CS61
Zhu, Justin

Deadlock

Tue, Dec 4, 2018
C CS61

Deadlock Multiple threads each waiting forever for a resource held by another thread. m.lock() m.lock() f() { std::scoped_lock guard(m); } g(); pipe buffer #1 is full, write() writes until nonfill 2 processes communicated with each other over pipes. Parent to child, child writes data that the parent reads. This is modeled after a helper process. Client-server computing. 1 to 2 and 2 to 1, response greater than the request.

Shell 1

Sun, Nov 18, 2018
C CS61

Shell and Process Control Create, Manage, Set Environment, Coordinate Processs Vmiter Map If running a program is expensive, then it will be costly to put all of these programs together. If you want to run a Java process it will take up a lot of space. Modularity: Programming system that divides into self-contained modules. Examples tr is a translator which changes certain characters (A-Z) into other characters (a-z) tr -cs A-Za-z’ ‘ |

Kernel 2

Tue, Nov 6, 2018
C CS61

#Process Isolation Process- When the program starts running Process isolation is when processes interact only as allowed by OS policy. Specifications - No memory clobbering! - Fair sharing of machine resources. Kernel divides up the resource and reallocate resources such as time - Protection of process from each other, of kernel from processes Kernel The Kernel is software, runs with full machine privilege. Memory is hardware. There are some processes that processors can’t perform but kernel can’t.

Kernel 1

Tue, Oct 30, 2018
C CS61

System Calls In assembly, asm denotes a single instruction implemented in syscall. The value of syscall is placed in %rax before syscall occurs. Any arguments stored in %rdi, %rsi, (i.e. normal system call) are then stored in the %rax from the syscall register. The return value of the system call is then placed into the system call. Processes Let’s say we take a string and copy it into a buffer the user provides.