Content deleted Content added
→Processor modes: likely original research: The terminology seems inconsistent. The text appears to imply that it refers to x86 at least partially, but uses terms not commonly used in application to this architecture. The claim that OS changes protection mode on software interrupt is likely incorrect |
couldn't find sources to corroborate that these hypothetical process management models are commonly used; 0 matches in Google Scholar and Google Books |
||
Line 75:
== Two-state process management model ==
{{original research|date=November 2023}}
The [[operating system]]'s principal responsibility is in controlling the execution of [[process (computing)|processes]]. This includes determining the interleaving pattern for execution and allocation of resources to processes. One part of designing an OS is to describe the behaviour that we would like each process to exhibit. The simplest model is based on the fact that a process is either being executed by a processor or it is not. Thus, a process may be considered to be in one of two states, ''RUNNING'' or ''NOT RUNNING''. When the operating system creates a new process, that process is initially labeled as ''NOT RUNNING'', and is placed into a queue in the system in the ''NOT RUNNING'' state. The process (or some portion of it) then exists in [[main memory]], and it waits in the queue for an opportunity to be executed. After some period of time, the currently ''RUNNING'' process will be interrupted, and moved from the ''RUNNING'' state to the ''NOT RUNNING'' state, making the processor available for a different process. The dispatch portion of the OS will then select, from the queue of ''NOT RUNNING'' processes, one of the waiting processes to transfer to the processor. The chosen process is then relabeled from a ''NOT RUNNING'' state to a ''RUNNING'' state, and its execution is either begun if it is a new process, or is resumed if it is a process which was interrupted at an earlier time.
Line 83 ⟶ 84:
==Three-state process management model==
{{original research|date=November 2023}}
Although the two-state process management model is a perfectly valid design for an operating system, the absence of a ''BLOCKED'' state means that the [[central processing unit|processor]] lies idle when the active process changes from CPU cycles to [[I/O]] cycles. This design does not make efficient use of the processor. The three-state process management model is designed to overcome this problem, by introducing a new state called the ''BLOCKED'' state. This state describes any process which is waiting for an I/O event to take place. In this case, an I/O event can mean the use of some device or a signal from another process. The three states in this model are:
|