1.2.1 Software and software development Flashcards
What is an operating system?
An operating system is a program or set of programs that manages the operations of the computer for the user.
Why do we need an operating system?
To act as a bridge between the user and the computer’s hardware, since a user cannot communicate with hardware directly.
Give three functions of an operating system?
Memory management
Resource management
Interrupt management
Security
User interface
Utility software
What 3 process does memory management entail?
Tracking the status of memory allocation
Determining storage requirements
Controlling memory usage
How does the OS Track the status of memory allocation?
Memory is divided up into physical address spaces
The OS initially marks each space as free
When required, the OS loads data into these spaces and marks them as allocated
When the data or instructions are no longer needed, the OS marks the spaces as free again, which allows the data that is stored in these spaces to be overwritten
How does the OS determine storage requirements?
The OS reserves blocks of addresses for each process to use
How does the OS control memory usage?
The OS manages swapping between processes and their memory space in order to provide memory access as required.
Name 2 methods of partitioning memory?
Paging
Segmentation
Name 3 features unique to paging?
Pages are fixed size.
Pages are stored discontinuously.
Pages are physical divisions.
Name 3 features unique to segmentation?
Segments are variable sizes.
Segments are stored contiguously.
Segments are logical divisions.
What are 2 similarities between paging and segmentation?
Both allow programs to be stored non-contiguously
Both use virtual memory
How does a multi-level feedback queue work?
Initially, processes are added to a queue with a certain level of priority.
If a process uses too much CPU time, it is moved to a lower priority queue and if a process has been idle for a long time, it is moved to a higher priority queue. This helps avoid starvation.
Processes that depend on input/output devices require a lot of processing time, so they are kept in high priority queues, and processes that are quick to complete are served first.
How is virtual memory used when there is not enough RAM?
A section of the hard drive is used to act as RAM
Sections of programs not currently being used are temporarily moved into virtual memory through paging/segmentation
This frees up memory for other programs in RAM
What is an interrupt?
An interrupt is a signal from a software program, hardware device or internal clock to the CPU.
In-between what steps in the FDE cycle does the interrupt occur?
Execute & Fetch
What are the 5 steps of the interrupt service routine?
- Complete the current Fetch-Decode-Execute Cycle.
- Check the priority of the incoming interrupt.
- If it’s of a higher priority than the current task
a. Contents of the registers stored in a stack. - The relevant interrupt service routine is loaded by loading the relevant value into the program counter.
- When the ISR (interrupt service routine) is complete the
What is a scheduler?
The scheduler is the operating system module responsible for making sure that processor time is used as effective as possible.
Name 5 scheduling algorithms?
Round robin
First come first served
Shortest job first
Shortest remaining time
Multi-level feedback queue
How does round robin scheduling work?
In round robin scheduling, processes are despatched on a first in first out (FIFO) basis
Each process in turn being given a limited amount of CPU time called a time slice.
If the process does not complete before its time expires, or before a high priority interrupt occurs, the despatcher gives the CPU to the next process.
In order to do this, the operating system sets an interrupting clock or interval timer to generate interrupts at specific times.
How does fist come first serve scheduling work?
Jobs are processed in the order in which they arrive, with no system of priorities.
How does shortest job first scheduling work?
The process with smallest estimated running time is next.
How does shortest remaining time scheduling work?
The process with the smallest estimated time to completion is run next.
How does a multi-level feedback queue work?
Initially, processes are added to a queue with a certain level of priority.
If a process uses too much CPU time, it is moved to a lower priority queue and if a process has been idle for a long time, it is moved to a higher priority queue. This helps avoid starvation.
Processes that depend on input/output devices require a lot of processing time, so they are kept in high priority queues, and processes that are quick to complete are served first.
Name an advantage of a multi-level feedback queue?
Services most urgent interrupt first
Name an disadvantage of a multi-level feedback queue?
Hard to implement
Name 5 types of operating systems?
Distributed
Embedded
Multitasking
Multi-user
Real time
Define a distributed system?
A distributed operating system coordinates the communication between computer nodes and makes them component parts that are joined together as a whole.
Define a embedded system?
Embedded operating systems are used in computers which only serve a specific purpose, such as mobile phones and washing machines.
Define a multitasking system?
A multitasking operating system manages the computer’s resources to provide the illusion to the user that it is possible to switch between tasks.
Define a multi-user system?
A multi-user operating system provides the facilities for multiple users to access the same system.
Define a real time system?
A real-time operating systems perform a task within a guaranteed timeframe.
Give 3 examples of real time systems being used?
Nuclear power station
Aeroplane
Self driving cars
What does POST stand for?
Power-on Self-test
What does BIOS stand for?
Basic Input Output System
Where are the BIOS settings stored?
Flash memory
What is the name of the program used to load the OS into memory?
Bootstrap
Name 3 roles the BIOS has?
Checks the computer is functional
POST test
Run bootstrap
Define a device driver?
Software that tells the operating system how to communicate with a device
Define a device driver?
Software that tells the operating system how to communicate with a device