ECE344 Fall 2026 (Sec 1) Lec 32 - Final Review
Overview
Jon Eyolfson reviews ECE344’s operating-systems themes of virtualization, concurrency, and persistence, connecting processes, system calls, virtual memory, threads, synchronization, scheduling, and file systems. He also outlines final-exam expectations: a cumulative, closed-book exam worth 45%, with emphasis on material less tested earlier and likely questions involving Labs 4 and 5.
Key takeaways
- Linux process creation commonly uses fork followed by execve: fork creates a child, and execve replaces its program while preserving the process identity and ordinary open file descriptors.
- After fork, parent and child descriptors can share an open-file entry, so they may also share the current file offset.
- A TLB avoids repeated multi-level page-table walks by caching virtual-to-physical translations; mapping changes may require invalidating cached entries.
- Mutexes provide mutual exclusion, while semaphores and condition variables can coordinate ordering; neither ordering mechanism automatically eliminates data races on shared variables.
- Journaling enables recovery by logging updates before applying them, while copy-on-write can preserve a consistent old state until an atomic root switch commits the new one.
- The ECE344 final is cumulative and worth 45%, with particular study value in past tests, synchronization problems, and Labs 4 and 5.
Chapters
- Eyolfson frames the course around virtualization, concurrency, and persistence, from virtual CPUs and memory to race-free shared data and durable files.
- A kernel is the code running in privileged CPU mode, but microkernels and monolithic kernels draw different boundaries around services such as drivers and file systems.
- The process abstraction includes saved registers, virtual memory, and file descriptors; system calls cross from user mode into kernel mode.
- An operating-system environment includes the kernel and relevant user-mode libraries; GUI applications may rely on display systems such as Wayland.
- Static libraries are copied into executables at compile time, while dynamic libraries are loaded at runtime and need compatible APIs and ABIs.
- On Linux, fork creates a process and execve loads a new program into it; shells commonly combine them, while posix_spawn offers a combined process-launching interface.
- A terminated child remains a zombie until its parent calls wait; an orphan is re-parented, typically to process ID 1, which can reap it.
- Pipes, sockets, and files provide IPC; pipe readers see end-of-file only after writers close their ends and all buffered bytes are consumed.
- File descriptors normally survive execve, except descriptors marked close-on-exec; a close-on-exec pipe can communicate whether execve failed.
- Blocking signals and polling a set of file descriptors lets an event loop wait for signals and I/O without busy-waiting.
- The MMU translates virtual page numbers to physical frames through page tables; 4 KB pages are the default example, and entries include validity and permission flags.
- Multi-level page tables organize mappings as a tree, avoiding the large mostly empty array that a 39-bit virtual address space could require.
- A TLB caches translations to avoid repeatedly walking page-table levels; changing mappings may require flushing stale TLB entries.
- Demand paging handles faults by loading mapped file data, copying a page for copy-on-write, or signaling a segmentation fault for invalid access.
- Round-robin scheduling shares CPU time through time slices; a dispatcher performs context switches by saving and restoring registers.
- A process owns resources such as virtual memory and file descriptors, while each thread has its own execution state, including registers and a stack.
- Pthreads provide create, join, detach, and exit operations; a detached thread cleans up automatically, while an unjoined terminated thread can remain a zombie thread.
- Thread mappings include many-to-one user threads and one-to-one kernel threads; user-level context switching saves registers but leaves stack contents in place.
- A data race involves concurrent accesses to the same location with at least one write; counter++ is a read, increment, and write, not one atomic operation.
- Mutexes enforce mutual exclusion, while hardware compare-and-swap can implement spin locks; sleeping locks use kernel-supported wait queues to avoid wasting CPU time.
- Semaphores coordinate ordering through atomic post and wait operations, while condition variables pair with a mutex and require condition checks inside a while loop.
- Multiple locks can improve parallelism but introduce deadlock; consistent lock ordering or try-lock with backoff can prevent it.
- Priority scheduling can starve low-priority work, and priority inheritance temporarily raises a lock holder’s priority to resolve priority inversion.
- Multiprocessor scheduling may use per-CPU queues, CPU affinity, rebalancing, and gang scheduling; Linux real-time tasks run ahead of normal tasks.
- Disk and device transfers can use DMA, with the device writing memory and interrupting the kernel when a request completes.
- SSD erase and write constraints motivate TRIM; RAID 0 stripes data, RAID 1 mirrors it, RAID 5 uses one disk’s worth of parity, and RAID 6 uses two.
- An open-file entry tracks a file position, flags, and a vnode; after fork, parent and child descriptors can refer to the same entry and share its position.
- File allocation approaches include contiguous, linked, FAT-style, and indexed allocation; Linux inodes use direct pointers plus single, double, and triple indirect blocks.
- Directories map names to inode numbers through hard links; symbolic links instead refer to another name.
- Inodes store metadata such as owner, group, and mode, alongside pointers to file-content blocks.
- A file-system update may modify several blocks, so a crash can leave partial changes; fsync requests that data be written to disk rather than remain only in cache.
- Journaling records intended updates in a log before applying them, allowing committed operations to be replayed after a crash.
- Copy-on-write file systems preserve old data and commit changes by atomically switching to a new root, supporting snapshots and checksums.
- Eyolfson briefly revisits page replacement and notes that newer material, including advanced replacement policies, is likely to receive limited exam emphasis.
- The final is cumulative, closed book, and worth 45%; a Type 3 calculator is not expected to help.
- Questions are weighted toward material not tested on Tests 1 and 2, but the course’s connected concepts make earlier material relevant too.
- Eyolfson expects at least some coverage of Labs 4 and 5, but says a Lab 6 question is unlikely; synchronization may appear as a longer problem.
- Past tests on the course website are the best practice, while newer topics such as containers and advanced page replacement are more likely to appear as multiple-choice or short-answer questions.
Transcript excerpt
0:06 All right. Welcome back to our last lecture. So, this is just final review. So, I have a lot of slides. I can just ramble through the whole course if you want, or we could you can ask me to do something. Want me to just ramble? Yeah. >> Can we kind of like draw visually how the file systems work? Like everything after test two, like where it all is. >> How the file systems work? >> No, just like visually where it >> Visually where everything is. Let's see if we can build it as we go through this. So, we'll try and build a picture as we go through this. Uh so, yeah, I'll be rambling. Oh, also uh course evals. Do them. You guys are at like 60 %.
0:54 So, >> I said you need to get 75 right? >> Yeah, you guys need I don't need 75. You guys need 75. Uh I'm all very >> 100 % I deserve the 100 %. >> I can't see that. Uh I'm not allowed to look at that. All right. So, we'll go through the whole course. So, why did we learn operating systems? Because, well, if we're doing software, we pretty much need to know operating systems, right? We learned so so so much. So, there were three main concepts in the course. Virtualization, that was sharing one resource by faking multiple independent copies. How many times did we do this? A lot, right? Like virtual CPUs. Well, virtual kind of CPUs for threads.
1:42 Saying you have, you know, multiple CPUs you can run on. That may or may not be true. Virtual memory. Virtual whatever. Virtual machines. Wow, we went all the way up to machines at the end. Then we got concurrency. That was fun, right? So, handle multiple
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Jon Eyolfson.