Operating systems provide an interface between the user and computer
Operating systems enable communication with the computer and perform low-level tasks involving memory and resource management
Examples of popular desktop operating systems include Windows and macOS, while popular mobile phone operating systems include iOS and Android
Operating systems are essential for memory management, resource management, file management, input/output management, interrupt management, utility software, security, and user interface
Paging involves splitting memory into equal-sized pages that can be swapped between main memory and the hard disk
Memory must be shared fairly between multiple programs through paging, segmentation, and virtual memory
Virtual memory uses a section of the hard drive as RAM when main memory is insufficient, with unused program sections moved to virtual memory through paging
Segmentation splits memory into logical divisions known as segments, representing the structure and flow of the program
Interrupts are signals indicating a process needs attention, stored in a priority queue in an interrupt register
Interrupts are checked at the end of each Fetch-Decode-Execute cycle, with the processor transferring contents to a stack to service the interrupt
Interrupt Service Routines (ISR) are loaded into RAM to respond to interrupts
First Come First Served processes jobs in chronological order, without considering job priority
Shortest Job First orders jobs by completion time, suited for batch systems but requires knowing or calculating job durations
Types of operating systems include Distributed, Embedded, Multi-tasking, Multi-user, and Real Time
Scheduling algorithms include Round Robin, First ComeFirstServed, Multi-level feedback queues, Shortest Job First, and Shortest Remaining Time
Multilevel feedback queues use multiple queues ordered by priority, which can be challenging to implement
Round Robin allocates equal time slices to jobs, potentially leading to longer job completion times and does not consider job priority
Shortest Remaining Time orders jobs by time left for completion, risking processor starvation for longer jobs if short jobs are added
Multi-user OS allows multiple users on one computer, Real Time OS performs tasks within a guaranteed time frame
Virtual machines are software implementations of computer systems, used for running intermediate code and testing programs on different operatingsystems
Virtual machines provide protection from malware, run incompatible software, and save time and money for testing programs
Distributed OS runs across multiple devices to spread the load, Embedded OS performs specific tasks for a device, Multi-tasking OS allows tasks to run simultaneously
BIOS is the first program that runs when a computer is switched on, responsible for key tests before loading the operating system into memory
Device drivers allow the operating system to interact with hardware, specific to the computer's architecture and the installed operating system
Intermediate code is independent of processor architecture and can be used across different machines and operating systems
An application program is any other program written by a user or developer to perform some task on behalf of the user.
Explain how an operating system deals with an interrupt. (3 marks)
Interrupt checked for at the start/end of each FDE cycle
If the interrupt is low priority then to the current process then the current process will continue
Flags are set to determine if interrupts are enabled/disabled
After interrupt complete, previous register values restored back from stack