Week 9 Flashcards
What is an operating system?
It’s a software that runs and makes a machine useable when there’s no application process running.
It’s a collection of a large number of services, some of which are provided all the time and others available to user programs via machine code requests (usually via an instruction like TRAP).
What happens when a computer starts up?
It executes its reset handler which is in read only memory (ROM). Programs that are permanently in ROM on a computer are known as firmware.
Where is the operating system held?
Some in ROM (basic input-output system B|OS) and some in firmware. The reset handler will normally go into the BIOS.
What is multitasking or concurrency?
When an OS can run several programs at once. When two or more processes are switched between when we are waiting for I/O to complete, several processes can progress at the same time on one CPU. This is called multi-tasking.
What are examples of operating systems?
Windows, unix, iOS, Android
Can multiple users be supported on multitasking operating systems?
Yes, eg Unix
What happened before operating systems existed in computers when the user wanted to run a program?
Operators using toggle switches loaded the program.
What does physical input/output involve?
Input and output (collectively I/O) involves the movement of binary codewords from/to external input or output peripherals.
What are examples of I/O devices?
Keyboard (input-only)
Screen (output-only)
Disk (both)
Why does running a single program using I/O take so long?
After instructions have been executed, there is a wait time for the I/O devices to complete.
What is a process?
It’s related to a program but differs from it as follows:
- A program is a static entity, either a source program written as text, or a binary image containing machine code
- A process is a running program and so is dynamic, continually changing as time passes and its instructions are executed
- When a program is loaded into primary memory and is ready to run, it becomes a process. When it is ready to run, it’s seen to be in a “waiting state”.
Why would a process stop running?
- The programmer has designed it that way by adding in a TRAP instruction.
- It can be aborted by the OS or a user with no intention of resuming it.
- It can be suspended by the OS with the intention of resuming it later.
- It is less complicated to resume a process if it is suspended between instruction cycles.
- To resume a process successfully, the contents of all the CPU registers and memory locations it is using must be preserved.
What is the “state” in the context of processes?
The collection of information needed to resume a process later.
What is a context switch?
When a process is waiting on I/O, it can be suspended with it’s state carefully saved, and another process can then start up. When we switch from one process to another, this is called a context switch.
What is the “ready” state in multi-tasking?
When the processes are not actually executing but are ready to go when the CPU becomes available.