the operating system Flashcards
paper 2
what is an operating system?
software that manages and controls the computer hardware + acts as an interface between user and the hardware
eg windows, macOS
OS services (name 3)
- provides user interface
- runs software programs by loading code + data into RAM and activating CPU
- allows multiple programs active at same time by sharing processor time
- allows configuration of hardware eg screen resolution
- displays catalogue of programs and data files
- provides security to prevent unauthorised access
how does the OS manage peripherals?
manages peripherals (inputs/outputs) by communicating and sending data output to them using drivers
how does the OS manage memory?
OS loads data into RAM when needed and unloads it when it isn’t
partitioning
buffering
partitioning
dividing memory into multiple partitions and allocating each partition to instructions and data for one specific task
buffering
allocating part of memory to temporarily store data in transit between computer and a slower device eg webcam/printer
cannot be filled and emptied at same time so double buffer can be used so one can be filled while the other is emptied to speed up data transfer.
how does the OS manage the backing store?
allocate physical disk space as files are added, edited or deleted providing hierarchical, searchable structure for users.
utility software
software that performs tasks that support the operating system
analyses processes, optimises processes or maintains the system
categories of utility software (name 4)
anti-virus
compression
debuggers
screensavers
system monitors
encryption
defragmentation
anti-virus
checks the computer for malware and notifies the user of any is found
compression
allows a file/folder to be reduced in size for storage or transmission
debuggers
identify and help to resolve problems in software
screensavers
starts automatically after a pre-set interval to prevent screen burn and save power
system monitors
utilities allow the user to track memory and processor usage + network connection speed and more
name 3 uses of a user interface
- allows copying/ deleting/ moving/ sorting/ searching of file or folders
- allows access to system settings such as hardware
- allows users to have more than one window open
- provides graphical user interface
- provides user with error messages
modes of operation
different ways that operating systems have of working
batch processing
real time control processing
real time transaction processing
batch processing
a series of tasks completed at the same time (normally without intervention overnight when resources are available)
uses a transaction file to record events and updates the master file at the end of the period
eg running pay roll, gas billing ( as bills are issued regularly in response to meter readings)
simpler/faster with transactions being stored in order they are recieved
real time control processing
reacts to a signal to make changes which will take place immediately (but doesn’t need to happen quickly)
eg traffic lights changing or autopilot detecting obstacle and moving
real time transaction processing
task completed immediately and the master file is updated when an occurrence is completed to give and accurate view of data at any time
much more complex algorithms
eg used to avoid double bookings at concerts
master file
holds descriptive data (the actual data that is supposed to be processed) and holds the resultant data after the process is completed
data is held sequentially in key field order
eg customer details for electricity company
transaction file
contains the transactions (changes supposed to be made to master file)
data is help serially in order it was collected
eg customer meter readings for electricity company
singer user OS
single user can be active at any one time (can have multiple users but one one at a time)
protected with user names and passwords
home directories are created for each user with a hierarchical file structure
can also be a multi tasking OS
multi user OS
system resources timeshared between multiple users at once - each can access their own terminals with usernames and passwords
often used on servers
can also be a multi tasking OS
multi tasking OS
switching tasks in and out of the CPU done by the OS to give the impression it is running everything simultaneously
can falter if one process takes a lot of processing time or crashes as other processes may delay or become unresponsive
multi programming OS
allows multiple processes to reside in main memory at the same time to make them appear to be processed by the computer’s CPU simulaneously
optimises use of CPU by preventing it from being idle while waiting for slower peripherals. OS may perform scheduling
scheduling
a processor appears to carry out multiple processes at a time whereas it is actually just switching between them extremely quickly.
scheduler ensures CPU is utilised as much as possible
has different methods of scheduling:
- first come first served
- round robin
- fixed priority
first come first served scheduling
each process handled from start to finish in the order in which is arose
round robin scheduling
each process received a fixed time slice and when time slice expired the CPU moves on to next process and come back to incomplete one later
fixed priority scheduling
high priority processes jump the queue and are handled first. low priority processes can have status upgraded if they are left waiting for a long time
time slice
a small chunk of processor time
states of a process
ready - in main memory awaiting execution by CPU
running - currently being executed by CPU
blocked - awaiting access to a resource that is currently unavailable (needs intervention)
polling
sending a signal to a device eg printer, to check if it is ready.
will repeat until device is ready or computer has polled a predetermined number of times
interrupt
a signal generated by hardware or software that puts the normal FDE cycle on hold and diverts CPU’s attention to source of the interrupt
has priority levels so another interrupt of higher priority can interrupt an interrupt
a low level interrupt will not interrupt a high level task
examples of hardware interrupts
mouse click
keyboard press
insertion of new piece of hardware
examples of a software interrupt
detection of imminent power loss
a runtime error eg attempt to divide by 0
software fault
fixed partitioning
dividing memory into non-overlapping sections that are fixed in size
process may be loaded into a partition of equal or greater size and is confined to that partition
internal fragmentation can occur
internal fragmentation
when a small process leaves unoccupied space in a partition
variable partitioning
system for dividing memory into non-overlapping sections with variable sizes
is more flexible than fixed and doesn’t allow for internal fragmentation
dynamic partitioning
system for making partitions during run-time according to process’ needs instead of doing it during system configuration
efficiently utilises RAM
memory buffering
small block of memory in devices where current data is being held and is used to compensate for slower devices
ensures work is not lost when the processor is busy
eg key press on keyboard may be held in buffer if text doesn’t appear when you are typing
buffer process for storing and loading data from a device
chunk of data sent by CPU to device and stored in a buffer
device will slowly save the data while CPU free do to other tasks
when buffer is empty an interrupt is sent to CPU
CPU processes interrupt by informing OS
then more data is sent and cycle repeats
double buffering
one buffer used to store the data
the second buffer will process the data
once the data is processed, data from buffer 1 sent to 2 and process repeated
avoids delays and increases processing speed
ping pong (method of double buffering)
buffer 1 holds data
buffer 2 interrupts and sends the data
buffer 1 interrupts and sends its own data while buffer 2 holds next set of data
threading
a thread is a sequence of instructions that make up part of a process.
2 threads belonging to the same process can share resources.