M4: Uncovering Services Provided by the Operating System Flashcards

1
Q

Control registers

A

Registers in the CPU that are used to store control

information on state of program execution, for example, the program counter and stack pointer.

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

Data registers

A

Registers in the CPU that are used to store the intermediate data used when executing instructions.

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

System call

A

executed in kernel mode and thus requires a context switch.
Provide an interface for the user to interact with the OS and request functionality.
Each system call has a call number, which is used by the system call dispatcher to lookup the code associated with the invoked system call.

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

Blocked queue:

A

a process is placed on the blocked queue, maintained by the OS, if it is waiting for some condition to be true before it is able to proceed in its execution;
one example is a process waiting for a response from an I/O device that is not ready

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

TRAP call

A

a series of assembly instructions leading to he privilege bit being flipped in the CPU to switch it from operating in user mode to kernel mode

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

CPU cache

A

stores copies the data that is frequently accessed by this processor

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

Disk operation

A

an operation requiring a response from the external disk memory

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

Interrupt

A

a notification to the OS for an event that requires servicing; the interrupt may originate from a hardware device or software condition

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

Interrupt identifier

A

used by the OS to map the interrupt notification to the

appropriate handler for the event

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

Disk device driver:

A

device drivers are used as an interface between the

hardware and software to allow the operating system to ignore the specific details of the hardware component being used

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

Interrupt handler

A

A function that is run whenever a particular type of interrupt is invoked and received by a process

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

Segmentation faults (C programming):

A

a failure that occurs when the program
attempts to access a restricted portion or memory, or read/write illegally (e.g. write to a read-only location of memory). This is a means of notifying the OS of
the illegal action, and results in memory protection for the machine.

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

Pointer (C programming):

A

store the addresses or memory locations of variables

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

Dereferencing (C programming)

A

use the address value from the pointer to access the data in the memory location

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

Hardware Interrupts

A

interrupts that are generated at the hardware level,

typically in response to an external event such as a clock tick or completion of a disk request.

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

Clock pulse

A

All motherboards usually come with its own clock. Every clock tick generates a pulse which is delivered to the operating system in order to advance current time and invoke the scheduler.

17
Q

Illegal instruction

A

A hardware instruction that is disallowed, for example, an instruction that cannot be run due to lack of privileges or an instruction that touches memory location that is not available to the current process.

18
Q

Scheduler

A

a piece of software that resides in the scheduler that decides which process to run next.

19
Q

Interrupt Service Routine

A

whenever a hardware interrupt arrives, it is delivered
to the operating system where there is a piece of software called the interrupt service routine that decides how to handle the interrupt. This is analogous to the signal handler.

20
Q

Hardware interrupt ID:

A

a unique identifier assigned to each hardware interrupt.

The interrupt service handler uses this to decide how to handle the specific interrupt.

21
Q

Custom handlers

A

signal handlers that provided in user space and is

customized by the application for handling the particular signal.

22
Q

Default handlers:

A

signal handlers that are default in the operating system

23
Q

Signal relaying

A

sending one signal from one process to another through the kernel.

24
Q

Preemptible signal handlers

A

when a signal handler is running and a new
signal arrives, rather than complete running the signal, if the handler is “preemptible”, it means we can stop the current handler and deal with the signal first.

25
Q

Signal blocking

A

a signal being buffered and delayed at the operating system and not delivered to the process until it is explicitly unblocked.

26
Q

Example HW interrupts

A
  1. Clock PUlse: Time is up
  2. INput: e.g. Keyboard, HW signal
  3. Illegal Instruction
27
Q

Signals for which Default Handlers cannot be overwritten

A

SIGKILL

SIGSTOP

28
Q

Are Signal Handlers Pre-emptible

A

Pre-emptible = signal handler A is running, new signal received, signal handler A stopped and new signal handler is run.
Pre-emption depends. If it is for the same signal type, not, signals processed one at a time per thread. If different and higher priority, then pre-emptible
To avoid preemption, use signal blocking in handler

29
Q

Are Signal Mask Process Dependent

A

Yes. OS needs to keep track, which signals for which process are currently allowed, not blocked. And if not blocked, shall custom or default handler take care

30
Q

Advantages of process abstranction

A

The process abstraction allows the operating system to isolate the resources and context required to perform different tasks

31
Q

Interrupts are only initiated by currently running processes.

A

Interrupts can be initiated by hardware, e.g. clock ticks, completion of I/O requests.