Wednesday, January 5, 2011

OS Case Study 5

Name: Vena H. Ronquillo
Section: BSIT 3E
Case Study #: 5

Load the following jobs into memory using fixed partition following a certain memory allocation method (a. best-fit, b. first-fit, c. worst-fit).
Memory Block Size
Block 1 50K
Block 2 200K
Block 3 70K
Block 4 115K
Block 5 15K

a. Job1 (100k) f. Job6 (6k)
turnaround: 3 turnaround: 1
b. Job2 (10k) g. Job7 (25k)
turnaround: 1 turnaround: 1
c. Job3 (35k) h. Job8 (55k)
turnaround: 2 turnaround: 2
d. Job4 (15k) i. Job9 (88k)
turnaround: 1 turnaround: 3
e. Job5 (23k) j. Job10 (100k)
turnaround: 2 turnaround: 3
*turnaround – how long it will stay in the memory.


(a) there are 5 blocks available for processing with each of its sizes, (b) all blocks will be occupied by Jobs 1-5 starting processes using searching for best-fit memory allocation, while job 6-10 are waiting, Job 1 is allocated to the closest fitting free partition, as are Jobs 2, 3 and 4. Job 5 is allocated to the only available partition although it is not the best-fitting one. (c) Jobs 2 and 4 ends here, therefore the blocks 3 and 5 will be free at this state while job 6-10 are still waiting to be processed. (d) Job 7 enters block 3 and Job 6 enters block 5 which is both are best fit to the blocks. (e) Jobs 3, 5, 7 and 6 end here and blocks 1, 2, 3 and 5 will be free and ready to be occupied by the remaining process. (f) block 2 is occupied by Job 9, and block 3 is occupied by Job 8. Job 8 is best fit to the memory while Job 9 is allocated to the available block that fits its size. (g) Job 1 end here and block 4 is now free to be occupied by the next process. (h) Job 10 occupied block 4. (i) Job 8 ends here and block 3 is now free. (j) Job 9 ends here and lefts block 2 free, remaining Job 10 on block 4, and so on until turnaround process ends, 5 blocks will back to free state.


(a) there are 5 blocks available for processing with each of its sizes, (b) first fit process is first partition fitting the requirements, meaning, it enters the first block that it passes which its size fits. Job 1 checks the first block but could not fit its size so it moves to block to which has bigger size than block 1, followed by Job 2 in block 1, Job 3 in block 3 and Job 4 in block 4, while Job 5 does not fit to block 5, so Jobs 5-10 are waiting to be processed. (c) Jobs 2 and 4 ends here leaving free space to blocks 1 and 4. (d) Job 5 enters the block 1 and Job 6 enters block 4. (e) Job 3 and Job 6 ends here leaving blocks 3 and 4 free for another processing. (f) Job 7 enters block 3 and Job 8 enters block 4 because blocks 1 and 2 are still occupied by Jobs 5 and 1. (g) Job 5, 1 and 7 ends here leaving blocks 1, 2 and 3 for another processing, only Job 5 remains in the memory. (h) Job 9 enters block 2, Job 10 cannot enter either of the available blocks because it couldn’t fit to any of them, the only blocks could fit him is blocks 2 and 4 which is currently occupied by Job 9 and 8. (i) Job 8 ends here leaving block 4 free for another processing. (j) here comes the Job 10 in block 4 and so on after 3 turnarounds of Jobs 9 and 10, the blocks will go back to its free memory space.




(a)there are 5 blocks available for processing with each of its sizes, (b) worst fit process is jobs will search for the biggest memory block that will fit him in. Job 1 finds the block 2 which is the biggest block of all so he occupied it himself, followed by the job 2 occupied in block 4 which is the 2nd biggest block in the memory so he occupied it, and also the Jobs 3 and 4 found the following bigger blocks. (c) Jobs 4 and 2 ends here, leaving blocks 1 and 4 free. (d) Job 5 occupied block 4 and Job 6 occupied block 1. (e) Jobs 6 and 3 ends here leaving blocks 1 and 3 free for another processing. (f) Job 7 occupied the block 3, (g) Jobs 1, 7 and 5 ends here leaving all blocks free for another process. (h) Job 8 occupied the biggest block which is the block 2 and Job 9 occupied block 4, the 2nd biggest block, block 10 has no place to fit. (i) Job 8 ends here leaving the biggest block free for another process. (j) here comes Job 10 which finally occupied the block 2, and so on until jobs 9 and 10 are processed, then the 5 blocks will be free again.

No comments:

Post a Comment