Sunday, May 22, 2011

CS323: Case Study 4




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




On the diagram above, we can see that there is no transition from the ready to waiting same with waiting to running. In the ready state to waiting state, there is no transition between them because you can only send the job in the waiting state if it came from the running state. Also, it will proceed to the waiting state if there are some interrupts and if it needs input/output request. In the waiting state to running state, there is also no transition because the process scheduler selects processes from the ready state for the CPU. Also, all jobs in the waiting list was arranged and prepared to proceed in the ready state.  In addition, only the ready jobs or only the jobs in the ready state will proceed to the running state to be run and to bypass the ready state would make process management impossible. To further understand the process let us assign job (a) to be processed. First job (a) will go to the hold state then it will proceed to ready state. If the job will fail because of some device failure it will go back to the hold state, if not, it will proceed to ready state which is controlled by the job scheduler. From the ready state, job (a) will go on to the running state. If there are no interrupts and there are no input/output request faults it will automatically proceed to the finished state. But, if it will encounter interrupts it will go back to the ready state and if it fails to have the input/output request it will proceed to the waiting state.  The remaining processes will either be ready or blocked, and for each of these states there will be a queue of processes waiting for some event. The lines connecting the process state diagram represent possible transitions from one state to another. Processes entering the system must initially go into the ready state. A process can only enter the running state from the ready state. There would be no transition that would occur when any job transfers from waiting to running.

Sunday, May 15, 2011

CS 323 - CASE STUDY 3



 










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.
Instructions: