OS Revision

Based on OS_Revision-2025.pdf

Exam

  • The final exam takes 2 hours
    • Covers
      • Ch5 CPU Scheduling
      • Ch6, 7 Process Synchronization
      • ch9 Main Memory
      • ch10 Virtual Memory
      • ch13 File System Interface
      • ch14 File System Implementation

Ch5 CPU Scheduling

  • What is CPU Scheduler?
    • A CPU scheduler selects one of the processes in the ready queue to be executed by the CPU.
  • What is multilevel Queue?
    • A multilevel queue is a scheduling strategy that partitions the ready queue into several separate queues, each with its own scheduling algorithm.
  • Real-Time CPU Scheduler, Priority-Based, Rate Monotonic Scheduling
    • These are specialized scheduling algorithms: Priority-Based assigns processes based on priority; Rate Monotonic is for real-time systems where shorter periods get higher priority.

Ch6, 7 Process Synchronization

  • What is race condition?
    • A race condition occurs when multiple processes access and manipulate shared data concurrently, and the outcome depends on the timing of their execution.
  • What is critical section problem?
    • It is a problem where multiple processes access a shared resource and the outcome depends on the order of execution.
  • What are three requirements for a solution to solve the critical problem?
    • “Mutual exclusion, progress, and bounded waiting.”
  • What methods can be used to solve the critical section problems?
    • “Algorithms like Peterson’s solution, semaphores, mutexes, and monitors.”
  • What are the problems if we incorrectly use the semaphore?
    • “Incorrect semaphore use can cause deadlocks, starvation, or incorrect execution sequences.”
  • What can semaphore help in process synchronization?
    • “Semaphores help coordinate processes by signaling and waiting, ensuring mutually exclusive access to resources.”
  • What is Monitor?
    • A monitor is a high-level synchronization construct that allows safe access to shared variables through condition variables and procedures.

Ch9 Main Memory

  • What is memory management?
    • Memory management handles the allocation and deallocation of memory to processes efficiently.
  • When does the address binding happen?
    • “Address binding happens at compile time, load time, or execution time.”
  • What is physical memory address?
    • It is the actual address in memory hardware.
  • What is logical memory address?
    • It is the address generated by the CPU.
  • In which situation, the above two addresses are same? In which situation, the above two addresses are different?
    • “They are the same in compile-time and load-time binding, different in execution-time binding.”
  • What memory allocation methods are there? Advantages? Disadvantages?
    • “Contiguous allocation, paging, and segmentation. Each has trade-offs in speed, flexibility, and fragmentation.”
  • How to map the logical address to physical address?
    • Using a memory management unit (MMU) that translates logical addresses to physical addresses using tables.
  • How to reduce time to find physical address?
    • Using translation lookaside buffer (TLB) or cache mechanisms.
  • What methods are used to solve the big page table problem?
    • “Hierarchical page tables, hashed page tables, or inverted page tables.”

Example: The Intel 32 and 64-bit Architectures is not included in exam

Ch10 Virtual Memory

  • What is swapping?
    • Swapping is moving processes between main memory and disk to free up memory.
  • What is backing store?
    • Backing store is the disk space used to hold swapped-out processes.
  • What is page demanding?
    • Demand paging loads pages into memory only when they are needed.
  • What is page fault?
    • A page fault occurs when a page is referenced that is not in memory.
  • What is effective access time?
    • “It is the average time the system takes to access memory, considering page faults.”
  • What is locality reference?
    • It refers to the tendency of programs to access a set of memory locations frequently.
  • How to manage the free frames?
    • Using free-frame lists or bitmap to track available memory blocks.
  • How to determine the pages to be replaced?
    • “Using algorithms like FIFO, LRU, or Optimal to select a page to replace.”
  • How can the thrashing happen?
    • Thrashing happens when excessive paging causes the system to spend more time swapping than executing.
  • How to allocate frames?
    • Fixed allocation or priority-based dynamic allocation methods.
  • How to allocate kernel memory
    • “Buddy system, slab allocation, and other specialized kernel memory allocation strategies.”

Ch13 File System Interface

  • What is file?
    • A file is a named collection of related data stored on secondary storage.
  • What is file system?
    • A file system manages files and directories and controls how data is stored and retrieved.
  • What basic operations can be performed on a file?
    • “Create, delete, read, write, open, close.”
  • What basic operations can be performed in a directory?
    • “Create, delete, list, rename, traverse.”
  • What structures can be used to organize directories?
    • “Single-level, two-level, tree-structured, acyclic-graph, and general graph directories.”
  • How can a file system be mounted?
    • Mounting is attaching a file system to a directory structure so it can be accessed.
  • How can the access to a file be controlled?
    • “By using permissions, user IDs, access control lists, etc.”

File locking is not included in the exam.

Ch14 File System Implementation

  • Why a file system is organized in layers?
    • “Layering separates concerns like application interface, logical file system, and physical file system for modular design.”
  • What are two categories of structures used in file system implementation?
    • Metadata structures and data blocks are two structure categories.
  • What is File Control Block or inode?
    • “A file control block or inode stores metadata about a file like size, location, ownership, etc.”
  • What open file tables are there in an operating system? What are they used for?
    • System-wide and per-process open file tables keep track of open files and their properties.
  • What methods are used to allocate disk blocks to files?
    • “Contiguous, linked, and indexed allocation methods.”
  • What are main methods used to manage free space on disk?
    • “Bitmaps, free lists, and grouping techniques.”

Virtual File System, Schemes in handling large files, Performance are not included in the exam

Author

TosakaUCW

Posted on

2025-05-21

Updated on

2025-05-23

Licensed under

Comments