Lecture 7 Revision Notes – Systems Software

This topic covers the software process of the computer. It covers:
– Fundamental functions
– Scheduling
– Compilers

Picture44.png

OS = controls the hardware for the software apps; it also acts as a resource protector:
– buggy software and intruders cannot harm other user’s programs, data and the system itself.
– provides security services.

Multi-programming = execute more than 1 task; achieved by allocating each process a given portion of CPU time (a timescale).

Interactive multi-programming systems are called time-sharing systems.

Fundamental functions:
(1) Scheduling: deciding which process gets the CPU.
(2) Synchronisation: arbitrating shared resources.
(3) Memory management: ensuring programs do not override each other.
(4) Interrupt handling: dealing with events ooutside of simple flow.
(5) Security and protection: only allowing legal access.

Scheduling:
Long-term scheduling = OS determines which process will be granted access to the CPU.
Short-term scheduling = OS determines which one will have access to the CPU at any particular time.
Context scheduling = process using the CPU is halted and CPU is switched to another process; the state of the process is switched during a context switch.

Approaches to CPU scheduling:
(1) First-come, first-serve = jobs are serviced in arrival sequence and run to completion if they have all of the resources they need.
(2) Shortest job first = where the shortest job gets scheduled first.
(3) Round robin = each job is allocated a certain amount of CPU time and a context switch occurs when the time expires.
(4) Priority = scheduling preempts a job with a lower priority when a higher priority job requires the CPU.

Compilers:
Virtual Machines = protected environment that presents an image of itself.
Picture45.png
Most compiles effect this translation in a 6-phase process:
First 3 are analysis phases:
(1) Lexical analysis
(2) Syntax analysis
(3) Semantic analysis

Last 3 are analysis phases:
(1) Intermediate code generation
(2) Optimisation
(3) Code generation

Leave a comment