1.2.1 Systems Software Flashcards
What is an Operating System?
a collection of programs that work together to supply a level of abstraction for the user to manage a computer.
What are the purposes of an OS?
#to manage processor #memory managment #device managment #platform for applications to run on #security (accepting or declining requests) #providing user interface
What is layering in terms of the OS
user -> application ->OS - > hardware
each layer doesnt concern about its neighbours but need data from them
Why is the OS needed?
As applications cannot allocate themself memory, processing time or secuirty.
Why do we require memory managment from the OS?
Since RAM is finite, so operating system will have to divide up and keep track of free space. Poor memory managment leads to fragmentation.
Methods of memory managment?
Paging
Segmentation
What does the OS rely on memory management to do ?
Split memory into blocks, which are allocated to processes.
Ensure security where processes dont cross data.
Extend memory if necessary using secondary memory
What is paging ?
When memory is split into equal size PAGES. It allows programs to run even if RAM is full by using virtual memory.
What are the drawbacks of paging ?
Some programs may not work if pages are split between RAM and secondary storage
Some memory can be wasted if a page isnt filled up.
What can paging be thought of ?
A person reading a book, so pages already read can be forgotten(freeing PAGES up) and the future are not needed yet(so theyre placed into virtual memory).
What is segmentation ?
A process that is similar to paging.However data is split into different size segments, which have an ID and a LENGTH, allowing modules to link in memory.
Which memory divisions are logical ?
Segments
Which memory divisions are physical ?
Pages
Why does the OS use a scheduler ?
The order of jobs has to be decided at the most efficient timing by using CPU time.
Describe the scheduling process…
- CPU is broken into time slices (given by the clock generating interrupts at regular intervals).
- The interrupt tells OS to give control to the scheduler.
- Scheduler saves the state of current process into a process descriptor table.
- Scheduler decides which process will run next and allows the CPU to execute it
What is a scheduler ?
A program, instructions used by the OS on manipulating jobs and CPU
Why are schedulers used?
To maximise the amount of processes completed in the shortest time possible To make efficient use of the processor To minimise delay To work upon priorities To ensure all jobs get processed
What is a process?
Instance of a computer that is being executed managed by a scheduler.
Descibe the scheduling queue.
A new processed opened by the user enters a ready queue waiting to be executed, when its turn is reached it enters a RUNNING PROCESS QUEUE. At this stage it can either be completed or be sent to the BLOCKED QUEUE due to an interupt. When interrupt is sorted it is put back into ready queue when it awaits further execution.
What happens in the PROCESS RUNNING QUEUE?
A processed with allocated CPU time is now being executed.They can only leave once finished unless it needs an I/O or there is an interrupt occurance.
What are the 5 priority types of the scheduler ?
FIRST COME FIRST SERVE SHORTEST JOB FIRST ROUND ROBIN SHORTEST REMAINING TIME MULTI LEVEL FEEDBACK QUEUES
What is a first come first serve priority?
When jobs arriving in ready queue will be executed strictly in arrival order
What is a shortest job first priority?
Scheduler creates an order based on execution length with shortest statement receiving priority.
What is a round robin priority?
Each task is given a time slice and once the limit is over the processor moves onto the next task even if previous isnt finished
What is a shortest remaining time priority?
Shortest tasks are given priority at all times even if the running process is almost finished
What is a multi-level feedback queue ?
When a job arrives it is given a priority and allocated to a queue. Processor will complete queues starting with the one that has a higher priority. It is basiclly placing jobs in the background for later completion.
What are interrupts ?
Computer’s way of diverting from sequential nature of completing instructions
What is each interrupt associated with ?
An ISR ( interrupt service routine)
What is an ISR ?
a set of instructions to be carried out when an interrupt occurs.
When is the blocked/interrupt queue checked ?
After each instruction is executed.
What kind of conditions generate interrupts ?
INPUT OUTPUT devices needing attention power/system failures user interrupt(alt+del+ctrl) software wanting attention hardwate failures run-time errors timer interrupt generated by the internal clock
What are the four types of interrupts?
I/O interrupts
Timer interrupts
Hardware interrupts
Program interrupts
What is an I/O interrupt ?
Those occur while there is a data transfer between a peripheral(e.g. removing memory stick)
What is a timer interrupt?
Critical data that takes priority e.g. netflix
The sound and image would otherwise be out of sync
What is a hardware interrupt ?
Problems with hardware making CPU store data and OS shut down safely
What is a program interrupt ?
Produced by the computer software telling CPU about an error.
When does the CPU check for interrupts?
After each FDE cycle and then runs ISR on it.
How are interrupts sorted ?
By priority
What are interruts allocated and why ?
A priority number just in case a higher priority interrupt enters the ready queue
What happens in PC as an interrupt is taken care of ?
The next instruction address is copied to a memory area called a stack and the PC now has the ISR address.
What is a single user OS?
Allows one user to access a particular computer at only one time
What is a multi-user OS?
Allows users to share data at the same time through a network controlled server ( requires a NOS) e.g.UNIX
What is a multi-tasking OS?
Allows machine to perform several programs/jobs at the same time
What is a real time OS?
A specialised OS designed to allow input processing under strict time limits. e.g.autopilots or chemical reaction control
What is an embedded OS?
An OS put within the device hardware made for a specific function
What is a distributed OS?
When the OS is split into nodes that communicate with each other using network technology
What is a batch OS?
OS that isnt direclty interacting with the user, it requiers user made input
What is BIOS a part of?
a part of the ROM that stores critical programs.
What does the BIOS do?
It will check the operation of computer and load the OS into RAM(this is called the booting process).
What OS bit is loaded into the memory?
A kernel - a part that is protected and cannot be overwritten.
What is a device driver?
program that provides an interface for OS to communcate witha device.Drivers are hardware dependant and OS specific.