Operating System Reference Manual Introduction process should use the CPU at any one tlme. it uses a generally non- preemptive scheduling algorithm. This means that a process wlll not lose the CPU unless lt blocks. The blocked state ls explained later ln this section. A process can lose the CPU when one of the following happens: • The process calls an qperaUng system procedure or function. • The process references one of its code segments that is not currently in memory. If neither of these occur, the process will not lose the CPU. Every process is started by another process.
The newly started process is called the son process The process that started it ls called its fatherprocess The resulting structure is a tree of processes. See Figure 3-2 for an illustration of a process trea When any process terminates, all its son processes and their descendants are also terminated. When the OS ls booted, lt starts a shellprocess The shell process starts any other processes desired by the user. Every newly created process has the same system-standard attributes and capabilities. These can be changed by using system calls. Any processes can suspend, activate, or kill any other process for which the global ID is known, as long as the other process does not protect itself.
The memory accesses of an executing process are restricted to its own memory address space. Processes can communicate with other processes by using shared files, pipes, event channels, or shared data segments. A process can be in one of three states: ready, running, or blocked. A ready process ls waiting for the Scheduler to select it to run. A runnlngprocess\% currently using the CPU to execute its code. A blocked process is waiting for some event, such as the completion of an l/O operation. It wlll not be scheduled until the event occurs, at which point it becomes ready. A terminated process has finished executing. Each process has a priority from 1 to 255.
The higher the number, the higher the priority of the process. Priorities 226 to 255 are reserved for system processes. The Scheduler always runs the ready process with the highest priority. A process can change its own priority, or the priority of any other process, while it is executing. 1 3 Memory Management Memory managment is concerned with what is in physical memory at any one time. Each process can use up to 128 memory segments. Each segment can contain up to 128 Kbytes. Memory segments are of two types: code segments and data segments.
The total amount of memory used by any one process can exceed the available RAM of the Lisa The Operating System will swap code segments in and out of memory as they are needed. To aid the Operating 1-4