SlideShare a Scribd company logo
Principles of
Operating System
S. Y . B.Sc. (Cyber and Digital Science)
Unit 1
1.1 Introduction to Operating System
1.2 Interaction Between
Introduction to Operating System
An Operating System (OS) is an interface between a computer user and
computer hardware.
An operating system is a software which performs all the basic tasks like file
management, memory management, process management, handling input
and output, and controlling peripheral devices such as disk drives and
printers.
It provides an environment in which user can execute programs in a
convenient and efficient manner.
Purpose of OS is to transfer control automatically from one job to next job.
User Views
The user view of the computer depends on the interface used.
Some users may use PC’s. In this the system is designed so that only one user
can utilize the resources and mostly for ease of use where the attention is
mainly on performances and not on the resource utilization.
Some users may use a terminal connected to a mainframe or minicomputers.
Other users may access the same computer through other terminals. These
users may share resources and exchange information. In this case the OS is
designed to maximize resource utilization-so that all available CPU time,
memory & I/O are used efficiently.
Other users may sit at workstations, connected to the networks of other
workstation and servers. In this case OS is designed to compromise between
individual visibility & resource utilization.
System Views
We can view system as resource allocator i.e. a computer system has many
resources that may be used to solve a problem. The OS acts as a manager of
these resources. The OS must decide how to allocate these resources to
programs and the users so that it can operate the Computer system efficiently
and fairly.
A different view of an OS is that it need to control various I/O devices & user
programs i.e. an OS is a control program used to manage the execution of user
program to prevent errors and improper use of the computer.
Resources can be either CPU Time, memory space, file storage space, I/O
devices and so on. The OS must support the following tasks
Examples of Operating Systems are –
Windows (GUI-based, PC)
GNU/Linux (Personal, Workstations, ISP, File
and print server, client/Server)
Mac OS ,used for Apple’s personal computers
and workstations (Mac Book, iMac).
Android ( Operating System for smart phones
/tablets/ smart watches)
iOS (Apple’s OS for iPhone , iPad , and iPod
Touch)
1.3Types of Operating Systems
1. Batch Operating System.
2. Time Sharing Operating System
3. Network Operating Systems
4. Distributed Systems
5. Real Time Operating System
6. Multiprogramming Operating System
7. Multiprocessing Operating System
1. Batch Operating System
In this technique, similar types of jobs were batched together and executed
in time. People were used to having a single computer which was called a
mainframe.
access is given to more than one person they submit their respective jobs to
the system for the execution. The system put all of the jobs in a queue on
the basis of first come first serve and then executes the jobs one by one.
The users collect their respective output when all the jobs get executed. The
purpose of this operating system was mainly to transfer control from one
job to another as soon as the job was completed
Advantage
 Multiple users can share the batch systems
 It is easy to manage large work repeatedly in batch systems
Disadvantages
 The computer operators should be well known with batch systems
 Batch systems are hard to debug
 It is sometimes costly
 The other jobs will have to wait for an unknown time if any job fails.
2. Time-Sharing Operating System(Multitasking OS )
Computer resources are allocated in a time-dependent fashion to several
programs simultaneously. Thus it helps to provide a large number of user's
direct access to the main computer. It is a logical extension of
multiprogramming.
In time-sharing, the CPU is switched among multiple programs given by
different users on a scheduled basis.
Advantages
 Each task gets an equal opportunity
 Fewer chances of duplication of software
 CPU idle time can be reduced
Disadvantages
 Data transmission rates are very high in comparison to other methods.
 Security and integrity of user programs loaded in memory and data need
to be maintained as many users access the system at the same time.
Examples - Multics, Unix, etc
3. Network Operating System
These systems run on a server and provide the capability to manage data,
users, groups, security, applications, and other networking functions.
These types of operating systems allow shared access of files, printers,
security, applications, and other networking functions over a small private
network.
Advantages
 Highly stable centralized servers
 Security concerns are handled through servers
 New technologies and hardware up-gradation are easily integrated into
the system
 Server access is possible remotely from different locations and types of
systems
Disadvantages
 Servers are costly.
 User has to depend on a central location for most operations.
 Maintenance and updates are required regularly.
 Examples -
Microsoft Windows Server 2003, Microsoft Windows Server
2008, UNIX, Linux, Mac OS etc.
4. Distributed Operating System
The Distributed Operating system is not installed on a single machine, it is
divided into parts, and these parts are loaded on different machines.
A part of the distributed Operating system is installed on each machine to
make their communication possible.
Distributed Operating systems are much more complex, large than NOS
because they also have to take care of varying networking protocols.
Advantages
 Failure of one will not affect the other network communication, as all
systems are independent from each other
 Since resources are being shared, computation is highly fast.
 Load on host computer reduces
 Delay in data processing reduces
Disadvantages
 Failure of the main network will stop the entire communication
 These types of systems are not readily available as they are very
expensive
Examples - LOCUS, etc.
5. Real Time Operating System
In Real-Time Systems ,is an advanced OS and serve real time system. The
response time between input processing and response is tiny. Which is
benifical for process. These OS is used when many events occurs in short time
or within certain deadlines such as real time simulations.
Advantages
 Easy to layout, develop and execute real-time applications under the
real-time operating system.
 In a Real-time operating system, the maximum utilization of devices
and systems.
Disadvantages
 Real-time operating systems are very costly to develop.
 Real-time operating systems are very complex and can consume critical
CPU cycles
Examples –
Scientific experiments, medical imaging systems, industrial control
systems, satellite launching, robots, air traffic control systems, etc.
Hard Real Time OS
In Hard RTOS, the deadline is handled very strictly which means that given
task must start executing on specified scheduled time, and must be completed
within the assigned time duration.
Example: Medical critical care system, Aircraft systems, etc.
Soft Real Time
Soft Real time RTOS, accepts some delays by the Operating system. In this
type of RTOS, there is a deadline assigned for a specific job, but a delay for a
small amount of time is acceptable. So, deadlines are handled softly by this
type of RTOS.
Example: Online Transaction system
6. Multiprogramming Operating System
Multiprogramming is an extension to batch processing where the CPU is
always kept busy. Each process needs two types of system time: CPU time and
IO time.
In a multiprogramming environment, when a process does its I/O, The CPU
can start the execution of other processes. Therefore, multiprogramming
improves the efficiency of the system.
Advantages
 Throughout the system, it increased as the CPU always had one program
to execute.
 Response time can also be reduced.
Disadvantages
 Multiprogramming systems provide an environment in which various
systems resources are used efficiently, but they do not provide any user
interaction with the computer system
7. Multiprocessing Operating System
A multiprocessor operating system is an operating system that uses multiple
processors to improve performance. This operating system is commonly found
on computer systems with more than one CPU.
Multiprocessor systems improve system performance by allowing the
execution of tasks on multiple processors simultaneously. Overall reduces the
time it takes to complete specific tasks.
Advantages
 It allows the system to run multiple programs simultaneously.
 Beneficial for tasks that need to use all of the processor’s resources, such
as games, scientific calculations, and financial simulations.
Disadvantages
 They require additional hardware, such as processors and memory,
making a system more expensive
1.4Components of Operating System
The components of an operating system used to manage all the resources of
computer system while ensuring the proper execution of program.
1. Process Management
The process management component is the way to manage the multiple
processes running simultaneously on the OS.
Process management manages all the running processes and makes sure that
all of them run efficiently.
It also uses the memory allocated to them and shuts them down when
required.The execution of a process must be in a sequence such that at least
one instruction executes on behalf of the process.
Following are the features of process management:
 Creation and deletion of processes.
 Suspending and resuming processes.
 Synchronizing processes
 Establishing communication with and between processes.
2. File Management
A set of related information that represents programs, source forms, object
forms, and data is called a file.
A data file can either be numeric, alphabetic, or alphanumeric.
Following are the features of file management:
 Creation and deletion of files and directories.
 Manipulation of files and directories.
 Maps files onto secondary storage.
 File backup on a stable storage media.
3. I/O Device Management
I/O device management hides the variations of some hardware devices from
the user.
Following are the features of I/O device management:
 Buffers caching system
 Provides general device driver code
 Provides drivers for particular hardware devices.
 Helps know the individualities of a device
4. Network Management
Network management administers and manages computer networks. Its
services include performance management, fault analysis, network
provisioning, and service quality management.
Network management helps connect the network fully or partially so that
users can design routing and connection strategies with no connection and
security issues.
Following are the features of network management:
 It offers user access to the various resources that the network shares.
 We can access shared resources. These help speed-up computation and
offer data availability and reliability.
5. Main memory management
Main Memory comprises large amounts of storage or byte where each storage
and byte has an address. In order to conduct the process of memory
management a sequence of reads or writes of specific memory addresses is
used. We map it to absolute addresses and load it inside the memory in order
to execute a program.
Memory management is mainly based on the system’s hardware design as
each algorithm needs the support of a hardware. It ensures fast storage so that
the CPU can access it directly. It is costly and has a low storage capacity.
Despite this, in order to execute a program, the program needs to be in the
main memory.
Following are the features of memory management:
 Keeps track of primary memory.
 Determines what part of the memory is in use and by whom.
 Decides which process should get the memory and what amount.
 Allocates memory on the request of a process.
 De-allocates memory when a process terminates.

6. Secondary-Storage Management
Programs help access data in the main memory during execution. The main
memory is too small and cannot store all the data and programs permanently.
Thus, secondary storage acts as a backup to the main memory.
Assemblers and compilers are stored on the disk until they are loaded into the
memory and use the disk for processing.
Following are the features of secondary-storage management:
 Allocates storage
 Manages free space
 Disk scheduling
7. Security Management
It is necessary to protect the processes from each other’s activities. Security
management ensures that the operating files, memory, CPU, and other
hardware resources have proper authorization from the OS. No process can do
its own I/O, this maintains the integrity of peripheral device
8. A command interpreter
A command interpreter allows the user to interact with a program using
commands in the form of text lines Many commands are given to the
operating system by control statements.
A program that reads and interprets control statements is automatically
executed when a new job is started in a batch system or a user logs in to a
time-shared system.
 The control card interpreter,
 The command-line interpreter,
 The shell (in UNIX), and so on.
1.5 Operating System Services
An OS offers services to both the users and as well as to the programs. It offers
programs with an environment to execute. It offers users the services to run
and execute the programs conveniently.
Common services provided by an OS −
 Program execution
 I/O operations
 File System manipulation
 Communication
 Error Detection
 Resource Allocation
 Protection
1.Program execution
OS manage multiple categories of services from operator specified programs
to system programs
A procedure involves the complete implementation context (code to execute,
data to operate, registers, OS/ Operating Systems assets in usage).
the main activities of an OS concerning program management −
 Loads a program into memory.
 Executes the program.
 Handles program's execution.
 offers a mechanism for process synchronization.
 offers a mechanism for process communication.
 offers a mechanism for deadlock handling.
2.I/O Operation
An I/O subsystem includes I/O devices and their identical driver software.
Drivers conceal the characteristics of particular hardware devices from the
operator.
An OS controls the communication between the operators and device drivers.
I/O operation intends to read or write operation with any file or any particular
I/O(input or output) device.
The OS offers access to the particular I/O device when asked for.
3.File system manipulation
A file represents a set of related information. Computers can save files on the
hard disk (secondary storage), for long-term storage goals. instances of
storage media include mag tape, magnetic disc and optical disc drives like
CDs, DVDs. Each of those media has its properties like speed, capacity, data
transfer rate and data access methods.
A filing system is generally organized into directories for straightforward
navigation and usage. These folders can hold data and other directions.
Following are the main activities of an OS concerning file management −
 The program must read a file or write a file.
 The OS permits the program for operation on the file.
 Permission varies from read-only, read-write, denied then on.
 Operating System offers an interface for the user so, he can create or
delete files and directories as per his/her requirement.
 Operating System offers an interface to create the backup of the filing
system.
4.Communication
In the case of distributed systems which are a set of processors that don't
share a memory, peripheral devices, or a clock, the OS manages
communications between all the processes. Multiple processes communicate
with each other through communication lines within the network.
The OS controls routing and attachment procedures, and since the difficulties
of dispute and security. Given are the major activities of an OS concerning
communication −
 Two processes usually want the information to be shared between
them,
 Both the processes are often on one computer or different
computers but are connected through a network.
 Communication could also be implemented by two methods, either
by Shared Memory or by Message Passing.
5.Error handling
Errors can occur anytime and anywhere. a mistake may occur within the CPU,
in I/O devices or the memory hardware.
Given are the main activities of an OS concerning error handling −
 The OS constantly checks for possible errors.
 The OS takes applicable legal action to make sure accurate and
reliable computing.
6.Resource Management
In case if there are multi-user or multi-tasking environment, assets like main
memory, CPU (Central processing Unit) cycles and files storing are to be
supplied to each user or job.
Given are the major activities of an OS concerning resource management −
 The OS handles all sorts of assets using schedulers.
 CPU scheduling algorithms are utilized for better use of CPU (Central
processing unit).
7.Security
Considering a computing system having multiple users and
multiprogramming of multiple processes, the varied processes must be
shielded from each other's activities.
Security refers to a mechanism or how to improve the access of software,
processes, or operators to the assets specified by a computing system.
Given are the major activities of an OS concerning protection −
 The OS guarantees that access to system resources is controlled.
 The OS guarantees that external I/O devices are shielded from illogical
access attempts.
 The OS offers verification features for each user using passwords.
1.6 System Calls in Operating System
System calls provide the interface between the process and the operating
system
It is the method by which program makes request to Operating system
In our computer system, there are two modes available-
 User Mode:
In this mode, execution is done on behalf of the user.
 Kernel-Mode:
In this mode, execution is done on behalf of OS
Types Of System Calls
Process Control
Process control is the system call that is used to direct the processes. Some
process control examples include creating, load, abort, end, execute, process,
terminate the process, etc.
File Management
File management is a system call that is used to handle the files. Some file
management examples include creating files, delete files, open, close, read,
write, etc.
Device Management
Device management is a system call that is used to deal with devices. Some
examples of device management include read, device, write, get device
attributes, release device, etc.
Information Maintenance
Information maintenance is a system call that is used to maintain information.
There are some examples of information maintenance, including getting
system data, set time or date, get time or date, set system data, etc.
Communication
Communication is a system call that is used for communication. There are
some examples of communication, including create, delete communication
connections, send, receive messages, etc
Important System Calls Used in System
open()
The open() system call allows you to access a file on a file system. It allocates
resources to the file and provides a handle that the process may refer to. Many
processes can open a file at once or by a single process only. It's all based on
the file system and structure.
read()
It is used to obtain data from a file on the file system.
wait()
a process may have to wait for another process to complete its execution
before proceeding. When a parent process makes a child process, the parent
process execution is suspended until the child process is finished.
The wait() system call is used to suspend the parent process. Once the child
process has completed its execution, control is returned to the parent process.
write()
It is used to write data from a user buffer to a device like a file. This system call
is one way for a program to generate data
fork()
Processes generate clones of themselves using the fork() system call. It is one
of the most common ways to create processes in operating systems. When a
parent process spawns a child process, execution of the parent process is
interrupted until the child process completes. Once the child process has
completed its execution, control is returned to the parent process.
close()
It is used to end file system access. When this system call is invoked, it
signifies that the program no longer requires the file, and the buffers are
flushed, the file information is altered, and the file resources are de-allocated
as a result.
exec()
When an executable file replaces an earlier executable file in an already
executing process, this system function is invoked. As a new process is not
built, the old process identification stays, but the new process replaces data,
stack, data, head, etc.
exit()
The exit() is a system call that is used to end program execution. This call
indicates that the thread execution is complete, which is especially useful in
multi-threaded environments. The operating system reclaims resources spent
by the process following the use of the exit() system function.
A brief introduction about an operating system and its architecture
1.7 System programs
System programs provide an environment where programs can be developed
and executed.
It also provides a bridge between the user interface and system calls.
System Programs Purpose
The system program serves as a part of the operating system. It traditionally
lies between the user interface and the system calls. The user view of the
system is actually defined by system programs and not system calls because
that is what they interact with and system programs are closer to the user
interface
System programs as well as application programs form a bridge between the
user interface and the system calls.
Types of System Programs
System programs can be divided into seven parts.
1. Status Information
The status information system programs provide required data on the current
or past status of the system.
This may include the system date, system time, available memory in system,
disk space, logged in users etc.
2. Communications
These system programs are needed for system communications such as web
browsers.
Web browsers allow systems to communicate and access information from
the network as required.
3. File Manipulation
These system programs are used to manipulate system files. This can be done
using various commands like create, delete, copy, rename, print etc.
These commands can create files, delete files, copy the contents of one file
into another, rename files, print them etc.
4. Program Loading and Execution
The system programs that deal with program loading and execution make
sure that programs can be loaded into memory and executed correctly.
Loaders and Linkers are a prime example of this type of system programs.
5. File Modification
System programs that are used for file modification basically change the data
in the file or modify it in some other way.
Text editors are a big example of file modification system programs.
6. Application Programs
Application programs can perform a wide range of services as per the needs of
the users.
These include programs for database systems, word processors, plotting tools,
spread sheets, games, scientific applications etc.
7. Programming Language Support
These system programs provide additional support features for different
programming languages.
Some examples of these are compilers, debuggers etc.
These compile a program and make sure it is error free respectively.

More Related Content

PPTX
OS.pptx
PDF
Operating System
PPTX
Introduction to Operating Systems
PDF
Operating System Simple Introduction
PPTX
Fundamental Operating System Concepts.pptx
PPTX
Demo.pptx
PDF
Operating system Concepts
PPTX
1. Introduction to Operating System, Types.pptx
OS.pptx
Operating System
Introduction to Operating Systems
Operating System Simple Introduction
Fundamental Operating System Concepts.pptx
Demo.pptx
Operating system Concepts
1. Introduction to Operating System, Types.pptx

Similar to A brief introduction about an operating system and its architecture (20)

PDF
CS197OSTYPES.pdf
PDF
Unit 4 Real Time Operating System
PDF
OPERATING SYSTEM.pdf
PDF
OPERATING SYSTEM.pdf
PPTX
Understanding Basics of OS
PPTX
1.Operating System-unit 1.pptx Evolution of operating systems: Batch, times...
PPT
Introduction to OS 1.ppt
PPTX
Different Operating system's use and advantage.pptx
PPTX
Operating_Systems_UNIT_Concept of an Operating System1.pptx
DOCX
Operating system
PPTX
Operating system
PDF
Os unit 1
PPTX
Operating System-unit 1.pptxX X A A A A A A A A A A
PPTX
Advanced computer architecture lesson 1 and 2
PPTX
Session 2(Types of operating system).pptx
DOCX
Operating system
PPTX
Operating Systems- Dr.G.Sumathi AI & DS, KNCET
PPTX
Operating System Introduction
PPTX
Platform Technologies Report (1).pptx
PDF
Os-unit1-Introduction to Operating Systems.pdf
CS197OSTYPES.pdf
Unit 4 Real Time Operating System
OPERATING SYSTEM.pdf
OPERATING SYSTEM.pdf
Understanding Basics of OS
1.Operating System-unit 1.pptx Evolution of operating systems: Batch, times...
Introduction to OS 1.ppt
Different Operating system's use and advantage.pptx
Operating_Systems_UNIT_Concept of an Operating System1.pptx
Operating system
Operating system
Os unit 1
Operating System-unit 1.pptxX X A A A A A A A A A A
Advanced computer architecture lesson 1 and 2
Session 2(Types of operating system).pptx
Operating system
Operating Systems- Dr.G.Sumathi AI & DS, KNCET
Operating System Introduction
Platform Technologies Report (1).pptx
Os-unit1-Introduction to Operating Systems.pdf
Ad

More from Guna Dhondwad (20)

DOCX
Unit 5 Web Application and Hacking Techniques.docx
DOCX
Unit 4 InformationGathering and Network Discovery.docx
DOCX
Unit 3 Networking Basics of Ethical Hacking.docx
DOCX
unit 2 Intoduction to Tools and Platforms.docx
DOCX
Unit 1 Introduction to Cyber Securiyt Attacks.docx
PPTX
Unit -1 cryptography contiues with algorithm.pptx
PPTX
Unit 1 Network Fundamentals and Security .pptx
PPTX
Unit 3 -Symmetric Key Cryptographic Algorithms – I.pptx
PPTX
Network and Internet Security.pptx
PPTX
Computer Security Essentials.pptx
PPTX
Deadlocks and Deadlock Detection Other Issues
DOCX
Concurrency : Mutual Exclusion and Synchronization
PDF
Process And Scheduling Algorithms in os
PPTX
operating systems and it's services.pptx
PPTX
Introductions to Problem solvings.pptx
PPTX
Introduction to computer and its fundamentals.pptx
PPTX
Internet Networking with its working.pptx
PPTX
Wi-Fi Hacking with the help of various tools.pptx
PPTX
Web Application Hacking tools .pptx
PPTX
Privilege Escalation in Ethical Hacking.pptx
Unit 5 Web Application and Hacking Techniques.docx
Unit 4 InformationGathering and Network Discovery.docx
Unit 3 Networking Basics of Ethical Hacking.docx
unit 2 Intoduction to Tools and Platforms.docx
Unit 1 Introduction to Cyber Securiyt Attacks.docx
Unit -1 cryptography contiues with algorithm.pptx
Unit 1 Network Fundamentals and Security .pptx
Unit 3 -Symmetric Key Cryptographic Algorithms – I.pptx
Network and Internet Security.pptx
Computer Security Essentials.pptx
Deadlocks and Deadlock Detection Other Issues
Concurrency : Mutual Exclusion and Synchronization
Process And Scheduling Algorithms in os
operating systems and it's services.pptx
Introductions to Problem solvings.pptx
Introduction to computer and its fundamentals.pptx
Internet Networking with its working.pptx
Wi-Fi Hacking with the help of various tools.pptx
Web Application Hacking tools .pptx
Privilege Escalation in Ethical Hacking.pptx
Ad

Recently uploaded (20)

PPTX
L1 - Introduction to python Backend.pptx
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
history of c programming in notes for students .pptx
PDF
System and Network Administraation Chapter 3
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Introduction to Artificial Intelligence
PDF
System and Network Administration Chapter 2
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Nekopoi APK 2025 free lastest update
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
AI in Product Development-omnex systems
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
medical staffing services at VALiNTRY
L1 - Introduction to python Backend.pptx
Design an Analysis of Algorithms II-SECS-1021-03
How to Choose the Right IT Partner for Your Business in Malaysia
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
history of c programming in notes for students .pptx
System and Network Administraation Chapter 3
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Introduction to Artificial Intelligence
System and Network Administration Chapter 2
Odoo POS Development Services by CandidRoot Solutions
Nekopoi APK 2025 free lastest update
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PTS Company Brochure 2025 (1).pdf.......
AI in Product Development-omnex systems
Which alternative to Crystal Reports is best for small or large businesses.pdf
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Operating system designcfffgfgggggggvggggggggg
medical staffing services at VALiNTRY

A brief introduction about an operating system and its architecture

  • 1. Principles of Operating System S. Y . B.Sc. (Cyber and Digital Science)
  • 2. Unit 1 1.1 Introduction to Operating System 1.2 Interaction Between Introduction to Operating System An Operating System (OS) is an interface between a computer user and computer hardware. An operating system is a software which performs all the basic tasks like file management, memory management, process management, handling input and output, and controlling peripheral devices such as disk drives and printers. It provides an environment in which user can execute programs in a convenient and efficient manner. Purpose of OS is to transfer control automatically from one job to next job.
  • 3. User Views The user view of the computer depends on the interface used. Some users may use PC’s. In this the system is designed so that only one user can utilize the resources and mostly for ease of use where the attention is mainly on performances and not on the resource utilization. Some users may use a terminal connected to a mainframe or minicomputers. Other users may access the same computer through other terminals. These users may share resources and exchange information. In this case the OS is designed to maximize resource utilization-so that all available CPU time, memory & I/O are used efficiently. Other users may sit at workstations, connected to the networks of other workstation and servers. In this case OS is designed to compromise between individual visibility & resource utilization. System Views We can view system as resource allocator i.e. a computer system has many resources that may be used to solve a problem. The OS acts as a manager of these resources. The OS must decide how to allocate these resources to programs and the users so that it can operate the Computer system efficiently and fairly. A different view of an OS is that it need to control various I/O devices & user programs i.e. an OS is a control program used to manage the execution of user program to prevent errors and improper use of the computer. Resources can be either CPU Time, memory space, file storage space, I/O devices and so on. The OS must support the following tasks
  • 4. Examples of Operating Systems are – Windows (GUI-based, PC) GNU/Linux (Personal, Workstations, ISP, File and print server, client/Server) Mac OS ,used for Apple’s personal computers and workstations (Mac Book, iMac). Android ( Operating System for smart phones /tablets/ smart watches) iOS (Apple’s OS for iPhone , iPad , and iPod Touch)
  • 5. 1.3Types of Operating Systems 1. Batch Operating System. 2. Time Sharing Operating System 3. Network Operating Systems 4. Distributed Systems 5. Real Time Operating System 6. Multiprogramming Operating System 7. Multiprocessing Operating System 1. Batch Operating System In this technique, similar types of jobs were batched together and executed in time. People were used to having a single computer which was called a mainframe.
  • 6. access is given to more than one person they submit their respective jobs to the system for the execution. The system put all of the jobs in a queue on the basis of first come first serve and then executes the jobs one by one. The users collect their respective output when all the jobs get executed. The purpose of this operating system was mainly to transfer control from one job to another as soon as the job was completed Advantage  Multiple users can share the batch systems  It is easy to manage large work repeatedly in batch systems Disadvantages  The computer operators should be well known with batch systems  Batch systems are hard to debug  It is sometimes costly  The other jobs will have to wait for an unknown time if any job fails. 2. Time-Sharing Operating System(Multitasking OS ) Computer resources are allocated in a time-dependent fashion to several programs simultaneously. Thus it helps to provide a large number of user's direct access to the main computer. It is a logical extension of multiprogramming. In time-sharing, the CPU is switched among multiple programs given by different users on a scheduled basis.
  • 7. Advantages  Each task gets an equal opportunity  Fewer chances of duplication of software  CPU idle time can be reduced Disadvantages  Data transmission rates are very high in comparison to other methods.  Security and integrity of user programs loaded in memory and data need to be maintained as many users access the system at the same time. Examples - Multics, Unix, etc 3. Network Operating System These systems run on a server and provide the capability to manage data, users, groups, security, applications, and other networking functions. These types of operating systems allow shared access of files, printers, security, applications, and other networking functions over a small private network.
  • 8. Advantages  Highly stable centralized servers  Security concerns are handled through servers  New technologies and hardware up-gradation are easily integrated into the system  Server access is possible remotely from different locations and types of systems Disadvantages  Servers are costly.  User has to depend on a central location for most operations.  Maintenance and updates are required regularly.  Examples - Microsoft Windows Server 2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS etc. 4. Distributed Operating System The Distributed Operating system is not installed on a single machine, it is divided into parts, and these parts are loaded on different machines.
  • 9. A part of the distributed Operating system is installed on each machine to make their communication possible. Distributed Operating systems are much more complex, large than NOS because they also have to take care of varying networking protocols. Advantages  Failure of one will not affect the other network communication, as all systems are independent from each other  Since resources are being shared, computation is highly fast.  Load on host computer reduces  Delay in data processing reduces Disadvantages  Failure of the main network will stop the entire communication  These types of systems are not readily available as they are very expensive Examples - LOCUS, etc. 5. Real Time Operating System In Real-Time Systems ,is an advanced OS and serve real time system. The response time between input processing and response is tiny. Which is benifical for process. These OS is used when many events occurs in short time or within certain deadlines such as real time simulations.
  • 10. Advantages  Easy to layout, develop and execute real-time applications under the real-time operating system.  In a Real-time operating system, the maximum utilization of devices and systems. Disadvantages  Real-time operating systems are very costly to develop.  Real-time operating systems are very complex and can consume critical CPU cycles Examples – Scientific experiments, medical imaging systems, industrial control systems, satellite launching, robots, air traffic control systems, etc. Hard Real Time OS In Hard RTOS, the deadline is handled very strictly which means that given task must start executing on specified scheduled time, and must be completed within the assigned time duration. Example: Medical critical care system, Aircraft systems, etc. Soft Real Time Soft Real time RTOS, accepts some delays by the Operating system. In this type of RTOS, there is a deadline assigned for a specific job, but a delay for a small amount of time is acceptable. So, deadlines are handled softly by this type of RTOS. Example: Online Transaction system
  • 11. 6. Multiprogramming Operating System Multiprogramming is an extension to batch processing where the CPU is always kept busy. Each process needs two types of system time: CPU time and IO time. In a multiprogramming environment, when a process does its I/O, The CPU can start the execution of other processes. Therefore, multiprogramming improves the efficiency of the system. Advantages  Throughout the system, it increased as the CPU always had one program to execute.  Response time can also be reduced. Disadvantages  Multiprogramming systems provide an environment in which various systems resources are used efficiently, but they do not provide any user interaction with the computer system
  • 12. 7. Multiprocessing Operating System A multiprocessor operating system is an operating system that uses multiple processors to improve performance. This operating system is commonly found on computer systems with more than one CPU. Multiprocessor systems improve system performance by allowing the execution of tasks on multiple processors simultaneously. Overall reduces the time it takes to complete specific tasks. Advantages  It allows the system to run multiple programs simultaneously.  Beneficial for tasks that need to use all of the processor’s resources, such as games, scientific calculations, and financial simulations. Disadvantages  They require additional hardware, such as processors and memory, making a system more expensive
  • 13. 1.4Components of Operating System The components of an operating system used to manage all the resources of computer system while ensuring the proper execution of program. 1. Process Management The process management component is the way to manage the multiple processes running simultaneously on the OS. Process management manages all the running processes and makes sure that all of them run efficiently. It also uses the memory allocated to them and shuts them down when required.The execution of a process must be in a sequence such that at least one instruction executes on behalf of the process.
  • 14. Following are the features of process management:  Creation and deletion of processes.  Suspending and resuming processes.  Synchronizing processes  Establishing communication with and between processes. 2. File Management A set of related information that represents programs, source forms, object forms, and data is called a file. A data file can either be numeric, alphabetic, or alphanumeric.
  • 15. Following are the features of file management:  Creation and deletion of files and directories.  Manipulation of files and directories.  Maps files onto secondary storage.  File backup on a stable storage media. 3. I/O Device Management I/O device management hides the variations of some hardware devices from the user. Following are the features of I/O device management:  Buffers caching system  Provides general device driver code  Provides drivers for particular hardware devices.  Helps know the individualities of a device
  • 16. 4. Network Management Network management administers and manages computer networks. Its services include performance management, fault analysis, network provisioning, and service quality management. Network management helps connect the network fully or partially so that users can design routing and connection strategies with no connection and security issues. Following are the features of network management:  It offers user access to the various resources that the network shares.  We can access shared resources. These help speed-up computation and offer data availability and reliability. 5. Main memory management Main Memory comprises large amounts of storage or byte where each storage and byte has an address. In order to conduct the process of memory management a sequence of reads or writes of specific memory addresses is
  • 17. used. We map it to absolute addresses and load it inside the memory in order to execute a program. Memory management is mainly based on the system’s hardware design as each algorithm needs the support of a hardware. It ensures fast storage so that the CPU can access it directly. It is costly and has a low storage capacity. Despite this, in order to execute a program, the program needs to be in the main memory. Following are the features of memory management:  Keeps track of primary memory.  Determines what part of the memory is in use and by whom.  Decides which process should get the memory and what amount.  Allocates memory on the request of a process.  De-allocates memory when a process terminates.  6. Secondary-Storage Management Programs help access data in the main memory during execution. The main memory is too small and cannot store all the data and programs permanently. Thus, secondary storage acts as a backup to the main memory. Assemblers and compilers are stored on the disk until they are loaded into the memory and use the disk for processing.
  • 18. Following are the features of secondary-storage management:  Allocates storage  Manages free space  Disk scheduling 7. Security Management It is necessary to protect the processes from each other’s activities. Security management ensures that the operating files, memory, CPU, and other hardware resources have proper authorization from the OS. No process can do its own I/O, this maintains the integrity of peripheral device
  • 19. 8. A command interpreter A command interpreter allows the user to interact with a program using commands in the form of text lines Many commands are given to the operating system by control statements. A program that reads and interprets control statements is automatically executed when a new job is started in a batch system or a user logs in to a time-shared system.  The control card interpreter,  The command-line interpreter,  The shell (in UNIX), and so on.
  • 20. 1.5 Operating System Services An OS offers services to both the users and as well as to the programs. It offers programs with an environment to execute. It offers users the services to run and execute the programs conveniently. Common services provided by an OS −  Program execution  I/O operations  File System manipulation  Communication  Error Detection  Resource Allocation  Protection 1.Program execution OS manage multiple categories of services from operator specified programs to system programs A procedure involves the complete implementation context (code to execute, data to operate, registers, OS/ Operating Systems assets in usage). the main activities of an OS concerning program management −  Loads a program into memory.  Executes the program.  Handles program's execution.  offers a mechanism for process synchronization.  offers a mechanism for process communication.  offers a mechanism for deadlock handling. 2.I/O Operation An I/O subsystem includes I/O devices and their identical driver software. Drivers conceal the characteristics of particular hardware devices from the operator. An OS controls the communication between the operators and device drivers.
  • 21. I/O operation intends to read or write operation with any file or any particular I/O(input or output) device. The OS offers access to the particular I/O device when asked for. 3.File system manipulation A file represents a set of related information. Computers can save files on the hard disk (secondary storage), for long-term storage goals. instances of storage media include mag tape, magnetic disc and optical disc drives like CDs, DVDs. Each of those media has its properties like speed, capacity, data transfer rate and data access methods. A filing system is generally organized into directories for straightforward navigation and usage. These folders can hold data and other directions. Following are the main activities of an OS concerning file management −  The program must read a file or write a file.  The OS permits the program for operation on the file.  Permission varies from read-only, read-write, denied then on.  Operating System offers an interface for the user so, he can create or delete files and directories as per his/her requirement.  Operating System offers an interface to create the backup of the filing system. 4.Communication In the case of distributed systems which are a set of processors that don't share a memory, peripheral devices, or a clock, the OS manages communications between all the processes. Multiple processes communicate with each other through communication lines within the network. The OS controls routing and attachment procedures, and since the difficulties of dispute and security. Given are the major activities of an OS concerning communication −  Two processes usually want the information to be shared between them,  Both the processes are often on one computer or different computers but are connected through a network.  Communication could also be implemented by two methods, either by Shared Memory or by Message Passing.
  • 22. 5.Error handling Errors can occur anytime and anywhere. a mistake may occur within the CPU, in I/O devices or the memory hardware. Given are the main activities of an OS concerning error handling −  The OS constantly checks for possible errors.  The OS takes applicable legal action to make sure accurate and reliable computing. 6.Resource Management In case if there are multi-user or multi-tasking environment, assets like main memory, CPU (Central processing Unit) cycles and files storing are to be supplied to each user or job. Given are the major activities of an OS concerning resource management −  The OS handles all sorts of assets using schedulers.  CPU scheduling algorithms are utilized for better use of CPU (Central processing unit). 7.Security Considering a computing system having multiple users and multiprogramming of multiple processes, the varied processes must be shielded from each other's activities. Security refers to a mechanism or how to improve the access of software, processes, or operators to the assets specified by a computing system. Given are the major activities of an OS concerning protection −  The OS guarantees that access to system resources is controlled.  The OS guarantees that external I/O devices are shielded from illogical access attempts.  The OS offers verification features for each user using passwords.
  • 23. 1.6 System Calls in Operating System System calls provide the interface between the process and the operating system It is the method by which program makes request to Operating system In our computer system, there are two modes available-  User Mode: In this mode, execution is done on behalf of the user.  Kernel-Mode: In this mode, execution is done on behalf of OS
  • 24. Types Of System Calls Process Control Process control is the system call that is used to direct the processes. Some process control examples include creating, load, abort, end, execute, process, terminate the process, etc. File Management File management is a system call that is used to handle the files. Some file management examples include creating files, delete files, open, close, read, write, etc. Device Management Device management is a system call that is used to deal with devices. Some examples of device management include read, device, write, get device attributes, release device, etc. Information Maintenance Information maintenance is a system call that is used to maintain information. There are some examples of information maintenance, including getting system data, set time or date, get time or date, set system data, etc.
  • 25. Communication Communication is a system call that is used for communication. There are some examples of communication, including create, delete communication connections, send, receive messages, etc Important System Calls Used in System open() The open() system call allows you to access a file on a file system. It allocates resources to the file and provides a handle that the process may refer to. Many processes can open a file at once or by a single process only. It's all based on the file system and structure. read() It is used to obtain data from a file on the file system. wait() a process may have to wait for another process to complete its execution before proceeding. When a parent process makes a child process, the parent process execution is suspended until the child process is finished. The wait() system call is used to suspend the parent process. Once the child process has completed its execution, control is returned to the parent process. write() It is used to write data from a user buffer to a device like a file. This system call is one way for a program to generate data fork() Processes generate clones of themselves using the fork() system call. It is one of the most common ways to create processes in operating systems. When a
  • 26. parent process spawns a child process, execution of the parent process is interrupted until the child process completes. Once the child process has completed its execution, control is returned to the parent process. close() It is used to end file system access. When this system call is invoked, it signifies that the program no longer requires the file, and the buffers are flushed, the file information is altered, and the file resources are de-allocated as a result. exec() When an executable file replaces an earlier executable file in an already executing process, this system function is invoked. As a new process is not built, the old process identification stays, but the new process replaces data, stack, data, head, etc. exit() The exit() is a system call that is used to end program execution. This call indicates that the thread execution is complete, which is especially useful in multi-threaded environments. The operating system reclaims resources spent by the process following the use of the exit() system function.
  • 28. 1.7 System programs System programs provide an environment where programs can be developed and executed. It also provides a bridge between the user interface and system calls. System Programs Purpose The system program serves as a part of the operating system. It traditionally lies between the user interface and the system calls. The user view of the system is actually defined by system programs and not system calls because that is what they interact with and system programs are closer to the user interface System programs as well as application programs form a bridge between the user interface and the system calls.
  • 29. Types of System Programs System programs can be divided into seven parts. 1. Status Information The status information system programs provide required data on the current or past status of the system. This may include the system date, system time, available memory in system, disk space, logged in users etc. 2. Communications These system programs are needed for system communications such as web browsers. Web browsers allow systems to communicate and access information from the network as required. 3. File Manipulation These system programs are used to manipulate system files. This can be done using various commands like create, delete, copy, rename, print etc. These commands can create files, delete files, copy the contents of one file into another, rename files, print them etc. 4. Program Loading and Execution The system programs that deal with program loading and execution make sure that programs can be loaded into memory and executed correctly. Loaders and Linkers are a prime example of this type of system programs. 5. File Modification System programs that are used for file modification basically change the data in the file or modify it in some other way. Text editors are a big example of file modification system programs.
  • 30. 6. Application Programs Application programs can perform a wide range of services as per the needs of the users. These include programs for database systems, word processors, plotting tools, spread sheets, games, scientific applications etc. 7. Programming Language Support These system programs provide additional support features for different programming languages. Some examples of these are compilers, debuggers etc. These compile a program and make sure it is error free respectively.