Consider a swapping system in which the memory map consists of the following whole sizes in memory order: 10K, 4K, 20K, 18K, 7K, 9K, 12K, and 15K. Draw the allocation sequence for the successive memory size requests of: (i) 12K, (ii) 10K, (iii) 9K using the following memory allocation requests:
(a) First Fit
(b) Best Fit
(c) Worst Fit
Hi,
I hope you’re doing well.
In the given question :
Available sizes in the memory are as under :
10K, 4K, 20K, 18K, 7K, 9K, 12K, and 15K
Memory allocation request are as under:
12K, 10K, 9K
So now we need to do all request as per the following fit approaches:
(a) First Fit
(b) Best Fit
(c) Worst Fit
First fit : for allocating the hole, first scans
the memory holes from starting(that is why first
fit) such that the available hole size should be greater
than or equal to the requested segment.
soultion : First fit
a)12k ---> 20k (first occurence is 20K which is greater than 12K)
b)10k ---> 10k (first occurence is 10K which is equal to 10K)
c) 9k ---> 18k (first occurence should be 10K but 10K, 20K are already filled in above parts(b) and (a) respectivley, that is why 18K is first fit which is greater than 9K )
Best fit: for allocating the hole, first scans the
memory holes from starting until to find minimum
hole size greater than or equal to requested segment.
Solution : Best fit
a) 12k ---> 12k (Since it is only the available hole with size equal to request segment size)
b) 10k ---> 10k (Since it is only the available hole with size equal to request segment size)
c) 9k ---> 9k (Since it is only the available hole with size equal to request segment size)
Worst fit: It is the just opposite to best fit. For allocating the hole, first scans the memory holes from starting until to find maximum hole size greater than or equal to requested segment.
Solution : Worst fit
a) 12k ---> 20k (Since it is only the available hole with size greatest than requested segment size)
b) 10k ---> 18k (Since 20K should be the greatest but its is filled in above part so only the available hole with size greatest than requested segment size is 18K)
c) 9k ---> 15k (Since 20K,18K should be the greatest but these are already filled in above parts (a) and (b) respectively, so only the available hole with size greatest than requested segment size is 15K)
Note : Do like and comment if you have any queries. I would be very happy to resolve all your queries.
Thank You !
Consider a swapping system in which the memory map consists of the following whole sizes in...
(15 points) Consider a swapping system in which memory consists of the following hole sizes in memory order: 16K, 14K, 4K, 20K, 18K, 7K, 9K, 12K, and 15K. Which hole is taken for successive segment requests of (a) 12K (b) 10K (c) 9K for first fit? Now repeat the question for best fit, worst fit, and next fit (15 points) Consider a swapping system in which memory consists of the following hole sizes in memory order: 16K, 14K, 4K, 20K,...
Assume a swapping system in which memory consists of the following hole sizes in memory and in order of 12K, 16K, 8K, 10K, 22K, 8K, 11K, 14K, and 13K.(5marks)Which memory hole is taken for successive segment requests of(a) 7K (b) 30K (c) 20K(d) 6k(e) 2kfor first fit, best fit, worst fit, and next fit. Assume a swapping system in which memory consists of the following hole sizes in memory and in order of 12K, 16K, 8K, 10K, 22K, 8K, 11K, 14K,...
QUESTION 4 (a) Given a heap of memory management scheme with the following free list: U H H H U H H 20KB н Tu 150KB 190KB U 240KB H 250KB H 340KB u 475KB OKB 70KB 120KB 295KB 440KB 500KB 560KB 690KB 800KB The following process request will be received in order: Process number Size in KB (Kilobytes) P1 90 P2 39 P3 27 P4 16 P5 36 Show how the memory requests above are allocated by using: i....