Title | Memory Management |
---|---|
Author | Fikri Nurqahhari Priambodo |
Course | Sistem Pengoperasian |
Institution | Universitas Gadjah Mada |
Pages | 5 |
File Size | 152.9 KB |
File Type | |
Total Downloads | 30 |
Total Views | 83 |
Nama : Fikri Nurqahhari Priambodo NIM : 16/398505/PA/17466 Ossim Memory Management Exercise A. Fixed-sized partitions, allocation policies 1. Fill in the table indicating which process is allocated in partitions according to allocation policy Start First Fit Best Fit Worst Fit partition address @4 P...
Nama : Fikri Nurqahhari Priambodo NIM : 16/398505/PA/17466
Ossim Memory Management Exercise
A. Fixed-sized partitions, allocation policies 1. Fill in the table indicating which process is allocated in partitions according to allocation policy
Start First Fit Best Fit Worst Fit partition address @4
P1
P2
P3
@ 14 @ 19 @ 23 @ 38 @ 48
P3 P2 -
P1 P3 -
P2 P1
2. How much memory is wasted (Internal Fragmentation) for each policy: first fit, best fit, worst fit First Fit
:
12
Best Fit
:
1
Worst Fit
:
23
3. What is the advantage of first fit compared to the other First Fit is simpler because it requires lowest search out of all the other method
B. Variable-sized partitions, address translation 1. Fill in the table indicating which process is allocated in partitions according to allocation policy:
Start First Fit Best Fit Worst Set partition address @4 P1 P1 P1 @14 @19
P2 P3
P2 P3
P2 P3
@23
P4
P4
P4
@38 @48
P6 P6
P6 P6
P6 P6
2. What is the formula used to know the physical address corresponding to the logical address of a process in contiguous memory management?
Physical address = Start Partition Address + Logical address
3. Indicate the corresponding physical address of processes in the table. If the address does not match the logical address space of the process indicate error
Process Logical address Physical address P1
@3
7
P1 P3 P5
@6 @0 @ 10
Error 17 Error
C. Pagination 1. Create the table of the pages of each process at simulation end:
Page
Process 1 Frame Valid Bit
Page
Process 2 Frame Valid Bit
0
2
v
0
5
v
1
3
v
1
6
v
2
4
v
Process 3
Process 4
Page
Frame
Valid Bit
Page
Frame
Valid Bit
0
7
v
0
13
v
1
8
v
1
14
v
2
9
v
2
15
v
3
10
v
4
11
v
5
12
v
Process 5
Process 6
Page
Frame
Valid Bit
Page
Frame
Valid Bit
0
16
v
0
20
v
1
17
v
1
21
v
2
18
v
3
19
v
2. What is the formula used to know the physical address corresponding to the logical address of a process in pagination memory management?
Physical address = Start Partition Address + Logical address
3. Swap out the following pages: P1 page 2, P3 pages 0 and 3 Indicate the corresponding physical address of processes in the table. If the address does not match the logical address space of the process indicate an error, and if the address is in a swapped page indicate page error
Process P1 P1 P3 P3
Location logic @3 @6 @0 @8
Location physical 7 Error Page Error 22
D. Segmentation 1. Create segments tables for each process at simulation end:
Process 1 Segment Size Address Valid Bit
Process 2 Segment Size Address Valid Bit
Code
2
4
v
Code
5
Data
10
6
v
Data
14
Stack
8
i
Stack
1
16
v i
21
v
Process 3 Segment Size Address Valid Bit Code
10
22
v
Data
20
32
v
Stack
10
52
v
2. What is the formula used to know the physical address corresponding to the logical address of a process in segmentation memory management?
Physical address = Start Partition Address + Logical address
3. Indicate the corresponding physical address of processes in the table. If address does not match the logical address space of the process indicate an error, and if the address is in a swapped segment indicate segmentation error
Process P1 P1 P2
@logical address Physical address @3 7 @ 13 Segmentation Error @7 Segmentation Error
P3 P3
@0 @ 41
22 Error...