Vous êtes sur la page 1sur 2

3.

1 The functions of operating systems

The main aims and features of an operating system are to manage the resources of the computer system: -Processor management- for multiprogramming, the low-level scheduler must decide which job will get the next use of processor -Decide on appropriate scheduling algorithms -File management- maintaining a list of files, directories and which file allocation units belong to which files -Input/output management- control of all input and output devices attached to the computer -Memory management- using strategies such as segmentation and paging and the high-level scheduler to decide which jobs will be loaded next Peripherals and processes that want to use the processor send an interrupt: -A program interrupt signals an error in a program. -An I/O interrupt signals that a data transfer is complete or an error has occurred. -A timer input signals that a time-critical activity needs attention -A hardware error signals that some device has failed. After the processor finishes executing an instruction, it checks the priority queue of interrupts. High- priority interrupts are serviced before the processor continues with the next instruction. Every interrupt signal has its own interrupt service routing (ISR) that services the interrupt. The state of registers and memory is stored before an ISR runs in order that the interrupted process can resume from the same point. Scheduling tries to ensure that the processor is working to its pull potential: -That the processor is not idle, waiting for I/O -That I/O- bound processes do not wait for the processor when they only need to use it little -The processor-bound processes do not block other processes The scheduler has a choice of strategy for deciding which job gets the use of processor next:

- Shortest job first -Round robin -Shortest remaining time Jobs must be loaded into the computers main memory to use the processor. Each job must be protected from the actions of other jobs. Linker and loader software load and keep track of processes and their data. A process and its data can be allocated to fixed-size pages or it can be logically segmented Virtual memory is a small amount of fast access storage between the disk and the memory Virtual memory stores code and data relating to the current process that cannot be stored in main memory Spooling is a way to ensure that the input and output for different jobs do not become mixed up, and allows several uses (say on network) to produce output/printout at the same time. When a file is sent to a busy printer, a reference to the file is added the printers spool queue and it is processed when it reaches the top of the queue. A typical desktop PC operating system includes: -File management to allow users to create hierarchical structure for string files and to copy, delete and move files. - Multi-tasking to allow the user to run several programs - A boot process to check the computer every time it is switched on and load the OS - A file allocation table(FAT) to point to the blocks on disk that are used by files.

Vous aimerez peut-être aussi