UNIT 2: Systems Software Flashcards
What is an OS?
-boot loader in ROM loads the OS into RAM when computer is switched on
-OS manages the hardware and provides an interface and the application software
What functions do the OS provide?
-functions it provides- GUI, MEMORY MANAGEMENT, INTERRUPTS and PROCESSOR SCHEDULING
OS- User Interface
what the user interacts with
hides the complexity of the hardware from the user by providing a UI
OS- Memory Management
(Paging, segmentation,VM,)
programs and their data needs to be loaded into RAM
OS must manage the allocation of RAM to the different programs
may not be sufficient RM to load all the program at once
MM- Paging
Available memory is divided into fixed sized chunks called pages
each page has an address
process loads into RAM is allocated sufficient pages- they may not be contiguous in physical terms
MM- Segmentation
Memory can also be divided into segments which can be different lengths
they can relate to parts of a program- for example functions of subroutine may occupy a segment.
MM- Virtual memory
computer has fixed amount of RAM- demand often exceeds this amount
an area of the hard disk can be designated as VM
some pages are stored in VM until they are needed- then swapped into RAM
if many are running- lots of time is spent swapping as there is insufficient RAM
VM - DISK THRASHING
Repeatedly swapping can noticeably slow down the computer- DISK THRASHING
OS- Interrupts
Vital CPU can be interrupted when necessary
They can be sent to the CPU by software, hardware devices or CPU internal clock
When does the CPU check for interrupts?
CPU checks at the end of each clock cycle whether they are any interrupts to be processed
Interrupts EXAMPLES
EXAMPLE- printer runs out of paper, error, scheduled interrupt or power failure
Interrupts - using a stack
when an interrupt is detected- the processor stops fetching and pushes the current content of its registers into a stack
uses an interrupt service routine
Interrupts - Priority
they have priotires and will be processed in order
interrupts can themselves be interrupted if the new interrupts is of higher priority
OS - Processor scheduling
single CPU can only process instructions for one application at a time
OS must schedule when each app can use the CPU
gives the illusion of multitasking - appear to be running simultaneously
Processor scheduling AIMS
provide acceptable response times to all users
maximise the time the CPU is usefully engaged
ensure fairness on a multiuser system