Q: Consider two processes P1 and P2 in a purely segmented system (i.e. no paging
ID: 3866279 • Letter: Q
Question
Q: Consider two processes P1 and P2 in a purely segmented system (i.e. no paging). Their current segment tables contain the following entries (segment lengths are not show)
ST1
0
1000
1
6000
2
9000
3
2000
4
7000
ST2
0
2000
1
6000
2
9000
a) Which segments are shared, if any?
b) Which of the following virtual addresses would be illegal when used by an instruction in the segment at location 6000: (0,0) (1,0) (2,0) (3,0) (4,0) (5,0)? Explain.
c) The segment at location 7000 is swapped out and later reloaded at location 8000. Similarly, the segment at location 2000 is swapped out and reloaded at 1000. Show the new segment tables.
d) A third process, P3, wishes to share the segments at locations 2000, 4000, and 6000. Which of these must be data segments (as opposed to procedures) to make this possible?
0
1000
1
6000
2
9000
3
2000
4
7000
Explanation / Answer
1.
Segment 1 of process 1 and Segment 1 of process 2,Segment 2 of process 1 and Segment 2 of process 2 and Segment 3 of process 1 and segment 0 of process 2 are shared.
2.
segment at location 6000 is 1 so we cannot access virtual address at segment 0,1,3 and 4. Also segment 5 does not exist. Hence all virtual addresses except (1,0) are illegal.
3.
ST1
ST2
4.
Segments at location 2000 and 6000 must be data segments as these can be shared with process p1 and p2.
3 1000 1 6000 2 9000 4 8000Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.