Protection Flashcards

1
Q

Why is protection needed?

A

Must prevent programs from causing disruption from each other when sharing HW & resources

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

What is dual mode operation?

A

Allows us to differentiate between OS code and User code using rings.

Allows the concept of privileged instructions

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

What ring is user mode?

A

Ring 3

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

What ring is kernel mode?

A

Ring 0

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

How is dual mode implemented/differentiated?

A

The mode-bit in hardware shows what mode the instruction is to be implemented as.

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

What mode is the hardware in at boot time?

A

Starts in kernel mode so that the operating system can be loaded. This then starts user processes in user mode

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

How can a switch be made from user to kernel mode?

A

On interrupt, Interrupt Service Routine code executes in kernel mode. Mode-bit must be reset before returning control

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

What does the Hardware Timer do?

A

Generate regular interrupts in order to ensure OS maintains control of the CPU.

At each interrupt, ISR decides whether or not to return control to the current user program.

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

How are Privileged operations carried out?

A

In order to carry out kernel-mode operations, need to use system calls in order to appeal to the Operating system to allow privileged operation

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