OS Unit IV QA
OS Unit IV QA
o Types:
2. What is the main difference between Fixed Partitioning and Variable Partitioning?
3. Draw the memory layout for Fixed Partitioning and Variable Partitioning.
o Fixed Partitioning:
o Variable Partitioning:
4. What is a page in the context of Paging?
o A page is a fixed-size block of data that is a unit of logical memory. In the context
of paging, memory is divided into pages of equal size, which are mapped to
physical memory frames.
o Physical Address: The actual address in physical memory (RAM) where data is
stored. It is the real location in memory hardware.
1. Compare and contrast the three memory allocation strategies: First Fit, Best Fit,
and Worst Fit. Discuss their advantages and disadvantages.
o First Fit:
▪ Advantages:
▪ Disadvantages:
o Best Fit:
▪ Advantages:
o Worst Fit:
▪ Advantages:
▪ Disadvantages:
o Paging:
▪ Example: A process is divided into pages of 4KB each, and these pages
are mapped to frames of 4KB in physical memory.
o Segmentation:
▪ Example: A process might have segments for code, stack, heap, and
data, each of a different size.
o Fixed Partitioning:
▪ Method: Memory is divided into fixed-sized partitions at system startup.
▪ Example: A system with 1GB of RAM may be divided into ten 100MB
partitions. A process requiring 80MB will be allocated one of these
partitions, leaving 20MB wasted (internal fragmentation).
o Variable Partitioning:
1. Describe the different Memory management techniques. What are the advantages
and disadvantages of each?
▪ Advantages:
▪ Disadvantages:
o Paging:
▪ Advantages:
▪ No External Fragmentation: Any free frame can be used for any
page.
▪ Disadvantages:
o Segmentation:
▪ Advantages:
▪ Disadvantages:
o Virtual Memory:
▪ Advantages:
▪ Disadvantages:
o Concept of Paging:
▪ Mechanism:
▪ Example: Logical address 0x1234 with page size 1024 bytes has page
number 1 and offset 0x234.
o Addressing Fragmentation:
o Example:
▪ If a process requires 6KB and the page size is 1KB, the process will be
divided into 6 pages. These pages can be placed into any available
frames in physical memory, such as frame 2, frame 5, frame 8, etc.
o Advantages:
o Disadvantages: