You are on page 1of 3

Chapter 5 Problems

PORBLEM 1
Given a contiguous memory allocation system, suppose a process has the base and limit registers with
the corresponding values of (18680, 1260). Calculate the physical address of the following references:

12, -26, 678, 1272

reference Physical add >= base (18680) <= base + limit (19940) answer
12 18692 Yes Yes 18692
-26 18,654 No Yes Invalid
678 19,358 Yes Yes 19358
1272 19,952 yes No invalid

PORBLEM 2
Suppose the page size is 1KB in a paging system. A proces has the size of 157 KB, calculate (page, offset)
of the following logical address: 78, 1346, 8184, 126868, 183242

page size logical add page number


78 0
1346 1
1024 8184 7
126868 123
183242 178

PORBLEM 3
Given the page table of a process (16, 92, 3, 87). Suppose the page size is 1KB, calculate the physical
address of the following reference: 124, 8672, 3246, 4782,

page logical page logical


offset
size add number add
124 0 124 16508
1024 8672 8 480 invalid
3246 3 174 89262
4782 4 686 invalid
PORBLEM 4
Given a paging system with the page size of 2KB. The address register is 32 bit. Identify the number of
bits for (page, offset) in the address register.

2KB = 2048 = 211

Offset bits : 11

Page number bits : 32 – 11 = 21

PORBLEM 5
Given a paging system with the page size of 2KB. The address register is 54 bit. Identify the number of
bits for (page, offset) in the address register.

2KB = 2048 = 211

Offset bits : 11

Page number bits : 54 – 11 = 43

PORBLEM 6
Given the page table of a process in the form of (frame, valid) [(16, v), (92, i), (3, v), (87, v)]. Suppose the
page size is 1KB, calculate the physical address of the following reference: 124, 8672, 3246, 4782,

page logical page logical


offset
size add number add
124 0 124 16508
1024 8672 8 480 invalid
3246 3 174 89262
4782 4 686 invalid

PORBLEM 7
Given the segment table of a process in the form of (base, limit) [(16000, 1200), (18000, 4700), (28900,
200)]. Calculate the physical address of the following reference in the form of (segment, offset): (0, 868),
(0, 124), (1, 900), (2, 86)

reference segmen physical


<= limit
segment offset t add
0 868 0 yes 16868

2
0 124 0 yes 16124
1 900 1 yes 18900
2 86 2 yes 28986

PORBLEM 8
Given the segment table of a process in the form of (base, limit, valid) [(16000, 1200, v), (18000, 4700, i),
(28900, 2100, v)]. Calculate the physical address of the following reference in the form of (segment,
offset): (0, 868), (0, 124), (1, 900), (2, 86)

reference segmen physical


<= limit
segment offset t add
0 868 0 yes 16868
0 124 0 yes 16124
1 900 invalid   invalid
2 86 2 yes 28986

You might also like