2081 5

Operating Systems20815 marksNumerical: Memory allocation strategiesVideo solutionMemory Allocation Strategies

Consider a swapping system in which memory consists of the following hole sizes in memory order: 15 MB, 2 MB, 10 MB, 6 MB, 8 MB and 20 MB. Which hole is taken for successive segment requests of: (a) 10 MB (b) 10 MB For first fit, next fit and best fit.

Consider a swapping system in which memory consists of the following hole sizes in memory order: 15 MB, 2 MB, 10 MB, 6 MB, 8 MB and 20 MB. Which hole is taken for successive segment requests of: (a) 10 MB (b) 10 MB For first fit, next fit and best fit. [5]

Video solutionMemory Allocation: First Fit, Next Fit, Best Fit2:29
Speed

Checked against the model answer before publishing.

Holes in memory order: Hole Size -------------- 1 15 MB 2 2 MB 3 10 MB 4 6 MB 5 8 MB 6 20 MB Successive requests: (a) 10 MB, (b) 10 MB. Allocates the first hole large enough, scanning from the start each time. (a) 10 MB: Hole 1 (15 MB) $\ge 10$ → allocate. Hole 1 leftover $= 15 - 10 = 5$ MB. (b) ...

Up nextExplain how semaphore solves the problem of critical section.