본문 바로가기

강의/Operating Systems9

4. Locks and Condition Variables Locks Locks: an object that can only be owned by a single thread at any given time. Basic operations on a lock: acquire: mark the lock as owned by the current thread; if some other thread already owns the lock then first wait until the lock is free. Lock typically includes a queue to keep track of multiple waiting threads. release: mark the lock as free (it must currently be owned by the calling.. 2022. 11. 12.
3. Concurrency Independent and Cooperating Threads Independent thread: one that can't affect or be affected by the rest of the universe. Its state isn't shared in any way by any other thread. Deterministic: input state alone determines results. Reproducible. Can stop and continue with no impact on behavior (only time varies). For independent threads, the scheduling order doesn't matter Cooperating threads: tho.. 2022. 11. 12.
2. Threads, Processes, and Dispatching Threads and Processes Thread: a sequential execution stream Executes a series of instructions in order (only one thing happens at a time) Execution state: everything that can affect, or be affected by, a thread: code, data, registers, call stack, open files, network connections, time of day, etc Process: one or more threads, along with their execution state Part is shared among all threads in th.. 2022. 11. 11.
1. Introduction, Operating System History Evolution of Operating Systems In the begining, one user at a time, working directly at console Phase 1 Hardware expensive, humans cheap First OS: I/O subroutine libraries shared by users Simple batch monitor: get user away from the computer. OS = program to load and run user jobs, take memory dumps after crashes Overlap of I/O and computation: data channels, interrupts Memory protection and rel.. 2022. 10. 30.