Chapter 2 Flashcards

1
Q

what is a command interpreter

A

same thing as a CLI or command line interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what are system calls?

A

provide an interface to the services made available by the operating system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

why are API’s preferable to directly calling system calls?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what are the ways parameters are passed to system calls?

A

through registers, in a block of memory with the address of the memory being put in the register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is a process control system call?

A

manages the creation and termination of processes, loading and executing programs, getting and setting process attributes, allocating and freeing memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is a file management system call?

A

creates, deletes files. opens and clsoes files, reads and writes or moves, gets and sets file attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what are device management system calls?

A

request and release device, read write to the device, get and set device attributes, attach and detach devices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what are information maintenance system calls?

A

get/set time or date, get/set system data, get/set process, file or device attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what are communication system calls?

A

handles interprocess communication

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what two types of constructs are so similar that unix treats them as the same?

A

device management and file system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is the general purpose of information maintenance system calls?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

name the two types of interprocess communications

A

message passing model and shared-memory model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how are daemons used for interprocess communication?

A

a daemon wates for a connection in a client/server model and then facilitates communication with read_message() and write_message()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what are protection system calls?

A

they provide mechanisms for controlling access to resources. like setting and getting permissions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is the difference between system services and system calls?

A

system calls are singular things, system services can be an abstraction of multiple system calls and other logic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what is a linker?

A

a linker combines various object files into a single binary, like including libaries into the final binary output

17
Q

what is a loader?

A

a loader prepares the computer and memory space to run the binary

18
Q

what is a DLL?

A

dynamically linked libraries, it is used to not link every possible library file and instead pulls them in dynamically during run time

19
Q

why are applications OS specific

A

mainly comes down to system calls and various other OS specifics

20
Q

what are some solutions to this?

A

interpreters, virtual machines like the JVM, and cross compilation

21
Q

what do ELF files attempt to solve?

A

provides a common binary format with headers, instructions and variables that the OS can consistently understand how to run and load

22
Q

what is an ABI?

A

application binary interface, used to define how different components of binary code can interface for a given OS

23
Q

what problem do ABI’s solve?

A

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

24
Q

what is a monolithic OS structure?

A

when the kernel is placed into a single static binary file that runs in a single address space

25
Q

what is a layered OS design structure?

A

an os separated into smaller components that have specific and limited functionality

26
Q

what advantage do layered OS designs have?

A

they are less coupled, changes in one area do not necessarily impact another area of the OS or kernel

27
Q

what type of structure do modern OS’s use?

A

they use a hybrid of monolithic and layered as layered can be slow. the kernel is monolithic for performance

28
Q

what is a microkernel?

A

removes all nonessential components and makes them part of user space in the OS

29
Q

what are Loadable Kernel Modules?

A

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

30
Q

what is a boot loader?

A

it locates the kernel and loads it into memory

31
Q

what does grub do?

A

grub allows you to load different OS kernels into memory, can boot multiple OS’s

32
Q

what are OS counters?

A

they keep track of various stats of processes running on the OS, crucial for system monitoring for data tools like top or vmstat

33
Q

what is tracing in the OS?

A

provides detailed event by event information about system behavior. used for debugging or to find out what went wrong with

34
Q

what does the BCC do?

A

provided tracing at the kernel level, is a higher level abstraction on top of eBPF