Week 2 Flashcards
(71 cards)
3 Main OS Tasks
- Virtualize Resources
- Managing I/O
- Making the above easy
What does mediate mean
processes cannot interfere with each other
What an OS Looks like
Programs/process <-> OS <-> CPU/RAM/Device Drivers
What is batch mode?
submit a large computaion, wait for result, then submit another one
What did even early machines have?
Libraries of functions (common I/O functions)
In the 1960 breakthrough, what was implemented
Separation, given the OPTION to use programs
3 ways to implement separation for CPU Virtualization
- Give CPU 2 execution modes
- Define a trap –> an instruction to switch into OS code and back
- Ring of fire –> More flexibility
What are the different Ring of Fire levels
Level 0: OS/ Kernel
Level 3: Processes/apps
What enabled Multiprogramming?
Memory protection: allowing programs to share a memory / see their own area for memory through VIRTUAL MEMORY
What is CPU Virtualization
The art of “slicing” a CPU. An OS should be able to:
1. run and stop a program
2. decide which program should run
3. divide CPU time fairly
What is Memory Virtualization
Gives every process the same VIRTUAL ADDRESS SPACE
Each process gets the illusion of having the memory to itself.
Virtual address is mapped to the physical space.
Mapping can change and isn’t always 1:
Difference between Concurrency and CPU Virtualization
CPU Virtualization gives the “illusion” of concurrency by taking turns.
Concurrency: Different parts of A SINGLE program cooperate to complete a task.
What 2 requirements for Concurrency?
- Different parts of the program are able to communicate
- Ability to synchronize access to shared data
Virtual Memory vs Shared Disk?
Virtual Memory: works because processes mostly need their own memory space and only sometimes need to share MEMORY data
Shared Disk: Works because it is very common for programs to use / share DISK data
What is a command line?
Provided by a utility called a shell, it runs the terminal
What is a shell?
A program that presents a prompt and waits for text commands
What are commands?
Names of executable programs that you want to run.
Detailed Steps of how a shell command works.
- files are compiled programs called binaries
- OS loads the binary into memory and executes it
- OS stores metadata about each process (process ID / PID)
What are binaries
compiled programs
What is a process?
An executing program/binary. A program that is being executed.
What are shell environment variables
Stores configuration information and values for the shell. Which modifies the behavior of the shell.
How are shell metadata stored?
Stored as KEY-VALUE pairs. Each pair represents a variable and a value.
Ex: “VAR1_NAME = VAR1_VALUE”
Who can modify/read variables?
Shell, programs, and the user
what is PATH
Tells the shell which folder it should look for in programs.