1.2.1 system software Flashcards
what is an operating system
A collection of programs that work together to provide an interface between the user and a computer.
Operating systems enable the user to communicate with the computer and perform certain low-level tasks involving the
management of computer memory and resources
describe how virtual memory is used when there is not enough RAM
-A section of the hard drive is used to act as RAM
-sections of programs that are not currently in use are temporarily moved to virtual memory through paging.
-this frees up memory for other programs in RAM
similarities and differences between paging and segmentation
BOTH are used when RAMs space is inefficient, can cause disk thrashing
paging uses equal sized sections called pages
segmentation uses variable sized, logical sections called segments
give 3 functions of an operating system
-memory management
-resource management
-i/o management
-security
-user interface
-utility software
what is an interrupt
a signal generated by software or hardware to indicate to the processer that a process needs attention.
Explain the stages of the interrupt service routine
-interrupt register is checked at the end of every FDE cycle
-if there is an interrupt that is of higher priority compared to the current process the current contents of the registers in the CPU are transferred into a stack
- the relevent interrupt service routine (ISR) is loaded into RAM
-A flag is set to signal the ISR has begun
-the flag is reset once the ISR has finished
-interrupt register checked again. If interrupts are of a higher priority the process is repeated.
-if there are no interrupts with a higher priority, the contents of the stack are popped and placed back into the special memory registers.
-the fetch decode execute cycle renews as before
are the scheduling algorithms pre-emptive or non pre-emptive
pre-emptive- RR, SRT, MLFQ
non pre-emptive-FCFS, SJF
Give one advantage and one disadvantage of using multilevel feedback queues for scheduling
Advantages- services most urgent interrupts
Disadvantages-hard to implement
define a real time operating system and when it may be used
real time operating systems perform a task within a guaranteed time frame. They are used in systems were a response within a given time frame is critical e.g life support systems, self driving cars, power systems
Describe three functions of the BIOS
-POST(power on self test) which ensures that all hardware is correctly connected and functionality.
-checking the CPU clock, memory and processor
-testing for external memory devices
what is the role of a device driver
enables the operating system to interact with hardware devices
describe an instance in which a virtual machine may be used
-testing programs
-protecting from malware
-running software compatible with different versions and types of operating systems
Give one advantage and one disadvantage of intermediate code
Advantage - platform independent, portable
Disadvantage-slower execution
Pre-emptive
Jobs are actively made to start and stop by the
operating system.
Non pre-emptive
Once a job is started, it is left alone until it is
completed.
Round robin
Each job is given a section of processor time - known as a time slice - within
which it is allowed to execute. Once each job in the queue has used its first
time slice, the operating system again grants each job an equal slice of
processor time. This continues until a job has been completed
First come first served
Jobs are processed in chronological order by which they entered the queue.
Although this is straightforward to implement, FCFS again does not allocate
processor time based on priority.
Shortest job first
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 type of scheduling is most suited to batch systems, where shorter jobs
are given preference to minimise waiting time.
However it requires the processor to know or
calculate how long each job will take and this
is not always possible
Shortest remaining time
The queue storing jobs to be processed is
ordered according to the time eft for
completion, with the jobs with the least
time to completion being serviced first.
Again, there is a risk of processor starvation for longer jobs if short jobs are
added to the job queue.
Distributed type of os
This is a type of operating system which is run across multiple devices,
allowing the load to be spread across multiple computer processors when a
task is run
Embedded type of os
Built to perform a small range of specific tasks,
this operating system is catered towards a
specific device. They are limited in their
functionality and hard to update although they
consume significantly less power than other
types of OS.
Multi-tasking type of 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.
Multi-user type of os
Multiple users make use of one computer. Therefore a scheduling algorithm must be used to ensure processor time is shared fairly between jobs. Without a suitable scheduling algorithm, there is a risk of processor starvation, which is when a process is not given enough processor time to execute and complete.
why is the BIOS critical
The BIOS is critical to the computer system as it is only
after these checks are completed that the operating system
can be loaded into RAM from the hard disk
Intermediate Code
Code that is halfway between machine code and object code is called intermediate code.
This is independent of the processor architecture so can be used across different
machines and operating systems.
Paging
Paging is when memory is split up into equal-sized sections known as pages, with programs being made up of a certain number of equally-sized pages. These can then be swapped between main memory and the hard disk as needed.
Segmentation
Segmentation is the splitting up of memory into logical sized divisions, known as segments, which vary in size. These are representative of the structure and logical flow of the program, with segments being allocated to blocks of code such as conditional statements or loops
Emmulator
They trick a program into thinking its running on its native hardware when in fact it is running on an entirely different machine
The programs themselves are not aware they are being emulated
Bios
Responsible for loading the operating system when the computer first turns on
Multi level feedback queues
Several ready quesues are used, each with a different scheduling algorithm. Jobs can move between queues as their priorities change