everything.study
COMP 3000

Operating Systems

0.5 credit · Undergraduate

Operating system implementation course stressing fundamental issues in design and how they relate to modern computer architectures. Assignments involve the modification and extension of a multitasking operating system.

Study notes

Independent, AI-drafted study guide · Public sources linked below · Added November 5, 2026

Original study guide aligned to the public Fall 2026 course outline. The outline establishes topic scope; explanations, examples, and practice here are independently written.

Processes, system calls, and execution

A program is stored instructions; a process is a running instance with an address space, registers, open files, and scheduling state. User code asks the kernel to perform protected operations through system calls. A function call normally stays in the same protection domain, while a system call enters the kernel under controlled rules. Separate the API name from its implementation: a library can buffer requests or issue several system calls behind one convenient function.

  • Track process state separately from the executable file.
  • A context switch changes the running execution context; a mode switch need not change processes.

References: Operating Systems: Three Easy Pieces — free author chapters

Process creation and file descriptors

On Unix-like systems, fork creates a child with a logically separate address space; exec replaces the calling process's program image. A shell can fork, adjust file descriptors, and exec a command. File descriptors are small process-local handles referring to kernel-managed resources. Duplicating a descriptor can make two handles share an underlying open-file description and offset. A pipe is a byte stream; closing unused ends matters because readers only observe end-of-file after all writers close.

References: Operating Systems: Three Easy Pieces — free author chapters

CPU scheduling and the meaning of performance

A scheduler chooses a runnable task; a blocked task is waiting for an event and cannot benefit from another CPU slice yet. Response time measures delay until initial service, turnaround measures completion minus arrival, and throughput counts completed work per interval. Short slices improve interactivity but add switching overhead. Fairness and average waiting time are different objectives. Always state arrival times, burst lengths, preemption rules, and tie-breaking before tracing a scheduling policy.

References: Operating Systems: Three Easy Pieces — free author chapters

Virtual memory and address translation

Virtual addresses let each process reason about its own memory layout. Paging divides virtual memory into fixed-size pages mapped to physical frames. A translation lookaside buffer caches translations; a TLB miss is different from a page fault. A fault may require allocating a page, bringing data from storage, or rejecting an invalid access. With 4 KiB pages, virtual address 0x2345 has page number 2 and offset 0x345; if page 2 maps to frame 9, the physical address is 0x9345.

References: Operating Systems: Three Easy Pieces — free author chapters

Concurrency, races, and synchronization

A race occurs when correctness depends on the timing of operations that are not adequately coordinated. Even x = x + 1 usually involves a read, calculation, and write, so two threads can lose an update. A mutex protects an invariant across a critical section. A condition variable supports waiting for a predicate; test that predicate in a loop after reacquiring the mutex. Deadlock analysis asks whether resources can be held while waiting in a cycle, not simply whether a program has many locks.

  • Use one documented lock order when multiple locks are required.
  • Thread safety must include shared objects and lifetime rules, not just individual statements.

References: Operating Systems: Three Easy Pieces — free author chapters

Files, persistence, and observation

A file system maps names to objects, objects to metadata and blocks, and operations to storage updates. A directory entry is a naming relationship; an open file can remain usable after its last pathname is removed. Buffering improves performance but complicates durability: returning from a write does not always mean data has reached persistent storage. Diagnose behavior with a concrete observation plan: inspect process state, trace system calls, examine mappings, and separate cached reads from actual disk activity.

References: Operating Systems: Three Easy Pieces — free author chapters

Practice & worked answers

Original exercises for this guide.

1. Two threads each increment a shared counter once. Can the result be 1 instead of 2?

Show worked answer

Yes. Both can read 0, both compute 1, and both store 1. Protect the entire read-modify-write operation with synchronization or use an appropriate atomic increment. Protecting only the final store does not repair the lost update.

2. A process has a valid virtual mapping, but its page is absent from RAM. Is a segmentation fault inevitable?

Show worked answer

No. The page fault can be handled by loading the page and resuming the instruction. An invalid or disallowed access is a different case. Distinguish a hardware fault notification from the operating system's final response.

Public notes & references

Course sources establish the scope above. Reference materials support the explanations; linked lecture notes and books remain with their authors.

2026

Topics

  • Admins and IntroducƟon OSC Book Ch 1 (3EP Book Ch 2)
  • OS Structures, Processes, IPC OSC Ch 2, 3 (3EP Ch4, Ch5, Ch6)
  • SynchronisaƟon and Deadlocks OSC Ch 7, 8 (3EP Ch28, Ch31, Ch32)
  • Deadlocks and Memory Management OSC Ch 8, 9 (3EP Ch32, Ch13,15-17)
  • Memory Management and Mid-term OSC Ch 9 (3EP Ch 18-20)
  • Virtual Memory OSC Ch 10 (3EP Ch 21-23)
  • Mass Storage OSC Ch 11 (3EP Ch 36-38, 44)
  • FS ImplementaƟon and End-term OSC Ch 14 (3EP Ch 42, 43, 45)
  • File System Internals and Virtual Machines OSC Ch 15, 18 (3EP VMs)

Readings

  • Gagne (10th ed) “OperaƟng Systems: Three Easy Available online Free online Pieces”, Arpaci-Dusseau, Arpaci- Dusseau, Reiher
  • “OperaƟng System Concepts”, Bookstore, Amazon 88 CAD (Kindle) Silberschatz, Galvin, 135 CAD (Loose leaf) Gagne (10th ed) “OperaƟng Systems: Three Easy Available online Free online

Prerequisites & course information

Precludes additional credit for SYSC 4001 . Prerequisite(s): COMP 2401 with a minimum grade of C- and COMP 2402 . Lectures three hours a week, tutorial one and a half hours a week.

Sources