Thursday, March 3, 2011

CASE STUDY #6

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


Using the process state diagram, explain why there is no transition:
• From the READY to WAITING.
• From the WAITING to RUNNING.

From the READY to WAITING
Ready when the processor becomes free so it is happen that in this case ready state is occupying the part of processing unit when a running process is interrupted by the processor after completing its allotted time, its state is saved in its process control block, its process state changed to ready and its priority adjusted. A ready state process is runable but temporarily stopped running to let another process run. But never the Ready state will go directly to waiting state. There may be many "ready" processes at any one point of the systems execution - for example, in a one processor system, only one process can be executing at any one time, and all other "concurrently executing" processes will be waiting for execution. Ready to Waiting will happen when the process is already on the running state that needs to be fixed to trouble shoot the any problem of that running process.


From the WAITING to RUNNING
A process is said to be blocked if it is waiting for some event to happen such that as an I/O completion before it can proceed; a process is unable to run until some external event happens; a process that is blocked on some event (such as I/O operation completion or a signal). When a process blocks, it does so because logically it cannot continue, typically because it is waiting for input that is not yet available. Formally, a process is said to be blocked if it is waiting for some event to happen (such as an I/O completion) before it can proceed. In this state a process is unable to run until some external event happens. When the Ready state is not occupied the waiting state process will be on the ready state while waiting for the Running process to be executed and will be manipulated and be processed. But never the waiting will move directly to the running state.

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.

OS Case Study 4

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

Load the following jobs into memory using dynamic partition and relocatable dynamic partition: (The memory size is 220k with allocated OS for 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






(a) Memory capacity is 220k, 15k is allocated for OS and there is 205k free space for processing, (b) the 205k space is occupied by the Jobs 1-6 with a total of 204k, free space remaining is 16k which is the grey colours in the table above, (c) jobs 2, 4 and 6 ends here and there are free blocks and space for another processing, (d) using reallocation in dynamic partition for compaction of memory space, Jobs 1, 3 and 5 were compact then there is 47k remaining space, (e) enters the 25k Job 7, remaining space is 22k (not suited for Job 8), (f) Jobs 3, 5 and 7 ends here, remaining the Job 1 in its block and has free space of 105k, (g) Job 8 enters with 55k, and 50k is the remaining space, (h) Job 1 ends here remaining the Job 8, with 150 free space, (i) here comes the Job 9 with 88k occupying the 100k block, (j) compaction cannot be done here because Job 8 already ends here remaining the job 9, and 117k free space for another processing, (k) Job 10 enters with 100k, 17k free space remaining, (l) Job 9 ends remaining the Job 10, (m) after the 3rd turnaround of the Job 10, it will end its process and there’s no more jobs to be process so the 205k free space remains and also the constant 15k OS.