process table - list of all existing processes and info related to them file - main method for storing data pipe - best way to simulate two process communication o/s structure -> monolithic - no info hiding, collection of procedures all calling each other layered - user level, doesnt worry about process, memory, console... that work is done by lower level virtual machine - run several o/s' such as single user, multiuser etc.... client/server - make kernel only responsible for client/server communication difference between a process and program - ikea guide to building chair (program), using guide to build chair (process) daemons - processes running in the background process states - ready (process willing to run but no cpu), blocked (unable to run until external event occurs) process implementation - lowest level of o/s that handles interrupt errors process control block - another name for the process table threads - lightweight processes that have their own program counter threads DONT share program counter, registers, stack and state race conditions - who runs exactly when mutual exclusion - help avoid race condition, if 1 process is using shared variable/fill, other process is excluded from doing the same critical section/region - part of program where shared memory is accessed critical section has 4 conditions - no 2 processes can execute in CS at same time, no assumption on speed/number of cpu, no processes outside CS can block other processes, no process should wait forever to access CS Test and Set Lock (TSL) - no other processor can access memory word until this instruction is finished semaphore - has positive value and supports up/down conditions. if down +, decrements by 1, if 0 process using down goes to sleep if up +, increments by 1, if 0 wakes up process. *semaphores are difficult to co-ordinate. monitor - high level mechanism which is a collection of procedures, variable and data structures. process scheduling - pre-emptive (jobs can be stopped and others can be started), non-pre-emptive (each job runs to completion) first come first serve (non-pre-emptive) - first job in finishes and is the first job out shortest job first - jobs with shortest run times are addressed first round robin - each process assigned a time interval (quantam) of cpu time priority scheduling - each process given a priority shoretest job first - E = a T(i-1) + (1-a)Ti -> E = estimated running time, T(i-1) = past running time, Ti = recent running time guaranteed scheduling - makes real promises to the user, (ex. for n users, each will receive 1/n use of cpu) lottery scheduling - each job receives a lottery ticket, on each time splice, a random ticket will be picked memory management - part of the o/s that manages the memory hierarchy, allocates memory to processes when need it, and deallocates when they dont. two types of memory management - swapping and paging JOhn [ ] says: ryan JOhn [ ] says: u remember global variables and address space JOhn [ ] says: derwin u remember open files and child processes JOhn [ ] says: ill remember pending alarms and signals JOhn [ ] says: there are three ways to construct a server JOhn [ ] says: threads, single thread process and finite state machine JOhn [ ] says: threads - parallelism, blocking system calls JOhn [ ] says: single thread processes, no parallelism, blocking system calls