textbook chapter 8 Flashcards

1
Q

(8.0) Define control transfer

A

Human Def: Moving from one instruction to another either by sequence or branch / returns.

Textbook Def: A transition from address a(k) -> a(k+1), where a(k) is the address of some corresponding instruction l(k).

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

(8.0) Define control flow

A

A sequence of control transfers

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

(8.0) Define Exceptional Control Flow (ECF)

A

Abrupt changes in the control flow not caused by the internal program. Computers need to do a lot of things, such as: context switch between processes, handle incoming network packets, user I/O, etc.

Exception: an abrupt change in the control flow in response to some
change in the processor’s state.

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

(8.0) What is a system call?

A

As an application user, it is requesting services from the OS.

Examples: Writing data to a disk, reading network data.

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

(8.1) What is an event? (In terms of exceptions and control flow)

A

A change in the processors state.

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

(8.1) True or False: All exceptions that a program faces are due to its current instruction.

A

False. An exception CAN occur because of a program’s instruction, such as a divide by 0, but could also occur due to a system timer going off or the need to read in network data.

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

(8.1) What goes on when the processor detects an exceptional event has occurred?

A

It makes an indirect procedure call (The exception), through a jump table called an exception
table, to an operating system subroutine (the exception handler) that is specifically designed to process this particular kind of event.

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

(8.1) What are the three ways the handler can finish its processing?

A
  1. Return to current instruction.
  2. Return to next instruction
  3. Abort the program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

(8.1.1) What kind of exceptions are handled by the OS?

A

Divide by zero, page faults, memory access violations, break-points, arithmetic overflows.

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

(8.1.1) What kind of exceptions are handled by the processor?

A

System calls, I/O device signals.

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

(8.1.1) When is the jump table (exception table) initialized?

A

At system boot time (when the computer is reset or power,ed on)

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

(8.1.1) Define exception / jump table.

A

The exception table is a
jump table where entry
k contains the address
of the handler code for
exception k.

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

(8.1.1) What is the exception table base register?

A

The exception number is an index into the exception table, whose starting address is contained in a special CPU register called the exception table base register.

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

(8.1.1) Which mode do exception handlers run in?

A

Kernel mode (complete access to all system resources)

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

(8.1.1) Distribution of load between hardware and software

A

Once the hardware triggers the exception, the rest of the work is done in software by the exception handler.

After the handler has processed the event, it
optionally returns to the interrupted program by executing a special “return from interrupt” instruction

, which pops the appropriate state back into the processor’s control and data registers, restores the state to user mode if the
exception interrupted a user program, and then returns control to the interrupted program.

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

(8.1.2) Four classes of exceptions

A

(1) Interrupt
- I/O Signal
- Async
- Always returns to next instruction

(2) Trap
- Intentional exception
- Sync
- Always returns to next instruction

(3) Fault
- Potentially recoverable error
- Sync
- Might return to current instruction

(4) Abort
- Nonrecoverable
- Sync
- Never returns

17
Q

(8.2) Define process

A

an instance of a program in execution.

18
Q

(8.2.2) Define concurrency

A

The. general phenomenon of multiple flows executing concurrently

19
Q

(8.2.2) Define multitasking

A

The notion of a process taking turns with other processes

Also known as time slicing.

20
Q

(8.2.2) Define parallel flow

A

If two flows are running concurrently on different
processor cores or computers, then we say that they are parallel flows, that they are running in parallel, and have parallel execution.

21
Q

(8.2.3) Private address space

A

A process provides each program with the illusion that it has exclusive use of the system’s address space.

This space is private in the sense that a byte of memory associated with a particular address in the space cannot in general be read or written by any other process.

22
Q

(8.2.5) Context Switches

A