Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
14 Cards in this Set
- Front
- Back
As a process executes, it changes state. We can define the following Process States:
|
Ready: Process would do something if the CPU was available.
Running: Process is being executed by the CPU. Blocked: Process cannot continue until some event occurs. |
|
If we assume a single CPU,
|
only one process can be running at a time.
|
|
A process initially goes to the back on the ready list.
Then Dispatcher does what :? |
Dispatcher takes process at head of ready list and transforms its state to Running.
|
|
Each process is allocated the CPU for a specific interval what is it called
|
Quantam
|
|
A hardware interrupting clock generates an interrupt, returns control to the OS, returns this process’s state to ????, and makes the first process on the ready list ???
|
A hardware interrupting clock generates an interrupt, returns control to the OS, returns this process’s state to Ready, and makes the first process on the ready list Running
|
|
Processes can be suspended, and later resumed. Suspension involves
|
Processes can be suspended, and later resumed. Suspension involves removing the process from main memory and storing it on secondary storage.
|
|
The usual reasons are:
Tell me three? |
the process may not be immediately available for execution
to release some main memory to a process that is ready to execute a process may be suspected of causing a problem if a process is active only periodically user action, eg. for debugging purposes. to reduce system load at peak times, |
|
A process in the blocked state is not doing anything, so why not wait until it becomes unblocked and transfer its state to Ready, and then to ??????? Ready?
|
A process in the blocked state is not doing anything, so why not wait until it becomes unblocked and transfer its state to Ready, and then to Suspended Ready?
|
|
The PCB is a data structure containing all the information about a process needed by the OS including:
Name 3 of them |
Current state
Process ID Pointer to parent Pointers to children Program counter Priority Pointers to process’s memory Pointers to allocated resources Register save area List of open files |
|
Hardware registers and instructions ensure fast availability
|
PCB INFORMATION
|
|
The OS must have the capability of performing the following operations on processes.
Name as many as you can |
Create (naming; inserting into process table; find priority; create PCB; allocate resources)
Destroy Suspend Resume Change priority Block Wakeup Dispatch Enable intercommunication Enable spawning (parent/child relationship) |
|
A process switch may occur any time that the OS has gained control from the
|
currently running process.
|
|
There are three events that may cause the OS to gain control
|
Interrupt. With an ordinary interrupt, control is passed to an interrupt handler, which does some basic housekeeping and then branches to an OS routine that is concerned with the particular type of interrupt that has occured, eg. clock, I/O event, memory fault
Trap. This relates to an error or exception condition generated within the current process, eg. illegal file access. The OS first determines if the condition is fatal, in which case it is terminated. Otherwise the action depends on the nature of the error (eg. it may simply inform the user) Supervisor Call. The OS may be activated by a Supervisor Call from the process, eg. an instruction is executed that requests an I/O operation. This results in a transfer to a routine that is part of the OS code. |
|
The steps involved in a full process switch are as follows:
|
Save the context of the processor (eg program counter and other registers)
Update the PCB of the process currently running move the PCB of this process to the appropriate queue (eg. blocked, suspended) Select another process for execution Update the PCB of the selected process Update memory management data structures Restore the context of the processor to that which existed at the time the selected process was last switched out of the running state. |