0% found this document useful (0 votes)
11 views

Notes unit 1& 2 OS

Uploaded by

rathodnikil07
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Notes unit 1& 2 OS

Uploaded by

rathodnikil07
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Jai Mahakali Shikshan Sanstha’s

AGNIHOTRI POLYTECHNIC NAGTHANA,WARDHA


Department Of Computer Engineering
Subject: Operating System

WHAT IS OPERATING SYSTEM?

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.

An operating system (OS) is system software that manages computer hardware, software
resources, and provides common services for computer programs. The communication between a
user and a system takes place with the help of operating systems.
Windows, Linux, and Android are examples of operating systems that enable the user to use
programs like MS Office, Notepad, and games on the computer or mobile phone.

*FUNCTIONS OF OPERATING SYSTEM

 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 reallocation
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:
o Protection against unauthorized access through login.
o Protecting the system memory against malicious access.
o 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.
 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.

* FEATURES OF OPERATING SYSTEMS


Here is a list of some important features of operating systems:

1. Provides a platform for running applications


2. Handles memory management and CPU scheduling
3. Provides file system abstraction
4. Provides networking support
5. Provides security features
6. Provides user interface
7. Provides utilities and system services
8. Supports application development

* ADVANTAGES OF OPERATING SYSTEM

There are several advantages of operating systems.


1. Ensuring correct and efficient use of the computer’s hardware.
2. Allowing different applications to run concurrently.
3. Managing files and folders.
4. Providing a user interface.
5. Managing security.
6. Managing resources.
7. Managing printing.
8. Providing a platform for software development.

*DISADVANTAGES OF OPERATING SYSTEM

There are several disadvantages of operating systems.

 They can be complex and difficult to use.


 They can be expensive to purchase and maintain.
 They can be vulnerable to attacks from malicious users.

* TYPES OF OPERATING SYSTEM

There are several different types of operating systems present. In this section, we will discuss the
advantages and disadvantages of these types of OS.

 Batch OS
 Distributed OS
 Time Sharing OS/Multitasking OS
 Network OS
 Real-time OS

1) Batch Operating System

Batch OS is the first operating system for second-generation computers. These systems execute
batches of jobs without user interaction. Jobs are collected, processed in groups, and then the results
are produced.
Advantages of Batch OS

 Execution time taken for similar jobs is higher.


 Multiple users can share batch systems.
 Managing large works becomes easy in batch systems.
 The idle time for a single batch is very less.
Disadvantages of OS

 It is hard to debug batch systems.


 If a job fails, then the other jobs have to wait for an unknown time till the issue is
resolved.
 Batch systems are sometimes costly.
Examples of Batch OS: payroll system, bank statements, data entry, etc.

2) Distributed Operating System

A distributed OS is a recent advancement in the field of computer technology and is


utilized all over the world that too with great pace. In a distributed OS, various computers are
connected through a single communication channel. These independent computers have their
memory unit and CPU and are known as loosely coupled systems. The system processes can be
of different sizes and can perform different functions. The major benefit of such a type of
operating system is that a user can access files that are not present on his system but in another
connected system. In addition, remote access is available to the systems connected to this
network.
Advantages of Distributed OS

 Failure of one system will not affect the other systems because all the computers are
independent of each other.
 The load on the host system is reduced.
 The size of the network is easily scalable as many computers can be added to the
network.
 As the workload and resources are shared therefore the calculations are
performed at a higher speed.
 Data exchange speed is increased with the help of electronic mail.
Disadvantages of Distributed OS

 The setup cost is high.


 Software used for such systems is highly complex.
 Failure of the main network will lead to the failure of the whole system.
Examples of Distributed OS: LOCUS, etc.

3) Time sharing / Multitasking Operating System

The multitasking OS is also known as the time-sharing operating system as each task is
given some time so that all the tasks work efficiently. This system provides access to a large
number of users, and each user gets the time of CPU as they get in a single system. The tasks
performed are given by a single user or by different users. The time allotted to execute one task
is called a quantum, and as soon as the time to execute one task is completed, the system
switches over to another task.
Advantages of Multitasking OS

 Each task gets equal time for execution.


 The idle time for the CPU will be the lowest.
 There are very few chances for the duplication of the software.

Disadvantages of Multitasking OS

 Processes with higher priority cannot be executed first as equal priority is given to
eachprocess or task.
 Various user data is needed to be taken care of from unauthorized access.
 Sometimes there is a data communication problem.
Examples of Multitasking OS: UNIX, etc.

4) Network Operating System

Network operating systems are the systems that run on a server and manage all the networking
functions. They allow sharing of various files, applications, printers, security, and other networking
functions over a small network of computers like LAN or any other private network. In the
network OS, all the users are aware of the configurations of every other user within the network,
which is why network operating systems are also known as tightly coupled systems.
Advantages of Network OS

 New technologies and hardware can easily upgrade the systems.


 Security of the system is managed over servers.
 Servers can be accessed remotely from different locations and systems.
 The centralized servers are stable.
Disadvantages of Network OS

 Server costs are high.


 Regular updates and maintenance are required.
 Users are dependent on the central location for the maximum number of operations.
Examples of Network OS: Microsoft Windows server 2008, LINUX, etc.

5) Real-Time Operating System

Real-Time operating systems serve real-time systems. These operating systems are useful when
many events occur in a short time or within certain deadlines, such as real-time simulations.

Types of the real-time OS are:

 Hard real-time OS
The hard real-time OS is the operating system for mainly the applications in which the slightest
delay is also unacceptable. The time constraints of such applications are very strict. Such
systems are built for life-saving equipment like parachutes and airbags, which immediately need to
be in action if an accident happens.

 Soft real-time OS
The soft real-time OS is the operating system for applications where time constraint is not very
strict.

In a soft real-time system, an important task is prioritized over less important tasks, and this
priority remains active until the completion of the task. Furthermore, a time limit is always set
for a specific job, enabling short time delays for future tasks, which is acceptable.
For Example, virtual reality,reservation systems, etc.

Advantages of Real-Time OS

 It provides more output from all the resources as there is maximum utilization of
systems.
 It provides the best management of memory allocation.
 These systems are always error-free.
 These operating systems focus more on running applications than those in the queue.
 Shifting from one task to another takes very little time.
Disadvantages of Real-Time OS

 System resources are extremely expensive and are not so good.


 The algorithms used are very complex.
 Only limited tasks can run at a single time.
 In such systems, we cannot set thread priority as these systems cannot switch tasks
easily.
Examples of Real-Time OS: Medical imaging systems, robots, etc.

SERVICES PROVIDED BY AN OPERATING SYSTEM

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 -

o Program execution
o Control Input/output devices
o Program creation
o Error Detection and Response
o Accounting
o Security and Protection
o File Management
o 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.

o Input/ Output devices: For example, connection failure in the network, lack of paper
in theprinter, etc.
o User program: For example: attempt to access illegal memory locations, divide by zero,
use toomuch CPU time, etc.

o 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.

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 manager of the running device.

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
connectedover a network. This communication is accomplished using message passing and shared
memory.

SYSTEM CALLS IN OPERATING SYSTEM

A system call is a way for a user program to interface with the operating system. The
program requests several services, and the OS responds by invoking a series of system calls to
satisfy the request. A system call can be written in assembly language or a high-level language like C
or Pascal. System calls are predefined functions that the operating system may directly invoke if a
high-level language is used.

A system call is a method for a computer program to request a service from the kernel of the
operating system on which it is running. A system call is a method of interacting with the operating
system via programs. A system call is a request from computer software to an operating system's
kernel.

System calls are the mechanisms through which user applications interact with the operating system's
kernel. They provide a way for programs to request services from the OS, such as file manipulation,
process control, and communication. System calls act as an interface between user-level applications
and the hardware or low-level system functionalities.

TYPES of System Calls

1) Process control
2) File management
3) Device Management
4) Information maintenance
5) Communication

1) Process control(Mainly used for process)

 End, abort
 Load ,execute
 Create process, terminate process
 Get process attribute, Set process attribute
 Wait for time
 Wait event, signal event
 Allocate and for memory

2) File management(used for manipulation of files)

 Create file, delete file


 Open, close
 Read, write, reposition
 Get file attribute, set file attribute
3) Device Management(used for managing devices)

 Request device, release device


 Read, write, reposition
 Get device attribute, set device attribute
 Logically attach or detach device

4) Information maintenance(to do Information maintenance)

 Get time or date, set time or date,


 Get system data, set system data
 Get process, file, or device Attribute
 Set process, file, or device Attribute

6) Communication(for Communication among calls)

 Send, receive message


 Create, delete
 Transfer status information
 Attach or detach remote devices.

What is Kernel?

A kernel is the core part of an operating system. It acts as a bridge between software
applications and the hardware of a computer. The kernel manages system resources, such as
the CPU, memory, and devices, ensuring everything works together smoothly and efficiently.
It handles tasks like running programs, accessing files, and connecting to devices like
printers and keyboards.

Types of Kernel
1) Monolithic kernel
2) Microkernel

 OS Structure
1) Monolithic kernel

2) Microkernel

3) Layered OS Structure

1) Monolithic kernel
In a Monolithic kernel, the entire operating system runs as a single program in kernel mode.
The user services and kernel services are implemented in the same address space.
A monolithic kernel is a type of operating system architecture where the entire operating
system, including core functions like memory management, process management, device
drivers, and file systems, is integrated into a single large block of code running in a single
address space.
This design can make the system faster because all components can interact directly, but it
can also make the system more complex and harder to maintain, as a bug in one part of the
kernel can potentially affect the entire system.

2) Micro- kernel

The kernel manages the operations of the computer, In microkernel, the user services and
kernel services are implemented in different address spaces.
The user services are kept in the user address space, and kernel services are kept under the
kernel address space.
A microkernel is a minimalistic approach to designing an operating system.
In microkernel architecture, only the most essential functions are included in the kernel,
such as basic communication between hardware and software, and simple process
management.
Other services like device drivers, file systems, and network protocols are run in user space
as separate processes.

3) Layered OS Structure

The layered structure of an operating system is a design approach that organizes the system
into distinct levels or layers, each responsible for different functions. This structure
enhances modularity, making the OS easier to manage, understand, and maintain. Here’s a
breakdown of the typical layers:

1. Hardware Layer: This is the lowest layer, consisting of the physical hardware of the
computer, such as the CPU, memory, and storage devices.

2. Kernel Layer: The kernel is the core component of the OS, directly interacting with the
hardware. It manages system resources, provides essential services like process
management, memory management, device management, and system calls.

3. System Call Interface: This layer provides an interface for user programs to interact with
the kernel. It defines the set of system calls available to user applications for performing
operations like file manipulation, process control, and communication.

4. Device Drivers: These are specialized modules within the kernel that manage
communication between the operating system and hardware devices. Device drivers handle
the specifics of how data is transmitted to and from hardware devices.

5. User Interface: This layer provides the means for users to interact with the operating
system. It includes graphical user interfaces (GUIs) or command-line interfaces (CLIs),
depending on the OS design.

6. Application Layer: The topmost layer includes all the application programs that users run,
such as word processors, web browsers, and games. This layer interacts with the OS through
system calls and libraries.

You might also like