F453 - functions of an OS Flashcards
Why interrupts are used in a computer system?
To obtain processor time… for a higher priority task to avoid delays
to avoid loss of data
as an indicator to the processor… that a device needs to be serviced
State some sources of interrupts
power failure/system failure peripheral eg printer (buffer empty)/hardware clock interrupt
user interrupt eg new user log on request software
Why is scheduling used?
maximise number of users…
…with no apparent delay
maximise number of jobs processed… …as quickly as possible
obtain efficient use of processor time / resources…
…dependent upon priorities
…to ensure all jobs obtain processor time/long jobs do not monopolise the processor
Why are jobs given different priorities in a job queue?
some jobs are more urgent than others
priorities are used to maximise the use of the computer resources
Why is memory management necessary?
to allocate memory to allow separate processes to run at the same time to deal with allocation when paging/segmentation
to reallocate memory when necessary
to protect processes/data from each other
to protect the operating system/provide security to enable memory to be shared
Why is virtual memory needed?
to allow programs to run that need more memory than is available
How is virtual memory used?
use of backing store as if it were main memory/temporary storage
paging/fixed size units
swap pages between memory & backing store… …to make space for pages needed
What’s the problem of disk threshing?
occurs when using virtual memory/moving pages between memory & disk
disk is relatively slow
high rate of disk access
more time spent transferring pages than on processing
Name and describe 4 methods of scheduling
round robin each user allocated a short period of time/in a sequence or system of priorities highest priority first or length of job shortest job first or first come, first served jobs processed in order of arrival
What is spooling and when is it used?
output data to disk drive/storage device for printing at another time
to allow sharing/on a network
job references stored in a queue/buffer avoids delays / avoids speed mismatch as printers are relatively slow
jobs can be prioritised
How are paging and segmentation similar?
ways of partitioning memory
allow programs to run despite insufficient memory/used for virtual memory segments and pages are stored on backing store
segments and pages are assigned to memory when needed
What problems may occur from paging and segmentation?
disk threshing
more time spent swapping pages than processing computer may ‘hang’
When is the boot file used?
while the operating system is loading when the computer is switched on after POST
What is the purpose of the boot file?
provides personal settings
What’s virtual memory?
use of backing store…
…as additional memory
uses paging / swapping pages (between memory & backing store)
holds part of the program not currently in use allows large programs to run (when memory size is insufficient)