Operating System Unit I Part I
Operating System Unit I Part I
● An operating system is a program that controls the execution of application programs and acts as an
interface between the user of a computer and the computer hardware.
● An operating system (OS) is the software which helps in operating both hardware and software of the
computer and it also manages all other application programs in a computer.
● Processor Management: An operating system manages the processor’s work by allocating various jobs to
it and ensuring that each process receives enough time from the processor to function properly.
● Memory Management: An operating system manages the allocation and deallocation of the memory to
various processes and ensures that the other process does not consume the memory allocated to one
process.
● Device Management: There are various input and output devices. An OS controls the working of these
input-output devices. It receives the requests from these devices, performs a specific task, and
communicates back to the requesting process.
● File Management: An operating system keeps track of information regarding the creation, deletion,
transfer, copy, and storage of files in an organized way. It also maintains the integrity of the data stored in
these files, including the file directory structure, by protecting against unauthorized access.
● Security: The operating system provides various techniques which assure the integrity and confidentiality
of user data. Following security measures are used to protect user data:
○ Protection against unauthorized access through login.
○ Protection against intrusion by keeping Firefall active.
○ Protecting the system memory against malicious access.
○ Displaying messages related to system vulnerabilities.
● Error Detection: From time to time, the operating system checks the system for any external threat or
malicious software activity. It also checks the hardware for any type of damage. This process displays
several alerts to the user so that the appropriate action can be taken against any damage caused to the
system.
● Job Scheduling: In a multitasking OS where multiple programs run simultaneously, the operating system
determines which applications should run in which order and how time should be allocated to each
application.
The mechanical relays were very slow and were later replaced with vacuum tubes. These machines were enormous
but were still very slow.
These early computers were designed, built and maintained by a single group of people. Programming languages
were unknown and there were no operating systems so all the programming was done in machine language.
By the 1950’s punch cards were introduced and this improved the computer system. Instead of using plugboards,
programs were written on cards and read into the system.
The Batch System was introduced to reduce wasted time in the computer. A tray full of jobs was collected in the
input room and read into the magnetic tape.
The Third Generation ( 1965 - 1980 ): Integrated Circuits and Multiprogramming
Until the 1960’s, there were two types of computer systems i.e the scientific and the commercial computers. These
were combined by IBM in the System/360. This used integrated circuits and provided a major price and performance
advantage over the second generation systems.
The third generation operating systems also introduced multiprogramming. This meant that the processor was not
idle while a job was completing its I/O operation. Another job was scheduled on the processor so that its time would
not be wasted.
The advent of personal computers also led to the growth of networks. This created network operating systems and
distributed operating systems. The users were aware of a network while using a network operating system and could
log in to remote machines and copy files from one machine to another.
The operating system has been evolving through the years. The following table shows the history of the OS.
Time-sharing operating System- allows many users to share the computer resources. (Max utilization of the
resources).
Time-sharing enables many people, located at various terminals, to use a particular computer system at the same time.
Multitasking or Time-Sharing Systems is a logical extension of multiprogramming. Processor’s time is shared among
multiple users simultaneously and is termed as time-sharing.
The main difference between Time-Sharing Systems and Multiprogrammed Batch 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 implemented by the CPU by switching between them, but the switches occur so frequently. So, 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, i.e.; if n users are present, then each user can get a time
quantum. Whenever the user submits the command, the response time is in a few seconds at most.
An operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of a
time. Computer systems which were designed primarily as batch systems have been modified to time-sharing
systems.
Distributed operating System- Manages a group of different computers and makes them appear to be a single
computer.
Multiple central processors are used by Distributed systems to serve multiple real-time applications and multiple
users. Accordingly, Data processing jobs are distributed among the processors.
Processors communicate with each other through various communication lines (like high-speed buses or telephone
lines). These are known as loosely coupled systems or distributed systems. Processors in this system may vary in
size and function. They are referred to as sites, nodes, computers, and so on.
Advantages
● With resource sharing facility, a user at one site may be able to use the resources available at another.
● Speedup the exchange of data with one another via electronic mail.
● Failure of one site in a distributed system doesn’t affect the others, the remaining sites can potentially
continue operating.
● Better service to the customers.
● Reduction of the load on the host computer.
● Reduction of delays in data processing.
Network operating system- computers running on different operating systems can participate in a common network
(It is used for security purposes).
Network Operating System runs on a server and gives the server the capability to manage data, users, groups,
security, applications, and other networking functions. The basic purpose of the network operating system is to allow
shared file and printer access among multiple computers in a network, typically a local area network (LAN), a
private network or to other networks.
Some examples of network operating systems include Microsoft Windows Server 2003, Microsoft Windows Server
2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD.
Advantages
● Centralized servers are highly stable.
● Security is server managed.
● Upgradation of new technologies and hardware can be easily integrated into the system.
● It is possible to remote access to servers from different locations and types of systems.
Disadvantages
● High cost of buying and running a server.
● Dependency on a central location for most operations.
● Regular maintenance and updates are required.
and respond to inputs is so small that it controls the environment. The time taken by the system to
respond to an input and display of required updated information is termed as the response time. So in this
Real-time systems are used when there are rigid time requirements on the operation of a processor or the
flow of data and real-time systems can be used as a control device in a dedicated application. A real-time
operating system must have well-defined, fixed time constraints, otherwise the system will fail. For
example, Scientific experiments, medical imaging systems, industrial control systems, weapon systems,
secondary storage is limited or missing and the data is stored in ROM. In these systems, virtual memory is
retains the priority until it completes. Soft real-time systems have limited utility than hard real-time
systems. For example, multimedia, virtual reality, Advanced Scientific Projects like undersea exploration
● I/O operations
● Communication
● Error Detection
● Resource Allocation
● Protection
Program execution
Operating systems handle many kinds of activities from user programs to system programs like printer
spooler, name servers, file server, etc. Each of these activities is encapsulated as a process.
A process includes the complete execution context (code to execute, data to manipulate, registers, OS
resources in use). Following are the major activities of an operating system with respect to program
management −
I/O Operation
An I/O subsystem comprises of I/O devices and their corresponding driver software. Drivers hide the
An Operating System manages the communication between user and device drivers.
● I/O operation means read or write operation with any file or any specific I/O device.
● Operating system provides the access to the required I/O device when required.
storage), for long-term storage purpose. Examples of storage media include magnetic tape, magnetic disk
and optical disk drives like CD, DVD. Each of these media has its own properties like speed, capacity, data
A file system is normally organized into directories for easy navigation and usage. These directories may
contain files and other directions. Following are the major activities of an operating system with respect
to file management −
● The operating system gives the permission to the program for operation on file.
Communication
In case of distributed systems which are a collection of processors that do not share memory, peripheral
devices, or a clock, the operating system manages communications between all the processes. Multiple
processes communicate with one another through communication lines in the network.
The OS handles routing and connection strategies, and the problems of contention and security.
Following are the major activities of an operating system with respect to communication −
● Both the processes can be on one computer or on different computers, but are connected
Message Passing.
Error handling
Errors can occur anytime and anywhere. An error may occur in CPU, in I/O devices or in the memory
hardware. Following are the major activities of an operating system with respect to error handling −
Resource Management
In case of multi-user or multi-tasking environment, resources such as main memory, CPU cycles and files
storage are to be allocated to each user or job. Following are the major activities of an operating system
Protection
Considering a computer system having multiple users and concurrent execution of multiple processes, the
Protection refers to a mechanism or a way to control the access of programs, processes, or users to the
resources defined by a computer system. Following are the major activities of an operating system with
respect to protection −
● The OS ensures that external I/O devices are protected from invalid access attempts.
1. Process control: end, abort, create, terminate, allocate and free memory.
2. File management: create, open, close, delete, read file etc.
3. Device management
4. Information maintenance
5. Communication
Process Control
Process control is the system call that is used to direct the processes. Some process control
examples include creating, load, abort, end, execute, process, terminate the process, etc.
File Management
File management is a system call that is used to handle the files. Some file management
examples include creating files, delete files, open, close, read, write, etc.
Device Management
Device management is a system call that is used to deal with devices. Some examples of device
management include read, device, write, get device attributes, release device, etc.
Information Maintenance
Information maintenance is a system call that is used to maintain information. There are some
examples of information maintenance, including getting system data, set time or date, get time or
date, set system data, etc.
Communication
Communication is a system call that is used for communication. There are some examples of
communication, including create, delete communication connections, send, receive messages, etc.
2. Network connections require the system calls to sending and receiving data packets.
4. If you want to access hardware devices, including a printer, scanner, you need a system call.
5. System calls are used to create and manage new processes.