Main Memory Part 2 Flashcards
In Contiguous Memory Allocation, segments vary in ______, and the OS needs to find free space in memory for new address spaces
length
In contiguous memory allocation, the OS maintains lists on _________ space and _____ space to find holes to choose for new processes
allocated, free
What are the 3 fits an OS can give to a new process?
- First-fit
- Best-fit
- Worst-fit
In first-fit, the OS allocates _____ hole that is big enough
first
In best-fit, the OS allocates the _________ hole that is big enough.
smallest
In best-fit, the OS must ______ the entire list, unless ordered by ____
search, size
In best-fit, the OS produces the smallest _______ hole
leftover
In worst-fit, the OS allocates the ________ hole
largest
In worst-fit, the OS produces the _______ leftover hole
largest
Contiguous allocation is simple to ________ but can cause memory ________
implement, fragmentation
An issue that arises from external fragmentation is that there might be enough total memory space for ________, but it is not _________
allocation, contiguous
How does compaction solve the issue of external fragmentation?
It copies data to one contiguous chunk of memory
The main disadvantage of compaction is that is is _____
slow
What is internal fragmentation?
When allocated memory is larger than requested
Why does internal fragmentation occur?
It occurs when the system has fixed allocation sizes
Compaction cannot help internal fragmentation because the OS cannot control the memory once it is handed to the requesting ______
process
What are 4 memory allocation mechanisms?
- Splitting
- Coalescing
- Tracking allocated memory
- Tracking free memory
Splitting is when the OS finds a free chunk of ________ and splits it into two
memory
Splitting is useful when the ________ memory size is smaller than the size of free memory
requested
Coalescing is when the OS merges ________(______) memory chunks into a big chunk
returned, adjacent
The memory allocated is interfaced with ______ and ____
malloc, free
Allocated memory can store size information needed for _________ free space by storing it in a ______ block together with the allocated memory
managing, header