CS-418 Homework 2 - CS-418 Operating Systems Professor Van...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS-418 Operating Systems Professor: Van Horn Homework 2 Chapters 3 & 4 Pp. 147 - 149 o 5.1 Provide two examples of multithreading that improve performance over a single-threaded process. o 5.3 What are two differences between user-level threads and kernel level threads? Under what circumstances is one type better than the other? 5.6 What resources are used when a thread is created? How do they differ from those used when a process is created? 4. Consider the following set of processes, with the length of the CPU burst given in milliseconds. For those processes arriving at the same time, assume that P1 arrived before P2 and that P4 arrived before P5. Process P1 P2 P3 P4 P5 Burst Time 10 1 2 1 5 Priority 3 1 4 5 2 Arrival Time 0 0 3 5 5 a. Draw four Gantt Charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS Priority (smaller number is higher priority) RR (quantum = 1) SJF (preemptive) b. What is the turnaround time of each process for each algorithm? c. What is the waiting time of each process for each scheduling algorithm? d. Which algorithm has the minimum average waiting time (over all processes)? 5. Suppose that a scheduling algorithm favors those processes that have used the least processor time in the recent past. Why will this algorithm favor I/O-bound programs and yet not permanently starve CPU-bound programs? ...
View Full Document

This note was uploaded on 02/21/2012 for the course COMPUTER cs 418 taught by Professor Idk during the Spring '12 term at Capitol College.

Ask a homework question - tutors are online