Computer systems

CS-202

Express study guide (doesn't cover C)

This page is part of the content downloaded from Express study guide (doesn't cover C) on Sunday, 29 June 2025, 20:45. Note that some content and any files larger than 50 MB are not downloaded.

Page content

This page concerns only the lectures and pen-and-paper exercises. It does not concern C. You need to study for C separately (even if you are keeping your project grade from last year). The midterm will include a C question that is not covered by this study guide.

The ideal way to study for the first part of the midterm (so, not the C part) is to review all the lectures (or watch them if you have not done so already) and do all the pen-and-paper exercises.

If you don't have the time to do all this, here is what I would prioritize. (When I say "do exercises..." I mean do them without looking at the solutions and without asking an LLM. I cannot stress enough the importance of thinking an answer through to the end on your own. Looking at a proposed answer and agreeing with it does not prepare you for the exam.)

  1. Review or watch Lectures 02 and 03. Focus on:
    • The difference between programs, processes, and threads.
    • The concept of the memory image and its segments.
    • What each segment contains at each point in time during execution.
    • The fork, exec, and wait syscalls.
  2. Do CPU exercises 4, 6, and 7.
  3. Review or watch Lectures 04 and 05. Focus on:
    • Virtual vs. physical memory addresses.
    • What is the Memory Management Unit (MMU) and what it does.
    • The challenge of fragmentation.
    • The concept of paging (and why/how it reduces fragmentation).
    • What is a virtual page number and an offset.
    • How we use them to index into a linear (single-level) page table.
    • What a linear page table contains.
    • When/how is a multi-level page table better than a linear one?
    • What is a Table Lookaside Buffer (TLB) and what it does.
    • What does "swapping to disk" mean -- when is it useful?
  4. Do Memory exercises 1, 2, 4, and 5.
  5. Review or watch Lectures 06 and 07. Focus on:
    • Recognize the basic syscalls related to file systems: open, lseek, read, write, close.
    • What are pathnames, file descriptors and inodes. Convince yourself you perfectly understand the difference between "file descriptor" and "inode."
    • Single-level vs. multi-level indexing. Convince yourself you perfectly understand Slide 13 from Lecture 07.
    • The concept of an "inode walk." What happens when a process accesses a file, e.g., does an open, then a read or write, then a close. Which inodes and which data blocks are accessed.
    • What is the block cache or FS cache and what it does.
  6. Do File-system exercises 4, 5, 6, and 7.
  7. Review or watch Lecture 09. Focus on:
    • How we define/compute turnaround time and response time.
    • The FIFO, SJF, STCF, RR, and MLFQ policies. 
    • If you are given the arrival times of different threads, you should be able to determine which thread is scheduled at each time tick, depending on the scheduling policy.
  8. Do IO/scheduling exercises 4, 6, and 7.
  9. Do last year's midterm, from beginning to end.