lecture07-chapter04

lecture07-chapter04 - Summary The most fundamental concept...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Operating Systems Operating Systems Lecture 07: Lecture 07: Processes (cont) & Threads Processes (cont) & Threads (Chapter 4) (Chapter 4) Anda Iamnitchi anda@cse.usf.edu 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
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
Background image of page 2
#include <stdio.h> main(){ int a, x, y, n; a=-5; n=1; x=-15; y=-20; a=fork(); if(a==0) y=fork(); while (n<3){ if(y==0) x=fork(); n++;} printf(“x=%d y=%d a=%d\n”, x, y, a);} 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Work session: Work session: pair up with your neighbour pair up with your neighbour 4
Background image of page 4
Execution Execution of the of the Operating Operating System System 5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Execution Within User Processes 6
Background image of page 6
Summary
Background image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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...
View Full Document

Page1 / 7

lecture07-chapter04 - Summary The most fundamental concept...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online