0% found this document useful (0 votes)
8 views2 pages

Spring 2023 - CS604 - 2 - MC100404261

The document outlines an assignment for an Operating System course, consisting of three questions related to resource allocation, paging parameters, and effective memory access time. It includes calculations for resource needs, logical and physical address sizes, and effective memory access time based on given parameters. The assignment is due on July 13, 2023, and is worth a total of 20 marks.

Uploaded by

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

Spring 2023 - CS604 - 2 - MC100404261

The document outlines an assignment for an Operating System course, consisting of three questions related to resource allocation, paging parameters, and effective memory access time. It includes calculations for resource needs, logical and physical address sizes, and effective memory access time based on given parameters. The assignment is due on July 13, 2023, and is worth a total of 20 marks.

Uploaded by

borntodestroy269
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Operating System (CS604) Total Marks = 20

Spring 2023
Assignment # 02 Deadline Date
13/07/2023

Question No. 01 05 Marks


Suppose a system has resource type C with 16 instances and 5 processes and the current
system state is shown in the following table.

Process Max Need Allocated Need Matrix (Max


Need – Allocated)
P0 11 4 7
P1 6 3 3
P2 13 4 9
P3 15 3 12
P4 7 2 5

Calculate the Need for each resource by using the need formula and draw the Need Matrix.

Question No. 2 10 Marks


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 Pages= 64
Words on each page = 2048
Physical memory = 32 frames

As Total pages 64. These are accommodated in 6 bits (2^6=64) so


No. of bits needed for p = 6 bits

As we have 32 Frames. These are accommodated in 5 bits (2^5=32) so


No. of bits needed for f = 5 bits

As each page has 2048 words. These are accommodated in 11 bits (2^11=2048) so
No. of bits needed for d = 11 bits

Logical address size = p+d =6+11= 17 bits

Physical address size = f+d =5+11 =16 bits

Question No. 03 05 Marks


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
Hit ratio = 90%

Calculate the Effective Memory Access Time (Teffective) by using the formula. Show each
step of the calculation.

Ans.

Effective Memory Access Time

Teffective = HR (TTBL + Tmem) + MR (TTLB + 2Tmem)

Here,

Hit Ratio HR= 90% = 90/100= 0.9

Miss Ratio MR=10%=10/100= 0.1

Teffective = 0.9(20+200)+ 0.1(20+2*200)= 198+ 42= 240 nsec

You might also like