Chapter 2 - introduction to operating systems Flashcards

1
Q

what is an operating system

A

body of software as it is in charge of making sure the system operates correctly and efficiently

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

virtual machine

A

OS takes a physical resource and transforms it to virtual form

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

time sharing

A

OS switches quickly between programs

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

context switch

A

makes one CPU look like many

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

how to read memory

A

specify address - access the data stored there

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

where does a program keep its data structure

A

memory

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

what does malloc do

A

gets memory at a specific address

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

What is virtual memory?

A

A memory management technique where each process gets a private address space, managed by the OS.

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

Why does a program think it has all the memory to itself?

A

because the OS abstracts and manages the underlying physical memory

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

concurrency

A

host of problems that arise, must be addressed when working on many things at once

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

thread

A

function running within the same memory space as other functions, more than one of them active at a time

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

not atomic

A

another thread can interrupt in the middle -> gets different output with different threads

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

race condition

A

outcome depends on timing of thread switching

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

data race

A

A type of bug caused by unsynchronized access to shared data by multiple threads.

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

storing devices - why

A

SDD/hard drives - keep data permanently

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

3 basic system calls

A

open, write, close

17
Q

how to prevent losing data after crash

A

use storing devices

18
Q

what part of OS manages disk storage

A

file system

19
Q

are files shared across programs - what does not

A

yes - CPU and memory

20
Q

how does OS handle file storage behind the scenes

A

finds where to place the file - manages metadata - performs I/O requests to storage devices

21
Q

journaling/write-ahead logging

A

write a log before writing real data to recover from crashes -

22
Q

wha should OS minimize

A

time overhead (extra instructions)
space overhead (memory of disk use)

23
Q

main goal of operating system

A

build abstractions that hide hardware complexity

24
Q

how do files act as abstractions

A

hide the details of disk storage

25
what should OS protect
processes from each other and from the OS itself
26
Why is OS reliability important?
Because if the OS crashes, everything else crashes too