
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Professor: Gupta; Class: System Programming; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Spring 2007;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Posted January 30, 2007 (NOT GRADED)
Problem 1: In a system with threads, is there normally one stack per thread or one stack per process? Explain.
Problem 2: What are the three main states that a process can be in? Describe the meaning of each one briefly as well as the relation among them.
Problem 3: What common events lead to the creation of a process?
Problem 4: What does it mean to preempt a process? Give an example when a running process must be preempted.
Problem 5: Justify why a process needs a blocked state. What kind of programs could processes run if we could have only running and ready states?
Problem 6: Write a C program where a process creates a child process and each of them prints each other’s PID, i.e, parent prints the child’s PID and child prints the parent’s PID.
Problem 7: Consider the following steps when a process is switched: (a) Scheduler receives an interrupt; (b) Scheduler preempts the running process; (c) Scheduler selects another process for execution, (d) Scheduler updates the process control block of the selected process. Is this sequence of steps complete? Explain.
Problem 8: List four reasons why a mode switch between threads may be cheaper than a mode switch between processes.
Problem 9: It was pointed out that two advantages of using multiple threads within a process are: (1) less work is involved in creating a new thread within an existing process than in creating a new process, and (2) communication among threads within the same process is simplified. Is it also the case that a mode switch between two threads within the same process involves less work than a mode switch between two threads in different processes?
Process10: What resources are typically shared by all of the threads of a process?