Chapter 2 - introduction to operating systems Flashcards
(23 cards)
what is an operating system
body of software as in charge of making sure the system operates correctly and efficiently
virtual machine
OS takes a physical resource and transforms it to virtual form
time sharing
OS switches quickly between programs
context switch
makes one CPU look like many
how to read memory
specify address - access the data stored there
where does a program keep its data structure
memory
what does malloc do
gets memory at a specific address
What is virtual memory?
technique where each process gets a private address space, managed by the OS
concurrency
host of problems that arise
thread
function running within the same memory space as other functions
a thread is not atomic - what does that mean
another thread can interrupt in the middle -> gets different output with different threads
race condition
outcome depends on timing of thread switching
data race
A type of bug caused by unsynchronized access to shared data by multiple threads.
storing devices - why
SDD/hard drives - keep data permanently
3 basic system calls
open, write, close
how to prevent losing data after crash
use storing devices
what part of OS manages disk storage
file system
are files shared across programs - what does not
yes - CPU and memory
what is journaling/write-ahead logging
write a log before writing real data to recover from crashes -
what should OS minimize
time overhead (extra instructions)
space overhead (memory of disk use)
main goal of operating system
build abstractions that hide hardware complexity
what should OS protect
processes from each other and from the OS itself
Why is OS reliability important?
Because if the OS crashes, everything else crashes too