Ch. 1 - Introduction Flashcards

1
Q

Software can be grouped into 2 categories. Name both and give an example of each.

A

Applications Software (eg. games, apps)
Systems Software (eg. OS, utilities)

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

Why do extremely fast programs not interact with the operating system?

A

Extremely fast programs interact with the hardware directly. The drawback is that it is more challenging to create a program that directly interacts with the hardware.

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

Operating System (OS)

A

A resource manager of both time (on a given resource) and space (different units of the same resource).

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

What are the 3 roles an operating system takes on?

A

Referee
Illusionist
Glue

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

Referee (Role of OS)

A

-Ensure resources are allocated fairly
-Isolate different users/applications
-Allow for communication between users/applications (when applicable)

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

Illusionist (Role of OS)

A

-Each application appears to have the entire machine to itself
-Illusion of an infinite number of processors and memory

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

Glue (Role of OS)

A

OS provides libraries, and user interface widgets which “glue” everything together

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

What did the earliest computers use for input?

A

Panel Switches

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

Describe the steps involved in using an early batch system

A
  1. Bring punch card to card reader which goes through tape drive
  2. Use the tape from tape drive a Data Processing System (7094) which does computing
  3. Use result tape from 7094 in printer which prints results
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the goal of job interleaving?

A

To decrease total idle time

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

True or False: By using job interleaving, the time to execute each individual job (NOT total time for all jobs) decreases

A

False. The total time for all jobs will improve significantly, however the time for a single job may increase since the job may have to wait for another job to finish using the CPU or finish performing I/O.

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

Interrupts (Definition and Example)

A

Notification of an external event that occurs asynchronously with the current activity of the processor. Exact occurrence time is not known and not predictable.

Examples: Character typed on keyboard, timer

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

Traps (Definition and Example)

A

Notification of an internal event that occurs while a program is executing and thus synchronous with the current activity of the processor. They are immediate and predictable.

Examples: System call, error, page fault

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

Describe the steps required to handle an interrupt

A
  1. Save the current state of CPU and branch to OS
  2. Determine what kind of interrupt occurred using Interrupt Service Routine (ISR)
  3. Execute ISR to handle interrupt
  4. Return to interrupted program (at point saved in step 1)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

True or False: A user program cannot be affected by an interrupt

A

True. After an interrupt is serviced, the state of the user program before the interrupt is restored.

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

Programmed I/O

A

The CPU transfers data to or from the device buffers. After issuing an I/O operation, the CPU continuously polls for its completion. CPU cannot resume execution of program until I/O is complete.

17
Q

Interrupt-driven I/O

A

CPU issues an I/O operation and goes on to some other work. The device interrupts the CPU as each byte or word arrives. CPU handles the data transfer.

18
Q

Direct Memory Access (DMA)

A

CPU issues an I/O operation specifying:
the device
memory location of the data
block size

This allows the CPU to do other work. The DMA device interrupts the CPU upon the completion of the requested operation.

19
Q

Nesting of Interrupts

A

A new higher priority interrupt that occurs while a lower priority interrupt is being serviced will suspend the current interrupt handler until the new interrupt is processed.

20
Q

True or False: More than 1 interrupt can be triggered at the same time

A

False. When more than 1 interrupt is triggered successively, the OS prioritizes interrupts based on their priority.

21
Q

Supervisor Mode (aka Protected/Kernel Mode)

A

All basic and privileged instructions (i.e. I/O operations) available

22
Q

User Mode

A

Subset of instructions that can be used by user (basic instructions only).

23
Q

Why does the OS have 2 modes?

A

-Protect itself from the user program
-Protect multiple programs from themselves
-To give OS authority over resource management

24
Q

System Call (Definition & Implementation)

A

Enter the operating system and perform a privileged operation (changes execution mode of the CPU). Implemented as a trap

25
Q

Describe how a system call is serviced

A
  1. Verify arguments and switch to supervisor mode
  2. Branch to service function
  3. Return from service function and switch back to user mode
  4. Return from system call
26
Q

True or False: All portions of the OS are used to service the current active process

A

False. Some portions of the OS remain in main memory to service critical operations such as dispatching and interrupt handling. This portion of the OS is called the kernel