0% found this document useful (0 votes)
12 views

Paging and Segmentation Problem Tasks

Uploaded by

soomrokazim909
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Paging and Segmentation Problem Tasks

Uploaded by

soomrokazim909
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Operating Systems

Concepts
MEMORY MANAGEMENT PROBLEMS
Paging Problem 1

Consider a simple paging system with following parameters: physical


memory of 4 GB, Page Size of 1 KB, logical address space of 64 KB. Find:
a) How many bits are in the logical address? Ans. 16 bits
b) How many bits in the physical address? Ans. 32 bits
c) No: of Pages? Ans. 2^6 Pages
d) No: of Frames? Ans. 2^22 Frames
e) How many bits in Frame number? Ans. 22 bits
f) How many bits in Page number? Ans. 6 bits
g) How many bits in offset? Ans. 10 bits
h) How many entries in Page table? Ans. 2^6 = 64
i) No: of bits in each page entry? Ans. 22 bits
j) Page table size? Ans. 1408 bits or 176 bytes
Paging Problem 2

Consider a logical address space and main memory of 2^15 bytes, page
size of 2^10 Bytes and the following page table for some process P0.
Translate logical address 1025 to physical address.

Process P0 Page table

Ans. 000000 0000000001(in binary) or 1 (in Decimal)


Segmentation Problem 1

Consider a simple segmentation system with the following segment table.

For each of the following logical addresses, determine the physical address or indicate
if a segment fault occurs.
a) 0, 198
b) 2, 156
c) 1, 530
d) 3, 444
e) 0, 222
Segmentation Problem 2

Consider logical address of 16 bits; 4 bits for segment number and 12 bits for offset;
physical address of 16 bits and the following segment table

Determine whether the following logical address will generate a segment fault or
not? If not, then translate it to its equivalent physical address.
a) 1,752

Ans. No it wont cause a segment fault; Physical Address =


0010001100010000

You might also like