Module3 - Single-User Contiguous Scheme
Module3 - Single-User Contiguous Scheme
Module3 - Single-User Contiguous Scheme
MANAGEMENT
MODULE 3
EARLY SYSTEMS
Memory Management
Memory is the primary and fundamental power,
without which there could be no other intellectual
operation.”
Responsibilities include:
– Preserving space in main memory occupied by operating
system
– Checking validity and legality of memory space request
– Setting up memory tracking table
◦ Tracks usage of memory by sections
◦ Needed in multiuser environment
– Deallocating memory to reclaim it
Components of Memory Management
Garbage Collector
- Collection is performed when an allocation failure occurs in heap
lock allocation. Heap lock allocation occurs when the allocation
request cannot be satisfied in the existing cache or memory space.
- If the Garbage Collector cannot find a large enough chunk of free
storage, allocation fails and the Garbage Collector must run a
garbage collection.
- Responsible to perform the deallocation process to release a block
of information or program from the memory so it may be used for
another program.
Allocator
- Responsible for allocating areas of memory for the process/
program.
- The task is small compared to the functions of a garbage collector.
Memory Allocation
A process by which computer programs and services
are assigned with physical or virtual memory space.
The process of reserving a partial or complete portion
of computer memory for the execution of programs and
processes.
www.techopedia.com
Types of Memory Allocation Schemes
• Single-User Contiguous
• Fixed Partition
• Dynamic Partition
• Relocatable Dynamic Partition
Single-User Contiguous Scheme:
Program is loaded its entirety into memory and allocated as
much contiguous space in memory as it needs.
Jobs are processed sequentially.
If program is too large— it couldn’t be executed.
• The size of the main memory must be increased or
• the program must be modified to fit.
Requires minimal work by the Memory Manager
Hardware needed:
‣ Register to store the base address
‣ Accumulator to keep track of the program size
Single-User Contiguous Scheme:
Advantages:
Jobs are processed sequentially. Hence the requirement of OS’s work is
minimal.
The OS just need to check if the incoming job fits into the memory
space else reject the job and proceed to the next incoming job.
Disadvantages:
Only one job or program is loaded in to memory at any point of time.
All available memory is allocated to a job.
Memory sharing is not possible among jobs.
Even though there is a space to accommodate the waiting jobs, it is not
possible to accommodate more than one job.
Does not support multi-programming
Not cost effective, as it serves the purpose of only one user at a time.
Single-User Contiguous Scheme:
The Memory Manager
1. Evaluates the incoming job to see if it fits the memory
space.
◦ If it fits, load into memory. Otherwise, reject and evaluate
the next process.
2. Monitors the occupied memory space.
◦ When the resident job ends its execution and no longer
needs to be in memory, indicate that the entire amount of
main memory space is now available and return to Step 1
(evaluate the next incoming job).
Memory Allocation
Memory Capacity = 200K
OS 10K
6. Provide your conclusions. How many jobs was considered for memory allocation?