Unit 2: Systems Software Flashcards
What is meant by the term ‘operating system’?
The term ‘operating system’ refers to a collection of programs that provide an interface between the user and computer. Operating systems enable the user to communicate with the computer and perform tasks involving the management of computer memory and resources.
Name 5 features provided by Operating systems.
- File management
- Utility software
- Security
- User interface
What is Paging?
Paging is when memory is split up into equal-sized sections known as pages. These can then be swapped between main memory and the hard disk as needed.
What is Segmentation?
Segmentation is the splitting up of memory into logical sized divisions, known as segments, which vary in size. These represent the structure and logical flow of the program.
What is Virtual Memory and when is it used?
Virtual memory uses a section of the hard drive to act as RAM when the space in main memory is insufficient to store programs being used. Sections of programs not currently being used are temporarily moved into virtual memory through paging, freeing up memory for other programs in RAM.
What is disk thrashing and when does it occur?
Disk thrashing is when the computer ‘freezes’ due to pages being swapped too frequently between the hard disk and main memory. This issue becomes progressively worse as virtual memory is filled up.
What are Interrupts?
Interrupts are signals generated by software or hardware to indicate to the processor that
a process needs attention. Interrupts have different priorities and their urgency is taken into account by the OS when allocating processor time. They are stored in a priority queue in the interrupt register.
Explain how an Interrupt Service Routine is used.
The processor checks the interrupt register at the end of each Fetch-Decode-Execute cycle. If an interrupt exists that is of a higher priority to the process being executed, the current contents of the special purpose registers in the CPU are temporarily transferred into a stack. The processor then uses an interrupt service routine to process the interrupt. The interrupt queue is then checked for further interrupts of a higher priority to the process that was originally being executed. When all priority interrupts have been serviced, the Fetch-Decode-Execute cycle resumes as before.
What is Scheduling and why is it used by the OS?
The operating system ensures all sections of programs being run (known as ‘jobs’) receive a fair amount of processing time. This is done through various scheduling algorithms.
What is starvation (Scheduling)?
Starvation is when a process cannot complete its execution because it is constantly denied processor time.
What are the two types of scheduling algorithms?
- Pre-emptive: Jobs are actively made to start and stop by the
operating system (e.g Shortest Remaining Time, Round Robin) - Non pre-emptive: Once a job is started, it is left alone until it is completed. (e.g First Come First Served, Shortest Job First)
Describe the ‘Round robin’ scheduling algorithm.
Each job is given a section of a time slice in which it is allowed to execute. Once each job in the queue has used its first time slice, this process is repeated until the job has been completed, at which point it is removed from the queue. This means that all jobs will eventually be attended to, however longer jobs will take a much longer time for completion as execution is inefficiently split up into multiple cycles; starvation may occur
Describe the ‘First come first served scheduling’ algorithm.
Jobs are processed in chronological order by which they entered the queue. It is straightforward to implement
Describe the ‘multi-level feedback queue’ algorithm.
Processes are chosen from different queues based on the priority of each queue and how much processing time each process has already had. 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, however it is difficult to implement.
Describe the ‘Shortest job first’ algorithm.
The queue storing jobs to be processed is ordered according to the time required for completion, with the longest jobs being serviced at the end. This is suited to batch systems as waiting time is reduced, however it can result in processor starvation and delays; the processor needs to calculate how long each job will take.
Describe the ‘Shortest remaining time’ algorithm.
The queue storing jobs to be processed is ordered according to the time left for completion, with the jobs with the least time to completion being serviced first. This means throughput is increased as shorter processes can be quickly completed, however as this does not take into account job priority or urgency, starvation may occur if short jobs are continuously added to the queue.
What are the 5 types of operating systems?
- Distributed
- Embedded
- Multi-tasking
- Multi-user
- Real Time
Describe the function and use of a Distributed OS.
Run across multiple devices, allowing the load to be spread across multiple computer processors when a task is run.
Describe the function and use of an Embedded OS.
Built to perform a small range of specific tasks and catered towards a specific device such as a household appliance. They are limited in their functionality and hard to update although they consume significantly less
power than other types of OS.
Describe the function and use of a Multi-tasking OS.
Multi-tasking operating systems enable the user to carry out tasks seemingly simultaneously. This is done by using time slicing to switch quickly between programs and applications in memory.
Describe the function and use of a Multi-user OS.
Multiple users make use of one computer. A scheduling algorithm is used to ensure processor time is shared fairly between jobs and prevent processor starvation.
Describe the function and use of a Real Time OS.
Commonly used in time-critical computer systems, a real time OS is designed to perform a task within a guaranteed time frame. Examples of use include the management of control rods at a nuclear power station or within self-driving cars: any situation where a response within a certain time period is crucial to safety.
What is the BIOS and what is it responsible for?
The Basic Input Output System is the first program that runs when a computer system is
switched on. The BIOS is responsible for running various key tests before the operating
system is loaded into memory, such as:
- POST (Power-on self test) which ensures that all hardware is correctly connected and functional
- Checking the CPU clock, memory and processor is operational
- Testing for external memory devices connected to the computer
After these checks are completed, the operating system can be loaded into RAM from the
hard disk by the bootstrap/ bootloader.
What are Device Drivers?
Device drivers are computer programs which are provided by the operating system and allow the operating system to interact with hardware. When a piece of hardware is used, the device driver communicates this request to the operating system which can then produce the relevant output.