1.2.1 - Systems Software Flashcards
What is an operating system?
A collection of programs that work together to provide
an interface between the user and computer
What do operating systems provide (management)?
Memory, resource, file, i/o, interrupt.
What do operating systems provide (non-management)?
Utility software
Security
User interface
What is paging?
Partitioning memory into fixed size sections.
Uses physical divisions.
Swapped in and out of virtual memory.
What is segmentation?
Splitting memory into logical divisions which vary in size.
What is virtual memory?
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 that are not
currently in use are temporarily moved into virtual memory through paging, freeing up
memory for other programs in RAM.
What is the issue with memory management techniques?
Disk thrashing. This is when the
computer ‘freezes’ and occurs as a result of pages being swapped too frequently between
the hard disk and main memory.
As a result, more time is spent transferring these pages
between main memory and the hard disk then is spent actually running the program.
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
How are interrupts stored?
Interrupts are stored in order of their priority within an abstract data
structure called a priority queue in a special register known as an interrupt register
Give two examples of an interrupt.
A printer signalling
the completion of a print job or a peripheral signalling power failure.
How is an ISR started?
End of FDE cycle, processor checks IR
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.
loads the appropriate interrupt service
routine (ISR) into RAM.
A flag is set to signal the ISR has begun.
What happens once an interrupt has been serviced?
The flag is reset. The interrupt queue is checked
again for further interrupts of a higher priority to the process that was originally being
executed.
What happens if there are more interrupts to be serviced?
The ISR process is repeated until all priority interrupts have
been serviced.
If there are no more interrupts or interrupts
are of a lower priority to the current process, the contents of
the stack are transferred back into the registers in memory.
The Fetch-Decode-Execute cycle resumes as before.
What is the purpose of scheduling?
- Ensure all jobs receive fair processing time
- Process as many jobs in least possible time.
- Make efficient use of resources.
What is the difference between pre and not pre-emptive scheduling?
Pre-emptive: Jobs are made to actively stop and start by the operating system.
Not pre-emptive: Once a job is started, it is left a lone til completed.
How does the round robin algorithm work?
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, at which point
it is removed from the queue.
Pros/cons of round robin
Although Round Robin ensures each job is
seen to, longer jobs will take a much longer time for completion due to their
execution being inefficiently split up into multiple cycles.
This algorithm also
does not take into account job priority.
Describe the first come first served algorithm.
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.
Once a job starts it stops others being processed
Describe multilevel feedback queues.
This makes use of multiple queues, each which is ordered based on a
different priority.
This can be difficult to implement due to deciding which job to prioritise
based on a combination of priorities.
How does the shortest job first algorithm work (where is it most suitable)?
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.
What is the danger with shortest job first?
It requires the processor to know or
calculate how long each job will take and this
is not always possible. There is also a risk of
processor starvation if short jobs continue
being added to the job queue.
What is 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.
Again, there is a risk of processor starvation for longer jobs if short jobs are
added to the job queue.
What is a distributed operating system?
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.
What is an embedded operating system?
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.