0% found this document useful (0 votes)
2 views22 pages

01-Operating System Unit-I - Introduction

Uploaded by

sivaselvik.set
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views22 pages

01-Operating System Unit-I - Introduction

Uploaded by

sivaselvik.set
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UNIT - I INTRODUCTION

UNIT I INTRODUCTION
Computer System - Elements and organization; Operating System Overview - Objectives and Functions -
Evolution of Operating System; Operating System Structures – Operating System Services - User
Operating System Interface - System Calls – System Programs - Design and Implementation - Structuring
methods.

COMPUTER SYSTEM
Definition: Is a collection of entities (hardware, software and liveware) that are designed to receive,
process, manage and present information in a meaningful format.

COMPONENTS OF COMPUTER SYSTEM


Computer hardware - Are physical parts/ intangible parts of a computer. eg Input devices, output devices,
central processing unit and storage devices
Computer software - also known as programs or applications. They are classified into two classes namely -
system software and application software
Liveware - is the computer user. Also known as orgware or the humanware. The user commands the
computer system to execute on instructions.

Computer Hardware
Hardware refers to the physical, tangible computer equipment and devices, which provide support for major
functions such as input, processing (internal storage, computation and control), output, secondary storage
(for data and programs), and communication.

Hardware Categories (Functional Parts)


A computer system is a set of integrated devices that input, output, process, and store data and information.
Computer systems are currently built around at least one digital processing device. There are five main
hardware components in a computer system: Input, Processing, Storage, Output and Communication
devices.

Input Devices
Are devices used for entering data or instructions to the central processing unit. Are classifie according to
the method they use to enter data.
A) Keying Devices
Are devices used to enter data into the computer using a set of Keys eg Keyboard, key-to- storage and
keypad.
B) Pointing Devices
Are devices that enter data and instructions into the computer using a pointer that appears on the screen. The
items to be entered are selected by either pointing to or clicking on them.e.g mice, joystick, touch sensitive
screen, trackballs
C) Scanning Devices
Are devices that capture an object or a document directly from the source. They are classifie according to
the technology used to capture data e.g. Scanners and Document readers.

1
UNIT - I INTRODUCTION

The Central Processing Unit (CPU)


Is the brain or the heart of a computer. Is also known as processor and consist of three units namely -
i) Control Unit (CU)
ii) Arithmetic logic Unit (ALU)
iii) Main Memory unit (MMU)

The system unit is the core of a computer system. Usually it's a rectangular box placed on or underneath
your desk. Inside this box are many electronic components that process data. The most important of these
components is the central processing unit (CPU), or microprocessor, which acts as the "brain" of your
computer. Another component is random access memory (RAM), which temporarily stores information that
the CPU uses while the computer is on. The information stored in RAM is erased when the computer is
turned off.

Almost every other part of your computer connects to the system unit using cables. The cables plug into
specific ports (openings), typically on the back of the system unit. Hardware that is not part of the system
unit is sometimes called a peripheral device. Peripheral devices can be external such as a mouse, keyboard,
printer, monitor, external Zip drive or scanner or internal, such as a CD-ROM drive, CD-R drive or internal
modem. Internal peripheral devices are often referred to as integrated peripherals. There are two types
according to shape: tower and desktop.

Functions of Central Processing Unit


- Process data
- Control sequence of operaions within the computers
- It gives command to all parts of a computer
- It control the use of the main memory in storing of data and instructions
- it provides temporary storage (RAM) and permanent storage(ROM) of data

The Control Unit


Is the center of operations for the computer system, it directs the activities of the computer system.

2
UNIT - I INTRODUCTION

Software:
A set of programs that form an interface between the hardware and the user of a computer system are
referred to as Software. They are of six types:
(a) System software:
A set of programs to control the internal operations such as reading data from input devices, giving results
to output devices and ensuring proper functioning of components is called system software.
(b) Application software:
Programs designed by the user to perform a specific function, such as accounting software, payroll software
etc.
(c) Operating system:
A set of tools and programs to manage the overall working of a computer using a defined set of hardware
components is called an operating system. It is the interface between the user and the computer system.
(d) Utility software:
Certain special purpose programs that are designed to perform a specialized task, such as functions to copy,
cut or paste files in a computer, formatting a disk etc.
(e) Language processors:
Special software to accept data and interpret it in the form of Machine /Assembly language understandable
by a computer. It also ensures the correctness of language syntax and errors
(f) Connectivity software:
A set of programs and instructions to connect the computer with the main server to enable sharing of
resources and information with the server and other connected computers.

Output Unit:
It controls various output devices like printer, graphic plotter, speech synthesizer, monitor (also known as
Visual Display Unit or VDU) to produce the desired output and present it to the user. It ensures the
convertibility of output into human readable form that is understandable by the user.

OPERATING SYSTEM OVERVIEW


An Operating System (OS) is an interface between computer user and computer hardware.
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.

What is an Operating System?


 An operating system acts as an intermediary between the user of a computer and the computer
hardware.
 The purpose of an operating system is to provide an environment in which a user can execute
programs in a convenient and efficient manner.
 An operating system is software that manages the computer hardware.

Goals of an Operating System


 The primary goal of an operating system is thus to make the computer system convenient to use.
 The secondary goal is to use the computer hardware in an efficient manner.

3
UNIT - I INTRODUCTION

OPERATING SYSTEM OBJECTIVES AND FUNCTIONS


Objectives of OS:
1. Convenience: An OS makes a computer more convenient to use.
2. Efficiency: An OS allows the computer system resources to be used in an efficient manner.
3. Ability to evolve: An OS should be constructed in such a way as to permit the effective development,
testing, and introduction of new system functions without interfering with service.
4. Management of system resources: It guarantees that resources are shared fairly among various
processes and users.

Functions of an operating System are as follows:


Memory Management: Memory management refers to management of Primary Memory or Main
Memory. An Operating System does the following activities for memory management: OS Keeps tracks of
primary memory, i.e., what part of it are in use by whom, what part are not in use. In multi-programming,
the OS decides which process will get memory when and how much. OS allocates the memory when a
process requests it to do so. It de-allocates the memory when a process no longer needs it or has been
terminated.

Processor Management: In multi-programming 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: OS keeps tracks of processor and status of process.
OS allocates the processor (CPU) to a process. It 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. The program responsible
for this task is known as the I/O controller. Decides which process gets the device when and for how much
time. OS allocates the device in the most efficient way. It de-allocates devices in most efficient way.

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. OS Decides who gets the resources. It allocates the resources and also de-
allocates the resources when not in need.

Security: OS prevents unauthorized access to programs and data. For shared or public systems, the OS
controls access to the system as a whole and to specific system resources.

Control over system performance: OS will collect usage statistics for various resources and monitor
performance parameters such as response time, Recording delays between request for a service and
response from the system.

Job accounting: OS Keeps track of time and resources used by various jobs and users. On any system, this
information is useful in anticipating the need for future enhancements and in tuning the system to improve
performance and can be used for job accounting purposes.

Error detection & Response: A variety of errors can occur while a computer system is running. These
include internal and external hardware errors, such as a memory error, or a device failure or malfunction;
and various software errors. In each case, the OS must provide a response that clears the error condition
with the least impact on running applications. The response may range from ending the program that
caused the error, to retrying the operation, to simply reporting the error to the application, Production of
dumps, traces, error messages, and other debugging and error detecting aids.

4
UNIT - I INTRODUCTION

Booting the computer: Booting is the process of starting or restarting the computer. If computer is
switched off completely and then turned on then it is cold booting. If computer is restarted then it is warm
booting. Booting of the computer is done by OS.

Coordination between other software and users: An OS enables coordination of hardware components,
coordination and assignment of compilers, interpreters, assemblers and other software to the various users
of the computer systems.

EVOLUTION OF OPERATING SYSTEM


The evolution of the operating system can be divided into four generations.
Let us briefly discuss this generation-based evolution of the operating system with their timeline.
First Generation. The first generation of the operating system was used in the year 1945 to 1955. during
the time of electronic computing systems development. It was the era of mechanical computing systems
where the users or the programmers used to provide the instructions (through punch cards, paper tape,
magnetic tape, etc.) and the computer had to follow them. Now, due to human intervention, the process was
very slow and there were chances of human mistakes.
We can say that there is no operating system at that time and users used to give programs to the computer
system itself. So, less speed and more errors were the first-generation operating systems' drawbacks.
Second Generation. The second generation of the operating system was used from the year 1955 to 1965
during the time of batch operating system development. During the second generation phase, the users used
to prepare their instructions (tasks or jobs) in the form of jobs on an off-line device like punch cards and
submit them to the computer operator. Now, out of these punch cards (these punch cards were tabulated
into instructions for computers), similar punch cards of jobs were grouped and run as a group to speed up
the entire process. The jobs consisted of program and input data along with the control instructions. The
main task of the programmer or developer was to create jobs or programs and then hand them over to the
operator in the form of punch cards. Now, it was the duty of an operator to sort the programs with similar
requirements into batches.
Some major drawbacks of the second-generation operating system were:
 We could not set the priority of the jobs as jobs were scheduled only basis of similarities among the
jobs.
 The CPU was not utilized to its max potential as the CPU becomes idle (when the operator was
loading jobs).
Third Generation. The third generation of the operating system was used in the year 1965 to 1980 during
the time of multiprogramming operating system development. The third generation operating system was
developed to serve more than one user at a time (multi-users). During this period, users were able to
communicate with the operating systems with the help of software called command-line interface. So, the
computers became multi-user and multiprogramming.
Fourth Generation. The fourth generation of the operating system is being in from the year 1965 till now.
Before the evolution of the fourth generation of the operating system, the users were able to communicate
with the operating system but with the help of command line interfaces, punch cards, magnetic tapes, etc.
So, the user had to provide commands (that needed to be remembered) which became hectic.
So, the fourth generation of operating systems came into existence with the development of GUI (Graphical
User Interface). The GUI made the user experience more convenient.
We can also terminate the fourth generation operating system era the era of the distributed operating
systems. Now, the operating systems can be found in mobile devices, smart watches, fitness bands, smart
glasses, VR gears, and so on. We are now surrounded by various versions of the operating system.

5
UNIT - I INTRODUCTION

The evolution of operating systems based on the feature (how features got developed over the years).
Serial Processing
Before the 1950s, there was no operating system, and users used to give programs to the computer system
itself. So, less speed and more errors were generated (as serial processing is done on a single machine). So,
the developers or the programmers had to provide the entire program in the form of sequential instruction
in the form of a punched card. These punched cards were first translated into a card reader and then it was
submitted to the operating system.

Due to this extensive process of execution of a simple program and human intervention, the overall
execution time was very large and inefficient. There were various other problems such as no user
interaction, execution of only one process at a time, very less memory, no error handling, etc. Now, a red
light was used to detect the error in the program execution. So, if there was any error, the error got detected
due to red blinking lights.

The major drawbacks of the serial operating system were:


 No user and computer system interaction.
 Very less memory.
 It required a lot of time for program execution.
 Only one program could be executed at a time.
 the user could not execute another program when one program was in execution.

Batch Processing
In today's world, we can see that a user of the computer directly interacts with the computer. But in the past
years (1955 - 1965), the users were not able to directly interact with the computer system.

In earlier times, we used a type of operating system termed a batch operating system in which the user(s)
used to prepare their instructions (tasks or jobs) in the form of jobs on an off-line device like punch cards
and submits them to the computer operator. Now, out of these punch cards, similar punch cards of jobs
were grouped and run as a group to speed up the entire process.

Note: The Jobs consisted of program and input data along with the control instructions.

The main task of the programmer or developer was to create jobs or programs and then hand them over to
the operator in the form of punch cards. Now, it was the duty of an operator to sort the programs with
similar requirements into batches. Due to this dual procedure and manual intervention, the batch operating
system was a slow operating system. The most common use input and output devices were card-reader or
tape drives.

The Batch operating system was used to schedule similar jobs in one batch, so the same jobs in the batch
were executed at a higher speed. As the jobs were scheduled one after the other, whenever a job gets
completed, the next job from the job spool gets executed without any user interaction. The batch operating
system also eliminates the setup time issue.

6
UNIT - I INTRODUCTION

Since the batch operating system was very simple, it always resided in the memory and its major task was
to transfer control from one job to another job.
There major drawbacks of the batch operating system were:
 We could not set the priority of the jobs as jobs were scheduled only based on similarities.
 The CPU was not utilized to its maximum potential as the CPU becomes idle when the operator was
loading jobs.
Multiprogramming
In the multiprogramming operating system, several jobs or processes can be loaded into the main memory
simultaneously with the help of a single processor (a single processing unit was there and programs were
scheduled on a certain basis). Now, it was the duty of a subpart of the operating system called job scheduler
to schedule these processes in such a way that maximum processes can be executed in minimum time. So,
better CPU and memory utilization along with the execution of several processes at a time was the main
aim of the multiprogramming operating system.
The benefits of a multiprogramming operating system are:
 Multiple processes can be loaded into the main memory.
 The multiprogramming operating system was able to use both primary and secondary memory.
 Users can interact with the processes through input and output devices.
 There was no sequential process execution hence the later processes need not wait for a large amount
of time.
 The CPU was better utilized. If there is any process that waits for an I/O, then the CPU will change
the job and takes another job from the job pool so that the CPU will never sit idle.

7
UNIT - I INTRODUCTION

Time-sharing System
In the time-sharing operating system, several jobs or processes can be loaded into the main memory
simultaneously and several users can share the system as well. We can hence, say that the time-sharing
operating system was a logical extension of the multiprogramming operating system. The name time-
sharing was used because the processes used to share an equal amount of time specified by the operating
system developer.

The main aim of the time-sharing operating system was to reduce the overall process response time. The
CPU could execute several processes by providing an equal amount of time to each process, so the CPU
utilization became better than the multiprogramming operating system.

Note:
Response time is the total amount of time it takes to respond to a process. It should not be confused with
the execution time. The switching between several operating system processes was handled by an operating
system subprocess knew as the CPU scheduler.

The benefits of the time-sharing operating system are:


 Multiple processes and user requests can be responded to simultaneously as there is more than one
processing unit.
 Better response time than the previously used multiprogramming operating system.
 The CPU did not have to be idle due to regular switching.
 More efficient utilization of the CPU.

8
UNIT - I INTRODUCTION

Operating System Structures


An operating system has a complex structure, so we need a well-defined structure to assist us in applying it
to our unique requirements. Just as we break down a big problem into smaller, easier-to-solve subproblems,
designing an operating system in parts is a simpler approach to do it. And each section is an Operating
System component. The approach of interconnecting and integrating multiple operating system components
into the kernel can be described as an operating system structure. As mentioned below, various sorts of
structures are used to implement operating systems.

Simple Structure
It is the simplest Operating System Structure and is not well defined; It can only be used for small and
limited systems. In this structure, the interfaces and levels of functionality are well separated; hence
programs can access I/O routines which can cause unauthorized access to I/O routines.

This structure is implemented in MS-DOS operating system:


The MS-DOS operating System is made up of various layers, each with its own set of functions.
These layers are:
Application Program
System Program
MS-DOS device drivers
ROM BIOS device drivers
Layering has an advantage in the MS-DOS operating system since all the levels can be defined separately
and can interact with each other when needed.
It is easier to design, maintain, and update the system if it is made in layers. So that's why limited systems
with less complexity can be constructed easily using Simple Structure.
If one user program fails, the entire operating system gets crashed.
The abstraction level in MS-DOS systems is low, so programs and I/O routines are visible to the end-user,
so the user can have unauthorized access.

9
UNIT - I INTRODUCTION

Advantages of Simple Structure


 It is easy to develop because of the limited number of interfaces and layers.
 Offers good performance due to lesser layers between hardware and applications.
Disadvantages of Simple Structure
 If one user program fails, the entire operating system crashes.
 Abstraction or data hiding is not present as layers are connected and communicate with each other.
 Layers can access the processes going in the Operating System, which can lead to data modification
and can cause Operating System to crash.
Monolithic Structure
The Monolithic operating System in which the kernel acts as a manager by managing all things like file
management, memory management, device management, and operational processes of the Operating
System.
The kernel is the heart of a computer operating system (OS). Kernel delivers basic services to all other
elements of the System. It serves as the primary interface between the Operating System and the hardware.
In monolithic systems, kernels can directly access all the resources of the operating System like physical
hardware, exp Keyboard, Mouse etc.
The monolithic kernel is another name for the monolithic operating system. Batch processing and time-
sharing maximize the usability of a processor by multiprogramming. The monolithic kernel functions as a
virtual machine by working on top of the Operating System and controlling all hardware components. This
is an outdated operating system that was used in banks to accomplish minor activities such as batch
processing and time-sharing, which enables many people at various terminals to access the Operating
System.

Advantages of Monolithic structure:


 It is simple to design and implement because all operations are managed by kernel only, and layering
is not needed.
 As services such as memory management, file management, process scheduling, etc., are
implemented in the same address space, the execution of the monolithic kernel is relatively fast as
compared to normal systems. Using the same address saves time for address allocation for new
processes and makes it faster.

10
UNIT - I INTRODUCTION

Disadvantages of Monolithic structure:


 If any service in the monolithic kernel fails, the entire System fails because, in address space, the
services are connected to each other and affect each other.
 It is not flexible, and to introduce a new service

Layered Approach
In this type of structure, OS is divided into layers or levels. The hardware is on the bottom layer (layer 0),
while the user interface is on the top layer (layer N). These layers are arranged in a hierarchical way in
which the top-level layers use the functionalities of their lower-level levels.

In this approach, functionalities of each layer are isolated, and abstraction is also available. In layered
structure, debugging is easier as it is a hierarchical model, so all lower-level layered is debugged, and then
the upper layer is checked. So all the lower layers are already checked, and the current layer is to be
checked only.

Advantages of Layered Structure


 Each layer has its functionalities, so work tasks are isolated, and abstraction is present up to some
level.
 Debugging is easier as lower layers are debugged, and then upper layers are checked.
Disadvantages of Layered Structure
 In Layered Structure, layering causes degradation in performance.
 It takes careful planning to construct the layers since higher layers only utilize the functions of lower
layers.

Micro-kernel
Micro-Kernel structure designs the Operating System by removing all non-essential components of the
kernel. These non-essential components of kernels are implemented as systems and user programs. Hence
these implemented systems are called as Micro-Kernels.

Each Micro-Kernel is made independently and is isolated from other Micro-Kernels. So this makes the
system more secure and reliable. If any Micro-Kernel fails, then the remaining operating System remains
untouched and works fine.

11
UNIT - I INTRODUCTION

Advantages of Micro-kernel structure:


 It allows the operating system to be portable between platforms.
 As each Micro-Kernel is isolated, it is safe and trustworthy.
 Because Micro-Kernels are smaller, they can be successfully tested.
 If any component or Micro-Kernel fails, the remaining operating System is unaffected and continues
to function normally.
Disadvantages of Micro-kernel structure:
 Increased inter-module communication reduces system performance.
 System is complex to be constructed.

12
UNIT - I INTRODUCTION

Operating system services


The operating system provides the programming environment in which a programmer works on a computer
system. The user program requests various resources through the operating system. The operating system
gives several services to utility programmers and users. Applications access these services through
application programming interfaces or system calls. By invoking those interfaces, the application can
request a service from the operating system, pass parameters, and acquire the operation outcomes.

Following are the services provided by an operating system -


Program execution
Control Input/output devices
Program creation
Error Detection and Response
Accounting
Security and Protection
File Management
Communication

Program execution
To execute a program, several tasks need to be performed. Both the instructions and data must be loaded
into the main memory. In addition, input-output devices and files should be initialized, and other resources
must be prepared. The Operating structures handle these kinds of tasks. The user now no longer should fear
the reminiscence allocation or multitasking or anything.

Control Input/output devices


As there are numerous types of I/O devices within the computer system, and each I/O device calls for its
own precise set of instructions for the operation. The Operating System hides that info with the aid of
presenting a uniform interface. Thus, it is convenient for programmers to access such devices easily.

Program Creation
The Operating system offers the structures and tools, including editors and debuggers, to help the
programmer create, modify, and debugging programs.

Error Detection and Response


An Error in a device may also cause malfunctioning of the entire device. These include hardware and
software errors such as device failure, memory error, division by zero, attempts to access forbidden
memory locations, etc. To avoid error, the operating system monitors the system for detecting errors and
takes suitable action with at least impact on running applications.

While working with computers, errors may occur quite often. Errors may occur in the:
Input/ Output devices: For example, connection failure in the network, lack of paper in the printer, etc.
User program: For example: attempt to access illegal memory locations, divide by zero, use too much
CPU time, etc.
Memory hardware: For example, Memory error, the memory becomes full, etc.

To handle these errors and other types of possible errors, the operating system takes appropriate action and
generates messages to ensure correct and consistent computing.

Accounting
An Operating device collects utilization records for numerous assets and tracks the overall performance
parameters and responsive time to enhance overall performance. These personal records are beneficial for
additional upgrades and tuning the device to enhance overall performance.
13
UNIT - I INTRODUCTION

Security and Protection


Operating device affords safety to the statistics and packages of a person and protects any interference from
unauthorized users. The safety feature counters threats, which are published via way of individuals out of
doors the manage of the running device.

For Example:
When a user downloads something from the internet, that program may contain malicious code that may
harm the already existing programs. The operating system ensures that proper checks are applied while
downloading such programs.
If one computer system is shared amongst a couple of users, then the various processes must be protected
from another intrusion. For this, the operating system provides various mechanisms that allow only those
processes to use resources that have gained proper authorization from the operating system. The
mechanism may include providing unique users ids and passwords to each user.

File management
Computers keep data and information on secondary storage devices like magnetic tape, magnetic disk,
optical disk, etc. Each storage media has its capabilities like speed, capacity, data transfer rate, and data
access methods.
For file management, the operating system must know the types of different files and the characteristics of
different storage devices. It has to offer the proportion and safety mechanism of documents additionally.

Communication
The operating system manages the exchange of data and programs among different computers connected
over a network. This communication is accomplished using message passing and shared memory.

14
UNIT - I INTRODUCTION

User Operating System Interface


The user and operating system are connected with each other with the help of interface, so interface is used
to connect the user and OS.
In computers there are different types of interface that can be used for connection with computers to users
and their connection is responsible for data transfer.
Also, in computers there are different interfaces. These interfaces are not necessarily used but can be used
in computers whenever it is needed. So, different types of tasks can be performed by the help of different
interfaces.
Command line interface
The command-line interface is an interface whenever the user needs to have different commands regarding
the input and output and then a task is performed so this is called the command-line argument and it is used
to execute the output and create, delete, print, copy, paste, etc.
All these operations are performed with the help of the command-line interface.
The interface is always connected to the OS so that the command given by the user directly works by the
OS and a number of operations can be performed with the help of the command line interface because
multiple commands can be interrupted at same time and execute only one.
The command line interface is necessary because all the basic operations in the computer are performed
with the help of the OS and it is responsible for memory management. By using this we can divide the
memory and we can use the memory.
Command Line Interface advantages −
 Controls OS or application
 faster management
 ability to store scripts which helps in automating regular tasks.
 Troubleshoot network connection issues.
Command Line Interface disadvantages −
 The steeper learning curve is associated with memorizing commands and a complex syntax.
 Different commands are used in different shells.
Graphical user interface
The graphical user interface is used for playing games, watching videos, etc. these are done with the help of
GUI because all these applications require graphics.
The GUI is one of the necessary interfaces because only by using the user can clearly see the picture, play
videos.
So we need GUI for computers and this can be done only with the help of an operating system.
When a task is performed in the computer then the OS checks the task and defines the interface which is
necessary for the task. So, we need GUI in the OS.
The basic components of GUIs are −
 Start menu with program groups
 Taskbar which showing running programs
 Desktop screen
 Different icons and shortcuts.

15
UNIT - I INTRODUCTION

Choice of interface
The interface that is used with the help of OS for a particular task and that task can be performed with
minimum possible time and the output is shown on the screen in that case we use the choice of interface.

The choice of interface means the OS checks the task and finds out which interface can be suitable for a
particular task. So that type of interface is called the choice of interface and this can be done with the help
of an OS.

SYSTEM CALLS
 System calls provide the interface between a process and the operating system.
 These calls are generally available as assembly-language instructions.

System calls can be grouped roughly into five major categories:


1. Process control
2. file management
3. device management
4. information maintenance
5. communications.

1. Process Control
 end,abort
 load, execute
 Create process and terminate process
 get process attributes and set process attributes.
 wait for time, wait event, signal event
 Allocate and free memory.

2. File Management
 Create file, delete file
 Open , close
 Read, write, reposition
 Get file attributes, set file attributes.

3. Device Management
 Request device, release device.
 Read, write, reposition
 Get device attribtues, set device attributes
 Logically attach or detach devices

4. Information maintenance
 Get time or date, set time or date
 Get system data, set system data
 Get process, file, or device attributes
 Set process, file or device attributes

16
UNIT - I INTRODUCTION

5. Communications
 Create, delete communication connection
 Send, receive messages
 Transfer status information
 Attach or detach remote devices
Two types of communication models
(a) Message passing model
(b) Shared memory model

SYSTEM PROGRAMS
 System programs provide a convenient environment for program development and execution.
 They can be divided into several categories:

1. File management:
These programs create, delete, copy, rename, print, dump, list and generally manipulate files and
directories.
2. Status information:
The status such as date, time, amount of available memory or diskspace, number of users or
similar status information.
3. File modification:
Several text editors may be available to create and modify the content of files stored on disk or tape.
4. Programming-language support:
Compilers, assemblers and interpreters for common programming languages are often provided to the
user with the operating system.
5. Program loading and execution:
The system may provide absolute loaders, relocatable loaders, linkage editors, and overlay loaders.
6. Communications:
These programs provide the mechanism for creating virtual connections among processes, users, and
different computer systems. (email, FTP, Remote log in)
7. Application programs:
Programs that are useful to solve common problems, or to perform common operations.
Eg. Web browsers, database systems.

17
UNIT - I INTRODUCTION

Design and Implementation


Operating System Design Goals
It is quite complicated to define all the goals and specifications of the operating system while designing
[Link] design changes depending on the type of the operating system i.e if it is batch system, time shared
system, single user system, multi user system, distributed system etc.

There are basically two types of goals while designing an operating system. These are −
User Goals
The operating system should be convenient, easy to use, reliable, safe and fast according to the users.
However, these specifications are not very useful as there is no set method to achieve these goals.
System Goals
The operating system should be easy to design, implement and maintain. These are specifications required
by those who create, maintain and operate the operating system. But there is not specific method to achieve
these goals as well.

Operating System Mechanisms and Policies


There is no specific way to design an operating system as it is a highly creative task. However, there are
general software principles that are applicable to all operating systems.

A subtle difference between mechanism and policy is that mechanism shows how to do something and
policy shows what to do. Policies may change over time and this would lead to changes in mechanism. So,
it is better to have a general mechanism that would require few changes even when a policy change occurs.

For example - If the mechanism and policy are independent, then few changes are required in mechanism
if policy changes. If a policy favours I/O intensive processes over CPU intensive processes, then a policy
change to preference of CPU intensive processes will not change the mechanism.

Operating System Implementation


The operating system needs to be implemented after it is designed. Earlier they were written in assembly
language but now higher level languages are used. The first system not written in assembly language was
the Master Control Program (MCP) for Burroughs Computers.

Advantages of Higher Level Language


There are multiple advantages to implementing an operating system using a higher level language such as:
the code is written more fast, it is compact and also easier to debug and understand. Also, the operating
system can be easily moved from one hardware to another if it is written in a high level language.

Disadvantages of Higher Level Language


Using high level language for implementing an operating system leads to a loss in speed and increase in
storage requirements. However in modern systems only a small amount of code is needed for high
performance, such as the CPU scheduler and memory manager. Also, the bottleneck routines in the system
can be replaced by assembly language equivalents if required.

18
UNIT - I INTRODUCTION

TWO MARKS QUESTIONS WITH ANSWERS


1. What is meant by Mainframe Systems?
Mainframe systems are the first computers developed to tackle many commercial and scientific
applications. These systems are developed from the batch systems and then multiprogramming system and
finally time sharing systems.
2. What is meant by Batch Systems?
In this, operators batched together jobs with similar needs and ran through the computer as a group.
The operators would sort programs into batches with similar requirements and as system become available,
it would run each batch.
3. What is meant by Multiprogramming?
Several users simultaneously compete for system resources (i.e) the job currently waiting for I/O will
yield the CPU to another job which is ready to do calculations, if another job is waiting. Thus it increases
CPU utilization and system throughput.
4. What is meant by Time-sharing Systems?
Time Sharing is a logical extension of multiprogramming .Here, CPU executes multiple jobs by
switching among them, but the switches occur so frequently that the users can interact with each program
while it is running.
5. What are the Components of a Computer System?
Application Programs, System Program, Operating System & Computer Hardware.
6. What are the advantages of Multiprogramming?
Increased System Throughput Increased CPU utilization
7. What are Multiprocessor System?
Multiprocessor systems have systems more than one processor for communication, sharing the
computer bus, the memory, clock & peripheral devices.
8. What are the advantages of multiprocessors?
 Increased throughput
 Economy of scale
 Increased reliability
9. What is meant by clustered system?
Clustered systems are collection of multiple CPUs to accomplish computational work. Those
systems share storage and are closely linked via LAN networking.
10. What are the types of clustering?
 Asymmetric Clustering
 Symmetric Clustering & Clustering over a WAN
11. What is meant by Asymmetric Clustering?
In this clustering, one machine is in hot standby mode, while the other is running the application. The
hot standby machine just monitors the active server. If that server fails, hot stand by host become the active
server.
12. What is meant by Symmetric clustering?
In this, two or more hosts are running applications and they are monitoring each other. This
clustering requires more than one application be available to run and it uses all of the available hardware.
13. What is meant by parallel clusters?
Parallel clusters allow multiple hosts to access the same data on the shared storage. Each machine
has full access to all data in the database.

19
UNIT - I INTRODUCTION

14. What is meant by symmetric multiprocessing?


In Symmetric multiprocessing, each processor runs an identical copy of the operating system and
these copies communicate with one another as needed.
15. What is meant by Asymmetric Multiprocessing?
In Asymmetric multiprocessing, each processor assigned a specific task.
A master processor controls the system and the other processors either look to the master for
instruction or have predefined tasks.
This master processor also schedules and allocates work to the slaves.
16. What is meant by Real time system?
Real time systems are systems that have their in-built characteristics as supplying immediate
response.
In real time system, each process is assigned a certain level of priority according to the relative
importance of the events to be processed.
17. What are the advantages of distributed systems?
 Resource sharing
 Load balancing
 Reliability
 Communication link easy
18. What are the applications of real-time systems?
 Controlling the machines Instruments
 Industrial process
 Landing & tasking off aero planes Real time simulations
 Military applications.
19. What are the types of Real time systems?
Hard Real Time System
Soft Real Time System
20. What is meant by Hard Real time systems?
They are generally required to and they guarantee that the critical tasks are completed in given
amount of time.
21. What is meant by soft real time system?
It provides priority to the tasks based on their criticality.
It does not guarantee completion of critical tasks in time.
22. What is meant by distributed systems?
A distributed system is basically a collection of autonomous computer systems which co-operate
with one another through their h/w and s/w interconnections.
23. What are the disadvantages of distributed systems?
 Security weakness
 Over dependence on performance and reliability
 Maintenance and control become complex
24. What are the modes of operation in Hardware Protection?
User Mode
Monitor Mode

20
UNIT - I INTRODUCTION

25. What are Operating Services?


Normally, an operating system provides certain services to programs and to the users of those
programs. Some of them are:
 Program Execution.
 I/O operations
 File-system manipulation
 Communications Error Detection
26. What is System Programs?
System programs provide a convenient environment for program development and execution. Some
of these programs are user interfaces to system calls and others are more complex. Some of them are:
 File Management
 Status Information
 File modification
 Programming Language support
 Program loading,
 Execution and communication.
27. What is meant by System Calls?
The System Calls acts as a interface to a running program and the Operating system. These system
calls available in assembly language instructions.
28. What is Virtual machine?
The Application programs view everything under them in the hierarchy as though the system
programs were part of the machine itself. This layered approach is taken as the logical conclusion in the
concept of a Virtual machine.
29. What is meant by Hand held Systems?
Handheld Systems have a small amount of memory including slow processors and also small display
screens and are of limited size and they always have connectivity to a network.
30. What is known as system utilities?
Most operating systems are supplied with programs that solve common problems or perform
common operations. Such programs include web browsers, word processors and text formatters, spread
sheets, database systems, compilers, plotting and games. These programs are known as system utilities.

21
UNIT - I INTRODUCTION

SIXTEEN MARK QUESTIONS WITH ANSWERS

1. Explain the types of system call in detail.


1. Process Control
2. File Manipulation
3. Device Manipulation
4. Information maintenance
5. Communications
6. Protection
2. Explain in detail about operating system structures.
 Simple Structure
 Layered Approach
 Microkernels
3. What are the system components of an operating system and explain them?
[Link] management
[Link]-memory management
[Link] management
4.I/O management
[Link] storage management
[Link]
[Link] system
[Link]-interpreter system
4. Explain Evolution of Operating System in detail.

5. Write short notes on Operating System Services.

6. Illustrate the Design and Implementation of OS.

22

You might also like