Operating System
U2M3 Lecture 2 Components / Functions of OS Process Management process states
Objectives
List the components / functions of an OS Describe Process management Describe process states Describe process control block
Components of an OS
Processor management. Memory management. File management File Security User interface Device management Network management
Process Management
Ensure that each process and application receives enough of the processor's time to function properly. Deals with
Process States Process Descriptor Interrupts Deadlocks Scheduling
Process States
Click to see an animation
Process States
Ready - A "ready" or "waiting" process has been loaded into main memory and is awaiting execution on a CPU. There may be many "ready" processes at any one point of the systems execution - for example, in a one processor system, only one process can be executing at any one time, and all other "concurrently executing" processes will be waiting for execution.
Running - A process moves into the running state when it is chosen for execution. The process's instructions are executed by one of the CPUs (or cores) of the system. There is at most one running process per CPU or core. Blocked - A process that is blocked on some event (such as I/O operation completion or a signal). Eg: If a process (program) is instructed to open a selected file, the process is placed into the blocked state until the file is selected.
Process Control Block (PCB)
A process in an operating system is represented by a data structure known as a process control block (PCB) or process descriptor. The PCB contains important information about the specific process including
Process Control Block (PCB)
Process Control Block (PCB)
Process Id An unique identification of the process in order to track "which process is which Process state -The current state of the process i.e., whether it is ready, running, blocked Process priority- how urgently is the process required to be completed (a part of CPU scheduling information
Process Control Block
A register save area Saves all the CPU registers for context switching. Pointers to the Process Memory - pointers to the locations where the process image resides in the memory. Pointers to Other Resources- gives pointers to other data structures maintained for the process.
Process Control Block
List of Open files is used by the Operating System to close all open files not closed by a process explicitly on termination. Pointers to Other PCBs- This gives the address of the next PCB in the same category (e.g. process state)