1/41
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Explain three reasons why it is important that the CPU can be interrupted.
The CPU needs to be able to reallocate processor time
…to a higher priority process
…otherwise data might be lost
To ensure that each user in a multi user system gets a fair share of processing time
To make the maximum use of processor time
…e.g. processing other jobs while waiting for user input
To deal with errors such as “file not found”, “out of paper” etc.
The CPU is processing ordinary application code. Describe what happens
to enable the CPU to run the interrupt service routine.
At the end of each fetch execute cycle the processor will check for interrupts
If an interrupt is found, the contents of the registers will be pushed onto the stack
…so that the interrupt service routine can be loaded
and the interrupted process resumed once the interrupt has been dealt with
Explain why the execution of an INPUT statement generates an interrupt.
The CPU operates much more quickly than a human / it cannot wait for input
The CPU will be processing other jobs whilst it waits for input
a) Explain why virtual memory may be necessary in a computer
To allow programs to use more memory than is available in RAM
If many programs are running simultaneously there may be insufficient RAM available
…so parts of one or more programs can be stored in virtual memory and swapped into RAM when needed
Describe two benefits of using paging for managing memory allocation.
Memory is divided into small fixed sized chunks (typically 4K) which can be easily reallocated
The pages of a process do not have to be contiguous in physical memory but can still be addressed logically as if this were the case (via the paging table)
Individual pages of a process can be swapped out to virtual memory quickly to make room for pages of a currently running process that are needed
It would be much more time-consuming to have to swap out an entire large process to virtual memory and back again
(a) State what is meant by a driver.
A piece of software
…which allows the OS to interact with a hardware device
Explain how a driver makes it possible for the same printer to work with more
than one different type of computer hardware.
The OS calls a driver routine when it wants to communicate with the device
The driver sends the instructions to the device (and passes back any results to the OS)
The driver software is hardware/OS dependent
…so the routines will vary according to the platform…
…but the OS does not need to know how they are implemented
(b) Describe what is meant by a fail-safe.
A system or component that comes into operation in the event of the failure of something going wrong
…and which deals with the situation quickly and safely (e.g. by shutting down the equipment)
A device or practice that in the event of failure, responds in a way that causes minimal harm or damage to equipment, humans or the environment
Describe what is meant by hardware redundancy.
Crucial hardware components are duplicated…
…so that if one component fails, another is automatically brought into operation
(or could answer by example, e.g. transactions written to two or three separate storage devices simultaneously)
State a function the BIOS performs at start up
Initialise / check hardware
Load OS into RAM
List three ways in which an embedded operating system differs from an operating system on a desktop computer.
Simple user interface operated by buttons, dials and/or touch screen etc
No memory management or processor scheduling required
Permanently held in ROM along with application program
Real-time operating system, running a single application
The OS is generally inseparable from the application
Designed to be compact
define OS
a collection of programs that work together to provide an interface between the user and computer.
Examples of functions of an OS
File management (moving, editing, deleting files and folders)
Utility software (disk defragmenter, backup, formatting etc.)
Security (firewall)
manage CPU usage
manage hardware
define paging
when memory is split up into fixed equal-sized sections known as pages, these can then be swapped between main memory and the hard disk as needed
define segmentation
splitting up of memory into varied sized divisions
what are the problems with virtual memory, paging and segmentation?
disk thrashing; when the computer ‘freezes’ and occurs as a result of pages being swapped too frequently between the hard disk and main memory. As a result, more time is spent transferring these pages between main memory and the hard disk then is spent actually running the program.
Explain the process of round robin.
Each process is allocated a fixed amount of CPU time. If the process is not complete it will be suspended and the next process will start.
Explain the process of First Come First Served.
Each process is given equal priority and they are processed in the order they arrive.
Explain the function of Multi-level feedback queues.
Splits processes into different priority queues based on the amount of processor time they need. It allows them to move between the queues as their characteristics change.
Explain shortest job first.
Selects the process that takes the shortest amount of time to complete. The processes are run until they are fully complete.
Explain the shortest remaining time.
Selects the processes that takes the shortest amount of time. The process can be suspended if another shorter process is added.
explain a distributed os
allows multiple computers to work together on a single task
explain an embedded os
has a dedicated/limited function
is read only / cannot be changed
define utility
performs a specific task and is related to the upkeep of the os. example; virus checker
define a multi tasking os
runs multiple programs at the same time
define a multi user os
allows multiple users at the same time
define a real-time os
an operating system that is modifiable instantaneously
function of the BIOS
responsible for running various key tests before the operating system is loaded into memory
examples of BIOS functions
POST (Power-on self test) which ensures that all hardware (keyboards, disk drives) are correctly connected and functional
Checking the CPU clock, memory and processor is operational
Testing for external memory devices connected to the computer
why is BIOS important
bios is important because only after these checks are completed that the operating system can be loaded into RAM from the hard disk.
2 features of device drivers?
Device drivers are specific to the computer’s architecture, so different drivers must be used for different device types
they are also specific to the operating system installed on the device.
define virtual machine
where software is used to
take on the function of the machine, including intermediate code or running
an operating system within another to emulate different hardware.
define intermediate code
Code that is halfway between machine code and object code is called intermediate code.
advantage and disadvantage of virtual machines?
it saves both the time and money of having to purchase multiple devices solely for testing.
running intermediate code in a virtual machine can also be considerably slower compared to running low-level code on the device it was designed for.
examples of virtual machines
Protection from malware
- Malware will affect the virtual machine rather than the device being used.
Running incompatible software
-Programs specific to different operating systems or different versions of an operating system can be run within a VM,
saving time and money required to purchase the hardware. A common example is of games consoles being implemented on PCs via a virtual machine.
advantages + disadvantages of round robin
It is simple to implement. Round Robin is a good algorithm if all the processes are more or less of similar priority and size.
It does not take into account how important a process is (its priority). A high priority process has to wait just as long as very low priority processes to get its turn in main memory.
It does not consider that some processes are short and others long. If processes are very different in this way, it makes Round Robin an inefficient way to allocate time and resources.
Advantages and disadvantages of first first served?
It is a simple algorithm to implement. It also ensures that once a process starts, it will run to finish in good time.
Once a job starts it prevents other jobs from being processed until it is completed
It does not take into account the priority of a process. High priority processes are put behind low priority ones if they arrive later.
It does not consider that some processes are short and others long. A long process will delay all the processes in the queue behind it.
advantages of shortest job first?
It ensures the maximum number of jobs are completed
It ensures that short jobs aren't kept waiting while long processes tie up CPU resources.
It minimises the average time a process takes to complete.
disadvantages of shortest job first?
Does not take into account the priority of a process. A process that is high priority but is very long will have to wait for all shorter processes to complete first, even if they are unimportant.
If a long job is nearly completed, it will still be interrupted and put back in the queue when a shorter job arrives.
The scheduler can only estimate how long a job will take to complete, but its estimation could be wrong.
Particularly long jobs may never complete if shorter jobs continually keep 'jumping the queue'.
advantages and disadvantages of shortest time remaining
It allows short processes to be handled very quickly
It ensures the maximum number of processes are completed in a given time, taking into account what has happened so far.
It does not take into account the priority of a process. High priority processes will remain at the back of the queue if they need a lot of time to complete, even if the jobs ahead of them are unimportant.
Particularly long jobs may never complete if shorter jobs continually keep 'jumping the queue'.
advantages and disadvantages of multi level feedback queues ?
Makes sophisticated use of process priority.
It ensures that higher priority processes run on time.
Complex to implement.
Not very efficient if all jobs have similar priority.
Low priority jobs may take an extremely long time to complete if the queue algorithm doesn't compensate for wait-time, especially if new high-priority jobs keep arriving.