Operations Systems C2 Flashcards
(32 cards)
What is the critical aspect of main memory management?
Main memory management is critical for the entire system’s performance
On what two items does the entire system performance depend?
The entire system performance depends on the amount of memory available and the optimization of memory during job processing
What are the four types of memory allocation schemes introduced
The four types of memory allocation schemes introduced are
Single-user systems,
Fixed partitions,
Dynamic partitions,
Relocatable dynamic partitions
DR SF
Describe the Single-User Contiguous Scheme
Loads the entire program into memory
contigious memory space is now been allocated so that the job(s) can be processed
What are the disadvantages of the Single-User Contiguous Scheme?
The disadvantages include lack of support for multiprogramming or networking and being cost-ineffective, making it unsuitable for business when introduced in the late 1940s and early 1950s
lack of surport for
multiprogramming
network
and cost in-effective
How does Fixed Partitions permit multiprogramming?
Fixed Partitions permit multiprogramming by by dividing main memory, with each partition dedicated to one job.
What are the responsibilities of Fixed Partitions in memory management?
Fixed Partitions are responsible for protecting each job’s memory space and matching job size with partition size
Protecting jobs mem space
job size —>{match} partition size
What are the characteristics of Fixed Partitions?
Fixed Partitions load the entire program side by side, and job allocation involves choosing the first available section of the Right size.
What is the main characteristic of Dynamic Partitions in memory management?
Dynamic Partitions allocate memory by creating sections in main memory, providing each job with space as needed.
What are the disadvantages of Dynamic Partitions?
Disadvantages include full memory utilization only when the first jobs are loaded, subsequent allocation leading to memory waste, and external fragmentation between blocks.
you need to have full mem only when the first job is loaded
and you need to allocate mem waste and external fragmentation bet blocks
What are the two methods for free space allocation in memory management?
The two methods are First-fit memory allocation and Best-fit memory allocation
How does the First-fit memory allocation method work?
In First-fit memory allocation, the Memory Manager organizes free/busy lists by memory locations, and a job is assigned the first partition large enough for fast allocation
organizes free/busy list by memory locations
jobs are assigned to the first parition large enough
resulting in memory waste but fast allocation
What are the advantages and disadvantages of First-fit memory allocation?
The advantage is faster allocation, but the disadvantage is memory waste
How does the Best-fit memory allocation method differ from First-fit?
In Best-fit memory allocation, free/busy lists are ordered by size, and a job is assigned the smallest partition large enough, reducing wasted space and internal fragmentation.
orgainizes free/busy list by size
and jobs are assigned to the smallest partition to accomindate it
resulting in reducung the memory watage and inter fragmentation but slower in performance wise
What is the goal of the Best-fit algorithm?
The goal is to find the smallest memory block where the job fits, with the entire table searched before allocation.
What is deallocation in memory management?
Deallocation involves releasing allocated memory space.
How does deallocation work for fixed-partition systems?
In fixed-partition systems, the Memory Manager resets the job’s memory block status to “free” upon job completion, using any code (e.g., 0 = free and 1 = busy).
What is the algorithm for deallocation in dynamic-partition systems?
The algorithm in dynamic-partition systems tries to combine free areas of memory, and it involves three cases depending on the position of the block to be deallocated.
What are the three dynamic partition system cases for deallocation?
- Case 1: The block is adjacent to another free block.
- Case 2: The block is between two free blocks.
- Case 3: The block is isolated from other free blocks.
Describe Case 1 where two free blocks are joined
: In Case 1, adjacent blocks are joined, and the list changes to reflect the starting address of the new free block. The memory block size changes, showing the new size for the free space, resulting in two free partitions.
in simple terms, Case 1 involves putting together neighboring free blocks to make a bigger one. The system’s list gets updated to show where this bigger block starts( starting address ), and its size is adjusted accordingly. This results in having two free partitions turning into one larger free partition
Explain Case 2 where three free blocks are joined.
In Case 2, deallocated memory space is between two free memory blocks. The list changes to reflect the starting address of the new free block, and three free partitions’ sizes are combined. The total size is stored with the smallest beginning address, and the last partition is assigned null entry status.
In Case 2, we merge three free blocks by updating the list with the new starting address. The sizes of the three free partitions are combined, and the total size is stored with the smallest beginning address. The last partition is marked with null entry status.
Define Case 3 for deallocating an isolated block.
In Case 3, deallocated memory space is isolated from other free areas. The system determines the released memory block status, searches the table for a null entry if the block is not adjacent to any free memory blocks between two other busy areas. The memory block between two busy memory blocks is then returned to the free list.
In Case 3, isolated deallocated memory is addressed separately. The system checks the released memory block status, searches for a null entry if it’s not next to other free blocks, and adds the block between two busy areas back to the free list.
What does the Memory Manager do in Relocatable Dynamic Partitions?
The Memory Manager in Relocatable Dynamic Partitions relocates programs by gathering all empty blocks together, compacting them to make one memory block large enough to accommodate some or all waiting jobs.
What is compaction in the context of memory defragmentation?
Compaction involves the operating system reclaiming fragmented memory space sections by relocating most or all programs in memory, achieving a contiguous arrangement. The operating system distinguishes between addresses and data values, adjusting every address and address reference to match the program’s new memory location while leaving data values unchanged.
Compaction is when the operating system rearranges scattered memory sections to create a continuous block. It involves relocating programs in memory, adjusting addresses to match the new locations while keeping data values unchanged.