Ch. 1 - Introduction Flashcards
Software can be grouped into 2 categories. Name both and give an example of each.
Applications Software (eg. games, apps)
Systems Software (eg. OS, utilities)
Why do extremely fast programs not interact with the operating system?
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.
Operating System (OS)
A resource manager of both time (on a given resource) and space (different units of the same resource).
What are the 3 roles an operating system takes on?
Referee
Illusionist
Glue
Referee (Role of OS)
-Ensure resources are allocated fairly
-Isolate different users/applications
-Allow for communication between users/applications (when applicable)
Illusionist (Role of OS)
-Each application appears to have the entire machine to itself
-Illusion of an infinite number of processors and memory
Glue (Role of OS)
OS provides libraries, and user interface widgets which “glue” everything together
What did the earliest computers use for input?
Panel Switches
Describe the steps involved in using an early batch system
- Bring punch card to card reader which goes through tape drive
- Use the tape from tape drive a Data Processing System (7094) which does computing
- Use result tape from 7094 in printer which prints results
What is the goal of job interleaving?
To decrease total idle time
True or False: By using job interleaving, the time to execute each individual job (NOT total time for all jobs) decreases
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.
Interrupts (Definition and Example)
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
Traps (Definition and Example)
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
Describe the steps required to handle an interrupt
- Save the current state of CPU and branch to OS
- Determine what kind of interrupt occurred using Interrupt Service Routine (ISR)
- Execute ISR to handle interrupt
- Return to interrupted program (at point saved in step 1)
True or False: A user program cannot be affected by an interrupt
True. After an interrupt is serviced, the state of the user program before the interrupt is restored.