Friday, January 25, 2013

Operating Systems Day 09 Memory allocation schemes

Fixed size partitions or static partitions

Descriptions

  1. Each partition contains only one job
  2. Entire program is stored contiguously and in memory from the beginning to the end of its execution
  3. This partition scheme is suitable for a system where its jobs have the same size or its sizes are known ahead of time and don't vary between reconfigurations.

Advantages

  1. Protect the job's memory space
  2. Allow several programs to be in memory at the same time, compared with the single-user scheme

Shortcomings

  1. May suffer from internal fragmentation
  2. Large jobs may have a longer turnaround time as they wait for free partitions of sufficient size or may never run
  3. A small job occupies its entire partition. As a result, the unused memory in the partition will remain idle.

Dynamic partitions

Descriptions

  1. Available memory is still kept in contiguous blocks but jobs are given only as much memory as they request.

Advantages

  1. Allocate as much memory as a process requests.

Shortcomings

  1.  May suffer external fragmentation where fragments of memory between blocks of allocated memory cannot be used.

References

  1. McHoes, A., & Flynn, I.M. (2011). Understanding operating systems (6th ed.). CENGAGE Learning.

No comments:

Post a Comment

Mounting USB drives in Windows Subsystem for Linux

Windows Subsystem for Linux can use (mount): SD card USB drives CD drives (CDFS) Network drives UNC paths Local storage / drives Drives form...