Professional Documents
Culture Documents
CS604
Student ID: bc200407783
Question No: 01
Suppose a system has resource type C with 16 instances and 5 processes and the current
system state is shown in the following table.
Calculate the Need for each resource by using the need formula and draw the Need Matrix.
Solution:
Process: P0 P1 P2 P3 P4
C: 7 3 9 12 5
Question No: 02
Assume a logical address space of 64 pages of 2048 words, each mapped into a physical
memory of 32 frames. You are required to calculate the following parameters related to
paging.
No. of bits needed for p = ? bits
No. of bits needed for f = ? bits
No. of bits needed for d = ? bits
Logical address size = ? bits
Physical address size = ? bits
Solution:
No. of bits needed for p (page number):
Since we have 64 pages, we need enough bits to represent them using 6 bits (26 = 64)
Therefore, No. of bits needed for p = 6 bits.
Question No: 03
The performance measure in paging is the effective memory access time. With part of the
page table in the TLB and the rest in the main memory. In the context of paging, you are
required to calculate the Teffective by considering the following factors.
Tmem = 200 nsec
TTLB = 20 nsec
Calculate the Effective Memory Access Time (Teffective) by using the formula. Show each
step of the calculation.
Solution:
Miss ratio (MR)= 1- HR = 1 – 0.9 = 0.1
Substituting the value into formula
Teffective = HR (TTLB + Tmem) + MR (TTLB + 2Tmem) nanoseconds
= 0.9(20+200) + 0.1(20+2*200) nanoseconds
= .9(220) + 0.1(20+400) nanoseconds
= 0.9(220) + 0.1(420) nanoseconds
= 198+42 nanoseconds
= 240 nanoseconds