1. Given the following information
Job List:
Job Number Memory Requested
J1 740K
J2 500K
J3 700K
Memory List:
Memory Block Size
Block 1 650K
Block 2 850K
Block 3 700K
a. Use the best-fit algorithm to allocate the memory blocks to the three arriving jobs.
b. Use the first-fit algorithm to allocate the memory block s to the three arriving jobs.
Answer for a.
Memory Block | Memory Block Size | Job Number | Job Size | Status | Internal Fragmentation |
Block 1 Block 2 Block 3 | 650K 850K 700K | Job 2 Job 1 Job 3 | 500K 740K 700K | Busy Busy Busy | 150K 110K 0 |
Total Available: | 2200K | Total Used: | 1940K | | 260K |
Answer for b.
Memory Block | Memory Block Size | Job Number | Job Size | Status | Internal Fragmentation |
Block 1 Block 2 Block 3 | 650K 850K 700K | Job 2 Job 1 Job 3 | 500K 740K 700K | Busy Busy Busy | 150K 110K 0 |
Total Available: | 2200K | Total Used: | 1940K | | |
2. Given the following information.
Job List:
Job Number Memory Requested
J1 700K
J2 500K
J3 740K
Memory List:
Memory Block Size
Block 1 610K
Block 2 850K
Block 3 700K
a. Use the best-fit algorithm to allocate the memory blocks to the three arriving jobs.
b. Use the first-fit algorithm to allocate the memory blocks to the three arriving jobs.
Answer for a
Memory Block | Memory Block Size | Job Number | Job Size | Status | Internal Fragmentation |
Block 1 Block 2 Block 3 | 610K 850K 700K | Job 2 Job 3 Job 1 | 500K 740K 700K | Busy Busy Busy | 110K 110K 0 |
Total Available: | 2160K | Total Used: | 1940K | | 220K |
Answer for b
Memory Block | Memory Block Size | Job Number | Job Size | Status | Internal Fragmentation |
Block 1 Block 2 Block 3 | 610K 850K 700K | Job 2 Job 1 | 500K 700K | Busy Busy Idle | 110K 150K 0 |
Total Available: | 2160K | Total Used: | 1200K | | 260K |
No comments:
Post a Comment