Presentation is loading. Please wait.

Presentation is loading. Please wait.

Process Description and Control. Process A program in execution OS Reponsibilities: –Creation/Termination –Scheduling processes –Suspension/resumption.

Similar presentations


Presentation on theme: "Process Description and Control. Process A program in execution OS Reponsibilities: –Creation/Termination –Scheduling processes –Suspension/resumption."— Presentation transcript:

1 Process Description and Control

2 Process A program in execution OS Reponsibilities: –Creation/Termination –Scheduling processes –Suspension/resumption –Synchronization, Interprocess communication –Deadlock handling Needs –CPU time, memory, files, I/O devices, etc.

3 Parallel Execution of processes Resource sharing Speed up Modular design of programs

4 Process Description PCB--Process Control Block (a record containing following info): –Process state-new/ready/running/blocked/halted –Program Counter –CPU register values –Scheduling information –Memory management info –Accounting info –I/O status, other info

5 Process State Diagram new terminated blocked running ready Scheduler chooses Time exceeded Needs to to I/O I/O done

6 Process Creation In Unix, fork() system call fork() creates an almost identical copy of the process Child and parent if (fork()==0) {child_code} else {parent_code}

7 Process termination When executing last instruction or killed by someone else Clean up Release resources held by the process Accounting info to be updated

8 Process switch When to switch? –Clock interrupt –I/O interrupt –memory fault


Download ppt "Process Description and Control. Process A program in execution OS Reponsibilities: –Creation/Termination –Scheduling processes –Suspension/resumption."

Similar presentations


Ads by Google