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:
Why would a process stop running?
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.
What is a “timer” in multitasking?
It sets time periods to interrupt the processor and stop the CPU doing what it’s doing and jump to a handler routine.
What is a handler routine?
Some kind of OS and would decide of the several processes that are active which one will go next.
What is an “interrupt” in multitasking?
It is a hardware signal from a device to the CPU which will stop it executing the current process. This is called a process break. The processes are executing in memory.
What issues occur with multitasking?
How is the operating system designed to support multitasking?
What is Process Control?
It is implemented by the central core of machine code in the operating system (i.e. the Kernel). It is a fundamental service by any multitasking OS.
What are some points on multitasking on one CPU?
The CPU is executing just one instruction. That instruction must belong to a process or to the OS.
How often does the CPU switch between processes?
Depends on when the timer is set for (but around 100 times per second)
What states will the process in a multitasking system always be in?
Either: