


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



This is a CLOSED books/notes test. You are NOT allowed to consult any material you have brought into the classroom. NO exchange of information is allowed among students. Write your name and ZN on each sheet detached.
a) Set value of timer yes / no b) Read the Clock yes / no c) Clear memory yes / no d) Issue a trap instruction yes / no e) Turn off interrupts yes / no f) Modify entries in device-status table yes / no g) Access I/O device yes / no
#include <stdio.h> #include <unistd.h>
int main() { /* fork a child process */ fork();
/* fork another child process */ fork();
/* and fork another */ fork();
/* and fork again */ fork();
return(0); }
Process Arrival Time Burst Time
P 1 0.0-^3 P 2 1.0-^6 P 3 2.0-^4 P 4 4.0-^1 P 5 7.0-^2
Compute the average turnaround time and average waiting time for each of the following scheduling algorithms. Show work. (20pts.)
a. FCFS b. Non-preemptive SJF c. Preemptive SJF d. RR (quantum = 2)
Note: The minus ( -^ ) sign to the right of an arrival time refers to a very small amount of time prior to the indicated time.