Download: Unit 1.2.1 Systems Software
System Software: (This is software that is designed and maintain a computer)
- System Software are programs that control the hardware and operation of the computer system.
- It acts as an interface between the processor and the user.
Operating System: (This is a program or a set of software programs that are designed to manage the hardware of the system)
- Acts like a bridge between the user and the computer’s hardware as the user cannot communicate with the hardware directly.
- The operating system is held in permanent storage, for example on a hard drive. A small program called the loader is held in ROM. When a computer is switched on, the loader in ROM sends instructions to load the operating system by coping it from storage into the RAM.
- Provides an application programming interface (API), which is a set of code libraries that software developers can use to write applications for a specific operating system.
- Has many utility software programs that are used to carry out housekeeping tasks on the system to maintain the hardware.
Functions of the Operating System:
- Peripheral management: Communicates with internal and external hardware by device drivers. This is making sure that the correct piece of data goes to the correct piece of external hardware.
- Provides a user interface: allowing a user to interact with the computer.
- Graphical User Interfaces: These are designed for everyday users as they are visually interactive and intuitive.
- Command-Line Interface: This is a text-based interface which is less resource heavy than GUIs. However, they are not suitable for everyday users but for more advanced users as they are more efficient and powerful.
- Memory Management: Allows the computer to multi-task by controlling memory resources and the CPU. Multi-tasking is the ability of running multiple applications at the same time.
- Backing Store Management: The term ‘backing store’ is typically part of a hard disk that is used by a paging or swapping system to store information not currently in main memory. (virtual memory)
- Processor Scheduling: This is the allocation of a computer’s processor power to specific tasks. It assigns a specific percentage of time the processor is running to individual tasks.
- File/Disk Management: The OS deals with the movement, editing & deletion of data.
- Device Security: Protects the security of the system. For example, Windows uses user accounts to protect data that is on each account.
- Interrupt Service Routines: An interrupt is a signal from a software program, hardware device or internal clock to the CPU.
- Translation: Handles the translation of code through compilers, interpreters and assemblers to translate High Level and Low Level Language into machine code.
Memory Management: (The allocation and management of space is controlled by the operating system)
- Organises the use of main memory by converting logical addresses to physical addresses.
- Ensures no space is wasted by partitioning programs into chunks.
- Ensures programs cannot access each other’s memory unless legitimately required to.
- Allocates memory to allow separate process to run at the same time and reallocates memory when necessary.
- Through efficient memory management, it will allow programs larger than main memory to run.
Paging and Segmentation: (these are two different techniques for making the optimum use of memory by splitting it into small sections)
Paging: This partitions memory into fixed sized physical divisions made to fit sections of memory.
Segmentation: This partitions memory into variable sized logical divisions which hold complete sections of programs.
- Both are assigned to memory when needed to allow programs to run despite insufficient memory
- Both are stored on a backing store disk to swap parts of programs used for virtual memory.
- Both allow programs to be stored in memory non-contiguously. (A non-contiguous data structure is a method of storing data in sectors of memory that are not in close proximity)
- Both can cause Disk Threshing.
Virtual Memory: (When the memory available is insufficient, an allocated area of a secondary storage device is used to allow large programs to run.)
- This uses a backing store as additional memory for temporary. The term ‘backing store’ is typically part of a hard disk that is used by a paging or swapping system to store information not currently in main memory.
- An allocated area of secondary storage used in virtual memory may be called a ‘pagefile’. Pages are then swapped between the RAM and the backing store using something called ‘paging’. This is to make space in RAM for the pages that are needed.
- This stores parts of a program that is not currently in used or not accessed as regularly but may be needed.
- High rate of disk access may cause the computer to ‘hang’. Secondary storage is slow to be accessed compared to RAM, therefore more time is spent transferring pages between main memory and the disc rather than processing data. This problem is called Disk threshing.
Interrupts: (An interrupt is a signal from a software program, hardware device or internal clock to the CPU)
- Software Interrupt: This can occur when an application program terminates or requests certain services from the operating system.
- Hardware Interrupt: This can occur when an I/O (Input/Output) operation is complete or an error such as ‘Printer is out of paper’ occurs.
- Internal Clock Interrupt: These are triggered by a timer to indicate that is it the turn of the next process to have processor time. As a processor can be interrupted, this allows multi-tasking to take place.
- An interrupt can only interrupt a lower priority task to avoid delays and lose of data in order to ensure that the most urgent task is performed first.
- An interrupt starts when the current Fetch-Decode-Execute Cycle has finished in order to ensure the most efficient use of the processor.
Interrupt Service Routine (ISR): (Called to deal with an interrupt)
Interrupts are assigned priorities, and lower priority interrupts may be disabled while a higher priority interrupt is being serviced.
- Checks the Interrupt register by comparing the priority of the incoming interrupt with the current task.
- If it is of a lower or equal priority to the current task, then the current task continues.
- If it is of a higher priority, the CPU completes the current FDE cycle.
- The contents of registers are copied to a Last In First Out stack stored in memory.
- The location of the appropriate Interrupt Service Routine is loaded by loading the relevant values into the Program Counter.
- When the ISR is complete:
- Flags are reset to an inactive state
- Further interrupts are checked and serviced if necessary.
- Previous states contents are popped from the stack and are loaded back into the registers in order to resume processing.
Processor Scheduling: (This is the allocation of a computer’s processor power to specific tasks. It assigns a specific percentage of time the processor is running to individual tasks)
- The scheduler is the operating system module responsible for making sure that processor time is used efficiently as possible.
- The operating system is responsible for allocating processor time to each task as they compete for CPU usage.
- The objectives for the scheduler are to maximise throughput, to be fair to all users on a multi-user system, provide acceptable response time to all users.
- Ensure hardware resources are kept as busy as possible.
There are number of different algorithms a scheduler can use:
- Round Robin: Processes are despatched on a first in first out (FIFO) basis, with each process in turn given a limited amount of CPU time called a time slice or quantum. It is a pre-emptive scheduler that allocates each user or process in a very small time slice in a sequence. F it hasn’t finished processing by the end of the time slice, the system moves to the next user in turn and the previous unfinished task is moved to the back of the queue. This is repeated until all users are serviced.
- First Come, First Served: Tasks are processed in order of arrival. This means that the first process to arrive is dealt with by the CPU until it is finished. Meanwhile, any other processes that come along are forced to queue up and wait for their turn. This is a system with no priorities.
- Multi-level Feedback Queues: This uses a number of queues where each of these queues has a different priority. The algorithm can move jobs between these queues depending on the job’s behaviour. It is designed to give preference to short jobs, input/output bound processes and to separate processes into categories based on their need for the processor.
- Shortest Job First: The scheduler estimates the length of each job and picks the one that will take the shortest time and runs it until it is finished. The main advantage is that you must know the duration of each job, so the user has to estimate the job time.
- Shortest Remaining Time: The process with the smallest estimated running time is next.
Types of Operating System:
- Distributed Operating System: This is a form of a parallel processing system. It allows the multiple computers, resources or processors on a network to work together on the problem and to be treated as a single system. This is done by dividing a single job into several jobs and each of these sub-tasks are performed by separate computers on the network. They share processing and data between different systems on a network in order to help reduce bottlenecks.
- Embedded System: This is a computer system which is built into another device to support its operation. For example: Washing machines & dishwashers. They will have a minimal user interface, which consist of a few buttons and a small display screen. Most likely having a limited amount of RAM so a complex memory management system is not required.
- Multi-Tasking System: This allows more than one task or software program to run simultaneously. Each task is given a slice of processor time before going on to the next. For example: Windows.
- Multi-User, Multi-taking System (Time-Sharing System): This is a single powerful mainframe or supercomputer that is connected to a large amount of terminals, which are all using the mainframe CPU. Each user gets a slice of processor time according to a scheduler algorithm.
- Real Time System: Data is processed immediately and a response is given within a guaranteed time frame. This is used on aircrafts, where this system must respond very quickly to any inputs or sensors. It must be able to deal with many inputs simultaneously. It also requires incorporate redundancy. This means that if one component fails then it must automatically switch to back hardware.
Basic Input/Output System (BIOS):
- This is a program that is stored in Erasable Programmable Read-Only Memory (EPROM) that gets a computer started when turned on.
- It will first check that the computer is functional, memory is installed and accessible as well as checking if the processor is working properly.
- It is stored on flash memory so that it can be updated. This allows settings such as boot order of disks to be changed and saved by the user (BIOS Menu).
- This is a piece of software that is usually supplied with a peripheral device. It contains the instructions to allow the peripheral and the OS to communicate and to be able to configure the hardware.
- The operating system is expected to communicate with a wide range of devices, each with different models and manufacturers. It is impossible for a single operating system to know how to handle all existing and future peripheral devices. This is why we need device drivers.
- Can be defined as any instance where software is used to take on the function of the machine.
- It is a theoretical or generalised computer which provides an environment in which a translator is available on which programs can run.
- It has limited, if any, access to some low level features. For example, access to the GPU.
- It can be used to run an operating system on a software implementation of a machine. For example, when testing programs compatibility until the physical machine is ready.
- It uses an interpreter to run intermediate code. The intermediate code can then be run off any computer with a virtual machine but it tends to be slower compared than a compiler.
435 total views, 1 views today