The UNIX system has been in wide use for over 20 years, and has helped to define many areas of computing.
Post
It is also possible to write programs that deliberately synchronize with the system clock to outwit the scheduler.
lol
kind of incredibly strange that stat counting would be implemented by a clock interrupt which stops everything instead of filling up a log buffer of event counts???
An important event is the scheduling that periodically raises or lowers the CPU priority for each process in the system based on that process's recent CPU usage (see Section 4.4).
i don't consider this to be a "scheduler". this is a pencil pusher. a scheduler makes decisions and should incorporate page cache movement along with task scheduling
On a heavily loaded system with many processes, the scheduler may take a long time to complete its job.
a "scheduler" that's linear in the number of processes. genius work
now they have this event queue
The data structure that describes waiting events is called the callout queue.
these are supposedly scheduled with softclock()
honestly i don't get any of this
Other possible approaches include maintaining a heap with the next-occurring event at the top [Barkley & Lee, 1988], or maintaining separate queues of short-, medium- and long-term events [Varghese & Lauck, 1987].
basically my thing is this but the events are tasks and their i/o dependencies
this is completely illogical
The stack is also created from zero-filled memory. Although the stack should not need to be zero filled, early UNIX systems made it so. In an attempt to save some startup time, the developers modified the kernel to not zero fill the stack, leaving the random previous contents of the page instead. Numerous programs stopped working because they depended on the local variables in their main procedure being initialized to zero. Consequently, the zero filling of the
stack was restored.
every damn time anything could be good by asking the user what they want someone decides no
Copying into memory the entire text and initialized data portion of a large program causes a long startup latency.
wouldn't be a problem if you provided a dependency graph structure and the kernel could schedule this before execution
ok so i now understand demand paging is specifically about virtual memory
The system does demand paging by dividing up the address space into equal-sized areas called pages. For each page, the kernel records the offset into the executable file of the corresponding data. The first access to an address on each page causes a page-fault trap in the kernel.
this sounds so complex. what if we didn't do it because we scheduled each task. what then
malloc( ) a more programmer-friendly interface to sbrk.
god damn it now i remember how i made my own allocator in shared memory https://codeberg.org/cosmicexplorer/upc and i still think allocators should be able to work with a given region to allocate from and not do that for you
In addition to the information maintained in the user area, a process usually requires the use of some global system resources.
i'm listening
Among other data, the process entries record information on scheduling and on virtual-memory allocation.
ok so this is where i can store the dep graph and i/o buffers
Other global resources associated with a process include space to record information about descriptors and page tables that record information about physical-memory utilization.
so you think i'm right
oh hell yeah
One important responsibility of an operating system is to implement access-control mechanisms.
that's right. i'm the RAM bouncer
Most of these access-control mechanisms are based on the notions of individual users and of groups of users.
this part is fine on its own, but why the hell is everything global
UIDs are the basis for accounting, for restricting access to privileged kernel operations, (such as the request used to reboot a running system), for deciding to what processes a signal may be sent, and as a basis for filesystem access and disk-space allocation.
literally no problems at all with any of this except that it's global