You are on page 1of 4

Name: Ana Lisa M.

Mesina MIT 603-Operating System

Problem Set:

1. Using the Job pool below:


A B C D E F G H

11k 5k 2k 13k 8k 7k 3k 9k

Use the partitions:

10K 3K 6k 4K 12K 15K

In what region will each of the jobs be allocated using?

10 K 3K 6K 4K 12K 15K

First Fit H9 C2 B5 G3 A11 D13

Next Fit E8 G3 B5 C2 F7 H9 AD

Best Fit H9 G3 B5 A11 D13 CEF

Worst Fit E8 C2 B5 G3 F7 A11 DH

In What
Internal External %Memory
Partition will C
Fragmentation Fragmentation Utilized
be allocated?

First Fit 3K 1+1+1+1+1+2=7 0 50-7 X100 = 86


50

Next Fit 4K 2+0+1+1+5+6=10 0 50-10X100= 80


50

Best Fit NONE 1+0+1+1+2=5 4 50-9X100 = 82


50

Worst Fit 3K 2+1+1+1+5+4=14 0 50-14X100= 72


50

2. Given the job stream:

1 MEMORY MANAGEMENT
Name: Ana Lisa M. Mesina MIT 603-Operating System

Arrival Memory Burst


Job
Time Size Time
12K
A 0 9 6

B 3 5 8 6K

C 4 8 4 6K

D 7 7 5 6K

Assume:

CPU Scheduling Algorithm – Shortest Job First

Memory Allocation Strategy – First Fit

Memory Management Strategy – Multiple Fixed Partitions

Compute IF, EF and %MU

Memory Partition Internal External %Memory


Time
12K 6K 6K 6K Fragmentation Fragmentation Utilization
30-3X100 = 90
0 A9 3 0 30
30-4X100 =86.66
3 A9 B5 3+1=4 0 30
30-16X100=46.66
4 A9 B5 3+1=4 12 30
30-16X100=46.66
7 A9 B5 3+1=4 12 30
B5 30-17X100=43.33
8 C8 4+1=5 12 30
30-18X100=40
11 D7 B5 5+1 12 30
30-25X100=16.66
16 B5 1 24 30

3. Given the job stream:

2 MEMORY MANAGEMENT
Name: Ana Lisa M. Mesina MIT 603-Operating System

Assume:
Arrival Memory Burst
Job
Time Size Time
CPU Scheduling Algorithm :
RR with q = 2
A 0 9 6
Memory Allocation Strategy :
First Fit
B 3 5 8
Memory Management Strategy :
Variable Partition
C 4 8 4
User Memory starts from:
25 to 45.

D 7 7 5 Compute IF, EF and %MU

Memory Partition External %Memory


Time
45 – 25 = 20 K Fragmentation Utilization

0 A9 11 K 0 100

3 A9 B5 6K 0 100

20-6 X100 =70


4 A9 B5 6 20

20-6 X100 =70


7 A9 B5 6 20

8 C8 B5 7K 0 100

10 C8 B5 D7 0 100

12 A9 B5 6K 0 100

14 C8 B5 D7 0 100

4. On a system with 1024KB memory using the buddy system, draw a diagram showing the
allocation of memory after each of the following events. Specify if fragmentation occurs.

3 MEMORY MANAGEMENT
Name: Ana Lisa M. Mesina MIT 603-Operating System

1024 KB IF EF

Process A,
1. request 40K A = 256 KB 256 KB 512 K 0 0

Process B,
2. request A = 256 KB 256 KB B = 256 KB 256 KB 0 0
140K
Process C, C=
3. request 50K A = 256 KB 128 KB 128 KB B = 256 KB 256 KB 0
0
C=
Process D,
A = 256 KB 128 KB D= 64 B =256 KB 256 KB
4. request 50K 0 0
64 KB
KB
Process E, C= D= E=
5. request 50K A = 256 KB 128KB 64 64 B = 256 KB 128 KB 128 KB 0 0
KB KB
Process D, A = 256 KB C=128 128 KB B = 256 KB E=
6. 0 0
exit KB 128 KB 128KB
Process C,
A = 256 KB 256 KB B = 256 KB E=
7. exit 0 0
128 KB 128 KB
Process E,
A = 256 KB 256 KB B = 256 KB 256 KB
8. exit 0 0

Process A,
9. exit 512 KB B = 256 KB 256 KB 0 0

Process
10. F,request F= 128 128KB 256 KB B = 256 KB 256 KB 0 0
115K KB
Process G,
F=128 G = 256 KB B = 256 KB 256 KB
11. request 0 0
KB 128 KB
140K
Process F,
12. exit 256 = KB G = 256 KB B = 256 KB 256 KB 0 0

Process G,
13. exit 512 KB B = 256 KB 256 KB 0 0

Process B,
14. exit 512 KB 512 KB 0 0

4 MEMORY MANAGEMENT

You might also like