Explore key concepts of internal and external memory fragmentation, their differences, causes, and effects in memory management. This quiz helps learners identify fragmentation types and apply their understanding to simple examples and scenarios.
In a memory system where blocks of 64 KB are allocated but a process only needs 50 KB, which type of fragmentation results from this allocation?
Explanation: Internal fragmentation occurs when fixed-size memory blocks are allocated but not fully used, such as allocating 64 KB for a 50 KB need. External fragmentation involves wasted memory between allocated blocks, not within them. A page fault is unrelated and refers to paging systems. Swapping is a memory management technique, not a type of fragmentation.
If several small, non-contiguous free memory blocks exist but together are insufficient to fulfill a large memory request, what is this situation called?
Explanation: External fragmentation refers to the presence of scattered, unused memory spaces that are individually too small to satisfy a request. Internal fragmentation deals with unused space inside allocated blocks. Paging error and segmentation fault refer to different memory issues that do not involve leftover free space.
Which statement best describes internal fragmentation?
Explanation: Internal fragmentation happens when a memory block is partially unused inside its allocated space. Unused memory between allocated blocks is external fragmentation. Memory leak and buffer overflow are different memory issues and not forms of fragmentation.
What is the primary cause of external fragmentation in memory?
Explanation: External fragmentation results mainly from allocating and freeing variable-sized blocks, which leaves small gaps scattered in memory. Fixed-size partitions correspond to internal fragmentation. Bit rate mismatches and cache misses pertain to different hardware issues.
Which method below can reduce or eliminate internal fragmentation?
Explanation: Allocating memory in exactly the required sizes avoids wasted space inside blocks, thereby reducing internal fragmentation. Increasing block size or randomizing block positions does not solve the underlying problem. Larger gaps between blocks would worsen fragmentation, not improve it.
A program requests a contiguous block of 200 KB memory, but only separate 150 KB and 100 KB free blocks are available. What kind of fragmentation prevents allocation?
Explanation: The inability to provide enough contiguous space even when total free memory is sufficient characterizes external fragmentation. Internal fragmentation refers to space within allocated blocks. Stack overflow and alignment fragmentation are not related to this scenario.
In a paged memory management system, which type of fragmentation is most likely to occur?
Explanation: Paged systems can suffer from internal fragmentation when the last page allocated to a process is not fully utilized. Paging eliminates external fragmentation by not requiring contiguous memory. Cross-fragmentation is not a standard term, and claiming no fragmentation would be incorrect.
When using fixed-size memory partitions, what kind of fragmentation is most likely to increase as the process size varies widely?
Explanation: Fixed-size partitions cause internal fragmentation, especially when process sizes don't match partition size, leading to wasted space inside each partition. External fragmentation is more about variable-sized allocations. Hardware fragmentation and thrashing are unrelated terms.
In a variable-partition memory system, what type of fragmentation occurs if many small holes or gaps are left in memory after multiple allocations and frees?
Explanation: Variable-partition systems are prone to external fragmentation as memory becomes divided by small, non-contiguous holes. Internal fragmentation is about unused space within allocations. Segment loss and overflow fragmentation are not standard memory management terms.
Which technique is commonly used to reduce external fragmentation by merging adjacent free memory blocks?
Explanation: Compaction reclaims scattered free memory by combining adjacent blocks into larger contiguous spaces, reducing external fragmentation. Inversion and caching are different concepts not related to merging memory blocks. Partitioning refers to how memory is originally divided, not how it is merged.