SE350: Operating Systems
This is one of the most fundamental courses that teaches you the inner workings of your Operating System.
Link to course notes here.
BEST TEXTBOOK:
- Operating Systems: Three Easy Pieces
- Available Locally file:///Users/stevengong/My%20Drive/Waterloo/3A/SE350/Operating%20Systems%20-%20Three%20Easy%20Pieces.pdf
- Andrej Karpathy has been reading Operating Systems: Principles and Practices
The /proc
directory shows you all the different processes.
Other useful things (Taken from the CS350 course website)
- Tutorials on C++, Gdb, etc.
- Assemblers, Linkers and the SPIM simulator.
This provides excellent information on the MIPS hardware/software interface. Including stack frames, procedure calls, exceptions, interrupts, etc. - An Introduction to Programming with Threads, by Andrew Birrell
- Some C background information useful for the assignments.
Concepts
Chapter 1
Chapter 2
Chapter 3
- Two-State Process Model
- Five-State Process Model
- Process Table
- Process Image
- Process
- Process Control Block
- Trap (OS)
- Control Table (OS)
- In-Circuit Debugger
- Supervisor Call Instruction
- System Call
- Preemption
- Non-Process Kernel
Chapter 4: Threads
Chapter 5: Concurrency - Mutual Exclusion and Synchronization
- Concurrency
- Concurrency (OS)
- Monitor (OS)
- Semaphore
- Mutual Exclusion
- Race Condition
- Critical Section
- Coroutine
- Producer and Consumer Problem
- Reader-Writers Problem
Chapter 6: Concurrency - Deadlock and Starvation
- Resource Allocation Graph
- Deadlock
- Reusable Resource
- Consumable Resource
- Livelock
- Dining Philosophers Problem
Chapter 7: Memory Management
Chapter 8: Virtual Memory
- Virtual Memory
- Page Table
- Frame Locking
- Page Size
- Page Fault
- Thrashing
- Resident Set
- Working Set
- Cleaning Policy
- Load Control
- Page Buffering
Chapter 9: Uniprocessor Scheduling
- OS Scheduler
- First-Come-First-Served Scheduling (FCFS)
- Round Robin modern ones based on clocks
- Shortest Process Next (SPN)
- Shortest Remaining Time (SRT)
- Highest Response Ratio Next (HRRN)
- Feedback-Based Scheduling
Chapter 10: Multiprocessor, Multicore, and Real-Time Scheduling
Chapter 11: I/O and Files
Chapter 12: File Management
Misc
Fundamental question that will be answered today (2024-03-11): how does multicore scheduling work? Is a process assigned to a particular core, or can it be bounced around between multiple cores? Ahh, this is answered in Multiprocessor Scheduling
Things I need to understand by end of the term
- How scheduling actually works? How do we prevent no more starvation? What are the different schemes? How are queues used
- See OS Scheduler. For starvation, you can use something like a Multi-Level Feedback Queue.
- How is shared memory implemented? If it is read-only memory, then it’s simple and everyone can read from the memory with no problem. But what if one needs to write?
- For managing concurrency, This is just a Reader-Writers Problem. OS can mark which part of the memory is owned by which process(e)s.
- How are mutexes used in the OS
- Everywhere for concurrency in multithreading. In terms of how a mutex is implemented, see Semaphore
- The different memory schemes, you run into Fragmentation issues, how to solve?
- We talk about this Memory Partitioning, but yea just do Compaction
- OS vs. RTOS
- Talked about in RTOS