AEiE0706 Memory management, file systems and system administration¶
Address and memory basics¶
- Logical or virtual address is generated by CPU.
- Physical address is actual memory location.
- Address binding may occur at compile time, load time, or execution time depending on system design.
Swapping and free-space management¶
- Swapping moves processes between main memory and secondary storage.
- Free-space management tracks available memory blocks.
- Common free-space representations include bitmaps and free lists.
- Contiguous allocation may use first-fit, best-fit, or worst-fit and can suffer external fragmentation.
Virtual memory and demand paging¶
- Virtual memory gives processes the illusion of a large address space beyond physical RAM.
- Paging divides logical memory into pages and physical memory into frames.
- Demand paging loads a page only when it is actually referenced.
Paging distinctions¶
| Term | Meaning |
|---|---|
| Page | Fixed-size block of virtual address space |
| Frame | Fixed-size block of physical memory |
| Page fault | Access to page not currently in RAM |
Trap:
- Paging uses fixed-size blocks.
- Segmentation uses variable-size logical units.
Performance cues¶
- Effective memory access time depends on memory-hit time and page-fault penalty.
- High page-fault rate can cause thrashing.
- Locality principle explains why paging works reasonably in practice.
Files, directories, and paths¶
- File is named collection of related information on secondary storage.
- Directory organizes files and possibly subdirectories.
- Absolute path begins from root; relative path begins from current directory.
File system implementation and disk mapping¶
- File system maps logical file blocks to physical disk blocks.
- Allocation methods include contiguous, linked, and indexed allocation.
| Method | Strength | Weakness |
|---|---|---|
| Contiguous | Fast sequential and direct access | External fragmentation, growth difficulty |
| Linked | Easy growth | Poor direct access |
| Indexed | Supports direct access via index block | Index overhead |
Disk-platter cue:
- Classical terms include track, sector, cylinder, seek time, rotational latency, and transfer time.
File-system performance¶
- Performance depends on allocation strategy, caching, free-space management, and access pattern.
- Sequential access often performs better than random disk access on mechanical drives.
System administration tasks¶
| Task | Meaning |
|---|---|
| User account management | Create, modify, disable, remove user accounts and permissions |
| Startup procedure | Boot sequence, service initialization |
| Shutdown procedure | Safe service stop and state preservation |
Administrative cue:
- Clean shutdown helps preserve file-system consistency and reduces corruption risk.
Startup cue:
- Firmware initializes hardware and invokes boot code.
- A bootloader then loads the OS kernel into RAM, normally from persistent secondary storage such as an SSD or HDD.
- Network boot is also possible, so secondary storage is the conventional assigned answer rather than a universal rule.
Memory-and-file-system examples¶
- If a required page is absent from RAM, the event is a page fault.
- If one asks for fixed-size memory blocks in virtual memory, choose paging.
- If direct access is needed without contiguous storage, indexed allocation is a standard answer.
AEiE0706 revision box¶
- Virtual memory separates logical address space from physical RAM size.
- Page is virtual block; frame is physical block.
- Demand paging loads pages on reference.
- Paging uses fixed-size blocks; segmentation uses variable-size logical units.
- Contiguous, linked, and indexed allocation have distinct trade-offs.