Ask Question
4 August, 09:20

Consider a swapping system in which memory consists of the following hole sizes in memory order: 10 MB, 4 MB, 20 MB, 18 MB, 7 MB, 9 MB, 12 MB, and 15 MB. Which hole is taken for successive segment requests of (a) 12 MB (b) 10 MB (c) 9 MB for first fit

+5
Answers (1)
  1. 4 August, 09:26
    0
    a) 20 MB

    b) 10 MB

    c) 18 MB

    Explanation:

    First fit method works by keeping list of jobs which are ordered by memory location. This list of jobs contains free/busy status. Free means that hole is available and it takes the memory requests and busy is for the memory space is occupied.

    In first fit method the first process takes the first available hole or memory with space greater than or equal to the size of the job. OS assigns process to nearest memory partition available with sufficient size.

    For the request for 12 MB the hole with size 20 MB is taken as its nearest memory location of sufficient size than 10 and 4 MB. Now the status of this is busy as its taken by a job.

    Next for the request of 10 MB the sufficient nearest memory hole is 10 MB as its equal to the size of the job. The status is changed to busy.

    Next for the request of 9 MB the sufficient nearest hole is 18 MB as the 10 and 20 MB are already taken and 4 MB is not sufficient so the first sufficient available hole is of 18 MB.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Consider a swapping system in which memory consists of the following hole sizes in memory order: 10 MB, 4 MB, 20 MB, 18 MB, 7 MB, 9 MB, 12 ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers