Beruflich Dokumente
Kultur Dokumente
105.11.11
Problem 1. We can describe much of processor management in terms of process state transition diagram, such
as:
Waiting
4
3
2
Ready
Running
1) 4
2) 3 2Ready JobRunning Process
3)
(i)()
(ii) Preemptiom
(iii) Ready
Problem 2. Suppose that the following processes arrive for execution at the times indicated. Each process will
run the listed amount of time. In answering the questions, use nonpreemptive scheduling and base all
decisions on the information you have at the time the decision must be made.
a. What is the average turnaround time for these processes with the FCFS scheduling algorithm?
b. What is the average turnaround time for these processes with the SJF scheduling algorithm?
c. The SJF algorithm is supposed to improve performance, but notice that we chose to run process P1 at
time 0 because we did not know that two shorter processes would arrive soon. Compute what the average
turnaround time will be if the CPU is left idle for the first 1 unit and then SJF scheduling is used.
Remember that processes P1 and P2 are waiting during this idle time, so their waiting time may increase.
This algorithm could be known as future-knowledge scheduling.
E3
(b) selecting from the jobs in memory and allocates the CPU to one of them
(c) selecting a good mix of I/O bound and CPU bound jobs
(d) all of the above (e) a and b only (f) a and c only
6. ( A ) The issuing of a "READ" command by a user program will change the status of the process from
(a) run to wait (b) ready to run (c) ready to wait (d) wait to ready (e) wait to run
7. ( D ) At completion of an I/O command the status of the process that had issued the I/O command will change
from (a) run to wait (b) ready to run (c) ready to wait (d) wait to ready (e)
wait to run
8. ( B ) The scheduling of a process that has not yet RUN will change from
(a) run to wait (b) ready to run (c) ready to wait (d) wait to ready (e) wait to run
9. ( D ) The process control block is used to
10. ( A ) Knowing that a preemptive scheduling policy for the CPU indicates that
(a) the CPU can be taken away from one process and given to another process
(b) the CPU cannot be taken away from one process and given to another process
(c) the process in the running state can be moved to waiting state
(d) both a and c (e) both b and c (f) none of the above