Lesson 1 Flashcards
Intro
What is an OS
Software that manages a computers hardware. Provides interface between the computer user and the computer hardware
What is a resource allocator?
the OS acts as a manager of CPU, memory, storage, IO
What is a control program?
manages the execution of user programs to prevent errors and improper use of the computer. Especially with IO devices
What is a bus?
provides access between components and shared memory
What is a device controller?
maintains local buffer storage and set of registers. responsible for moving data between peripherals and local buffer storage
what is a device driver?
driver understands the device controller and provides the OS with an interface to the device
what is an interrupt?
hardware can trigger an interrupt at any time by sending a signal to the CPU on the system bus (usually)
what is an interrupt vector?
a list of addresses (pointers) to the interrupt
high level explanation of interrupt flow
CPU uses interrupt-request line that the CPU checks after executing every instruction, when CPU detects an interrupt it reads the number and jumps to the pointer in the interrupt vector. then returns with “return_from_interrupt”
how does the CPU know which interrupts to prioritize?
interrups have interrupt priority levels
What is the difference between main and secondary memory?
main memory is ram, secondary is storage devices like HDD’s, ssd’s, etc
what is direct memory access? (DMA)
Used for bulk movement of data, basically copies entire blocks of memory of data directly to or from the devices and main memory, only requires 1 interrupt
how do clustered systems work?
utilize SAN’s and distributed lock managers to perform compute across shared stroage (think database)
What is a process?
programs that are organized so that the CPU always has one to execute in a multiprogrammed system
how do multiprogrammed systems works?
the OS keeps several processes in memory simultaneously and works on them switching back and forth when IO is needed
what are the two modes provided by the OS?
User mode and Kernel mode
What is the purpose of dual-modes in the OS?
to ensure that programs cannot cause other programs to execute incorrectly
What mode do system calls execute in?
kernel mode
When exceptions or interrupts occur, which mode does the OS switch into?
kernel mode
what is a mode bit?
a bit that designates whether the OS is in kernel or user mode
describe what happens when a syscall is executed?
treated as a software interrupt, control is passed through the interrupt vector to a service routine in the OS and mode bit is set to kernel. the kernel examines the interrupt and calls the syscall
what is a timer used for?
to ensure that a user program doesn’t get stuck in an infinite loop or fail to give control back to the OS
what is a program counter?
keeps a list of next instructions to execute
what is the difference between processes and user programs?
programs are passive, processes are active
What is the OS responsible for when it comes to memory?
Keeps track of memory being used, allocates and deallocates memory, moves processes in and out of memory