Section 2 Systems Software Flashcards
Why is an operating system necessary?
To manage operations of the computer from the user
Because the user cannot directly communicate with the hardware
Define OS
A set of programs that managed the operations of a computer for the user
Where is the OS stored?
the hard disk
List the different tasks that OS handle? (6)
Peripheral/file management
interrupt handling
security
providing a platform for software to run
providing a user interface
processor scheduling
Why is memory management needed
for multitasking on devices
allowing for users to switch between multiple running applications
eg streaming music then editing a document
Why use paging or segmentation?
They split memory into small sections for optimum use
What is paging?
Memory is divided logically into fixed size pages of 4Kb each
A process in memory may be held in several non-contiguous pages
Logical memory and physical memory locations are linked by a page table which shows both addresses
What is segmentation?
Logical division of address space in main memory into varying length segments which depend on the program structure
Why is virtual memory needed?
Memory is limited
Many jobs might need to be loaded into memory, so some jobs need to be loaded to secondary storage as an extension of memory to make room for the next job
Benefit and drawbacks of virtual memory
more memory can be used than is available in RAM
it may take long if many jobs are in VM as the OS spends most of its time swapping pages in and out of RAM, slowing performance
What is a interrupt? Give an example of each of the 3 types.
a signal from a software program, hardware device or internal clock to the CPU
software: application program terminates or requests certain services from the OS
hardware: error in printing such as out of paper
clock: triggered by timer regularly to indicate it’s the next process’s turn
Describe the flow of the Fetch execute cycle with interrupt checking
Start
fetch next inst
decode inst
excecute inst
any interrupts to be processed?
if yes, interrupt service routine is tun
if not, continue to next instruction
Examples of 3 interrupts with descrnding priorities
power fail interrupt
clock interrupt
an i/o device sending a signal requesting service or end of i/o operation
What is responsible for allocating processor time to each application running simultaneously?
the OS
What is multi-tasking in computers?
Processors complete small tasks of multiple larger tasks in turn, giving the appearance of them running similtaneously
describe the job of a scheduler?
the OS module responsible for ensuring processor time is used as efficiently as possible
this is very complex in large multi user networks eg accessing the same database
Objectives of the scheduler (4)
maximise throughput
be fair to all users on a multi user system
provide acceptable response time to all users
ensure hardware resources are kept as busy as possible
state 5 scheduling algorithms
round robin
first come first served
shortest remaining time
shortest job first
multi level feedback queues
describe round robin
processes despatched in first come first serve basis
each process given a limited time slice of cpu time
if the process isn’t complete before it’s time expired/a higher priority interrupt occurs, the despatcher gives the CPU to the next process
uses an interval timer to generate regular scheduled interrupts
guarantees a reasonable response time for all users of the system
describe first come first served
jobs processed in the order they arrive
no priority system
describe SRT scheduling
processes with smaller ETC are run next
reduced number of small jobs waiting behind big jobs
however, knowledge of job ETC required
good for batch jobs such as payroll or any scientific jobs run regularly
describe SJF scheduling
process with the smallest ERT (estimated running time) is run next
same issues as SRT
if a uni student runs a small program, their output will be much faster than large research programs when being run at the same time
describe multi level feedback queues
designed to
give preference to short jobs and I/O bound processes
separate processes into categories based on their need for the processor
since i/o processes are slower than processor speed, keeping peripherals busy prevents bottlenecks from occuring when several programs need to send data to the printer for example
List the 6 types of OS
distributed
embedded
multitasking
multiuser
realtime