In: Computer Science
Job List: |
Memory Block List: |
|||
Job Number |
Memory Requested |
Memory Block |
Memory Block Size |
|
Job A |
60K |
Block 1 |
10K |
|
Job B |
10K |
Block 2 |
60K |
|
Job C |
250K |
Block 3 |
100K |
Job List: |
Memory Block List: |
|||
Job Number |
Memory Requested |
Memory Block |
Memory Block Size |
|
Job A |
60K |
Block 1 |
300K |
|
Job B |
10K |
Block 2 |
60K |
|
Job C |
250K |
Block 3 |
100K |
Use the first-fit algorithm to indicate which memory blocks are allocated to each of the arriving jobs.
Use the best-fit algorithm to indicate which memory blocks are allocated to each of the arriving jobs.
What are the differences you find in the first table and the second table for first fit and best fit algorithms. Explain your answer.
7. Given the following Segment Map Tables for two jobs below: [8 pts]
SMT for Job 1 Segment Number |
Memory Location |
0 |
4096 |
1 |
6144 |
2 |
9216 |
3 |
2048 |
4 |
7168 |
SMT for Job 2 Segment Number |
Memory Location |
0 |
2048 |
1 |
6144 |
2 |
9216 |
a. Which segments, if any, are shared between the two jobs?
b. If the segment now located at 7168 is swapped out and later reloaded at 8192, and the segment now at 2048 is swapped out and reloaded at 1024, what would the new segment tables look like? [Draw the new tables]
https://www.techrepublic.com/article/how-to-use-windows-10s-resource-monitor-to-track-memory-usage/
7 )
a ) The segments shared between two jobs :
Therefore, the segments shared by SMT for job1 and SMT by job2 are at the memory locations.
2048,6144 and 9216.
b) Swapping out the segments and reloading it in other locations and then
displaying new SMT for job1 and job2:
The following data consists of the segments which are swapped out and later reloaded in different memory
locations.
The segment located at 7168 is swapped out of the memory and then the segment is reloaded in memory
location 8192.
The segment located at 2048 is swapped out of the memory and then the segment is reloaded in memory location 1024.
The following table consists of the new Segment Map Table for job1 and job2:
segment map table for job1:
Segment Number | Memory Location |
0 | 4096 |
1 | 6144 |
2 | 9216 |
3 | 1024 |
4 | 8192 |
segment map table for job2:
Segment Number | Memory Location |
0 | 1024 |
1 | 6144 |
2 | 9216 |
=======================================================================================
ANSWERED AS PER MY KNOWLEDGE
IF ANY DOUBTS COMMENT IT