1.2.1 Systems Software
(a) The need for, function and purpose of operating systems.
Operating Systems
• a program or set of programs that manages the operations of a device for the
user
• provides an interface between the user and the device
• held in permanent storage
Functions of an operating system
• create a simple interface for the user
• memory management
• interrupt service routines
• file management
• utility software
• processor scheduling
• input/output management
• security
(b) Memory Management (paging, segmentation and virtual
memory).
Memory Management
• while the computer is running, each program is allocated a specific area of
memory
• if a user wants to switch between applications, they must be stored in memory
simultaneously
• allocation and management is controlled by the operating system
• the techniques of paging and segmentation are used to make optimum use of
memory
Paging
• memory is split into fixed sized sections (pages)
• a process in memory may be held in several non-contiguous pages
, Segmentation
• logical division of memory into segments of varying size
• representative of the structure and logical flow of a program
Virtual memory
• when there is no space in RAM, pages from temporarily unused programs are
swapped into secondary storage
• using a section of the hard drive as an extension of main memory
Disk thrashing
• an issue that occurs when pages are swapped too frequently between virtual
memory and main memory
• more processor time is spent swapping pages than running current programs
(c) Interrupts, the role of interrupts and Interrupt Service
Routines (ISR), role within the Fetch-Decode-Execute Cycle.
Interrupts
• a signal from software, hardware or internal clock to the CPU
• indicates that a process needs attention
• software interrupt example: application process terminates or request certain
services from the operating system
• hardware interrupt example: input/output operation is complete or an error
occurs
• stored in order of priority in an interrupt register
• processor scheduling ensures that interrupts are serviced fairly
Interrupt Service Routines
• at the end of each FDE cycle, the CPU checks for interrupts
• if an interrupt is of higher priority than the current task, all lower priority interrupt
are disabled
• the current process is paused and register values are pushed onto the system
stack
• the relevant value for the corresponding interrupt service routine is loaded into
the program counter which deals with the interrupt
• original register values are retrieved from the stack and the CPU's previous
process continues
(a) The need for, function and purpose of operating systems.
Operating Systems
• a program or set of programs that manages the operations of a device for the
user
• provides an interface between the user and the device
• held in permanent storage
Functions of an operating system
• create a simple interface for the user
• memory management
• interrupt service routines
• file management
• utility software
• processor scheduling
• input/output management
• security
(b) Memory Management (paging, segmentation and virtual
memory).
Memory Management
• while the computer is running, each program is allocated a specific area of
memory
• if a user wants to switch between applications, they must be stored in memory
simultaneously
• allocation and management is controlled by the operating system
• the techniques of paging and segmentation are used to make optimum use of
memory
Paging
• memory is split into fixed sized sections (pages)
• a process in memory may be held in several non-contiguous pages
, Segmentation
• logical division of memory into segments of varying size
• representative of the structure and logical flow of a program
Virtual memory
• when there is no space in RAM, pages from temporarily unused programs are
swapped into secondary storage
• using a section of the hard drive as an extension of main memory
Disk thrashing
• an issue that occurs when pages are swapped too frequently between virtual
memory and main memory
• more processor time is spent swapping pages than running current programs
(c) Interrupts, the role of interrupts and Interrupt Service
Routines (ISR), role within the Fetch-Decode-Execute Cycle.
Interrupts
• a signal from software, hardware or internal clock to the CPU
• indicates that a process needs attention
• software interrupt example: application process terminates or request certain
services from the operating system
• hardware interrupt example: input/output operation is complete or an error
occurs
• stored in order of priority in an interrupt register
• processor scheduling ensures that interrupts are serviced fairly
Interrupt Service Routines
• at the end of each FDE cycle, the CPU checks for interrupts
• if an interrupt is of higher priority than the current task, all lower priority interrupt
are disabled
• the current process is paused and register values are pushed onto the system
stack
• the relevant value for the corresponding interrupt service routine is loaded into
the program counter which deals with the interrupt
• original register values are retrieved from the stack and the CPU's previous
process continues