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 user 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
PS Round Robin
Each job is allocated(BY FIFO) a time slice during which it can use the CPU
if job ain’t complete by the end of time slice- next job is allocated a time slice
What is FIFO? (Round Robin)
First in, first out
PS First come first served
First job that arrives is executed until its complete
PS Shortest remaining time
time to completion is estimated as each new job arrives
job with SRT is executed, a new shorter job can take over from current process
PS Shortest job first
also called - shortest process next
total execution time is estimated by the user
waiting job w the smallest total execution time is executed when the current job completes
PS Multifeedback queues
created w different priority levels
if uses too much CPU time its moved to lower priority
processor can move if waited a long time
Types of operating systems
distributed, embedded, multitasking/ multi-user, real time
Distributed operating systems
Separate computers can be joined together via network connections to work together as a more powerful whole.
A distributed operating system coordinates the communication between these computer nodes and essentially makes them component parts that are joined together as a whole.
Distributed systems are useful when processor-intensive tasks need to be completed and a single processor cannot provide enough computational power on its own.
Multitasking system
a single processor can appear to do more than one task simultaneously by scheduling processor time