1. The Process Abstraction Flashcards
What exactly is an abstraction?
A separation between the policy (how it is thought of, represented, or otherwise handled) of a function and its mechanism (how it actually works)
Abstractions provide an interface to application programmers that separates policy (what the interface commits to accomplishing) from mechanism (how the interface is implemented)
How do abstractions simplify application design? (Hint: 3 big contributions)
They hide undesirable properties (like what?),
add new capabilities (like names and addresses for files),
and organize information (like how?)
How is a file an example of abstraction?
Files allow data to appear to the user to be contiguous blocks of memory, while in fact the data could be distributed all over the disk.
They also allow chunks of data to be named and organized into directories.
Files allow for data blocks on disk to be given access based on permissions.
In short, files map properties (like organizational info) onto disk blocks without troubling the user with the actual physical reality of the data they are working with.
What undesirable properties do file systems hide (abstract away)?
The fact that discs are super slow, that data is often distributed all over the disc and not in one place, and that disc storage can fail sometimes.
What new capabilities do files add?
Dynamic size and organization into directories
What information do files help organize?
Ownership, permissions, access time, modification time, type, etc
How are threads an example of abstraction (what do they abstract)?
Threads abstract the CPU
How are address spaces an example of abstraction (what do they abstract)?
Address spaces abstract physical memory
What do files abstract?
Files abstract the disc
What is the most fundamental OS abstraction?
The process is the most fundamental OS abstraction because it organizes information about other abstractions and represents a single “thing” that a computer is working on
What is a process?
A process is an abstraction that organizes information about other abstractions and represents a single thing that the computer is “doing”
How is a process different from other OS abstractions, like threads, address spaces, and files?
The process abstraction is not tied to a piece of hardware like threads, address spaces, and files. Instead, processes contain one or more threads, an address space, and zero or more open file handles representing files.
What is a protection boundary?
An abstracted boundary between processes that guarantees that one process cannot crash the machine it’s running on or affect other processes without explicit permission
What functionality must the OS guarantee in regard to communication between processes?
The OS must isolate processes from each other so that a process cannot crash the machine it is running on or affect any other process without permission
How do multiple threads in the same process communicate with each other?
They share memory within the address space of their process.