15 Feb 2011

Case Study no. 5 in Operating Systems

This is the fixed (pre-determined) partition of the memory:

Memory Block

Size

Block 1

50K

Block 2

200K

Block 3

70K

Block 4

115K

Block 5

15K

______________________________________________________________________________


A. Using best-fit allocation:

Memory Block

Size

Job 3

35K

Job 1

100K

Job 8

55K

Job 10

100K

Job 4

15K

Waiting List:

Job 2 – 10K

Job 5 – 23K

Job 6 – 6K

Job 7 – 25K

Job 9 – 88K

______________________________________________________________________________


Memory Block

Size

Job 3

35K

Job 1

100K

Job 8

55K

Job 10

100K

Job 2

10K

Waiting List:

Job 5 – 23K

Job 6 – 6K

Job 7 – 25K

Job 9 – 88K

______________________________________________________________________________


Memory Block

Size

Job 7

25K

Job 1

100K

---

---

Job 10

100K

Job 6

6K


Waiting List:

Job 5 – 23K

Job 9 – 88K

______________________________________________________________________________


Memory Block

Size

Job 5

23K

---

---

---

---

Job 9

88K

---

---

Waiting List:

No jobs remaining

______________________________________________________________________________

B. Using first-fit allocation:

Memory Block

Size

Job 3

35K

Job 10

100K

Job 8

55K

Job 1

115K

Job 4

15K

Waiting List:

Job 2 – 10K

Job 5 – 25K

Job 6 – 6K

Job 7 – 25K

Job 9 – 88K

______________________________________________________________________________


Memory Block

Size

Job 3

35K

Job 10

100K

Job 8

55K

Job 1

100K

Job 2

10K


Waiting List:

Job 5 – 25K

Job 6 – 6K

Job 7 – 25K

Job 9 – 88K

______________________________________________________________________________


Memory Block

Size

Job 5

25K

Job 10

100K

Job 7

25K

Job 1

100K

Job 6

6K


Waiting List:

Job 9 – 88K

______________________________________________________________________________

Memory Block

Size

Job 5

25K

---

---

---

---

Job 9

88K

---

---


Waiting List:

No jobs remaining

______________________________________________________________________________

C. Using worst-fit allocation method:

Memory Block

Size

Job 2

10K

Job 9

88K

Job 5

23K

Job 8

55K

Job 6

6K

Waiting List:

Job 1 – 100K

Job 3 – 35K

Job 4 – 15K

Job 7 – 25K

Job 10 – 100K

______________________________________________________________________________


Memory Block

Size

Job 3

35K

Job 9

88K

Job 5

23K

Job 8

55K

Job 4

15 K

Waiting List:

Job 1 – 100K

Job 7 – 25K

Job 10 – 100K

______________________________________________________________________________


Memory Block

Size

Job 3

35K

Job 9

88K

Job 7

25K

Job 1

100K

---

---

Waiting list:

Job 10 – 100K

___________________________________________________________________________


Memory Block

Size

---

---

Job 10

100K

---

---

Job 1

100K

---

---

Waiting List:

No jobs remaining

7 Jan 2011

Case Study no. 4 in Operating Systems

Using the first come-first serve method of allocation, Jobs 1, 2, 3, 4, 5 and 6 have been loaded to the system. The remaining jobs are waiting for their turn in the queue.









Jobs 2, 4 and 6 are now done processing their respective tasks and are now deallocated from the memory. Since there is not enough space in memory to accommodate all incoming jobs, they will have to wait in queue.






Jobs 3 and 5 have finished their jobs and are now deallocated from the memory. Jobs 7 and 8 are loaded and are now beginning to execute their specified jobs. Memory allocated is 195k.






Job 1 has now finished its task and is now deallocated from the memory. Job 9 is loaded onto memory and is now executing its task. Job 10 will have to wait because there is not enough space in the memory to accommodate its size.






Job 8 has now finished its task and is now deallocated from the system. Job 10 is now loaded in the system and is now executing its specified task.






B. Relocatable Dynamic Partition

Jobs 1, 2, 3, 4, 5 and 6 are now loaded in memory and are now executing their respective jobs. The remaining jobs are waiting in queue for their turn.







Jobs 2, 4 and 6 have finished their respective tasks and are now deallocated from the memory. Jobs 1 and 3 are then compacted to accommodate Job 7.







Jobs 3 and 5 are now done executing and they are now deallocated from the memory. Job 8 enters. Job 9 cannot be loaded because when their sizes will be added together, the total size (258k, OS included) will exceed the limit (220k) by 38k.






Job 1 has finished its task in memory and is now deallocated from the system. Job 9 is now loaded into memory and is now executing its assigned task.







Job 8 has now finished its task and is now deallocated from the memory. Job 10 is now loaded into the memory and is now executing.