operating system pdf
operating system pdf
operating system pdf
Process management
• A program in its execution state is known as process.
• A process needs certain resources including CPU time, memory, files and
I/O devices to accomplish its task.
• These resources are either given to the process when it is created or
allocated to it while it is running.
• A program is a passive entity such as contents of a file stored on the disk
whereas a process is an active entity
The operating system is responsible for the following activities in
process management:
• Creating and deleting both user and system processes
• Suspending and resuming processes
• Providing mechanisms for process synchronization
• Providing mechanisms for process communication
• Providing mechanisms for deadlock handling.
2. Memory management
Main memory is a collection of quickly accessible data shared by the CPU and I/O
devices.
The central processor reads instructions from main memory (during instruction-
fetch cycle) and both reads and writes data from main memory (during data-
fetch cycle).
The operating system is responsible for the following activities in memory
management:
• Keeping track of which parts of memory are currently being used and by whom
• Deciding which processes and data to move into and out of memory
• Allocating and deallocating memory space as needed.
3. File-System Management
The operating system is responsible for the following activities with file management:
• Creating and deleting files
• Creating and deleting directories to organize files
• Supporting primitives for manipulating files and directories
• Backing up files on stable (nonvolatile) storage media.
8.Command Interpreter
• To interface with the operating System we use command-line interface or command interpreter
that allows users to directly enter commands that are to be performed by the operating system.
• The main function of the command interpreter is to get and execute the user-specified
commands. Many of the commands given at this level manipulate files: create, delete, list, print,
copy, execute, and so on. Eg: MS-DOS and UNIX shells.
Types of Operating System
• Single user Operating system This OS provides the environment for
single user i.e. only one user can interact with the system at a time. Eg:
MS-DOS, MS WINDOWS-XP, ME, 2000 etc.
• In a typical sequence first the editor is been called to create a source code of user
program then translator is been called to convert source code into its object code,
finally the loader is been called to load its executable program into main memory for
execution.
• If syntax errors are detected than the whole program must be restarted from the
beginning.
Batch processing Operating System
• A real time system has well defined fixed time constraints, processing
must be done within defined constraints or system will get failed.
• System that controls scientific system, experimenting medical system,
industrial control system and certain display systems are real time
system.
• They are also applicable to automobile engine fuel system, home
appliance controller and weapon systems.
• There are two types of real system:
• i) Hard real time system This system guarantees that critical tasks be
completed on time. For this all the delays in the system should be
bounded, from the retrieval of stored data to the time it takes operating
system to finish any request made to it.
• ii) Soft real time system This is less restrictive type of system defined as
not hard real-time, simply providing that a critical real-time task will
receive priority over other tasks and that it will retain the priority until it
completes.
Netwok Operating System :-An Os that includes special functions for
connecting computers and devices into a LAN. Some OS such as UNIX and
the Mac OS, having networking functions built in.
Some popular NOS’s for DOS and Windows systems include Novell
Netware, Microsoft LAN Manager and Windows NT.
• Some characteristics
• Each computer has its own private OS, instead of running part of a global
system wide operating system.
• Each user normally works on his/her own system.
Distributed Operating System :-It hides the existence of multiple
computers from the user i.e. the user doesn’t know that many
computers are being used to process the data.
These computers may be located at many places around the globe. This
OS provides provide single-system image to its users. All these
computers work in close coordination with each other.
• In this OS, each processor has its own memory and clock. The processor
communicates with each other through various communication lines
such as high speed buses and telephone lines.
Operating-System Services
1) User interface Almost all operating systems have a user interface
(UI).This interface can take several forms.
• command-line interface (CLI) which uses text commands.
• batch interface, in which commands and directives to control those
commands are entered into files
• graphical user interface (GUI) the interface is a window system with a
pointing device to direct I/O, choose from menus, and make selections
and keyboard to enter text.
2) Program execution:- The system should to load a program into memory and to run
that program. The program must be able to end its execution.
4)File-system manipulation:- Programs need to read and write files. They also need to
create and delete. Finally, some programs include permissions management to allow or
deny access to files or directories based on file ownership.
5) Input / Output Operations:-A program which is currently executing
may require I/O, which may involve file or other I/O device. For
efficiency and protection, users cannot directly govern the I/O devices.
So, the OS provide a means to do I/O Input / Output operation which
means read or write operation with any file
6) Communications. There are many circumstances in which one process needs to
exchange information with another process.
Such communication may occur between processes that are executing on the
same computer or between processes that are executing on different computer
systems tied together by a computer network.
7) Error detection. Errors may occur in the CPU and memory hardware (such as a
memory error or a power failure), in I/O devices (a network failure, or lack of
paper in the printer), and in the user program (such as an arithmetic overflow, an
attempt to access an illegal memory location, or too-great use of CPU time).
For each type of error, the operating system should take the appropriate action
to ensure correct and consistent computing.
8. Resource allocation. When there are multiple users or multiple jobs running at the same
time, resources must be allocated to each of them. Many different types of resources are
managed by the operating system trough various methods such as CPU-scheduling.
9. Accounting. OS keeps track of which users use how much and what kind of computer
resources. This record keeping may be used for accounting
10. Protection and security. 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.
Protection involves ensuring that all access to system resources is controlled. Security of the
system from outsiders is also important by means of a password, to gain access to system
resources.
Interrupts