You are on page 1of 10

Qeustion 2

Use the following as input :

Memory reference of each task :


#5 52 93 113 28 9
#4 29 93 113 28 9
#3 19 93 104 125 9
#2 93 19 104 89 31
#1 19 76 113 125 9
Task A B C D E

1. Does the task scheduling technique affect the hit rate of overall system? Explain.

Task scheduling technique does affect slightly on the overall system hit rate. The task scheduling is
been use to to provide good time-sharing performance and preempt a running process to let
another one run. When an I/O request for a process is complete, the process moves from the
waiting state to the ready state and gets placed on the run queue. However, a task scheduling is a
preemptive scheduler if it has the ability to get invoked by an interrupt and move a process out of a
running state to let another process run. There are 3 types of task scheduling technique which is
FIFO, Round-Robin and Priority-based. Each of them have their own drawback in the system. But the
big idea was realizing that you could preempt a process and let another process run and do this
quickly enough to give the illusion that many processes are running at the same time.

2. Find the hit rate in each of the following caches after 12 Simulation
Cache hit Rate % FIFO Round-Robin Priority-Based
(16,4) 44% 32% 44%
(16,8) 44% 32% 44%
(32,2) 44% 44% 44%

3. When does the round robin technique behave like the FIFO technique?

At cache size 32, set 2 in term of hit-rate

4. When can the priority-based technique behave like the round robin technique?

At cache size 32, set 2 in term of hit-rate


Simulation (Cache size, Sets)
Priority-Based (3-1-0-2-4)
(16,4)
(16,8)
(32,2)
Robin round
(16,4)
(16,8)
(32,2)
FIFO
(16,4)
(16,8)
(32,2)

You might also like