Chapter 2 Flashcards
what is a command interpreter
same thing as a CLI or command line interface
what are system calls?
provide an interface to the services made available by the operating system
why are API’s preferable to directly calling system calls?
API’s provide a level of abstraction to ensure portability they are also generally simplified interfaces compared to the sys call. API’s are the interface between user mode and kernel mode
what are the ways parameters are passed to system calls?
through registers, in a block of memory with the address of the memory being put in the register
what is a process control system call?
manages the creation and termination of processes, loading and executing programs, getting and setting process attributes, allocating and freeing memory
what is a file management system call?
creates, deletes files. opens and clsoes files, reads and writes or moves, gets and sets file attributes
what are device management system calls?
request and release device, read write to the device, get and set device attributes, attach and detach devices
what are information maintenance system calls?
get/set time or date, get/set system data, get/set process, file or device attributes
what are communication system calls?
handles interprocess communication
what two types of constructs are so similar that unix treats them as the same?
device management and file system
what is the general purpose of information maintenance system calls?
to simply transfer information between the user program and the operating system. just generic things that may not fit exclusively into the various buckets, like version numbers or date time. they also critically provide stack traces
name the two types of interprocess communications
message passing model and shared-memory model
how are daemons used for interprocess communication?
a daemon wates for a connection in a client/server model and then facilitates communication with read_message() and write_message()
what are protection system calls?
they provide mechanisms for controlling access to resources. like setting and getting permissions
what is the difference between system services and system calls?
system calls are singular things, system services can be an abstraction of multiple system calls and other logic
what is a linker?
a linker combines various object files into a single binary, like including libaries into the final binary output
what is a loader?
a loader prepares the computer and memory space to run the binary
what is a DLL?
dynamically linked libraries, it is used to not link every possible library file and instead pulls them in dynamically during run time
why are applications OS specific
mainly comes down to system calls and various other OS specifics
what are some solutions to this?
interpreters, virtual machines like the JVM, and cross compilation
what do ELF files attempt to solve?
provides a common binary format with headers, instructions and variables that the OS can consistently understand how to run and load
what is an ABI?
application binary interface, used to define how different components of binary code can interface for a given OS
what problem do ABI’s solve?
they define a common interface to define how things like system calls are encoded at the binary level to ensure that registers in a specific architecture are used
what is a monolithic OS structure?
when the kernel is placed into a single static binary file that runs in a single address space
what is a layered OS design structure?
an os separated into smaller components that have specific and limited functionality
what advantage do layered OS designs have?
they are less coupled, changes in one area do not necessarily impact another area of the OS or kernel
what type of structure do modern OS’s use?
they use a hybrid of monolithic and layered as layered can be slow. the kernel is monolithic for performance
what is a microkernel?
removes all nonessential components and makes them part of user space in the OS
what are Loadable Kernel Modules?
LKM’s provide a small kernel with other modules that can be dynamically loaded while the kernel is still loading that would otherwise require the kernel to be recompiled
what is a boot loader?
it locates the kernel and loads it into memory
what does grub do?
grub allows you to load different OS kernels into memory, can boot multiple OS’s
what are OS counters?
they keep track of various stats of processes running on the OS, crucial for system monitoring for data tools like top or vmstat
what is tracing in the OS?
provides detailed event by event information about system behavior. used for debugging or to find out what went wrong with
what does the BCC do?
provided tracing at the kernel level, is a higher level abstraction on top of eBPF