Académique Documents
Professionnel Documents
Culture Documents
System Components Virtual Machines System Programs System Calls Operating System Services
Process Management
y A process is a program in execution. It is a unit of work
Process Management(count.)
y The operating system is responsible for the
following activities in connection with process management. y Creating and deleting both user and system processes y process suspension and resumption. y Provision of mechanisms for: y process synchronization y process communication y deadlock handling
Main-Memory Management
y Memory is a large array of words or bytes, each with its own
address. It is a shared by the CPU and I/O devices. y Main memory is a volatile storage device. y CPU reads data from main memory during instruction fetch cycle. I/O operations implemented via DMA. y The operating system is responsible for the following activities in connections with memory management:
y Keep track of which parts of memory are currently being used and by
whom. y Decide which processes to load when memory space becomes available. y Allocate and deallocate memory space as needed.
Secondary-Storage Management
y Since main memory (primary storage) is volatile and too small
to accommodate all data and programs permanently, the computer system must provide secondary storage to back up main memory. y Most modern computer systems use disks as the principle on-line storage medium, for both programs and data. y The operating system is responsible for the following activities in connection with disk management:
y Free space management y Storage allocation y Disk scheduling
with computer.
y Different devices has different working method. For this
derivers of specific device are loaded into computer. When needed these drivers are loaded in to main memory.
y The operating system is responsible for the following
File Management
y A computer can store information on different types of media. y For user convenient, OS provides a logical view of information
storage. y A file is a collection of related information defined by its creator. Commonly, files represent programs (both source and object forms) and data. y The operating system is responsible for the following activities in connections with file management:
y y y y y
File creation and deletion. Directory creation and deletion. Support of primitives for manipulating files and directories. Mapping files onto secondary storage. File backup on stable (nonvolatile) storage media.
Protection System
y The processes of a computer must be protected to from one another
activities. OS ensure that Files, Memory, CPU, and other resource are used by only authorized processes.
y Protection refers to a mechanism for controlling access by
share memory or a clock. Each processor has its own local memory. y The processors in the system are connected through a communication network. y A distributed system provides user access to various system resources. y Access to a shared resource allows:
y Computation speed-up y Increased data availability y Enhanced reliability
Command-Interpreter System
y One of the most important system program for an OS is the
command interpreter. It is the interface between user and OS. y Many commands are given to OS by Control statements. When a new job OS started in Batch system or a user log on in a time sharing system, a program executes automatically. This program reads and interprets control statements. This program is called Control Card Interpreter or Command Line interpreter.
Command-Interpreter System(count.)
y Many commands are given to the operating system by
provides some facilities for program and user. Different OS provides different services. Some common services are given below
1. Program execution The main purpose of OS is to provide an efficient and convenient environment for program execution. So an OS provides various functions for loading a program into main memory and execute it. Every running program must terminate either normally or abnormally. 2. I/O operations A running program may need I/O operation (for reading data or to give output). This I/O may be from /to a file. This I/O may be from /to a I/O device. All these operations are managed by an OS.
System Calls
y System calls provide the interface between a running y y y
program and the operating system. Generally available as assembly-language instructions. Several languages (such as C,C++) can be used to write system calls. To understand System call, let a program reads a data from a file and copy it to another file. The first input that the program will need is the name of two files. Once the names are specified , the program must open both files and then copy the required data. All these are done with the help of System Calls. System call can be divided into 5 categories-------
Process control
y A running program must stop either normally (end) or
abnormally(Abort). On abnormal stop OS must provide appropriate message. y Load and executes system calls are used to bring a program into main memory and its execution. y If we Create a process than its execution is controlled by its attributes( priority, cpu time , etc). These attributes are gained by Get process attribute and set
process attribute system calls. To terminate a process terminate system calls is used. y Wait system calls is used when a process waits for an event(user input, busy resource etc.)
Read, write , reposition 3. Get device attribute , set device attribute 4. Logically attach or detach device.(distributed system)
2.
Device Management
y A process may need additional resource for its
execution. These additional resources may be more memory, tape drive, access to file etc. y Many system calls are needed for devices. y If there are many user then user must first Request the device and after use user must Release it. After allotment user can read, write the device.
Get system date, set system date 3. Get process , file or device attribute 4. Set process , file or device attribute
2.
MESSAGE PASSING and SHARED MEMORY. y In message passing IPC is used. Before communication starts a path must be established.
y Each computer in a network has a host name and each
process has an ID. To know the name of another host and process get hostid and get processid system calls are used.
system call. Both communicator communicates with the help of read message and write message system calls. y The close connection system call terminates the coomunication.
call.
System Programs
y System programs provide a convenient environment
File manipulation
y OS provides programs for--1. Create file 2. Delete file 3. Rename file 4. Copy file 5. Print file 6. List file 7. Manipulating files
Status information
y OS provides programs for---
File modification
y OS provides programs for--y Text editors to create and modify files y Special commands to search contents of files or perform
Communications
y OS provides programs for---