Introduction of Operating System (Unit 1)
Introduction of Operating System (Unit 1)
Definition
An operating system is a program that acts as an interface between the user and the
computer hardware and controls the execution of all kinds of programs.
• Memory Management
• Processor Management
• Device Management
• File Management
• Security
• Control over system performance
• Job accounting
• Error detecting aids
• Coordination between other software and users
Memory Management
Memory management refers to management of Primary Memory or Main Memory.
Main memory is a large array of words or bytes where each word or byte has its own
address.
Main memory provides a fast storage that can be accessed directly by the CPU. For a
program to be executed, it must in the main memory. An Operating System does the
following activities for memory management −
• Keeps tracks of primary memory, i.e., what part of it are in use by whom, what
part are not in use.
• In multiprogramming, the OS decides which process will get memory when and
how much.
• Allocates the memory when a process requests it to do so.
• De-allocates the memory when a process no longer needs it or has been
terminated.
Processor Management
In multiprogramming environment, the OS decides which process gets the processor
when and for how much time. This function is called process scheduling. An
Operating System does the following activities for processor management −
• Keeps tracks of processor and status of process. The program responsible for
this task is known as traffic controller.
• Allocates the processor (CPU) to a process.
• De-allocates processor when a process is no longer required.
Device Management
An Operating System manages device communication via their respective drivers. It
does the following activities for device management −
• Keeps tracks of all devices. Program responsible for this task is known as the I/O
controller.
• Decides which process gets the device when and for how much time.
• Allocates the device in the efficient way.
• De-allocates devices.
File Management
A file system is normally organized into directories for easy navigation and usage.
These directories may contain files and other directions.
An Operating System does the following activities for file management −
• Keeps track of information, location, uses, status etc. The collective facilities are
often known as file system.
• Decides who gets the resources.
• Allocates the resources.
• De-allocates the resources.
• The user has to submit a job (written on cards or tape) to a computer operator.
• Then a special program, the monitor, manages the execution of each program in the
batch.
• The monitor is always in the main memory and available for execution.
memory.
• Once this job needs an I/O operation operating system switches to another job (CPU
• Jobs in the memory are always less than the number of jobs on disk(Job Pool).
• If several jobs are ready to run at the same time, then the system chooses which one to
• In Non-multiprogrammed system, there are moments when CPU sits idle and does not
do any work.
Time Sharing Systems are very similar to Multiprogramming batch systems. In fact
time sharing systems are an extension of multiprogramming systems.
In Time sharing systems the prime focus is on minimizing the response time, while in
multiprogramming the prime focus is to maximize the CPU usage.
Time-sharing /Multitasking operating systems
Time-sharing is a technique which enables many people, located at various terminals,
to use a particular computer system at the same time. Time-sharing or multitasking is a
logical extension of multiprogramming. Processor's time which is shared among
multiple users simultaneously is termed as time-sharing.
The main difference between Multiprogrammed Batch Systems and Time-Sharing
Systems is that in case of Multiprogrammed batch systems, the objective is to
maximize processor use, whereas in Time-Sharing Systems, the objective is to
minimize response time.
Multiple jobs are executed by the CPU by switching between them, but the switches
occur so frequently. Thus, the user can receive an immediate response. For example,
in a transaction processing, the processor executes each user program in a short burst
or quantum of computation. That is, if n users are present, then each user can get a
time quantum. When the user submits the command, the response time is in few
seconds at most.
The operating system uses CPU scheduling and multiprogramming to provide each
user with a small portion of a time. Computer systems that were designed primarily as
batch systems have been modified to time-sharing systems.
Advantages of Timesharing operating systems are as follows −
• Problem of reliability.
• Question of security and integrity of user programs and data.
• Problem of data communication.
Multiprocessor Systems
A Multiprocessor system consists of several processors that share a common physical
memory. Multiprocessor system provides higher computing power and speed. In
multiprocessor system all processors operate under single operating system. Multiplicity
of the processors and how they do act together are transparent to the others.
Advantages of Multiprocessor Systems
1. Enhanced performance
2. Execution of several tasks by different processors concurrently, increases the system's
3. If possible, system divides task into many subtasks and then these subtasks can be
tasks.
1. As there are multiple systems involved, user at one site can utilize the resources of
systems at other sites for resource-intensive tasks.
2. Fast processing.
Clustered Systems
• Like parallel systems, clustered systems gather together multiple CPUs to
accomplish computational work.
• Clustered systems differ from parallel systems, however, in that they are
composed of two or more individual systems coupled together.
• The definition of the term clustered is not concrete; the general accepted
definition is that clustered computers share storage and are closely linked via
LAN networking.
• Clustering is usually performed to provide high availability.
• A layer of cluster software runs on the cluster nodes. Each node can monitor one
or more of the others. If the monitored machine fails, the monitoring machine can
take ownership of its storage, and restart the application(s) that were running on
the failed machine. The failed machine can remain down, but the users and
clients of the application would only see a brief interruption of service.
1. Both of these concepts are for single Both of these concepts are for single CPU.
SR.NO MULTIPROGRAMMING MULTI-TASKING
CPU.
operating system simply switches allowed time expires or where there other
to, and executes, another job when reason for current process needs to wait
System Call in OS
Step 1) The processes executed in the user mode till the time a system call
interrupts it.
Step 2) After that, the system call is executed in the kernel-mode on a priority
basis.
Step 3) Once system call execution is over, control returns to the user mode.,
• Process Control
• File Management
• Device Management
• Information Maintenance
• Communications
•
Categories Windows Unix
CreateProcess() ExitProcess()
Process control fork() exit() wait()
WaitForSingleObject()
Device
SetConsoleMode() ReadConsole() WriteConsole() loctl() read() write()
manipulation
Open() Read()
File manipulation CreateFile() ReadFile() WriteFile() CloseHandle()
write() close!)
Information getpid() alarm()
GetCurrentProcessID() SetTimer() Sleep()
maintanence sleep()
Pipe() shm_open()
Communication CreatePipe() CreateFileMapping() MapViewOfFile()
mmap()
SetFileSecurity() InitlializeSecurityDescriptor() Chmod() Umask()
Protection
SetSecurityDescriptorGroup () Chown()
Operating System Generations
Operating Systems have evolved over the years. So, their evolution through the years can be
mapped using generations of operating systems. There are four generations of operating
systems. These can be described as follows –