Вы находитесь на странице: 1из 22

Operating System

NITESH KUMAR NELSON HIJAM ORDU HARMONY 100101150 100101143 100101152 [CS-B]

A program that controls the execution of application programs and acts as an intermediary between a user of a computer and the computer hardware.

What the Operating System Does


Provides user interface

Manages the CPU


Manages memory Manages hardware Coordinates application

software with the CPU

Where we use operating systems??


Windows Linux Unix Mac OS etc.

Four Components of a Computer System


User1 User2 User3 User. n

System and applications programs Operating system


Computer hardware

Operating Systems Component

Process Management
A process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity. Process needs resources to accomplish its task CPU, memory, I/O, files Initialization data

Memory Management
All data in memory before and after processing All instructions in memory in order to execute Memory management activities Keeping track of which parts of memory are currently being used and by whom Deciding which processes (or parts thereof) and data to move into and out of memory Allocating and de-allocating memory space as needed

Device Management
Opening or attaching a device to a process Reading data from a device Writing data to a device Closing or releasing a device

File Management
Manages the different file containing different contents Arranging them in particular sequence Allocate the memory as they need

Protection & Security


Protection any mechanism for controlling access of processes or users to resources defined by the OS Security defense of the system against internal and external attacks Huge range, including denial-of-service, worms, viruses, identity theft, theft of service

Networking
Establish a connection to a remote service Listening for connection from remote client Sending message to a remote system Receiving message from remote system Closing connection to a remote system

System Calls
System calls provide the interface between a running program and the operating system like invoking a command from inside a program.
Generally available as assembly-language instructions. Languages defined to replace assembly language for systems programming allow system calls to be made directly (e.g., C, C++) - C language: open, close, read, write,

System calls are used whenever a program needs to access a restricted resource. A system call is an interface between a user-space application and a service that the kernel provides. Because the service is provided in the kernel, a direct call cannot be performed; instead, we must use a process of crossing the user-space/kernel boundary

Example of System Calls


System call sequence to copy the contents of one file to another file

Types of System Calls


Process control

File management
Information maintenance Device management Communications

System calls categories:


Process Control. load execute create process terminate process get/set process attributes wait for time, wait event, signal event allocate, free memory File management. create file, delete file open, close read, write, reposition get/set file attributes

Device Management. request device, release device read, write, reposition get/set device attributes logically attach or detach devices Information Maintenance. get/set time or date get/set system data get/set process, file, or device attributes

Communication. create, delete communication connection send, receive messages transfer status information attach or detach remote devices

Examples of Windows and Unix System Calls