SlideShare a Scribd company logo
Unit 1: Introduction to Operating Systems
History of OS; simple batch systems; multiprogrammed
batch systems; time-sharing systems; distributed systems
and real-time systems; operating system structures;
services; system calls; system programs and virtual
machines.
Introduction to Operating Systems
An operating system is a program that acts as a link between the
user and the computer system. The presence of an OS is very
important as without it other programs can’t run. Thus, it manages
the resources on a system and they cannot function when the OS is
absent. It has existed since the first generation of computers and has
been evolving with time
An operating system is a software programme that is used to manage and control
computing devices such as smartphones, tablets, computers, supercomputers, web
servers, automobiles, network towers, smartwatches, and other similar devices.
It is the operating system which eliminates the requirement to understand a coding
language in order to interface with computers.
It’s a graphical user interface (GUI) layer that serves as a bridge between the user and
the computer hardware.
The operating system regulates programme execution and administers the software
side of a computer.
Services provided by an operating system :
Program Execution
The OS allows you to run programs, ensuring they execute smoothly. It loads the program
into memory, starts it, and manages its operation.
I/O Operations
The OS handles Input/Output devices like keyboards, printers, and monitors, allowing
programs to read data (input) and display results (output).
File System Manipulation
It manages files and directories on storage devices. You can create, delete, read, write, and
organize files efficiently.
Communication
Programs can communicate with each other via the OS. This is useful for networked
applications or processes working together.
Error Detection
The OS monitors the system for errors (e.g., hardware issues, software bugs) and takes
steps to correct or report them.
Resource Allocation
It distributes system resources like CPU, memory, and storage among running programs
to ensure fairness and efficiency.
Protection
The OS safeguards data and resources by controlling access, ensuring only authorized
programs and users can interact with the system.
Diving into the History of Operating Systems
1. In 1956, twenty years after the Z1 computer, which was the first computer to
run without an operating system, the first-ever operating system was built to
manage tape storage.
2. After that, Bell Labs created UNIX, the first multitasking operating system.
3. In 1977, Apple Dos 3.3 was released, which was the first disc operating
system.
4. In 1981, Microsoft was the next company to develop a DOS operating
system.
5. MS-DOS was combined with Graphics User Interface in 1985. (GUI).
6. As of October 2021, the most recent version of Windows for PCs and tablets
is Windows 11.
Os-unit1-Introduction to Operating Systems.pdf
Between hardware and
software, operating systems are
a middleman. Without an
operating system, hardware
and software cannot function
properly.
The operating system consists
of two components:
1. Shell
2. Kernel
In a computer system, both of
these are utilized to establish
communication and operate the
system. However, there is a
significant distinction between
shell and kernel. A shell is a type
of interface that connects the
kernel and the user. It enables all
of the system’s users to
communicate with the kernel. A
kernel is the fundamental heart
of a typical operating system. Its
purpose is to manage all of the
duties associated with a system.
Os-unit1-Introduction to Operating Systems.pdf
Simple batch systems
Batch processing is a technique in which Operating System collects one programs and data
together in a batch before processing starts. Operating system does the following activities
related to batch processing.A simple batch system is a basic type of operating system that
doesn't allow direct communication between users and the computer:
● User preparation: Users prepare a job on control cards that includes the program,
data, and control information.
● Job submission: Users submit the job to a computer operator on punch cards or tape.
● Batch creation: The computer operator groups jobs with similar requirements into
batches.
● Batch execution: The computer runs the batches one after the other.
● Output: The output from the jobs is produced after a certain period of time, which
could be minutes, hours, or days.
● Batch monitor: The batch monitor manages the execution of each program in the
batch.
Os-unit1-Introduction to Operating Systems.pdf
Advantages
● Batch processing takes much of the work of the operator to the computer.
● Increased performance as a new job gets started as soon as the previous job
finished without any manual intervention.
Disadvantages
● Difficult to debug program.
● A job could enter an infinite loop.
● Due to lack of protection scheme, one batch job can affect pending jobs.
Multiprogrammed batch systems
Multiprogramming is a variation of batch processing in which the CPU is kept
busy at all times. CPU time and IO time are two forms of system time required by
each process. When a process completes its I/O in a multiprogramming
environment, the CPU can begin the execution of other processes. As a result,
multiprogramming helps in improving the system’s efficiency.(non preemptive)
Multiprogramming operating systems are divided into two categories, and they
are:
● Multitasking Operating System
● Multiuser Operating System
Multitasking Operating System
A multitasking OS allows two or more programs to run
simultaneously. This is accomplished by the operating system
transferring each program into or out of memory one by one.
Multiuser Operating System
A multiuser operating system allows multiple users from various
terminals to share the processing time on a certain powerful central
machine. The operating system achieves this by frequently switching
between terminals, each of which is allotted a certain amount of
processor time on a central computer.
Os-unit1-Introduction to Operating Systems.pdf
Disadvantages
•It’s quite complex and sophisticated.
•CPU scheduling is necessary.
•Since all types of tasks get stored in the main memory, memory management is
required in the operating system.
•The more difficult challenge is managing all procedures and tasks.
Time-sharing system
It allows the user to perform more than one task at a time, each task getting the
same amount of time to execute. Hence, the name time sharing OS. Moreover, it
is an extension of multiprogramming systems. In multiprogramming systems, the
aim is to make the maximum use of the CPU. On the other hand, here the aim is
to achieve the minimum response time of CPU.
Working of Time Sharing Operating System
The operating system performs time sharing through CPU scheduling and multiprogramming.
Distributed systems
A Distributed Operating System (DOS) is software that manages a group of independent
computers (nodes) connected through a network, making them appear and function as a
single cohesive system to users. It enables resource sharing, task distribution, and fault
tolerance while providing transparency about the underlying complexity.
Os-unit1-Introduction to Operating Systems.pdf
Os-unit1-Introduction to Operating Systems.pdf
Features:
1. Transparency: Users see the system as one, not as multiple computers.
○ Access transparency: Users access resources without worrying about their
physical location.
○ Location transparency: Users don't need to know where the resource is located.
2. Resource Sharing: Shares hardware (CPUs, memory, storage) and software (files,
applications) across nodes.
3. Fault Tolerance: If one node fails, the system continues working by using other
nodes.
4. Scalability: Can add more computers to handle increased loads.
5. Concurrency: Multiple users can run tasks simultaneously.
Real-time systems(RTOS)
A Real-Time Operating System (RTOS) is a specialized operating system
designed to process data and respond to inputs or events within a strict time
constraint. It is primarily used in systems where timing and reliability are critical,
such as embedded systems, medical devices, robotics, and automotive systems.
Os-unit1-Introduction to Operating Systems.pdf
Hard Real-Time Operating Systems
These systems guarantee task completion within strict deadlines. Failure to
meet a deadline results in catastrophic consequences.
Characteristics:
○ Deterministic behavior with zero tolerance for delays.
○ Used in life-critical and mission-critical systems.
Examples:
○ Airbag systems in cars.
○ Medical devices like pacemakers.
○ Spacecraft control systems.
Soft Real-Time Operating Systems
Deadlines are important, but occasional delays are acceptable, though they
may degrade performance.
Characteristics:
○ Prioritizes tasks but allows flexibility for lower-priority tasks.
○ Suitable for non-critical but time-sensitive applications.
Examples:
○ Online video streaming.
○ Video conferencing applications.
○ Gaming consoles.
Firm Real-Time Operating Systems
Missing a deadline does not cause catastrophic failure, but the output
becomes less useful if a deadline is missed.
Characteristics:
○ Falls between hard and soft RTOS in terms of timing strictness.
○ Failure to meet deadlines affects system efficiency but not its
functionality.
Examples:
○ Industrial automation systems.
○ Banking and stock trading systems.
Operating system structures
The structure of an Operating System (OS) refers to how its
components are organized to perform various tasks effectively.
Different structures are used based on the OS design and its goals,
such as efficiency, modularity, or simplicity.
Types of Operating Systems Structures
● Simple Structure
● Monolithic Structure
● Micro-Kernel Structure
● Layered Structure
● Virtual Machines
Simple Structure
No Strict Layering
Direct
Communication
Monolithic Structure
A Monolithic OS structure is fast and
efficient for small or less complex systems
but struggles with maintainability and
scalability for larger, modern computing
environments.
Micro-Kernel Structure
Layered Structure
The OS is divided into hierarchical layers, with each layer performing specific tasks and relying on the lower
layers.
Clear separation of functionality.
Easier debugging and
maintenance.
Performance overhead due to
inter-layer communication.
Virtual Machines
Non Virtual Machine Virtual Machine
Os-unit1-Introduction to Operating Systems.pdf
A hypervisor
(VMM) is a
software that you
can use to run
multiple virtual
machines on a
single physical
machine.
An Operating System provides services to both the users and to the programs. It provides
programs, an environment to execute. It provides users, services to execute the programs in
a convenient manner.
Following are few common services provided by operating systems.
● Program execution
● I/O operations
● File System manipulation
● Communication
● Error Detection
● Resource Allocation
● Protection
Program execution
A process includes the complete execution context (code to execute, data to manipulate,
registers, OS resources in use). Following are the major activities of an operating system with
respect to program management.
● Loads a program into memory.
● Executes the program.
● Handles program's execution.
● Provides a mechanism for process synchronization.
● Provides a mechanism for process communication.
● Provides a mechanism for deadlock handling.
I/O operations
Operating System manages the communication between user and device drivers. Following are
the major activities of an operating system with respect to I/O Operation.
● I/O operation means read or write operation with any file or any specific I/O device.
● Program may require any I/O device while running.
● Operating system provides the access to the required I/O device when required.
File System manipulation
A file system is normally organized into directories for easy
navigation and usage. These directories may contain files and other
directions. Program needs to read a file or write a file.
● The operating system gives the permission to the program for
operation on file.
● Permission varies from read-only, read-write, denied and so
on.
● Operating System provides an interface to the user to
create/delete files.
● Operating System provides an interface to the user to
create/delete directories.
● Operating System provides an interface to create the backup of
file system.
Communication
OS handles routing and connection strategies, and the problems
of contention and security.
● Two processes often require data to be transferred between
them.
● The both processes can be on the one computer or on
different computer but are
connected through computer network.
● Communication may be implemented by two methods
either by Shared Memory or by Message Passing
Error Detection
Error can occur anytime and anywhere. Error
may occur in CPU, in I/O devices or in the
memory
hardware.
● OS constantly remains aware of
possible errors.
● OS takes the appropriate action to
ensure correct and consistent
computing.
Resource Allocation
In case of multi-user or multi-tasking
environment, resources such as main
memory, CPU cycles
and files storage are to be allocated to each
user or job.
● OS manages all kind of resources using
schedulers.
● CPU scheduling algorithms are used for
better utilization of CPU
Protection
Protection refers to mechanism or a
way to control the access of
programs, processes, or users
to the resources defined by
computer systems.
● OS ensures that all access to
system resources is
controlled.
● OS ensures that external I/O
devices are protected from
invalid access attempts.
● OS provides authentication
feature for each user by
means of a password.
System calls
The interface between a process and an operating system is provided by system
calls.
The processes execute normally in the user mode until a system call interrupts
this. Then the system call is executed on a priority basis in the kernel mode. After
the execution of the system call, the control returns to the user mode and
execution of user processes can be resumed.
Os-unit1-Introduction to Operating Systems.pdf
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.
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()
Types of System
Calls Windows Linux
Information
Maintenance
GetCurrentProcessID() getpid()
SetTimer() alarm()
Sleep() sleep()
Communication
CreatePipe() pipe()
CreateFileMapping() shmget()
MapViewOfFile() mmap()
System Calls
Os-unit1-Introduction to Operating Systems.pdf
Os-unit1-Introduction to Operating Systems.pdf
Os-unit1-Introduction to Operating Systems.pdf
Os-unit1-Introduction to Operating Systems.pdf
Os-unit1-Introduction to Operating Systems.pdf
Os-unit1-Introduction to Operating Systems.pdf
Os-unit1-Introduction to Operating Systems.pdf
Os-unit1-Introduction to Operating Systems.pdf
System programs
System programs provide a convenient environment for program development
and execution.
System calls and system programs are critical to the operation of the OS. These
structures describe the functions that the operating system must carry out. The
system call establishes a connection between the user software and the operating
system's services. In contrast, the system software defines the OS user interface.
The system program also offers a proper environment for the development and
execution of a program.
It traditionally lies between the user interface and system calls so users can only
view up-to-the System Programs he can’t see System Calls.
System Programs can be divided into these categories:
File Management:
Create, delete, copy, rename, print, dump and generally manipulate files and directories.
A file is a collection of specific information stored in the memory of a computer system.
File management is defined as the process of manipulating files in the computer system i.e.
process of creating, modifying and deleting files.
It helps to create new files in the computer system and placing them at specific locations.
It helps in easily and quickly locating these files in the computer system.
It helps to store files in separate folders known as directories.
Status Information:
Information like date, time, amount of available memory, disk space and number of
users etc are provided by such system programs.
Some also provide details like performance, logging and debugging information which
is more complex.
All this information is formatted and displayed on output devices or printed. Terminal
or other devices or files or a window of GUI is used for showing the output of programs.
File Modification:
e.g. text editors to create and modify files.
For searching contents of files or perform transformations of files
we use special commands.
Programming Language Support:
For common programming languages, we use Compilers,
Assemblers, Debuggers and interpreters which are already
provided to users.
It provides all support to users.
We can run any programming language. All languages of importance
are already provided.
Program Loading and Execution:
When the program is ready after Assembling and compilation, it must be
loaded into memory execution.
A loader is part of an operating system that is responsible for loading
programs and libraries.
It is one of the essential stages for starting a program.
Loaders, linkage editors and overlay loaders are provided by the system.
Communications:
Virtual connections among processes, users and computer systems are
provided by the programs.
Users can send messages to another user on their screen, can send email,
browse on web pages, can transfer the files from one user to another etc.
System Call Example
A system call is a request made by a program to the operating system's kernel to perform low-level operations, such as reading a file,
writing data, or creating a process.
Example: Reading a File
In C programming:
System Program Example
A system program provides a user-friendly way to interact with system functionalities like file management, process management, or
system settings.
Example: Copying a File (using a shell command)
This cp command is a system program that uses system calls internally (like open(), read(), and write()) to copy the content of
file1.txt into file2.txt.
Thank you

More Related Content

PPTX
MYSQL DATABASE Operating System Part2 (1).pptx
DOCX
PPTX
Operating_Systems_UNIT_Concept of an Operating System1.pptx
DOCX
A brief introduction about an operating system and its architecture
PPTX
OS.pptx
PPTX
Introduction tio m Operating System.pptx
PPTX
1. Introduction to Operating System, Types.pptx
PPT
Introduction to OS 1.ppt
MYSQL DATABASE Operating System Part2 (1).pptx
Operating_Systems_UNIT_Concept of an Operating System1.pptx
A brief introduction about an operating system and its architecture
OS.pptx
Introduction tio m Operating System.pptx
1. Introduction to Operating System, Types.pptx
Introduction to OS 1.ppt

Similar to Os-unit1-Introduction to Operating Systems.pdf (20)

PDF
Os notes
PDF
Os unit 1
DOCX
Operating system notes
PPT
Unit 1_Operating system
DOCX
An_Operating_System by chidi kingsley wo
PPTX
different-os.pptx
PPTX
1.Operating System-unit 1.pptx Evolution of operating systems: Batch, times...
PPTX
LM1 - Computer System Overview, system calls
PPTX
Operating system
PPTX
week-1-200310134908.pptx
PDF
lecture 1 (Introduction to Operating System.)
PPTX
Advanced computer architecture lesson 1 and 2
PPT
NE223_chapter 1_Overview of operating systems.ppt
PPTX
Demo.pptx
PPT
Operating System
PDF
Operating System
PPTX
Operating systems
PPTX
Operating System-unit 1.pptxX X A A A A A A A A A A
PPTX
Operating system by aman kr kushwaha
PDF
Ch1 - OS.pdf
Os notes
Os unit 1
Operating system notes
Unit 1_Operating system
An_Operating_System by chidi kingsley wo
different-os.pptx
1.Operating System-unit 1.pptx Evolution of operating systems: Batch, times...
LM1 - Computer System Overview, system calls
Operating system
week-1-200310134908.pptx
lecture 1 (Introduction to Operating System.)
Advanced computer architecture lesson 1 and 2
NE223_chapter 1_Overview of operating systems.ppt
Demo.pptx
Operating System
Operating System
Operating systems
Operating System-unit 1.pptxX X A A A A A A A A A A
Operating system by aman kr kushwaha
Ch1 - OS.pdf
Ad

More from SonaShaiju1 (7)

PDF
OPS_Unit1OpenSourceDemystifyingpart2.pdf
PDF
OPS_Unit-1--Open Source Demystifying.pdf
PDF
OPS_Unit-2--Open Source Demystifying.pdf
PPTX
OPS-Unit 3-Open Source Demystifying.pptx
PDF
OperatingSystem-Unit2_Process Management
PPTX
Software Engineering-Process Models.pptx
PPTX
Cloud computing Fundamentals-Cloud Technologies and Concepts.pptx
OPS_Unit1OpenSourceDemystifyingpart2.pdf
OPS_Unit-1--Open Source Demystifying.pdf
OPS_Unit-2--Open Source Demystifying.pdf
OPS-Unit 3-Open Source Demystifying.pptx
OperatingSystem-Unit2_Process Management
Software Engineering-Process Models.pptx
Cloud computing Fundamentals-Cloud Technologies and Concepts.pptx
Ad

Recently uploaded (20)

PDF
Insiders guide to clinical Medicine.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Cell Structure & Organelles in detailed.
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
master seminar digital applications in india
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Cell Types and Its function , kingdom of life
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Pre independence Education in Inndia.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
Insiders guide to clinical Medicine.pdf
01-Introduction-to-Information-Management.pdf
Cell Structure & Organelles in detailed.
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Final Presentation General Medicine 03-08-2024.pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
human mycosis Human fungal infections are called human mycosis..pptx
Anesthesia in Laparoscopic Surgery in India
master seminar digital applications in india
STATICS OF THE RIGID BODIES Hibbelers.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Cell Types and Its function , kingdom of life
VCE English Exam - Section C Student Revision Booklet
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Microbial diseases, their pathogenesis and prophylaxis
Pre independence Education in Inndia.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Week 4 Term 3 Study Techniques revisited.pptx

Os-unit1-Introduction to Operating Systems.pdf

  • 1. Unit 1: Introduction to Operating Systems History of OS; simple batch systems; multiprogrammed batch systems; time-sharing systems; distributed systems and real-time systems; operating system structures; services; system calls; system programs and virtual machines.
  • 2. Introduction to Operating Systems An operating system is a program that acts as a link between the user and the computer system. The presence of an OS is very important as without it other programs can’t run. Thus, it manages the resources on a system and they cannot function when the OS is absent. It has existed since the first generation of computers and has been evolving with time
  • 3. An operating system is a software programme that is used to manage and control computing devices such as smartphones, tablets, computers, supercomputers, web servers, automobiles, network towers, smartwatches, and other similar devices. It is the operating system which eliminates the requirement to understand a coding language in order to interface with computers. It’s a graphical user interface (GUI) layer that serves as a bridge between the user and the computer hardware. The operating system regulates programme execution and administers the software side of a computer.
  • 4. Services provided by an operating system : Program Execution The OS allows you to run programs, ensuring they execute smoothly. It loads the program into memory, starts it, and manages its operation. I/O Operations The OS handles Input/Output devices like keyboards, printers, and monitors, allowing programs to read data (input) and display results (output). File System Manipulation It manages files and directories on storage devices. You can create, delete, read, write, and organize files efficiently. Communication Programs can communicate with each other via the OS. This is useful for networked applications or processes working together.
  • 5. Error Detection The OS monitors the system for errors (e.g., hardware issues, software bugs) and takes steps to correct or report them. Resource Allocation It distributes system resources like CPU, memory, and storage among running programs to ensure fairness and efficiency. Protection The OS safeguards data and resources by controlling access, ensuring only authorized programs and users can interact with the system.
  • 6. Diving into the History of Operating Systems 1. In 1956, twenty years after the Z1 computer, which was the first computer to run without an operating system, the first-ever operating system was built to manage tape storage. 2. After that, Bell Labs created UNIX, the first multitasking operating system. 3. In 1977, Apple Dos 3.3 was released, which was the first disc operating system. 4. In 1981, Microsoft was the next company to develop a DOS operating system. 5. MS-DOS was combined with Graphics User Interface in 1985. (GUI). 6. As of October 2021, the most recent version of Windows for PCs and tablets is Windows 11.
  • 8. Between hardware and software, operating systems are a middleman. Without an operating system, hardware and software cannot function properly. The operating system consists of two components: 1. Shell 2. Kernel
  • 9. In a computer system, both of these are utilized to establish communication and operate the system. However, there is a significant distinction between shell and kernel. A shell is a type of interface that connects the kernel and the user. It enables all of the system’s users to communicate with the kernel. A kernel is the fundamental heart of a typical operating system. Its purpose is to manage all of the duties associated with a system.
  • 11. Simple batch systems Batch processing is a technique in which Operating System collects one programs and data together in a batch before processing starts. Operating system does the following activities related to batch processing.A simple batch system is a basic type of operating system that doesn't allow direct communication between users and the computer: ● User preparation: Users prepare a job on control cards that includes the program, data, and control information. ● Job submission: Users submit the job to a computer operator on punch cards or tape. ● Batch creation: The computer operator groups jobs with similar requirements into batches. ● Batch execution: The computer runs the batches one after the other. ● Output: The output from the jobs is produced after a certain period of time, which could be minutes, hours, or days. ● Batch monitor: The batch monitor manages the execution of each program in the batch.
  • 13. Advantages ● Batch processing takes much of the work of the operator to the computer. ● Increased performance as a new job gets started as soon as the previous job finished without any manual intervention. Disadvantages ● Difficult to debug program. ● A job could enter an infinite loop. ● Due to lack of protection scheme, one batch job can affect pending jobs.
  • 14. Multiprogrammed batch systems Multiprogramming is a variation of batch processing in which the CPU is kept busy at all times. CPU time and IO time are two forms of system time required by each process. When a process completes its I/O in a multiprogramming environment, the CPU can begin the execution of other processes. As a result, multiprogramming helps in improving the system’s efficiency.(non preemptive) Multiprogramming operating systems are divided into two categories, and they are: ● Multitasking Operating System ● Multiuser Operating System
  • 15. Multitasking Operating System A multitasking OS allows two or more programs to run simultaneously. This is accomplished by the operating system transferring each program into or out of memory one by one. Multiuser Operating System A multiuser operating system allows multiple users from various terminals to share the processing time on a certain powerful central machine. The operating system achieves this by frequently switching between terminals, each of which is allotted a certain amount of processor time on a central computer.
  • 17. Disadvantages •It’s quite complex and sophisticated. •CPU scheduling is necessary. •Since all types of tasks get stored in the main memory, memory management is required in the operating system. •The more difficult challenge is managing all procedures and tasks.
  • 18. Time-sharing system It allows the user to perform more than one task at a time, each task getting the same amount of time to execute. Hence, the name time sharing OS. Moreover, it is an extension of multiprogramming systems. In multiprogramming systems, the aim is to make the maximum use of the CPU. On the other hand, here the aim is to achieve the minimum response time of CPU.
  • 19. Working of Time Sharing Operating System The operating system performs time sharing through CPU scheduling and multiprogramming.
  • 20. Distributed systems A Distributed Operating System (DOS) is software that manages a group of independent computers (nodes) connected through a network, making them appear and function as a single cohesive system to users. It enables resource sharing, task distribution, and fault tolerance while providing transparency about the underlying complexity.
  • 23. Features: 1. Transparency: Users see the system as one, not as multiple computers. ○ Access transparency: Users access resources without worrying about their physical location. ○ Location transparency: Users don't need to know where the resource is located. 2. Resource Sharing: Shares hardware (CPUs, memory, storage) and software (files, applications) across nodes. 3. Fault Tolerance: If one node fails, the system continues working by using other nodes. 4. Scalability: Can add more computers to handle increased loads. 5. Concurrency: Multiple users can run tasks simultaneously.
  • 24. Real-time systems(RTOS) A Real-Time Operating System (RTOS) is a specialized operating system designed to process data and respond to inputs or events within a strict time constraint. It is primarily used in systems where timing and reliability are critical, such as embedded systems, medical devices, robotics, and automotive systems.
  • 26. Hard Real-Time Operating Systems These systems guarantee task completion within strict deadlines. Failure to meet a deadline results in catastrophic consequences. Characteristics: ○ Deterministic behavior with zero tolerance for delays. ○ Used in life-critical and mission-critical systems. Examples: ○ Airbag systems in cars. ○ Medical devices like pacemakers. ○ Spacecraft control systems.
  • 27. Soft Real-Time Operating Systems Deadlines are important, but occasional delays are acceptable, though they may degrade performance. Characteristics: ○ Prioritizes tasks but allows flexibility for lower-priority tasks. ○ Suitable for non-critical but time-sensitive applications. Examples: ○ Online video streaming. ○ Video conferencing applications. ○ Gaming consoles.
  • 28. Firm Real-Time Operating Systems Missing a deadline does not cause catastrophic failure, but the output becomes less useful if a deadline is missed. Characteristics: ○ Falls between hard and soft RTOS in terms of timing strictness. ○ Failure to meet deadlines affects system efficiency but not its functionality. Examples: ○ Industrial automation systems. ○ Banking and stock trading systems.
  • 29. Operating system structures The structure of an Operating System (OS) refers to how its components are organized to perform various tasks effectively. Different structures are used based on the OS design and its goals, such as efficiency, modularity, or simplicity.
  • 30. Types of Operating Systems Structures ● Simple Structure ● Monolithic Structure ● Micro-Kernel Structure ● Layered Structure ● Virtual Machines
  • 31. Simple Structure No Strict Layering Direct Communication
  • 32. Monolithic Structure A Monolithic OS structure is fast and efficient for small or less complex systems but struggles with maintainability and scalability for larger, modern computing environments.
  • 34. Layered Structure The OS is divided into hierarchical layers, with each layer performing specific tasks and relying on the lower layers. Clear separation of functionality. Easier debugging and maintenance. Performance overhead due to inter-layer communication.
  • 35. Virtual Machines Non Virtual Machine Virtual Machine
  • 37. A hypervisor (VMM) is a software that you can use to run multiple virtual machines on a single physical machine.
  • 38. An Operating System provides services to both the users and to the programs. It provides programs, an environment to execute. It provides users, services to execute the programs in a convenient manner. Following are few common services provided by operating systems. ● Program execution ● I/O operations ● File System manipulation ● Communication ● Error Detection ● Resource Allocation ● Protection
  • 39. Program execution A process includes the complete execution context (code to execute, data to manipulate, registers, OS resources in use). Following are the major activities of an operating system with respect to program management. ● Loads a program into memory. ● Executes the program. ● Handles program's execution. ● Provides a mechanism for process synchronization. ● Provides a mechanism for process communication. ● Provides a mechanism for deadlock handling.
  • 40. I/O operations Operating System manages the communication between user and device drivers. Following are the major activities of an operating system with respect to I/O Operation. ● I/O operation means read or write operation with any file or any specific I/O device. ● Program may require any I/O device while running. ● Operating system provides the access to the required I/O device when required.
  • 41. File System manipulation A file system is normally organized into directories for easy navigation and usage. These directories may contain files and other directions. Program needs to read a file or write a file. ● The operating system gives the permission to the program for operation on file. ● Permission varies from read-only, read-write, denied and so on. ● Operating System provides an interface to the user to create/delete files. ● Operating System provides an interface to the user to create/delete directories. ● Operating System provides an interface to create the backup of file system.
  • 42. Communication OS handles routing and connection strategies, and the problems of contention and security. ● Two processes often require data to be transferred between them. ● The both processes can be on the one computer or on different computer but are connected through computer network. ● Communication may be implemented by two methods either by Shared Memory or by Message Passing
  • 43. Error Detection Error can occur anytime and anywhere. Error may occur in CPU, in I/O devices or in the memory hardware. ● OS constantly remains aware of possible errors. ● OS takes the appropriate action to ensure correct and consistent computing.
  • 44. Resource Allocation In case of multi-user or multi-tasking environment, resources such as main memory, CPU cycles and files storage are to be allocated to each user or job. ● OS manages all kind of resources using schedulers. ● CPU scheduling algorithms are used for better utilization of CPU
  • 45. Protection Protection refers to mechanism or a way to control the access of programs, processes, or users to the resources defined by computer systems. ● OS ensures that all access to system resources is controlled. ● OS ensures that external I/O devices are protected from invalid access attempts. ● OS provides authentication feature for each user by means of a password.
  • 46. System calls The interface between a process and an operating system is provided by system calls. The processes execute normally in the user mode until a system call interrupts this. Then the system call is executed on a priority basis in the kernel mode. After the execution of the system call, the control returns to the user mode and execution of user processes can be resumed.
  • 48. 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.
  • 49. 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()
  • 50. Types of System Calls Windows Linux Information Maintenance GetCurrentProcessID() getpid() SetTimer() alarm() Sleep() sleep() Communication CreatePipe() pipe() CreateFileMapping() shmget() MapViewOfFile() mmap()
  • 60. System programs System programs provide a convenient environment for program development and execution. System calls and system programs are critical to the operation of the OS. These structures describe the functions that the operating system must carry out. The system call establishes a connection between the user software and the operating system's services. In contrast, the system software defines the OS user interface. The system program also offers a proper environment for the development and execution of a program.
  • 61. It traditionally lies between the user interface and system calls so users can only view up-to-the System Programs he can’t see System Calls.
  • 62. System Programs can be divided into these categories: File Management: Create, delete, copy, rename, print, dump and generally manipulate files and directories. A file is a collection of specific information stored in the memory of a computer system. File management is defined as the process of manipulating files in the computer system i.e. process of creating, modifying and deleting files. It helps to create new files in the computer system and placing them at specific locations. It helps in easily and quickly locating these files in the computer system. It helps to store files in separate folders known as directories.
  • 63. Status Information: Information like date, time, amount of available memory, disk space and number of users etc are provided by such system programs. Some also provide details like performance, logging and debugging information which is more complex. All this information is formatted and displayed on output devices or printed. Terminal or other devices or files or a window of GUI is used for showing the output of programs.
  • 64. File Modification: e.g. text editors to create and modify files. For searching contents of files or perform transformations of files we use special commands.
  • 65. Programming Language Support: For common programming languages, we use Compilers, Assemblers, Debuggers and interpreters which are already provided to users. It provides all support to users. We can run any programming language. All languages of importance are already provided.
  • 66. Program Loading and Execution: When the program is ready after Assembling and compilation, it must be loaded into memory execution. A loader is part of an operating system that is responsible for loading programs and libraries. It is one of the essential stages for starting a program. Loaders, linkage editors and overlay loaders are provided by the system.
  • 67. Communications: Virtual connections among processes, users and computer systems are provided by the programs. Users can send messages to another user on their screen, can send email, browse on web pages, can transfer the files from one user to another etc.
  • 68. System Call Example A system call is a request made by a program to the operating system's kernel to perform low-level operations, such as reading a file, writing data, or creating a process. Example: Reading a File In C programming:
  • 69. System Program Example A system program provides a user-friendly way to interact with system functionalities like file management, process management, or system settings. Example: Copying a File (using a shell command) This cp command is a system program that uses system calls internally (like open(), read(), and write()) to copy the content of file1.txt into file2.txt.