0% found this document useful (0 votes)
3 views8 pages

Unit2 - Problem Statements

The document contains a series of exercises focused on calculating return, waiting, and response times for various scheduling algorithms in a single processor system. Each exercise presents different process arrival times, running times, and scheduling policies such as FCFS, SJF, SRT, RR, and MLFQ. The exercises require the representation of temporal evolution for the tasks under specified conditions.

Uploaded by

kosebaris279
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views8 pages

Unit2 - Problem Statements

The document contains a series of exercises focused on calculating return, waiting, and response times for various scheduling algorithms in a single processor system. Each exercise presents different process arrival times, running times, and scheduling policies such as FCFS, SJF, SRT, RR, and MLFQ. The exercises require the representation of temporal evolution for the tasks under specified conditions.

Uploaded by

kosebaris279
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Exercise 1

Consider a system with the processes shown in the table. You have to calculate the return, waiting and response
times of each of the different tasks as well as to represent their temporal evolution for the following scheduling
algorithms.
a) FCFS b) SJF c) SRT

Process Arrival time (ms) Running time (ms)


A 0 11
B 1 2
C 2 4
D 3 3
E 4 7
F 5 1
Exercise 2

Consider a system with the processes shown in figure 1. We have a single processor system with processor
scheduling policy RR, with q = 3 ut.

The implementation of the system follows the process scheme described in the figure. If the quantum of a running
process expires while the arrival of a new process, then the new process is added to the queue of processes waiting to
run before the process that ends (running process).

The process A enters in the system at time 0 ut., the process B at time 1 ut., the process C at 2 ut., the process D at 3
ut. and the process E at 4 ut.

B
Ejecución en procesador
Run in processor
C

E
t (ut)
0 5 12 15 20 36

You have to calculate the return, waiting and response times of each of the different tasks as well as to represent
their temporal evolution for the following scheduling algorithms.
Exercise 3

Consider a system with the processes shown in the figure. We have a single processor system with processor
scheduling policy RR, with q = 1 ut and management of the devices I/O FCFS.

The implementation of the system follows the process scheme described in the figure. If the quantum of a running
process expires while the arrival of a new process, then the new process is added to the queue of processes waiting to
run before the process which ends (running process).

The process A enters in the system at time 0 ut., the process B at time 2 ut., the process C at 4 ut., the process D at 6
u.t..

D
t (ut)
0 3 4 5 6 7 8 9 10 13
11

CPU

I/O

You have to calculate the return, waiting and response times of each of the different tasks as well as to represent
their temporal evolution for the following scheduling algorithms.
Exercise 4

Consider a system with the processes shown in the figure. We have a single processor system with processor
scheduling policy RR, with q = 2 ut and management of the devices I/O FCFS.

The implementation of the system follows the process scheme described in the figure. If the quantum of a running
process expires while the arrival of a new process, then the new process is added to the queue of processes waiting to
run before the process which ends (running process). A process which finishes I/O has priority (only for this
exercise) over a new one.

The process A enters in the system at time 0 ut., the process B at time 4 ut., the process C at 8 ut., the process D at 10
u.t..

D
t (ut)
0 3 4 5 6 7 8 9 10 12 17 18 26 27
11 13

CPU

I/O

You have to calculate the return, waiting and response times of each of the different tasks as well as to represent
their temporal evolution for the following scheduling algorithms.
Exercise 5

Consider a system with the processes shown in the figure. We have a single processor system with processor
scheduling policy MLQ, with two queues q = 2. Queue 1 has higher priority than the 2 and it is preemptive between
queues. Queue 1 management is RR 1, with q = 2 u.t., while management of queue 2 is FCFS. Furthermore, the
device management of I/O is FCFS.

The implementation of the system follows the process scheme described in the figure. If the quantum of a running
process expires while the arrival of a new process (wither new of from I/O), then the new process is added to the
queue of processes waiting to run before the process which ends (running process).
The process A enters in the system at time 0 ut., the process B at time 4 ut., the process C at 8 ut., the process D at 10
u.t..

D
t (ut)
1 2 3 4 5 6 7 8 9 10 12 14
11 13 15

Device 1

Device 2

Devices 1 and 2 simultaneously

The arrival time of the process as well as the queue to which they belong are indicated in the table. Assume the
device access is mutex.

Process Arrival Queue


A 0 1
B 4 2
C 8 1
D 10 2

You have to calculate the return, waiting and response times of each of the different tasks as well as to represent their
temporal evolution for the following scheduling algorithms.
Exercise 6

Consider a monoprocessor system with MLFQ planning policy. Setting queues is:

Queue 0: Algorithm FCFS.


Queue 1: Algorithm RR with quantum = 100 ut
Queue 2: Algorithm RR with quantum = 200 ut
Queue 3: Algorithm RR with quantum = 300 ut

The priority of the process is decreasing with the queue number. The arrival process to the system follows the
following scheme:
Arrival time Type Duration

0 ut. A, user 700 ut. every 300 ut. tt does E/S 100 ut.

100 ut. B, user 500 ut. every 500 ut. tt does E/S 100 ut.

200 ut. C, user 600 ut. every 200 ut. tt does E/S 100 ut.

300 ut. D, user 700 ut. every 600 ut. tt does E/S 100 ut.

40 ut. G, system 100 ut..


This process is automatically
invoked every 320 ut. after to
finish running.

System processes go directly to the queue 0 (highest priority queue). User processes go to queue 1. When the
processor they will drop the next lower priority queue.

You have to calculate the return, waiting and response times of each of the different tasks as well as to represent their
temporal evolution for the following scheduling algorithms.
Exercise 7

Consider a monoprocessor system with MLFQ planning policy. Setting queues is:

Queue 0: Algorithm FCFS.


Queue 1: Algorithm RR with quantum = 100 ut
Queue 2: Algorithm SRT
Queue 3: Algorithm RR with quantum = 200 ut

The priority of the process is decreasing with the queue number. The arrival process to the system follows the
following scheme:
Arrival time Type Duration

0 ut. A, user 700 ut. every 300 ut. tt does E/S 100 ut.

100 ut. B, user 500 ut. every 500 ut. tt does E/S 100 ut.

200 ut. C, user 600 ut. every 200 ut. tt does E/S 100 ut.

300 ut. D, user 700 ut. every 600 ut. tt does E/S 100 ut.

40 ut. G, system 100 ut..


This process is automatically
invoked every 320 ut. after to
finish running.

System processes go directly to the queue 0 (highest priority queue).

User processes are sent to a queue according to the following expression:

queue = (running_process_time DIV 300) + 1

You have to calculate the return, waiting and response times of each of the different tasks as well as to represent their
temporal evolution for the following scheduling algorithms.
Exercise 8

Consider a system with two processors: the first processor has RR scheduling policy with q = 10 ut and it runs any
type of process; the second processor has FCFS policy and it runs ONLY system processes.
It has a resource of I/O with FCFS management. The system runs user and system processes. The running of user
processes follows the scheme described in the figure.

CPU
A F
E/S

B F

C F

t
4 12 16 20 24 26 30 34

Running systems processes follows the process scheme shown in the table. Periodic running times of these processes
are measured relative to the system clock without considering of the moment ended.

PS1 CPU running, 4 u.t. duration Periodically, every 10 u.t

PS2 CPU running, 4 u.t. duration Periodically, every 20 u.t

PS3 I/O, 4 u.t. duration Periodically, every 14 u.t

The arrival time of user processes shown in the table:

A 0 u.t.

B 6 u.t.

C 10 u.t.

You have to calculate the return, waiting and response times of each of the different tasks as well as to represent their
temporal evolution for the following scheduling algorithms.

You might also like