0% found this document useful (0 votes)
158 views10 pages

UNIT-1 Operating System - Concepts:: Definition

An operating system acts as an interface between the user and computer hardware, managing tasks like memory, processors, devices, files, security and error detection. Key functions include memory management, allocating and deallocating memory to processes; processor management, allocating processing time between processes; and device management, controlling access to devices. Popular operating systems include Linux, Windows, and OS X. Batch systems run jobs one at a time while time-sharing systems use multiprocessing to provide faster response times by switching between processes. Distributed systems span multiple computers that communicate over networks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views10 pages

UNIT-1 Operating System - Concepts:: Definition

An operating system acts as an interface between the user and computer hardware, managing tasks like memory, processors, devices, files, security and error detection. Key functions include memory management, allocating and deallocating memory to processes; processor management, allocating processing time between processes; and device management, controlling access to devices. Popular operating systems include Linux, Windows, and OS X. Batch systems run jobs one at a time while time-sharing systems use multiprocessing to provide faster response times by switching between processes. Distributed systems span multiple computers that communicate over networks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

UNIT-1

Operating System – Concepts:


An Operating System (OS) is an interface between computer user and computer hardware. An
operating system is software which performs all the basic tasks like file management, memory management,
process management, handling input and output, and controlling peripheral devices such as disk drives and
printers.
Some popular Operating Systems include Linux, Windows, OS X, VMS, OS/400, AIX, z/OS, etc.

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.

Following are some of important functions of an operating System.

 Memory Management
 Processor Management
 Device Management
 File Management
 Security
 Control over system performance
 Job accounting

1
 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 is 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.

Other Important Activities: Following are some of the important activities that an Operating System performs −
 Security − By means of password and similar other techniques, it prevents unauthorized access to
programs and data.
2
 Control over system performance − Recording delays between request for a service and response
from the system.
 Job accounting − Keeping track of time and resources used by various jobs and users.
 Error detecting aids − Production of dumps, traces, error messages, and other debugging and error
detecting aids.
 Coordination between other software’s and users − Coordination and assignment of compilers,
interpreters, assemblers and other software to the various users of the computer systems.
Types of Operating System: Operating systems are there from the very first computer generation and they
keep evolving with time. In this chapter, we will discuss some of the important types of operating systems
which are most commonly used.
1. Batch operating system: The users of a batch operating system do not interact with the computer
directly. Each user prepares his job on an off-line device like punch cards and submits it to the
computer operator. To speed up processing, jobs with similar needs are batched together and run as a
group. The programmers leave their programs with the operator and the operator then sorts the
programs with similar requirements into batches.

The problems with Batch Systems are as follows −

 Lack of interaction between the user and the job.


 CPU is often idle, because the speed of the mechanical I/O devices is slower than the CPU.
 Difficult to provide the desired priority.

3
2. Time-sharing 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 −

 Provides the advantage of quick response.


 Avoids duplication of software.
 Reduces CPU idle time.
. Disadvantages of Time-sharing operating systems are as follows −

 Problem of reliability
 Question of security and integrity of user programs and data.
 Problem of data communication.

3. Distributed operating System: A distributed operating system is an extension of the network operating


system that supports higher levels of communication and integration of the machines on the network.

4
Distributed Operating System runs on multiple, independent CPU’s. Distributed systems use multiple
central processors to serve multiple real-time applications and multiple users. Data processing jobs are
distributed among the processors accordingly.
The processors communicate with one another through various communication lines (such as
high-speed buses or telephone lines). These are referred as loosely coupled systems or distributed
systems where each processor has its own local memory and processors communicate with one
another through various communication lines, such as high speed buses or telephone lines.

The advantages of distributed systems are as follows −

 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.
 If one site fails in a distributed system, 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.

4. Network operating System: An operating system that provides the connectivity among a number of
autonomous computers is called a network operating system. A typical configuration for a network
operating system is a collection of personal computers along with a common printer, server and file
server for archival storage, all tied together by a local network. 
Mainly there are two types of network operating systems named as peer-to-peer and client / server. 
Peer-to-peer network operating systems allow users to share resources and files located on
their computers and to access shared resources found on other computers. In a peer-to-peer network,
5
all computers are considered equal; they all have the same privileges to use the resources available on
the network. Peer-to-peer networks are designed primarily for small to medium local area networks.
Windows for Workgroups is an example of the program that can function as peer-to-peer network
operating systems.  

Client/server network operating systems allow the network to centralize functions and


applications in one or more dedicated file servers. The file servers become the heart of the
system, providing access to resources and providing security. The workstations (clients) have
access to the resources available on the file servers. The network operating system allows
multiple users to simultaneously share the same resources irrespective of physical location.
Novell Netware and Windows 2000Server are examples of client/ server network operating
systems.

Examples of network operating systems include Microsoft Windows Server 2003, Microsoft
Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD.
The advantages of network operating systems are as follows −

 Centralized servers are highly stable.


 Security is server managed.
 Upgrades to new technologies and hardware can be easily integrated into the system.
6
 Remote access to servers is possible from different locations and types of systems.
The disadvantages of network operating systems are as follows −

 High cost of buying and running a server.


 Dependency on a central location for most operations.
 Regular maintenance and updates are required.
5. Real Time operating System: A real-time system is defined as a data processing system in which the
time interval required to process 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 method, the response time is very less as compared to online
processing.
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 image systems, industrial control
systems, weapon systems, robots, air traffic control systems, etc.
There are two types of real-time operating systems.
Hard real-time systems: Hard real-time systems guarantee that critical tasks complete on time. In
hard real-time systems, secondary storage is limited or missing and the data is stored in ROM. In
these systems, virtual memory is almost never found.
Soft real-time systems: Soft real-time systems are less restrictive. A critical real-time task gets
priority over other tasks and 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 likes undersea exploration and planetary rovers, etc.

Operating System Services: The following are different types of services provided by Operating
System.

 User interface: Almost all operating systems have a user interface (UI). This interface can take
several forms. One is a command-line interface (CLI), which uses text commands and a method for
entering them. Another is a batch interface, in which commands and directives to control those
commands are entered into files, and those files are executed. Most commonly a graphical user
interface (GUI) is used. Here, the interface is a window system with a pointing device to direct I/O,
choose from menus, and make selections and a keyboard to enter text.
 Program execution: The system must be able to load a program into memory and to run that
program. The program must be able to end its execution, either normally or abnormally (indicating
error).
 I/O operations: A running program may require I/O device. For specific devices, special functions
may be desired (such as recording to a CD or DVD drive). For efficiency and protection, users usually
cannot control I/O devices directly. Therefore, the operating system must provide a means to do I/O.
 File-system manipulation: Operating System is used to control operations on files like creating,
opening, reading, and writing.
 Communications: There are many cases 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. Communications may be implemented via shared memory or through message
passing, in which packets of information are moved between processes by the operating system.

7
 Error detection. The operating system needs to be constantly aware of possible errors. Errors may
occur in the CPU and memor, in I/O devices, and in the user program. For each type of error, the
operating system should take the appropriate action to ensure correct and consistent computing.
 Resource allocation. When there are multiple users or multiple jobs running at the same time,
resources must be allocated to each of them.
 Accounting: Accounting keep track of which users use how much and what kinds of computer
resources. This record keeping may be used for accounting (so that users can be billed) or simply for
accumulating usage statistics.
 Protection and security. The owners of information stored in a multiuser or networked computer
system may want to control use of that information. 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. Such security starts with requiring each user to
authenticate himself or herself to the system, usually by means of a password, to gain access to system
resources.

A View of Operating System Services

Introduction to System Calls: In computing, a system call is the programmatic way in which a
computer program requests a service from the kernel of the operating system it is executed on. A system call
is a way for programs to interact with the operating system. A computer program makes a system call when
it makes a request to the operating system’s kernel. System call provides the services of the operating system
to the user programs via Application Program Interface (API). It provides an interface between a process and
operating system to allow user-level processes to request services of the operating system. System calls are
the only entry points into the kernel system. All programs needing resources must use system calls.

Services Provided by System Calls:


1. Process creation and management
2. Main memory management
3. File Access, Directory and File system management
4. Device handling(I/O)
5. Protection
Networking, etc

8
Types of System Calls: There are 5 different types of system calls.
1. Process Control:
 fork ( ) : This system call is used to create a new process, which is called as child process.
 wait ( ): A call to wait() blocks the calling process until one of its child processes exits or a
signal is received. 
 exit ( ): This system call terminates a process normally.
2. File Manipulation:
 open ( ): This is used for creating and opening a file.
 read ( ): This is used to read content from specified file descriptor.
 write ( ): This is used to wrote content to specified file descriptor.
 close ( ): This is used to close opened file descriptors.
3. Device Manipulation:
 iocntl ( ): This system call is used to control specified I/O device.
 read ( ): This system call is used to read data from specified device.
 write ( ): This system call is used to write data to specified device.
4. Communications:
 pipe ( ) : This system call sends output of one command as input of another command.
 shmget ( ): This system call is used to create a shared memory.
 shmat ( ): This system call is used to access shared memory.
5. Protection and Security :
 chmod ( ): This system call is used to change file access permissions.
 chown ( ): This system call is used to change ownership of a file.
 umask ( ): This system call is used to change default umask value.

QUESTIONS

1. What is an Operating System? What are different types of Operating Systems?


2. Explain functions of an Operating System?
9
3. Explain about services of Operating Systems?
4. What is a System Call? Explain about different types of System Calls?

10

You might also like