Lecture 1 Flashcards

1
Q

Examples of Computer Hardware

A

CPU, RAM, Storage

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

Operating Systems enable…

A

…the user to interact with hardware

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

Examples of System/Application Programs

A

Compilers, Text Editors, Database Management Systems

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

Operating Systems act as…

A

…Resource allocators and control programs

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

What useful functions do operating systems provide on their own?

A

None (Waits for user or programs to do something)

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

Resource Allocator

A
  • Manages all resources
  • Decides between conflicting requests for efficient/fair
    resource use
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Control Program

A

Prevents errors and improper use of the computer

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

Operating System Goals

A
  • Make system convenient to use (more important for
    PCs)
  • Use hardware efficiently (more important for shared
    systems)
  • Sacrifice performance to improve lifetime of resources
    (Only done sometimes)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

CPUs and device controllers connect through a bus to…

A

…Shared memory, which becomes a means of communication

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

Steps of an I/O operation

A
  • CPU sends read request (CPU and I/O device
    controllers execute concurrently)
  • Incoming data written to I/O device’s local buffer
  • When I/O complete, send CPU an interrupt
  • CPU services interrupt, read from I/O local buffer to
    main memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Interrupts are ____ events

A

Asynchronous

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

On an interrupt, OS preserves state of CPU by storing ____ and the ____

A

Registers and the Program Counter

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

Interrupt is processed by calling the corresponding…

A

…ISR (Interrupt Service Routine)

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

How would OS locate the correct ISR?

A
  • An interrupt vector is stored at a known location in
    memory
  • Each entry contains the address of an ISR
  • Interrupt number is mapped to an entry in interrupt
    vector
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does interrupt (or event) driven mean?

A

OS sits idle until something happens

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

Interrupts are generated by…

A

…Hardware devices

17
Q

Traps/Exceptions are software-generated interrupts due to…

A

…Errors, or requests for OS services (system calls)

18
Q

4 potential problems with user code

A
  • Can be buggy/malicious
  • Can corrupt hardware
  • Can corrupt OS
  • Can corrupt or access other users’ software/files
19
Q

How to protect from user’s code?

A

Allow only OS to perform certain operations

20
Q

OS operates in two modes: ____ and ____

A

User and Kernel

21
Q

____ in hardware indicates OS’ current mode

A

Mode bit

22
Q

What are privileged instructions?

A

Instructions that are predetermined to possibly cause harm

23
Q

Hardware executes privileged instructions only in…

A

…Kernel mode

24
Q

OS ensures ____ and ____ of privileged instruction before execution

A

Safety and correctness

25
Q

How can users access privileged instructions?

A

System calls, which use software-generated interrupts

26
Q

When an interrupt or trap is generated, control is transferred to…

A

…the OS