Lecture 9 - Operating Systems Flashcards
Evolution of OSs Explore OSs in connection with input & output
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.
Explain how BIOS works
When the computer is turned on, the BIOS:
1.Checks everything is working properly
2Tests & ensures boot devices are functioning.
Boot devices are any piece of hardware containing files the computer needs to start.
3.BIOS loads the OS (or key parts of it ) into the computer’s random-access memory (RAM) from a hard disk or diskette drive (the boot device)
Name three examples of operating systems
Windows, iOS, Unix, Android
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 the challenges with multitasking?
Need to manage shared resources to prevent them from interfering with each other.
Shared resources include the processor, memory & IO devices (input/output devices).
Needs more complex software & additional hardware
If addressed, can support multiple users at the same time (eg., Unix) or several users at different times.
What is an operating system?
Is software that runs and manages other programs because of special privileges it is given on the hardware
Typically, the OS is the first one to start when a computer is turned on & all other subsequent programs are launched by the OS.
It’s a collection of a large number of services (eg., program execution, I/O operations..), 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 is another word for the Central Processing Unit (CPU)?
A processor
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.
Give 3 examples of I/O devices.
Input: Keyboard
Output: Screen
Input/Output: Disk
What happened before operating systems existed in computers when the user wanted to run a program?
Operators using toggle switches loaded the program.
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 do all IO devices have in common?
They are complex to set up & hard for programmers to use directly.
Give some examples of devices that contain Firmware?
Traffic lights, computers, mobile phones etc.
Give an example of a type of Firmware.
BIOS is short for Basic Input/Output System.
It is a program which runs when the system starts before the operating system starts.
What is the difference between program and processes? And how are they linked?
A process is related to a program, but differs 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’s ready to run, it’s seen to be in a “waiting state”.
What is a program?
A static entity, either a source program written as text, or a binary image containing machine code.
What is a process?
a running program and so is dynamic, continually changing as time passes and its instructions are executed.
Why would a process stop running?
And how would the process resume?
- The programmer designed it that way by adding a TRAP instruction.
- It can be aborted by the OS or user with no intention of resuming it
- It can be suspended by the OS with the intention of it resuming 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.
Why is it less complicated to resume a process between instruction cycles?
Because the instruction cycle has finished only the programmers code needs to be perserved.
If you did this during the instruction cycle, the state of all of the registers such as instruction, address and memory registers need to be considered which is much more complicated.