Thursday, January 6, 2011

CASE STUDY 4

University of Southeastern Philippines
Institute of Computing
OPERATING SYSTEMS
Second Semester – SY 2010-2011
Name: Maria Edna Hernandez
Section: BSIT-3
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

*turnaround – how long it will stay in the memory.
*apply compaction if only if the incoming jobs has no other block to allocate that will fit their sizes.










Dynamic Partition
Phase 1
OS(15k) 15k
Job1 (100k) 110k
Job2 (10k) 15k
Job3 (35k) 80k
Job4 (15k) waiting

Phase 2
OS 15k
Job1 (100k) 110k
Job4 (15k) 15k
Job3 (35k) 80k
Job5 (23k) waiting

Phase 3
OS 15k
Job1 (100k) 110k
Job6 (6k) 15k
Job5 (23k) 80k
Job7 (27k) waiting

Phase 4
OS 15k
Job7 (27k) 110k
15k
Job5 (23k) 80k
Job8 (55k) waiting
Phase 5-6
OS 15k
Job8 (55k) 110k
15k
80k
Job9 (88k) waiting.
Phase 5 and 6 has same data in the table because there is not enough space for job 9. We need to wait for job 8 to finish its turnaround before Job9 can enter.

Phase 7-9
OS 15k
Job9 (88k) 110k
15k
80k
Job10 waiting. Same case with phases 5-6

Phase 10-12
OS 15k
Job10 (100k) 110k
15k
80k
Waiting for its turnaround to finish before having an empty table.

Phase 13
Table empty.

Relocatable Dynamic Partition

Phase 1
OS(15k) 15k
Job1 (100k) 110k
Job2 (10k) 15k
Job3 (35k) 80k
Job4 (15k) waiting

Compaction
OS(15k) 15k
Job1 (100k) 115k
Job3 (35k) 160k
Job4 (15k) 175k
Job5 (23k) 198k
Job6 (6k) 204k

Phase2
OS(15k) 15k
Job1 (100k) 115k
Job3 (35k) 160k
Job4 (15k) 175k
Job5 (23k) 198k
Job6 (6k) 204k
Job7(25k) waiting.




Compaction
OS(15k) 15k
Job1 (100k) 115k
Job5 (23k) 138k
Job7 (25k) 163k
Job8(55k) 218

Phase3
OS(15k) 15k
Job1 (100k) 115k
Job5 (23k) 138k
Job7 (25k) 163k
Job8(55k) 218
Job9 (88k) waiting

Compaction
OS (15k) 15k
Job8 (55k) 70k
Job9 (80k) 158k

Phase 4
OS (15k) 15k
Job8 (55k) 70k
Job9 (80k) 158k
Job10 (100k)




Compaction
OS (15k) 15k
Job9 (88k) 103k
Job10 (100k) 203k

Phase 5-6
OS (15k) 15k
Job9 (88k) 103k
Job10 (100k) 203k

Phase 7

OS (15k) 15k
Job10 (100k) 115k

Phase 8
Table empty

No comments:

Post a Comment