* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download 2. OS Components
Survey
Document related concepts
Library (computing) wikipedia , lookup
MTS system architecture wikipedia , lookup
Security-focused operating system wikipedia , lookup
Copland (operating system) wikipedia , lookup
Plan 9 from Bell Labs wikipedia , lookup
Spring (operating system) wikipedia , lookup
Distributed operating system wikipedia , lookup
Burroughs MCP wikipedia , lookup
Process management (computing) wikipedia , lookup
Transcript
Operating System Services • An operating system provides an environment for the execution of programs. • It provides certain services to programs and to the users of those programs. Operating System Components • To provide the services and to manage the system the OS should have the appropriate programs or modules. • Those are called the components of OS. The Operating System programs consist of the following set of programs OS Components Process Management Main Memory Management I/O System Management File Management Protection System Networking Secondary-Storage Management Command-Interpreter System Process Management A process is a program in execution A process needs certain resources, including CPU time, memory, files, and I/O devices, to accomplish its task The operating system is responsible for the following activities in connection with process management Process creation and deletion Process suspension and resumption Provision of mechanisms for: process synchronization process communication OS Process manager Process suspension or termination Creation of Processes Making Decision which processes and when to run CPU Main-Memory Management Main memory is the only place where the program is loaded to run. It should be used effectively to fit as many programs as possible The operating system is responsible for the following activities with the memory management Keep track of which parts of memory are currently being used and by whom Decide which processes to load when memory space becomes available Allocate and deallocate memory space as needed OS (Memory manager) Memory Processes Making Decision which processes and where to place File Management A file is a collection of related information defined by its creator. The operating system is responsible for the following activities with the file management: Files, Directories creation and deletion Support of basic methods for manipulating files and directories OS (File manager) Programs Suggesting universal methods of: - file access (sequential, random) - file organization (directory tree). HDD, Tape, Flash Disk, Floppy disk, CDROM I/O System Management I/O subsystem hides the peculiarities of specific hardware devices from the user. The I/O system consists of: A buffer, caching, spooling system A general device-driver interface Drivers for specific hardware devices OS (Device Drivers) Programs Suggesting universal methods of I/O devices access. HDD, Tape, Flash Disk, Floppy disk, CDROM, Printer, Scanner, Keyboard Secondary (Mass) Storage Management The operating system is responsible for the following activities with disk management: Free space management Storage allocation Disk scheduling OS (Mass Storage Manager) Programs Suggesting effective methods of Mass Storage usage. HDD, Tape, Flash Disk, Floppy disk, CDROM Networking A distributed system collects physically separate, possibly heterogeneous, systems into a single coherent system, providing the user with universal access to the various resources that the system maintains (like OSI layers). OS (Networking routines) OS (Networking routines) Programs Programs Suggests universal form of communication. Suggests universal form of communication. Protection & Security Protection & Security refer to a mechanism for controlling access by programs, processes, or users to both system and user resources The protection mechanism: When several separate processes execute concurrently, it should not be possible for one process to interfere with the others or with the operating system itself The security mechanism must: distinguish between authorized and unauthorized usage specify the controls to be imposed (conditions to access) provide a means of enforcement (reject access) OS (Protection Mechanism) Processes Authorized Rejected Users Resources Command Interpreter One of the most important systems programs for an operating system is the command interpreter, which is the interface between the user and the operating system. Some operating systems include the command interpreter in the kernel. Other operating systems, such as MS-DOS and UNIX, treat the command interpreter as a special program that is running when a job is initiated, or when a user first logs on (on timesharing systems). Users Users Command Interpreter (Shell) OS Implementation of System Calls • System calls are the way of activation the OS appropriate components from the user programs. • grouped roughly into six major categories: process control, file manipulation, device manipulation, information maintenance, communications, and protection. Passing of parameters Three general methods are used to pass parameters to the operating system. The simplest approach is to pass the parameters in registers. In some cases, however, there may be more parameters than registers. In these cases, the parameters are generally stored in a block, or table, in memory, and the address of the block is passed as a parameter in a register. Parameters also can be placed, or pushed, onto the stack by the program and popped off the stack by the operating system. Some operating systems prefer the block or stack method because those approaches do not limit the number or length of parameters being passed. System Calls Example As you can see, even simple programs may make heavy use of the operating system. Frequently, systems execute thousands of system calls per second.