SlideShare a Scribd company logo
1 of 40
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edit9on
Chapter 1: Introduction
1.2 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Chapter 1: Introduction
 What Operating Systems Do
 Computer-System Organization
 Computer-System Architecture
 Operating-System Structure
 Operating-System Operations
 Process Management
 Memory Management
 Storage Management
 Protection and Security
 Kernel Data Structures
 Computing Environments
 Open-Source Operating Systems
1.3 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Objectives
 To describe the basic organization of computer systems
 To provide a grand tour of the major components of
operating systems
 To give an overview of the many types of computing
environments
 To explore several open-source operating systems
1.4 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
What is an Operating System?
 A program that acts as an intermediary between a user of a
computer and the computer hardware
 Operating system goals:
 Execute user programs and make solving user problems
easier
 Make the computer system convenient to use
 Use the computer hardware in an efficient manner
1.5 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Computer System Structure
 Computer system can be divided into four components:
 Hardware – provides basic computing resources
 CPU, memory, I/O devices
 Operating system
 Controls and coordinates use of hardware among various
applications and users
 Application programs – define the ways in which the system
resources are used to solve the computing problems of the
users
 Word processors, compilers, web browsers, database
systems, video games
 Users
 People, machines, other computers
1.6 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Four Components of a Computer System
1.7 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
What Operating Systems Do
 Depends on the point of view
 Users want convenience, ease of use and good performance
 Don’t care about resource utilization
 But shared computer such as mainframe or minicomputer must
keep all users happy
 Users of dedicate systems such as workstations have dedicated
resources but frequently use shared resources from servers
 Handheld computers are resource poor, optimized for usability
and battery life
 Some computers have little or no user interface, such as
embedded computers in devices and automobiles
1.8 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Operating System Definition
 OS is a resource allocator
 Manages all resources
 Decides between conflicting requests for efficient and
fair resource use
 OS is a control program
 Controls execution of programs to prevent errors and
improper use of the computer
1.9 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Operating System Definition (Cont.)
 No universally accepted definition
 “Everything a vendor ships when you order an operating
system” is a good approximation
 But varies wildly
 “The one program running at all times on the computer” is
the kernel.
 Everything else is either
 a system program (ships with the operating system) , or
 an application program.
1.10 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Computer Startup
 bootstrap program is loaded at power-up or reboot
 Typically stored in ROM or EPROM, generally known
as firmware
 Initializes all aspects of system
 Loads operating system kernel and starts execution
1.11 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Computer System Organization
 Computer-system operation
 One or more CPUs, device controllers connect through common
bus providing access to shared memory
 Concurrent execution of CPUs and devices competing for
memory cycles
1.12 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Computer-System Operation
 I/O devices and the CPU can execute concurrently
 Each device controller is in charge of a particular device type
 Each device controller has a local buffer
 CPU moves data from/to main memory to/from local buffers
 I/O is from the device to local buffer of controller
 Device controller informs CPU that it has finished its
operation by causing an interrupt
1.13 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Common Functions of Interrupts
 Interrupt transfers control to the interrupt service routine
generally, through the interrupt vector, which contains the
addresses of all the service routines
 Interrupt architecture must save the address of the
interrupted instruction
 A trap or exception is a software-generated interrupt
caused either by an error or a user request
 An operating system is interrupt driven
1.14 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Interrupt Handling
 The operating system preserves the state of the CPU by
storing registers and the program counter
 Determines which type of interrupt has occurred:
 polling
 vectored interrupt system
 Separate segments of code determine what action should
be taken for each type of interrupt
1.15 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Interrupt Timeline
1.16 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
I/O Structure
 After I/O starts, control returns to user program only upon I/O
completion
 Wait instruction idles the CPU until the next interrupt
 Wait loop (contention for memory access)
 At most one I/O request is outstanding at a time, no
simultaneous I/O processing
 After I/O starts, control returns to user program without waiting
for I/O completion
 System call – request to the OS to allow user to wait for
I/O completion
 Device-status table contains entry for each I/O device
indicating its type, address, and state
 OS indexes into I/O device table to determine device
status and to modify table entry to include interrupt
1.17 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Storage Definitions and Notation Review
The basic unit of computer storage is the bit. A bit can contain one of two
values, 0 and 1. All other storage in a computer is based on collections of bits.
Given enough bits, it is amazing how many things a computer can represent:
numbers, letters, images, movies, sounds, documents, and programs, to name
a few. A byte is 8 bits, and on most computers it is the smallest convenient
chunk of storage. For example, most computers don’t have an instruction to
move a bit but do have one to move a byte. A less common term is word,
which is a given computer architecture’s native unit of data. A word is made up
of one or more bytes. For example, a computer that has 64-bit registers and 64-
bit memory addressing typically has 64-bit (8-byte) words. A computer executes
many operations in its native word size rather than a byte at a time.
Computer storage, along with most computer throughput, is generally measured
and manipulated in bytes and collections of bytes.
A kilobyte, or KB, is 1,024 bytes
a megabyte, or MB, is 1,0242 bytes
a gigabyte, or GB, is 1,0243 bytes
a terabyte, or TB, is 1,0244 bytes
a petabyte, or PB, is 1,0245 bytes
Computer manufacturers often round off these numbers and say that a
megabyte is 1 million bytes and a gigabyte is 1 billion bytes. Networking
measurements are an exception to this general rule; they are given in bits
(because networks move data a bit at a time).
1.18 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Storage Structure
 Main memory – only large storage media that the CPU can access
directly
 Random access
 Typically volatile
 Secondary storage – extension of main memory that provides large
nonvolatile storage capacity
 Hard disks – rigid metal or glass platters covered with magnetic
recording material
 Disk surface is logically divided into tracks, which are subdivided into
sectors
 The disk controller determines the logical interaction between the device
and the computer
 Solid-state disks – faster than hard disks, nonvolatile
 Various technologies
 Becoming more popular
1.19 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Storage Hierarchy
 Storage systems organized in hierarchy
 Speed
 Cost
 Volatility
 Caching – copying information into faster storage system;
main memory can be viewed as a cache for secondary
storage
 Device Driver for each device controller to manage I/O
 Provides uniform interface between controller and
kernel
1.20 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Storage-Device Hierarchy
1.21 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Caching
 Important principle, performed at many levels in a computer
(in hardware, operating system, software)
 Information in use copied from slower to faster storage
temporarily
 Faster storage (cache) checked first to determine if
information is there
 If it is, information used directly from the cache (fast)
 If not, data copied to cache and used there
 Cache smaller than storage being cached
 Cache management important design problem
 Cache size and replacement policy
1.22 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Functions of an operating System
 Memory Management
 Processor Management
 Device Management
 File Management
 Network Management
 Security
 Control over system performance
 Job accounting
 Error detecting aids
 Coordination between other software and users
1.23 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Memory Management
 Memory management refers to management of Primary Memory or Main
Memory. Main memory is a large array of words or bytes where each word
or byte has its own address.
 Main memory provides a fast storage that can be accessed directly by the
CPU. For a program to be executed, it must in the main memory. An
Operating System does the following activities for memory management −
 Keeps tracks of primary memory, i.e., what part of it are in use by
whom, what part are not in use.
 In multiprogramming, the OS decides which process will get memory
when and how much.
 Allocates the memory when a process requests it to do so.
 De-allocates the memory when a process no longer needs it or has
been terminated.
1.24 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Processor Management
 In multiprogramming environment, the OS decides which process gets the
processor when and for how much time. This function is called process
scheduling. An Operating System does the following activities for
processor management −
 Keeps tracks of processor and status of process. The program
responsible for this task is known as traffic controller.
 Allocates the processor (CPU) to a process.
 De-allocates processor when a process is no longer required.
1.25 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Device Management
 An Operating System manages device communication via their respective
drivers. It does the following activities for device management −
 Keeps tracks of all devices. Program responsible for this task is known
as the I/O controller.
 Decides which process gets the device when and for how much time.
 Allocates the device in the efficient way.
 De-allocates devices.
1.26 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
File Management
 A file system is normally organized into directories for easy navigation and
usage. These directories may contain files and other directions.
 An Operating System does the following activities for file management −
 Keeps track of information, location, uses, status etc. The collective
facilities are often known as file system.
 Decides who gets the resources.
 Allocates the resources.
 De-allocates the resources.
1.27 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Mass-Storage Management
 Usually disks used to store data that does not fit in main memory or
data that must be kept for a “long” period of time
 Proper management is of central importance
 Entire speed of computer operation hinges on disk subsystem and its
algorithms
 OS activities
 Free-space management
 Storage allocation
 Disk scheduling
 Some storage need not be fast
 Tertiary storage includes optical storage, magnetic tape
 Still must be managed – by OS or applications
 Varies between WORM (write-once, read-many-times) and RW
(read-write)
1.28 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Other Important Activities
 Security − By means of password and similar other techniques, it prevents
unauthorized access to programs and data.
 Control over system performance − Recording delays between request
for a service and response from the system.
 Job accounting − Keeping track of time and resources used by various
jobs and users.
 Error detecting aids − Production of dumps, traces, error messages, and
other debugging and error detecting aids.
 Coordination between other software and users − Coordination and
assignment of compilers, interpreters, assemblers and other software to the
various users of the computer systems.
1.29 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Batch operating system
 The users of a batch operating system do not interact with the computer
directly.
 Each user prepares his job on an off-line device like punch cards and
submits it to the computer operator.
 To speed up processing, jobs with similar needs are batched together and
run as a group.
 The programmers leave their programs with the operator and the operator
then sorts the programs with similar requirements into batches.
 The problems with Batch Systems are as follows −
 Lack of interaction between the user and the job.
 CPU is often idle, because the speed of the mechanical I/O devices is
slower than the CPU.
 Difficult to provide the desired priority.
1.30 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Time-sharing operating systems
 Time-sharing operating systems allow multiple users to use the resources of
a single system at the same time by providing a mechanism for CPU time
division among all the tasks. Here are the key points about time-sharing
operating systems:
 Multiple Users: Supports concurrent use by multiple users, often through
remote terminals.
 CPU Scheduling: Utilizes CPU scheduling algorithms to allocate CPU time
slices to each task, ensuring fair usage.
 Efficiency: Maximizes CPU utilization by ensuring it is never idle if there
are tasks waiting to be processed.
 Task Switching: Rapidly switches between tasks, giving the illusion that
each user has their own dedicated system.
 Interactive: Users can interact with their tasks in real-time, making
adjustments as needed.
 Resource Sharing: Allows for the efficient sharing of system resources like
memory, I/O devices, etc., among all users.
1.31 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Distributed Operating System
 A Distributed Operating System (DOS) manages a group of independent
computers and makes them appear to the user as a single coherent system.
Below are the key points about distributed operating systems:
 Transparency: Provides the illusion of a single, unified computing resource
despite the underlying individual systems.
 Communication: Relies on a network for communication between nodes
(the individual computers).
 Autonomy: Each node in a distributed system operates independently but
is coordinated to achieve a common goal.
 Scalability: Easily scales out by adding more nodes to the system,
enhancing performance and capacity.
 Cloud Computing Platforms: Like Amazon Web Services (AWS),
Google Cloud Platform (GCP), and Microsoft Azure, where distributed
computing resources are offered as services.
 Distributed Databases: Systems like Cassandra, MongoDB, and
Google's Bigtable, where data is stored across multiple nodes to ensure
reliability, scalability, and quick access.
1.32 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Network operating System
 A Network Operating System runs on a server and provides the server the
capability to manage data, users, groups, security, applications, and other
networking functions. The primary purpose of the network operating system
is to allow shared file and printer access among multiple computers in a
network, typically a local area network (LAN), a private network or to other
networks.
 Centralized servers are highly stable.
 Security is server managed.
 Upgrades to new technologies and hardware can be easily integrated into
the system.
 Remote access to servers is possible from different locations and types of
systems.
1.33 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Real Time operating System
 A real-time system is defined as a data processing system in which the time
interval required to process and respond to inputs is so small that it controls
the environment.
 The time taken by the system to respond to an input and display of required
updated information is termed as the response time.
 So in this method, the response time is very less as compared to online
processing
1.34 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Performance of Various Levels of Storage
Movement between levels of storage hierarchy can be explicit or implicit
1.35 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Protection and Security
 Protection – any mechanism for controlling access of processes or
users to resources defined by the OS
 Security – defense of the system against internal and external attacks
 Huge range, including denial-of-service, worms, viruses, identity
theft, theft of service
 Systems generally first distinguish among users, to determine who
can do what
 User identities (user IDs, security IDs) include name and
associated number, one per user
 User ID then associated with all files, processes of that user to
determine access control
 Group identifier (group ID) allows set of users to be defined and
controls managed, then also associated with each process, file
 Privilege escalation allows user to change to effective ID with
more rights
1.36 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Kernel Data Structures
 Many similar to standard programming data structures
 Singly linked list
 Doubly linked list
 Circular linked list
1.37 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Kernel Data Structures
 Binary search tree
left <= right
 Search performance is O(n)
 Balanced binary search tree is O(lg n)
1.38 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Kernel Data Structures
 Hash function can create a hash map
 Bitmap – string of n binary digits representing the status of n items
 Linux data structures defined in
include files <linux/list.h>, <linux/kfifo.h>,
<linux/rbtree.h>
1.39 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Open-Source Operating Systems
 Operating systems made available in source-code format rather
than just binary closed-source
 Counter to the copy protection and Digital Rights
Management (DRM) movement
 Started by Free Software Foundation (FSF), which has
“copyleft” GNU Public License (GPL)
 Examples include GNU/Linux and BSD UNIX (including core of
Mac OS X), and many more
 Can use VMM like VMware Player (Free on Windows), Virtualbox
(open source and free on many platforms -
http://www.virtualbox.com)
 Use to run guest operating systems for exploration
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edit9on
End of Chapter 1

More Related Content

Similar to Introduction_to_OperatingSystems_ch1.ppt

Similar to Introduction_to_OperatingSystems_ch1.ppt (16)

Ch1 Operating system
Ch1 Operating systemCh1 Operating system
Ch1 Operating system
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch01.ppt
ch01.pptch01.ppt
ch01.ppt
 
operating system of the computer/PC/laptop.pptx
operating system of the computer/PC/laptop.pptxoperating system of the computer/PC/laptop.pptx
operating system of the computer/PC/laptop.pptx
 
ch01.ppt
ch01.pptch01.ppt
ch01.ppt
 
slide 4 systemsch1-great slide 4 systems.pptx
slide 4 systemsch1-great slide 4 systems.pptxslide 4 systemsch1-great slide 4 systems.pptx
slide 4 systemsch1-great slide 4 systems.pptx
 
ch1.pptx
ch1.pptxch1.pptx
ch1.pptx
 
cs231_ch1_ch2.pptx
cs231_ch1_ch2.pptxcs231_ch1_ch2.pptx
cs231_ch1_ch2.pptx
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1 (2).ppt
ch1 (2).pptch1 (2).ppt
ch1 (2).ppt
 
Ch1
Ch1Ch1
Ch1
 
ch1.pptx
ch1.pptxch1.pptx
ch1.pptx
 
ch1.pdf
ch1.pdfch1.pdf
ch1.pdf
 
ch1 operating system chapter 1 to OS.pptx
ch1 operating system chapter 1  to OS.pptxch1 operating system chapter 1  to OS.pptx
ch1 operating system chapter 1 to OS.pptx
 
Ch1 Operating System
Ch1 Operating System Ch1 Operating System
Ch1 Operating System
 
Ch1-Operating System Concept
Ch1-Operating System ConceptCh1-Operating System Concept
Ch1-Operating System Concept
 

Recently uploaded

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

Introduction_to_OperatingSystems_ch1.ppt

  • 1. Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edit9on Chapter 1: Introduction
  • 2. 1.2 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Chapter 1: Introduction  What Operating Systems Do  Computer-System Organization  Computer-System Architecture  Operating-System Structure  Operating-System Operations  Process Management  Memory Management  Storage Management  Protection and Security  Kernel Data Structures  Computing Environments  Open-Source Operating Systems
  • 3. 1.3 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Objectives  To describe the basic organization of computer systems  To provide a grand tour of the major components of operating systems  To give an overview of the many types of computing environments  To explore several open-source operating systems
  • 4. 1.4 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition What is an Operating System?  A program that acts as an intermediary between a user of a computer and the computer hardware  Operating system goals:  Execute user programs and make solving user problems easier  Make the computer system convenient to use  Use the computer hardware in an efficient manner
  • 5. 1.5 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Computer System Structure  Computer system can be divided into four components:  Hardware – provides basic computing resources  CPU, memory, I/O devices  Operating system  Controls and coordinates use of hardware among various applications and users  Application programs – define the ways in which the system resources are used to solve the computing problems of the users  Word processors, compilers, web browsers, database systems, video games  Users  People, machines, other computers
  • 6. 1.6 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Four Components of a Computer System
  • 7. 1.7 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition What Operating Systems Do  Depends on the point of view  Users want convenience, ease of use and good performance  Don’t care about resource utilization  But shared computer such as mainframe or minicomputer must keep all users happy  Users of dedicate systems such as workstations have dedicated resources but frequently use shared resources from servers  Handheld computers are resource poor, optimized for usability and battery life  Some computers have little or no user interface, such as embedded computers in devices and automobiles
  • 8. 1.8 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Operating System Definition  OS is a resource allocator  Manages all resources  Decides between conflicting requests for efficient and fair resource use  OS is a control program  Controls execution of programs to prevent errors and improper use of the computer
  • 9. 1.9 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Operating System Definition (Cont.)  No universally accepted definition  “Everything a vendor ships when you order an operating system” is a good approximation  But varies wildly  “The one program running at all times on the computer” is the kernel.  Everything else is either  a system program (ships with the operating system) , or  an application program.
  • 10. 1.10 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Computer Startup  bootstrap program is loaded at power-up or reboot  Typically stored in ROM or EPROM, generally known as firmware  Initializes all aspects of system  Loads operating system kernel and starts execution
  • 11. 1.11 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Computer System Organization  Computer-system operation  One or more CPUs, device controllers connect through common bus providing access to shared memory  Concurrent execution of CPUs and devices competing for memory cycles
  • 12. 1.12 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Computer-System Operation  I/O devices and the CPU can execute concurrently  Each device controller is in charge of a particular device type  Each device controller has a local buffer  CPU moves data from/to main memory to/from local buffers  I/O is from the device to local buffer of controller  Device controller informs CPU that it has finished its operation by causing an interrupt
  • 13. 1.13 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Common Functions of Interrupts  Interrupt transfers control to the interrupt service routine generally, through the interrupt vector, which contains the addresses of all the service routines  Interrupt architecture must save the address of the interrupted instruction  A trap or exception is a software-generated interrupt caused either by an error or a user request  An operating system is interrupt driven
  • 14. 1.14 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Interrupt Handling  The operating system preserves the state of the CPU by storing registers and the program counter  Determines which type of interrupt has occurred:  polling  vectored interrupt system  Separate segments of code determine what action should be taken for each type of interrupt
  • 15. 1.15 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Interrupt Timeline
  • 16. 1.16 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition I/O Structure  After I/O starts, control returns to user program only upon I/O completion  Wait instruction idles the CPU until the next interrupt  Wait loop (contention for memory access)  At most one I/O request is outstanding at a time, no simultaneous I/O processing  After I/O starts, control returns to user program without waiting for I/O completion  System call – request to the OS to allow user to wait for I/O completion  Device-status table contains entry for each I/O device indicating its type, address, and state  OS indexes into I/O device table to determine device status and to modify table entry to include interrupt
  • 17. 1.17 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Storage Definitions and Notation Review The basic unit of computer storage is the bit. A bit can contain one of two values, 0 and 1. All other storage in a computer is based on collections of bits. Given enough bits, it is amazing how many things a computer can represent: numbers, letters, images, movies, sounds, documents, and programs, to name a few. A byte is 8 bits, and on most computers it is the smallest convenient chunk of storage. For example, most computers don’t have an instruction to move a bit but do have one to move a byte. A less common term is word, which is a given computer architecture’s native unit of data. A word is made up of one or more bytes. For example, a computer that has 64-bit registers and 64- bit memory addressing typically has 64-bit (8-byte) words. A computer executes many operations in its native word size rather than a byte at a time. Computer storage, along with most computer throughput, is generally measured and manipulated in bytes and collections of bytes. A kilobyte, or KB, is 1,024 bytes a megabyte, or MB, is 1,0242 bytes a gigabyte, or GB, is 1,0243 bytes a terabyte, or TB, is 1,0244 bytes a petabyte, or PB, is 1,0245 bytes Computer manufacturers often round off these numbers and say that a megabyte is 1 million bytes and a gigabyte is 1 billion bytes. Networking measurements are an exception to this general rule; they are given in bits (because networks move data a bit at a time).
  • 18. 1.18 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Storage Structure  Main memory – only large storage media that the CPU can access directly  Random access  Typically volatile  Secondary storage – extension of main memory that provides large nonvolatile storage capacity  Hard disks – rigid metal or glass platters covered with magnetic recording material  Disk surface is logically divided into tracks, which are subdivided into sectors  The disk controller determines the logical interaction between the device and the computer  Solid-state disks – faster than hard disks, nonvolatile  Various technologies  Becoming more popular
  • 19. 1.19 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Storage Hierarchy  Storage systems organized in hierarchy  Speed  Cost  Volatility  Caching – copying information into faster storage system; main memory can be viewed as a cache for secondary storage  Device Driver for each device controller to manage I/O  Provides uniform interface between controller and kernel
  • 20. 1.20 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Storage-Device Hierarchy
  • 21. 1.21 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Caching  Important principle, performed at many levels in a computer (in hardware, operating system, software)  Information in use copied from slower to faster storage temporarily  Faster storage (cache) checked first to determine if information is there  If it is, information used directly from the cache (fast)  If not, data copied to cache and used there  Cache smaller than storage being cached  Cache management important design problem  Cache size and replacement policy
  • 22. 1.22 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Functions of an operating System  Memory Management  Processor Management  Device Management  File Management  Network Management  Security  Control over system performance  Job accounting  Error detecting aids  Coordination between other software and users
  • 23. 1.23 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Memory Management  Memory management refers to management of Primary Memory or Main Memory. Main memory is a large array of words or bytes where each word or byte has its own address.  Main memory provides a fast storage that can be accessed directly by the CPU. For a program to be executed, it must in the main memory. An Operating System does the following activities for memory management −  Keeps tracks of primary memory, i.e., what part of it are in use by whom, what part are not in use.  In multiprogramming, the OS decides which process will get memory when and how much.  Allocates the memory when a process requests it to do so.  De-allocates the memory when a process no longer needs it or has been terminated.
  • 24. 1.24 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Processor Management  In multiprogramming environment, the OS decides which process gets the processor when and for how much time. This function is called process scheduling. An Operating System does the following activities for processor management −  Keeps tracks of processor and status of process. The program responsible for this task is known as traffic controller.  Allocates the processor (CPU) to a process.  De-allocates processor when a process is no longer required.
  • 25. 1.25 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Device Management  An Operating System manages device communication via their respective drivers. It does the following activities for device management −  Keeps tracks of all devices. Program responsible for this task is known as the I/O controller.  Decides which process gets the device when and for how much time.  Allocates the device in the efficient way.  De-allocates devices.
  • 26. 1.26 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition File Management  A file system is normally organized into directories for easy navigation and usage. These directories may contain files and other directions.  An Operating System does the following activities for file management −  Keeps track of information, location, uses, status etc. The collective facilities are often known as file system.  Decides who gets the resources.  Allocates the resources.  De-allocates the resources.
  • 27. 1.27 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Mass-Storage Management  Usually disks used to store data that does not fit in main memory or data that must be kept for a “long” period of time  Proper management is of central importance  Entire speed of computer operation hinges on disk subsystem and its algorithms  OS activities  Free-space management  Storage allocation  Disk scheduling  Some storage need not be fast  Tertiary storage includes optical storage, magnetic tape  Still must be managed – by OS or applications  Varies between WORM (write-once, read-many-times) and RW (read-write)
  • 28. 1.28 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Other Important Activities  Security − By means of password and similar other techniques, it prevents unauthorized access to programs and data.  Control over system performance − Recording delays between request for a service and response from the system.  Job accounting − Keeping track of time and resources used by various jobs and users.  Error detecting aids − Production of dumps, traces, error messages, and other debugging and error detecting aids.  Coordination between other software and users − Coordination and assignment of compilers, interpreters, assemblers and other software to the various users of the computer systems.
  • 29. 1.29 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Batch operating system  The users of a batch operating system do not interact with the computer directly.  Each user prepares his job on an off-line device like punch cards and submits it to the computer operator.  To speed up processing, jobs with similar needs are batched together and run as a group.  The programmers leave their programs with the operator and the operator then sorts the programs with similar requirements into batches.  The problems with Batch Systems are as follows −  Lack of interaction between the user and the job.  CPU is often idle, because the speed of the mechanical I/O devices is slower than the CPU.  Difficult to provide the desired priority.
  • 30. 1.30 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Time-sharing operating systems  Time-sharing operating systems allow multiple users to use the resources of a single system at the same time by providing a mechanism for CPU time division among all the tasks. Here are the key points about time-sharing operating systems:  Multiple Users: Supports concurrent use by multiple users, often through remote terminals.  CPU Scheduling: Utilizes CPU scheduling algorithms to allocate CPU time slices to each task, ensuring fair usage.  Efficiency: Maximizes CPU utilization by ensuring it is never idle if there are tasks waiting to be processed.  Task Switching: Rapidly switches between tasks, giving the illusion that each user has their own dedicated system.  Interactive: Users can interact with their tasks in real-time, making adjustments as needed.  Resource Sharing: Allows for the efficient sharing of system resources like memory, I/O devices, etc., among all users.
  • 31. 1.31 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Distributed Operating System  A Distributed Operating System (DOS) manages a group of independent computers and makes them appear to the user as a single coherent system. Below are the key points about distributed operating systems:  Transparency: Provides the illusion of a single, unified computing resource despite the underlying individual systems.  Communication: Relies on a network for communication between nodes (the individual computers).  Autonomy: Each node in a distributed system operates independently but is coordinated to achieve a common goal.  Scalability: Easily scales out by adding more nodes to the system, enhancing performance and capacity.  Cloud Computing Platforms: Like Amazon Web Services (AWS), Google Cloud Platform (GCP), and Microsoft Azure, where distributed computing resources are offered as services.  Distributed Databases: Systems like Cassandra, MongoDB, and Google's Bigtable, where data is stored across multiple nodes to ensure reliability, scalability, and quick access.
  • 32. 1.32 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Network operating System  A Network Operating System runs on a server and provides the server the capability to manage data, users, groups, security, applications, and other networking functions. The primary purpose of the network operating system is to allow shared file and printer access among multiple computers in a network, typically a local area network (LAN), a private network or to other networks.  Centralized servers are highly stable.  Security is server managed.  Upgrades to new technologies and hardware can be easily integrated into the system.  Remote access to servers is possible from different locations and types of systems.
  • 33. 1.33 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Real Time operating System  A real-time system is defined as a data processing system in which the time interval required to process and respond to inputs is so small that it controls the environment.  The time taken by the system to respond to an input and display of required updated information is termed as the response time.  So in this method, the response time is very less as compared to online processing
  • 34. 1.34 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Performance of Various Levels of Storage Movement between levels of storage hierarchy can be explicit or implicit
  • 35. 1.35 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Protection and Security  Protection – any mechanism for controlling access of processes or users to resources defined by the OS  Security – defense of the system against internal and external attacks  Huge range, including denial-of-service, worms, viruses, identity theft, theft of service  Systems generally first distinguish among users, to determine who can do what  User identities (user IDs, security IDs) include name and associated number, one per user  User ID then associated with all files, processes of that user to determine access control  Group identifier (group ID) allows set of users to be defined and controls managed, then also associated with each process, file  Privilege escalation allows user to change to effective ID with more rights
  • 36. 1.36 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Kernel Data Structures  Many similar to standard programming data structures  Singly linked list  Doubly linked list  Circular linked list
  • 37. 1.37 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Kernel Data Structures  Binary search tree left <= right  Search performance is O(n)  Balanced binary search tree is O(lg n)
  • 38. 1.38 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Kernel Data Structures  Hash function can create a hash map  Bitmap – string of n binary digits representing the status of n items  Linux data structures defined in include files <linux/list.h>, <linux/kfifo.h>, <linux/rbtree.h>
  • 39. 1.39 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Open-Source Operating Systems  Operating systems made available in source-code format rather than just binary closed-source  Counter to the copy protection and Digital Rights Management (DRM) movement  Started by Free Software Foundation (FSF), which has “copyleft” GNU Public License (GPL)  Examples include GNU/Linux and BSD UNIX (including core of Mac OS X), and many more  Can use VMM like VMware Player (Free on Windows), Virtualbox (open source and free on many platforms - http://www.virtualbox.com)  Use to run guest operating systems for exploration
  • 40. Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edit9on End of Chapter 1