0% found this document useful (0 votes)
15 views74 pages

Y24 Final Eos Module 1 Unit 1

This document provides an introduction to operating systems, detailing their types, structures, and functionalities. It covers essential concepts such as memory management, processor management, device management, and file management, along with the roles of operating systems in optimizing system performance and ensuring security. Additionally, it discusses various operating system types, including batch, multiprogrammed batch, and time-sharing systems, along with their advantages and disadvantages.

Uploaded by

gurugoutham28
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)
15 views74 pages

Y24 Final Eos Module 1 Unit 1

This document provides an introduction to operating systems, detailing their types, structures, and functionalities. It covers essential concepts such as memory management, processor management, device management, and file management, along with the roles of operating systems in optimizing system performance and ensuring security. Additionally, it discusses various operating system types, including batch, multiprogrammed batch, and time-sharing systems, along with their advantages and disadvantages.

Uploaded by

gurugoutham28
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
You are on page 1/ 74

BCA

Topic :Introduction
ESSENTIAL OF OPERATING SYSTEM
Module - 1 Unit - 1

CREATED BY K. VICTOR BABU


AIM

To familiarize students with the operating systems types and operating system structures and
computer structures

INSTRUCTIONAL OBJECTIVES

In this unit, the students will be able to:


Learn about the different types of operating systems , different operating
system structures and different computer structures

LEARNING OUTCOMES

At the end of this unit, you should be able to:


✓ Improvement of knowledge between different types of operating systems.
✓ Deliberate various operating systems structures
✓ Deliberate the various types of computer system structures

CREATED BY K. VICTOR BABU


Overview of Operating Systems:

• What is an Operating System?


• An operating system (OS) is system software that manages computer
hardware, software resources, and provides
common services for computer programs.
• A program that acts as an intermediary between a user of a computer
and the computer hardware

CREATED BY K. VICTOR BABU


CREATED BY K. VICTOR BABU
CREATED BY K. VICTOR BABU
CREATED BY K. VICTOR BABU
Why are Operating Systems Used?
• The Operating System is used as a communication channel
between the Computer hardware and the user. It works as an
intermediate between System Hardware and End-User.

CREATED BY K. VICTOR BABU


Operating System handles the following
responsibilities:
• It controls all the computer resources.
• It provides valuable services to user programs.
• It coordinates the execution of user programs.
• It provides resources for user programs.
• It provides an interface (virtual machine) to the user.
• It hides the complexity of software.
• It supports multiple execution modes.
• It monitors the execution of user programs to prevent errors.

CREATED BY K. VICTOR BABU


Operating System Functionalities:

➢Memory Management ➢Control Over System


➢Processor Management Performance
➢Device Management ➢Job Accounting
➢File Management ➢Error-Detecting Aids
➢User Interface or Command ➢Coordination Between
Interpreter Other Software and Users
➢Booting the Computer ➢Network Management
➢Security

CREATED BY K. VICTOR BABU


Memory Management

• An operating system manages the allocation and deallocation


of memory to various processes and ensures that the other
process does not consume the memory allocated to one
process.

CREATED BY K. VICTOR BABU


An Operating System performs the following activities
for Memory Management:

➢It keeps track of primary memory, i.e., which bytes of memory


are used by which user program. The memory addresses that
have already been allocated and the memory addresses of the
memory that has not yet been used.
➢In multiprogramming, the OS decides the order in which
processes are granted memory access, and for how long.
➢It Allocates the memory to a process when the process
requests it and deallocates the memory when the process has
terminated or is performing an I/O operation.

CREATED BY K. VICTOR BABU


Processor Management

• In a multi-programming environment, the OS decides the order


in which processes have access to the processor, and how
much processing time each process has. This function of OS is
called Process Scheduling

CREATED BY K. VICTOR BABU


An Operating System performs the following
activities for 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.
Keeps track of the status of processes.
➢The program which performs this task is known as a traffic
controller.
➢Allocates the CPU that is a processor to a process.
➢De-allocates processor when a process is no longer required.

CREATED BY K. VICTOR BABU


Device Management
An OS manages device communication via its respective
drivers. It performs the following activities for device
management.

➢Keeps track of all devices connected to the system. designates


a program responsible for every device known as the
Input/Output controller.
➢Decide which process gets access to a certain device and for
how long. Allocates devices effectively and efficiently.
➢Deallocates devices when they are no longer required.

CREATED BY K. VICTOR BABU


File Management
• A file system is organized into directories for efficient or easy
navigation and usage. These directories may contain other
directories and other files.

An Operating System carries out the following file


management activities.

➢It keeps track of where information is stored, user access


settings, the status of every file, and more.
➢An OS keeps track of information regarding the creation,
deletion, transfer, copy, and storage of files in an organized
way.
CREATED BY K. VICTOR BABU
User Interface or Command Interpreter
➢The user interacts with the computer system through the
operating system.
➢ Hence OS acts as an interface between the user and the
computer hardware.
➢This user interface is offered through a set of commands or
a graphical user interface (GUI).
➢Through this interface, the user makes interacts with the
applications and the machine hardware.

CREATED BY K. VICTOR BABU


Booting the Computer

➢The process of starting or restarting the computer is known as


booting.
➢ If the computer is switched off completely and if turned on
then it is called cold booting.
➢ Warm booting is a process of using the operating system to
restart the computer.

CREATED BY K. VICTOR BABU


Security

• The operating system uses password protection to protect user


data and similar other techniques. it also prevents
unauthorized access to programs and user data.
• The following security measures are used to protect user
data:

• Protection against unauthorized access through login.


• Protecting the system memory against malicious access.
• Displaying messages related to system vulnerabilities.

CREATED BY K. VICTOR BABU


Control Over System Performance

• Operating systems play a pivotal role in controlling and


optimizing system performance.
• They act as intermediaries between hardware and software,
ensuring that computing resources are efficiently utilized.
• One fundamental aspect is resource allocation, where the OS
allocates CPU time, memory, and I/O devices to different
processes, striving to provide fair and optimal resource
utilization

CREATED BY K. VICTOR BABU


Job Accounting

• The operating system Keeps track of time and resources used


by various tasks and users, this information can be used to
track resource usage for a particular user or group of users. In a
multitasking OS where multiple programs run simultaneously,
the OS determines which applications should run in which
order and how time should be allocated to each application.

CREATED BY K. VICTOR BABU


Error-Detecting Aids

• The operating system constantly monitors the system to detect


errors and avoid malfunctioning computer systems.
• 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.

CREATED BY K. VICTOR BABU


Coordination Between Other Software and
Users
• Operating systems also coordinate and assign
• interpreters,
• compilers,
• assemblers,
• and other software to the various users of the computer
systems.
Network Management
• Operating systems help computers talk to each other and the
internet.
• They manage how data is packaged and sent over the network,
making sure it arrives safely and in the right order.
CREATED BY K. VICTOR BABU
Brief History of OS

CREATED BY K. VICTOR BABU


Basic Computer Architecture

CREATED BY K. VICTOR BABU


Continue..

CREATED BY K. VICTOR BABU


Computer System

• CPU – All modern CPUs still have arithmetic cores that do data
crunching and control units for coordination.
• Memory – There are many “kinds” of memory today, but the
CPU essentially still has its own memory cache. We also have
RAM for temporary storage and hard disks for permanent
storage.
• Input devices – Keyboard, mouse, touchscreen, game
controllers, microphones, webcam, etc…
• Output devices – Monitors, speakers, printers, etc…

CREATED BY K. VICTOR BABU


OS structures

CREATED BY K. VICTOR BABU


Cont..

CREATED BY K. VICTOR BABU


Types of Operating System

CREATED BY K. VICTOR BABU


Types of Operating System

• Batch Operating System


• Multi Programmed batch Operating System
• Time-sharing Operating System

CREATED BY K. VICTOR BABU


Batch Operating System
• There is no direct communication between the user and the
computer.
• In this, firstly, the user submits a job to the computer operator,
and after submitting the job, the computer operator creates a
batch of the jobs on an input device.
• The batch of jobs is created on the basis of the type of language
and needs.
• After the batch of the job is created, then a special program
monitors and manages each program in a batch.
• Example: Bank Statements, Payroll system, etc.

CREATED BY K. VICTOR BABU


CREATED BY K. VICTOR BABU
Advantages :
• Multiple users can share batch systems.
• Managing large works becomes easy in batch systems.
• The ideal time is very less for a batch operating system.
Disadvantages :
• If a job fails, then the other jobs have to wait for an unknown time
till the issue is resolved.
• It is hard to debug.
• The Batch operating systems are costly.
• Examples : Payroll System, Bank Statements, etc.

CREATED BY K. VICTOR BABU


Multiprogramming Batch Operating System

• In Multiprogramming Batch Operating System, the Operating


system first selects the job, and after selecting the job, it begins to
execute one of the jobs from memory.
• When this job requires an I/O operation operating system, it switches
to another job (operating system and CPU always busy).
• In this, the jobs present in memory are always minimum than the jobs
present in the job pool.

CREATED BY K. VICTOR BABU


• If different jobs are ready to execute at the same time, then the job is
selected for CPU scheduling.
• In a simple batch operating system, sometimes CPU is idle and
doesn’t perform any task, but in the multiprogramming batch
operating system, CPU is busy and will never sit idle and always keeps
on processing.

CREATED BY K. VICTOR BABU


CREATED BY K. VICTOR BABU
Simple Batched Systems N Multi-programmed
o. Batched Systems
In this system, processes 1 In this system, multiple
are processed one after processes can be executed
another. at a time.
As one process gets 2 Processes are executed in a
processed at a time, it parallel fashion, thus it is
performs low. faster.
CPU remains in idle states 3 CPU do not need to remain
for long times. in idle state.
Example: CP/M, MS DOS, 4 Example: Windows 95,
PC DOS etc. MaxOS etc.
CREATED BY K. VICTOR BABU
Time-Sharing Operating System

• In Time-sharing operating system, we assign some time to each


job so that all the jobs work efficiently and smoothly.
• The task may be from a single user as well as multiple users. The
time taken by each job to execute the job is known as quantum.
• After the interval of time is over, the operating system moves to
the next task.
• Time-sharing is sharing the processor’s time with multiple users
simultaneously

CREATED BY K. VICTOR BABU


CREATED BY K. VICTOR BABU
• Advantages:
• CPU remains idle for less time.
• No partiality occurs between the jobs.
• It quickly responds.

• Disadvantages :
• Reliability problem
• One must have to take care of the security and integrity of user
programs and data
• Data communication problem

Examples : Multics, Unix, etc.

CREATED BY K. VICTOR BABU


Operating System Operations

• The major operations of the operating system are

➢Process management,
➢Memory management,
➢Device management and
➢File management.

CREATED BY K. VICTOR BABU


Process Management
• The operating system is responsible for managing the
processes i.e assigning the processor to a process at a time.
This is known as process scheduling.
• The different algorithms used for process scheduling are
• FCFS (first come first served),
• SJF (shortest job first),
• Priority scheduling,
• Round Robin scheduling etc.

CREATED BY K. VICTOR BABU


Memory Management
• Memory management plays an important part in operating
system. It deals with memory and the moving of processes
from disk to primary memory for execution and back again.

•Device Management
• There are many I/O devices handled by the operating system
such as mouse, keyboard, disk drive etc. There are different
device drivers that can be connected to the operating system to
handle a specific device. The device controller is an interface
between the device and the device driver.

CREATED BY K. VICTOR BABU


File Management

• Files are used to provide a uniform view of data storage by the


operating system.
• All the files are mapped onto physical devices that are usually
non volatile so data is safe in the case of system failure.

CREATED BY K. VICTOR BABU


Operating-System Services
• Program execution:
• Error handling:
• Job sequencing:
• Input/Output operations:
• Interrupt handling:
• File system manipulation:
• Scheduling:
• Resource Allocation:
• Accounting of computer resources:
• Protection:

CREATED BY K. VICTOR BABU


• Program execution: Users are interested in executing programs. The system
must be able to load a program into memory and run it. The program must be
able to end its execution, either normally or abnormally.

• Error handling: For each type of error, the operating system should take the
appropriate action to assure correct and consistent computing.
• Example:
• Power failure in the CPU or memory.
• Parity error on tape.
•Printer out of paper. Arithmetic overflow.
• Access illegal memory location.

CREATED BY K. VICTOR BABU


• Job sequencing: The system must determine the sequence in
which job s should be processed. In the first operating systems to
transfer control from one Job to the next, a Job Control language
interpreter(a command interpreter) had to be used.

• Example:
•$JOB
•$COMPILE "Fortran“
•Program
•$LOAD & RUN
•Data
•$EOJ

CREATED BY K. VICTOR BABU


• Input/Output operations: Since a user program cannot execute 1/0
operations directly, the O.S. must provide some means to do so.

• Example:
•Rewind tape drive Start 1/0
• Skip the first record

CREATED BY K. VICTOR BABU


• Interrupt handling: Operating systems are event-driven programs. If there
are no programs to execute, no VO devices to service, and no user to respond
to, an O.S. will sit quietly, waiting for something to happen. Events are almost
always signaled by the occurrence of an interruption or trap.

• When an interrupt occurs, the hardware transfers control to the
O.S., it determines which type of interrupt has occurred, and takes
the appropriate actions.
• Types of interrupts:
• 1) Software interrupts
• 2) Hardware interrupts

CREATED BY K. VICTOR BABU


Software interrupt s: They are generated within the CPU.

• 1. System calls(aJso known as SuperVi sor Calls-SVC)


• 2. Traps(i.e. to handle program errors)
Hardware interrupts: These are signals sent to the CPU by
the device to indicate that a 110 operation is completed.
• 1. 1/0 interrupts

CREATED BY K. VICTOR BABU


•Timer interrupt: Every time the O.S. assign the CPU to a
program, the timer register is set to a value, say 100 ms, and at each
clock tick the register is decremented by one. When the timer register
reaches the value zero, an interrupt is generated,
• and the O.S. takes control of the computer system again, avoiding thus,
that no program monopolizes the CPU.

CREATED BY K. VICTOR BABU


• File system manipulation: Users will want to be able to
create, delete, read, or write files.
•Scheduling: The system has to decide when to
introduce new processes into the system and the order
in which processes should run.
• Resource Allocation: When there are multiple process
running concurrently, resources must be allocated to each
one of them.
• Example:

CREATED BY K. VICTOR BABU


•A compiler. A tape unit. Memory.
• Accounting of computer resources: The operating system must
keep track of the type and amount of resources used by each user.
This information can be used for the purpose of paying for the use
of the system or for accumulating usage statistics.

Protection: When several processes are being executed concurrently to
increase CPU utilization, it should not be possible for one process to
interfere the others.

CREATED BY K. VICTOR BABU


Real-Time Operating Systems (RTOS):

• An RTOS is designed to serve real-time applications that


process data and respond within a specified time constraint. It is
used where timely task completion is critical.
• Characteristics:
1.Deterministic: Guarantees response within a defined time.
2.Prioritized Scheduling: Tasks are executed based on priority.
3.Minimal Latency: Low interrupt latency and task-switching
latency.
4.Reliability: Handles tasks efficiently in critical situations.
5.Task Management: Supports multitasking with precise timing.
CREATED BY K. VICTOR BABU
Examples of RTOS Usage:

• Embedded systems (e.g., automotive systems, medical


devices, industrial machines).
• Flight control systems.
• Robotics and automation.
• Types of RTOS:
1.Hard RTOS: Missing a deadline is unacceptable (e.g.,
pacemakers).
2.Soft RTOS: Missing a deadline is tolerable within limits (e.g.,
multimedia streaming).

CREATED BY K. VICTOR BABU


CREATED BY K. VICTOR BABU
• Pacemakers are implantable medical devices that send electrical
pulses to help your heart beat at a normal rate and rhythm12.
• They can also be used to help your heart chambers beat in sync so
your heart can pump blood more efficiently to your body1.
• Pacemakers use steady, low-energy electric shocks to help the heart
maintain a normal beat or rhythm2.
• Pacemakers are used to help with arrhythmia, a condition where the
heart beats too fast, too slowly, or irregularly1

CREATED BY K. VICTOR BABU


CREATED BY K. VICTOR BABU
Distributed Operating Systems:

• A Distributed OS manages a group of independent computers and makes them appear to users as
a single coherent system. It is primarily used for resource sharing, reliability, and scalability.
• Characteristics:
1. Transparency:
1. Access Transparency: Users access resources without knowing their location.
2. Failure Transparency: System recovers from hardware or software failures seamlessly.
2. Resource Sharing: Efficient sharing of data, files, and devices.
3. Scalability: Can handle increasing workloads by adding more systems.
4. Concurrency: Supports multiple users and processes simultaneously.

CREATED BY K. VICTOR BABU


Examples of Distributed OS Usage:

• Distributed file systems (e.g., Hadoop HDFS).


• Cloud computing (e.g., Google Cloud, AWS).
• IoT systems.
• Types of Distributed OS:
1.Network Operating Systems (NOS): Offers services like file
sharing and printer access across networked devices.
2.Middleware-based Distributed Systems: Provides a layer
that enables resource sharing and communication (e.g.,
CORBA).

CREATED BY K. VICTOR BABU


System calls
• The interface between a process and an operating system is
provided by system calls.
• system calls are available as assembly language instructions.
• System calls are usually made when a process in user mode
requires access to a resource. Then it requests the kernel to
provide the resource via a system call.

CREATED BY K. VICTOR BABU


• A figure representing the execution of the system
call is given as follows −

CREATED BY K. VICTOR BABU


In general, system calls are required in the
following situations −
• If a file system requires the creation or deletion of files. Reading
and writing from files also require a system call.
• Creation and management of new processes.
• Network connections also require system calls. This includes
sending and receiving packets.
• Access to a hardware devices such as a printer, scanner etc.
requires a system call.

CREATED BY K. VICTOR BABU


Types of System Calls

• There are mainly five types of system calls.


• Process Control
• File Management
• Device Management
• Information Maintenance
• Communication

CREATED BY K. VICTOR BABU


CREATED BY K. VICTOR BABU
Process Control
• These system calls deal with processes such as process
creation, process termination etc.
File Management
• These system calls are responsible for file manipulation such as
creating a file, reading a file, writing into a file etc.
Device Management
• These system calls are responsible for device manipulation
such as reading from device buffers, writing into device buffers
etc.

CREATED BY K. VICTOR BABU


Information Maintenance
• These system calls handle information and its transfer between
the operating system and the user program.
Communication
• These system calls are useful for inter process communication.
They also deal with creating and deleting a communication
connection.

CREATED BY K. VICTOR BABU


Types of System Calls Windows Linux
Process Control CreateProcess() fork()
ExitProcess() exit()
WaitForSingleObject() wait()

File Management CreateFile() open()


ReadFile() read()
WriteFile() write()
CloseHandle() close()

Device Management SetConsoleMode() ioctl()


ReadConsole() read()
WriteConsole() write()

Information Maintenance GetCurrentProcessID() getpid()


SetTimer() alarm()
Sleep() sleep()

Communication CreatePipe() pipe()


CreateFileMapping() shmget()
MapViewOfFile() mmap()
CREATED BY K. VICTOR BABU
wait()
• In some systems, a process may wait for another process to
complete its execution.
• This happens when a parent process creates a child process and
the execution of the parent process is suspended until the child
process executes.
• The suspending of the parent process occurs with a wait() system
call.
• When the child process completes execution, the control is
returned back to the parent process.

CREATED BY K. VICTOR BABU


fork()
• Processes use the fork() system call to create processes that are a
copy of themselves.
• This is one of the major methods of process creation in operating
systems.
exit()
• The exit() system call is used by a program to terminate its
execution
kill()
• The kill() system call is used send a termination signal to a process
that urges the process to exit.

CREATED BY K. VICTOR BABU


System Programs
• File manipulation
• Status information
• File modification
• Programming-language support
• Program loading and execution
• Communications

CREATED BY K. VICTOR BABU


➢File manipulation
These programs create/delete, copy, rename, print, dump, list, and
generally manipulate files and directories.

➢Status information:
Some programs simply ask the system for the date, time, amount of
available memory or disk space, number of users, or similar status
information. That information is then formatted and is printed to the
terminal or other output device or file.

CREATED BY K. VICTOR BABU


• File modification: Several text editors may be available to
create and modify the content of files stored on disk or tape.
3.4 System Programs 67 •

• Programming-language support: Compilers, assemblers,


and interpreters for common programming languages (such
as FORTRAN, COBOL, Pascal, BASIC, C, and LISP) are
often provided to the user with the operating system.
• Many of these programs are now priced and provided
separately

CREATED BY K. VICTOR BABU


• Program loading and execution:
• Once a program is assembled or compiled, it must be loaded into
memory to be executed. The system may provide absolute loaders,
relocatable loaders, linkage editors, and overlay loaders. Debugging
systems for either higher-level languages or machine language are needed
also.
• Communications:
These programs provide the mechanism for creating virtual connections
among processes, users, and different computer systems. They allow users
to send messages to each other's screens, to send larger messages as
electronic mail, or to transfer files from one machine to another, and even
to use other computers remotely as though these machines were local
(known as remote login)

CREATED BY K. VICTOR BABU

You might also like