Practice problems for Memory management chapter

jaspersugarlandΛογισμικό & κατασκευή λογ/κού

14 Δεκ 2013 (πριν από 3 χρόνια και 7 μήνες)

138 εμφανίσεις

Practice problems for Memory management chapter.


1.

On a system with 1 Mb of memory using the buddy system, draw a diagram
showing the allocation of memory after each of the following events:


a.

Process A, requests 50 K

b.

Process B, request 150 K

c.

Process C, requ
est 60 K

d.

Process D, request 60 K

e.

Process E , request 60 K

f.

Process D, exit

g.

Process C, exit

h.

Process E, exit

i.

Process A, exit

j.

Process F, request 125 K

k.

Process G, request 150 K

l.

Process F, exit

m.

Process G, exit

n.

Process B, exit

2.

On a system with 1 Mb of memory usin
g the buddy system, what is the first
request that will fail in the following string of requests due to lack of available
memory? Requests: 50K, 150K, 90K, 130K, 70K, 80K, 120K, 1`80K, 60K.

3.

In the last problem, at the time of failed request, how much memo
ry is wasted due
to internal fragmentation, and how much is wasted due to external fragmentation?

4.

On a system with
bytes

of memory and
fixed partitions
of size 65,536 bytes,
how many bits must the limit register have?

5.

On a system usi
ng fixed partitions of sizes

,
and
bytes, how many bits
must the limit register have?

6.

On a simple paging system with
bytes of physical memory
, 256 pages of
logical

address space, and a page size of

bytes, how many bits denote a
logical address?

7.

On a simple paging system with
bytes of physical memory, 256 pages of
logical memory, and a page size of
bytes, how many bits in the physical
address specify the page frame?

8.

On a simple paging system with
bytes of physical memory, 256 pages of
logical address space, and a page size of
bytes, how many entries are
in a page
table?

9.

A system that uses two
-
level page table has

byte pages and 32 bit virtual
addresses. The first 8 bits of the address serve as the index into the first level page
table. (a) How many bits specify the second
-
level
i
ndex? (b) How many entries
are in a level
-
one page table? (c) How many entries are in a level
-
two page table?
(d) How many pages are in the virtual address space?