Lecture 2: Virtualization and system calls Flashcards

1
Q

Layers

A

Applications
|
Libraries
|
Kernel
|
hardware

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

What is a process and how they work

A

It’s a running instance of a program

Gives the machine an illusion that it has the whole machine to itself through the use of Virtual memory addresses

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

System calls

A

A system call API is an interface that makes OS services available to user programs

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

What is an exception?
How does the OS handle it?

A

an exception is the transfer of control to the os kernel in response to some event

The kernel gets a corresponding exception handler to process the exception

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

System call numbers

A

To associate each system call with a number, the kernel uses the system call dispatch table, which is stored in the sys_call_table array

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

Control flow & altering the control flow

Program state?
System state?

A

From start to shutdown, the cpu executes a sequence of instructions one at a time.

We can alter the control flow using
- Jumps and Branches
- Call and Return
These react to changes in a program’s state

Not sufficient for changes in system state

So the system needs a mechanism for exception control

Hi-level
- exceptions
low-level
- process context switch

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

Synchronous and Asynchronous exceptions

A

Asynchronous: Caused by events external to the processor
- Timer interrupt
- I/O interrupt

Synchronous: Caused by executing an instruction
- Traps: intentional
- Faults: unintentional but recoverable
- Aborts: Unintentional and unrecoverable

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

Fault examples

A

Page Fault: User writes to memory location
Invalid Memory reference fault: sends SIGSEGV to the user process, and the user process exits with a segmentation fault (accessing in invalid index in an array)

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