next up previous contents Back to Operating Systems Home Page
Next: Process control: architectural design Up: Process control and system Previous: Privileged execution modes

Process creation and execution

From the above discussion it should be clear that the creation of a process involves on the OS side

Process creation is only the first management action performed by the OS on the process. Since the process will use the resources made available by the OS, further OS activity will typically be needed to manage those resources on behalf of the process. This involves the release of the CPU control from the process to the OS. This release is triggered by various conditions, that can usually be classified as follows:

It is at this point important to analyze the in detail the operations involved in the above CPU release/regain events. From the point of view of an OS managing several processes, in particular, it's important to differentiate between two different scenarios:

Note carefully that the first scenario can be treated similarly to a subroutine call within one process: in order to resume correctly the process after the OS actions it's necessary that only a context switch, i.e. the saving/resuming of the processor state data, be performed before and after the interruption. The second scenario implies a process switch, which is typically a much more time-consuming sequence of operations on the OS side, since it involves the update of process tables and queues, the loading of suspended processes if no ready one are available, etc. It's consequently important for efficiency reasons that the OS be able to identify what services can be provided by a simple context switch (e.g., a memory block allocation in main memory), and which ones it's better to delaygif, allowing CPU access to another process.

Two interesting consequences derive from the above observation. One, leading to the distinction between processes and threads will be treated later. The second is of interest here, since it leads to understand in greater detail how the OS services are performed from a process's point of view.


next up previous contents Back to Operating Systems Home Page
Next: Process control: architectural design Up: Process control and system Previous: Privileged execution modes

Franco Callari