Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume that a system consists of 16 MB of physical address space (RAM). The oper

ID: 3583658 • Letter: A

Question

Assume that a system consists of 16 MB of physical address space (RAM). The operating system allows each process to use a logical address space of size 1MB. The frame size is 4KB bytes.

a) How many bits are used for the logical address generated by the CPU while executing the programs?

b) How many frames are there in this system?

c) How many bits of the logical address are used for identifying page number? How many bits are used as offset within a page?

d) How many entries are there in each page table? Assuming each entry requires 4 bytes, what is the size of page table for each process?

e) Given the page table below, what physical address will be generated by the paging unit for each of the logical address? The only free frames are 0x0134, 0x02F and 0x432

Page Table

Page Number

Frame Number

Valid/Invalid bit

0

0x0F0

v

1

0x002

v

2

0x103

v

3

-

i

4

-

i

5

-

i

6

-

i

7

-

i

Logical Address

Physical Address (in hex or binary)

0x00012

0x05541

0x02254

0x00190

0x11050

NOTE: one hex digit = 4 bits (one hex digit can have values from 0 to F)

Page Table

Page Number

Frame Number

Valid/Invalid bit

0

0x0F0

v

1

0x002

v

2

0x103

v

3

-

i

4

-

i

5

-

i

6

-

i

7

-

i

Explanation / Answer

Given:

Physical Address Space: 16MB = 24x220 = 224.

Logical Address Space: 1MB = 220.

Frame Size: 4KB = 22 x 210 = 212.

Answers:

a) Bits used for Logical Address = 20. This depends on Logical Addres space.

b) Number of Frames = Physical Address space/Frame size.

= 224/212 = 212 frames.

c) Total Bits used for Logical Address (from (a) ) is 20.

So number of bits used for identifying page number = 12 (because we have 212 frames).

Remaining bits are used as offset within the page = 20 - 12 = 8 bits.

d) Given each entry in Page table = 4B

Number of entries in Page Table = LogicalAddress Size/Frame size

= 220/212 = 28.

Size of Page Table = total number of page table entries * size of a page table entry

= 28 * 4 = 210

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote