








































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









































Source: Operating System Concepts by Silberschatz, Galvin and Gagne
Explore What components OS has What services OS provides How they are provided: Structuring OS, Installation, Customization, Boot OS Components OS Services User OS Interface System Calls and Their Types System Programs OS Design and Implementation OS Structure: Layered approach, Microkernels, Modules, Virtual machines OS Generation System Boot
A process is a program in execution. It is the unit of work in a system. It can be running a program or job (e.g., word-processing program, compiler program, sending output to a printer, simulation program) System consists of a collection of processes related to OS and user A process needs resources (CPU time, memory space, files, and I/O devices) to accomplish its task. A process may require input (or initialization data). The OS is responsible for all process management activities: process creation and deletion. process suspension and resumption (scheduling). mechanisms for: process synchronization process communication deadlock handling.
Main memory – an array of words or bytes, each with its own address A repository of quickly accessible data shared by the CPU and I/O devices. Programs, with the data they access, must be in main memory for the CPU to execute them. OS is responsible for all memory management activities: tracking which parts of memory are currently being used and by whom. deciding which processes to load when memory space becomes available. allocating and de-allocating memory space as needed.
OS hides the peculiarities of specific hardware devices from the user by defining an I/O subsystem. The I/O subsystem consists of: buffering, caching, and spooling a general device-driver interface drivers for specific devices The I/O subsystem interfaces to other system components, manages devices, transfers data, and detects I/O completion.
The computer system must provide secondary storage to back up main memory. Disk used as both the source and destination for processing OS is responsible for disk management activities: free space management storage allocation disk scheduling.
Protection refers to a mechanism for controlling access by programs, processes, or users to both system and user resources. The protection mechanism must: distinguish between authorized and unauthorized usage. specify the controls to be imposed. provide a means of enforcement.
Provide certain services to programs and to the users of those programs: User interface: command-line, batch interface and GUI Program execution: system capability to load a program into memory and to run it. I/O operations: A running program may require I/O, which may involve a file or an I/O device. File-system manipulation: program capability to read, write, create, and delete files. Communications: exchange of information between processes executing either on the same computer or on different systems tied together by a network. Implemented via shared memory or message passing. Error detection: ensure correct computing by detecting errors in the CPU and memory hardware, in I/O devices, or in user programs.
Two common approaches for users to interface with OS. Command line interface (CLI) or command interpreter Shell: program that is executed automatically when a job is initiated or a user logs on. Get and execute the next user-specified command UNIX Graphical user interface (GUI) Mouse-based window-and-menu system Icons representing files, programs, actions, etc. Windows Many systems now include both CLI and GUI interfaces Microsoft Windows is GUI with CLI “command” shell Apple Mac OS X as “Aqua” GUI interface with UNIX kernel underneath and shells available Solaris is CLI with optional GUI interfaces (Java Desktop, KDE)
System calls provide an interface between a process and the OS. Typically written in a high-level language (C or C++) Even simple programs make heavy use of OS But users never see this level of detail. Mostly accessed by programs via a high-level application program interface (API) rather than direct system call use Win32, POSIX and Java APIs.
Consider the ReadFile() function in the Win32 API—a function for reading from a file A description of the parameters passed to ReadFile() HANDLE file—the file to be read LPVOID buffer—a buffer where the data will be read into and written from DWORD bytesToRead—the number of bytes to be read into the buffer LPDWORD bytesRead—the number of bytes read during the last read LPOVERLAPPED ovl—indicates if overlapped I/O is being used
Typically, a number associated with each system call System-call interface maintains a table indexed according to these numbers The system call interface invokes intended system call in OS kernel and returns status of the system call and any return values The caller need know nothing about how the system call is implemented Just needs to obey API and understand what OS will do as a result call Most details of OS interface hidden from programmer by API Managed by run-time support library (set of functions built into libraries included with compiler)
Methods to pass parameters between running program and OS. Pass parameters in registers. Store parameters in a table or a block in memory, and the table address is passed as a parameter in a register. Push (store) parameters onto the stack by the program, and pop off the stack by OS.
Process control File management Device management Information maintenance Communications