Chapter 2 Flashcards
What are the four memory allocation schemes?
Single-user systems, fixed partitions, dynamic partitions, and relocatable dynamic partitions.
Describe the characteristics of single-user contiguous scheme?
- The program is entirely loaded into memory
- If a program doesn’t fit, then either the size of the
main memory must be increased, or the program must be modified to fit - Once execution begins, it remains in memory until execution is complete, either by finishing its work or through the intervention of the operating system, such as when an error is detected
- The amount of work required from the operating
system’s Memory Manager is minimal
What is the major limitation of single-user systems’ memory allocation?
It doesn’t support multiprogramming (multiple jobs or processes occupying memory at the same
time); it can handle only one at a time.
Describe the characteristics of fixed-partition scheme?
- It was the first attempt to allow for multiprogramming
- Each partition could be used by only one program.
The size of each partition was set in advance by the computer operator, so sizes couldn’t be changed without restarting the system. - This scheme required that the entire job be loaded into memory before execution could begin.
- This partition scheme is more flexible than the single-user scheme because it allows more than one program to be in memory at the same time.
What are limitations of fixed-partition memory allocation scheme?
- It works well if all of the jobs that run on the system
are of similar size or if the sizes are known ahead of time and don’t vary between reconfigurations. - If the partition sizes are too small; large jobs will
need to wait if the large partitions are already booked, and they will be rejected if they’re too big to fit into the largest partition - If the partition sizes are too big, memory is wasted
- Internal fragmentation
What is internal-fragmentation in fixed-partition scheme?
A major drawback where less-than-complete use of memory space inside a fixed partition
Describe the characteristics of dynamic partitions’ scheme?
- Memory is allocated to an incoming job in one contiguous block, and each job is given only as much memory as it requests when it is loaded for processing
- It enforces a fist-come, first-served policy for jobs incoming
What are limitations of dynamic partitions memory allocation scheme?
- Allocation of memory is done efficiently for first set of jobs; newer jobs are allocated into partitions on a priority basis which subsequently leads to external fragmentation.
What is external-fragmentation in dynamic partition scheme?
Allocation of memory creates fragments of free memory between partitions (outside memory)
What is best-fit allocation and what is its major advantage?
The goal is to find the smallest memory block into which the job will fit. Extra processing time is used to find the suitable memory block. Best-fit scheme yields better memory utilization.
What is first-fit allocation and what is its major advantage?
The goal is to find a large enough memory block to fit the job. Less processing time is wasted on finding smallest block for the job. First-fit offers fast allocation.
What is deallocation?
The release of memory space
How is memory deallocated in fixed-partitions system?
When the job is completed, the Memory Manager immediately deallocates it by resetting the status of the
entire memory block from “busy” to “free.”
How is memory deallocated in dynamic partition system?
It combines free areas of memory whenever possible creating three unique scenarios:
1. Joining two adjacent blocks
2. Joining three blocks
3. Deallocating an isolated block
In a dynamic partition system, what happens when the block to be deallocated is adjacent to another free block ?
The sizes of the two free partitions must be combined and the total stored with the smaller beginning address