Docsity

Operating Systems Lecture 7: Processes and Threads (Chapter 4) - Fork Example, Slides of Computer Science

Partial preview of the text

Download Operating Systems Lecture 7: Processes and Threads (Chapter 4) - Fork Example and more Slides Computer Science in PDF only on Docsity!

Operating Systems

Lecture 07:

Processes (cont) & Threads (Chapter 4)

1

Fork Example (from last class)

The following program will create one or more

processes. Show how processes are created

and what is printed to the screen when this

program executes.

2

Work session: pair up with your neighbour 4

Execution of the Operating System 5

Summary

 The most fundamental concept in a modern OS is the process  The principal function of the OS is to create, manage, and terminate processes  Process control block contains all of the information that is required for the OS to manage the process, including its current state, resources allocated to it, priority, and other relevant data  The most important states are Ready, Running and Blocked  The running process is the one that is currently being executed by the processor  A blocked process is waiting for the completion of some event  A running process is interrupted either by an interrupt or by executing a supervisor call to the OS 7