SlideShare a Scribd company logo
1 of 58
Chapter 2
Operating System Overview
Patricia Roy
Manatee Community College, Venice,
FL
©2008, Prentice Hall
Operating Systems:
Internals and Design Principles, 6/E
William Stallings
Layers and Views
What is an Operating System
• It is an extended, or virtual, machine
– provides a simple, high-level abstraction, i.e.,
hides the “messy details” which must be
performed
– presents user with a virtual machine, easier
to use
– provides services; programs obtain these by
system calls
• It is a resource manager
– provides orderly and controlled allocation for
programs in terms of time and space,
multiplexing
Services Provided by the OS
• Process creation
• Program execution
• Access to I/O devices
• Controlled access to resources, e.g. files
• System access
• Error detection and response
• Accounting
Operating System
• Functions the same way as ordinary
computer software
– It is a program that is executed, but with extra
privileges
• Kernel: Portion of operating system that is
in main memory
– Contains most frequently used functions
– Also called the nucleus
Evolution of Operating
Systems
• Serial processing
– No operating system
– Machines run from a console with display
lights (error messages), input device (punch
card, tape) and printer (for output)
– Setup included loading and compiling the
program, and loading and linking common
functions – very time consuming (errors!)
Simple Batch Systems
• Resident Monitor program: scheduling,
privileged operations
• Users submit jobs to operator
• Operator batches jobs
• Monitor controls sequence of events to
process batch
• When one job is finished, control returns to
Monitor which reads next job
• Monitor handles scheduling (e.g. FIFO,
SJF)
OS Features
• Memory protection
– Do not allow the memory area containing the
monitor to be altered by user program
• Timer
– Prevents a job from monopolizing the system
(when allocated time is up, job is stopped)
• Privileged instructions
– Certain machine level instructions (e.g. I/O)
can only be executed by the monitor – kernel
or supervisor mode vs. user mode
System Utilization Example
Uniprogramming
• Processor must wait for I/O instruction to
complete before preceding
Multiprogramming
• Processor has more than one program to
execute
• The sequence in which the programs are
executed depends on their relative priority
and whether they are waiting for I/O
• After an interrupt handler completes,
control may not return to the program that
was executing at the time of the interrupt
Multiprogramming
Example
Time Sharing Systems
• Using multiprogramming to handle multiple
interactive jobs
• Processor’s time is shared among multiple
users
• Multiple users simultaneously access the
system through terminals
Major OS Concepts
• Process
• Memory management
• Information protection and security
• Scheduling and resource management
• System structure
Process
• A program in execution
• An instance of a program running on a
computer
• The entity that can be assigned to and
executed on a processor
• A unit of activity characterized by
– A single sequential thread of execution
– A current state
– An associated set of system resources:
memory image, open files, locks, etc.
Five State Process Model
Memory
• Typical memory hierarchy (numbers
shown on the right are a bit out-dated)
Memory Management
• Process isolation
• Automatic allocation and management
• Support of modular programming
• Protection and access control
• Long-term storage
Process – memory image
• Consists of three components, segments
– An executable program – code segment
– Associated data needed by the program –
data segment
– Execution context of the program
• All information the operating system needs to
manage the process – process table entry (state,
priority, accounting), stack (entered
subprocedures, value of PC in suspended mode)
One base-limit pair and two base-limit pairs
Virtual Memory
• Problems with large programs, growing
segments, fragmentation
• Addressing memory from a logical point of
view
• Implementation is by the system –
transparent to the programmer
Paging
• Allows process to be comprised of a
number of fixed-size blocks, called pages.
Pages are stored in secondary memory
(hard disk)
• Each page may be loaded into main
memory – page frame (may be located
anywhere in main memory)
Virtual
Memory
Addresses
• Virtual or logical address is a page
number and an offset within the page ---
usually this is generated by the CPU
• Real or physical address (in main
memory) has to be computed --- this is a
page frame number and an offset
Page Table
• The map between main memory (page frames)
and secondary memory (pages) is described in
the page tables.
• Pages in main memory have a corresponding
page frame number --- this is stored in a page
table entry in the page table
• Some pages may not have corresponding page
frames --- page fault (data has to be loaded
from secondary memory)
Virtual Memory Addressing
Information Protection and Security
• Availability
– Protecting the system against interruption
• Confidentiality (access control)
– Assuring that users cannot read data for
which access is unauthorized
• Data integrity (access control)
– Protection of data from unauthorized
modification
• Authenticity (login)
– Proper verification of the identity of users and
the validity of messages or data
Scheduling and Resource
Management
• Fairness
– Give equal and fair access to resources
• Differential responsiveness
– Discriminate among different classes of jobs
• Efficiency
– Maximize throughput, minimize response or
turnaround time, and accommodate as many
users as possible
System Calls
• Interface between OS and user programs
(to perform privileged operations)
• Machine dependent, but can be invoked
by standard procedure libraries
11 steps in making read (fd, buffer, nbytes)
System Structure
• Hierarchical structure:
– View the system as a series of levels
– Each level performs a related subset of
functions
– Each level relies on the next lower level to
perform more primitive functions
• Modular structure:
– Different functions carried out by different
modules
– Communication between the modules
Monolithic System
Simple structuring model for a monolithic system
Layered System
• Structure of the THE operating system
• MULTICS - concentric rings
Machine Level
• Level 1
– Objects are registers, memory cells, and logic
gates; Operations are clearing a register or
reading a memory location
• Level 2
– Processor’s instruction set; Operations such
as add, subtract, load, and store
• Level 3
– Procedure or subroutine, call/return operation
• Level 4
– Interrupts
Concepts with Multiprogramming
• Level 5
– Process as a program in execution
– Suspend and resume processes
• Level 6
– Secondary storage devices
– Transfer of blocks of data
• Level 7
– Creates logical address space for processes
– Organizes virtual address space into blocks
Deal with External Objects
• Level 8
– Communication of information and messages
between processes (pipe)
• Level 9
– Supports long-term storage of named files
• Level 10
– Provides access to external devices using
standardized interfaces
Deal with External Objects
• Level 11
– Responsible for maintaining the association
between the external (abstract) and internal
identifiers, plus access rights
• Level 12
– Provides full-featured facility for the support of
processes (address space, resources, etc.)
• Level 13
– Provides an interface to the OS for the user
Microkernel architecture
Assigns only a few essential functions to the kernel
• Address spaces
• Interprocess communication (IPC)
• Basic scheduling
• Client-server model
Distributed operating systems
The client-server model in a distributed system
Latest Achievements 1
• Multithreading
– Process is divided into threads that can run
concurrently
• Thread
– Dispatchable unit of work
– Executes sequentially and is interruptable
• Process is a collection of one or more threads,
which share resources
Latest Achievements 2
• Symmetric multiprocessing (SMP)
– There are multiple processors
– These processors share same main memory
and I/O facilities
– All processors can perform the same
functions
– Scheduling!
– Cache coherency!
Windows Architecture
• Modular structure for flexibility
• Executes on a variety of hardware
platforms
• Started with microkernel … and then grew
and grew
Client/Server Model
• Simplifies the Executive
– Possible to construct a variety of application
programs
• Improves reliability
– Each server runs outside the kernel, protected
from other servers
• Provides a uniform means for applications
to communicate via RPCs
• Provides base for distributed computing
(support for SMP)
Kernel-Mode Components (1)
• Kernel
– Consists of the most used low level
components: scheduling, process switching,
interrupt handling
• Hardware abstraction layer (HAL)
– Isolates the operating system from platform-
specific hardware differences – portability
– DMA, bus, interrupts, timer
Kernel-Mode Components (2)
• Device drivers
– Translate user I/O function calls into specific
hardware device I/O requests
• Windowing and graphics systems
– Implements the graphical user interface (GUI)
Windows Executive (1)
• I/O manager: dispatching device drivers
• Cache manager
• Object manager: naming, security of
objects
• Plug and play manager: loading drivers
• Power manager
Windows Executive (2)
• Security reference monitor: enforces
access validation
• Virtual memory manager: paging,
translation between virtual and physical
addresses
• Process/thread manager
• Configuration manager: setting
parameters
• Local procedure call (LPC) facility:
communication between processes
UNIX
• Monolithic - hardware is surrounded by the
operating system software
• System V Release 4 (SVR4)
• BSD (=> Mac OS)
• Solaris 10
Linux
• Modular structure
• Collection of loadable modules: they
implement OS functions and execute in
kernel mode on behalf of current process
– Dynamic linking
– Stackable modules: hierarchy between clients
and libraries
cs-intro-os.ppt

More Related Content

Similar to cs-intro-os.ppt

Similar to cs-intro-os.ppt (20)

Os concepts
Os conceptsOs concepts
Os concepts
 
OS_MD_1.pdf
OS_MD_1.pdfOS_MD_1.pdf
OS_MD_1.pdf
 
OS-01.ppt
OS-01.pptOS-01.ppt
OS-01.ppt
 
Unit 4
Unit  4Unit  4
Unit 4
 
Ch1 introduction
Ch1   introductionCh1   introduction
Ch1 introduction
 
4 Module - Operating Systems Configuration and Use by Mark John Lado
4 Module - Operating Systems Configuration and Use by Mark John Lado4 Module - Operating Systems Configuration and Use by Mark John Lado
4 Module - Operating Systems Configuration and Use by Mark John Lado
 
chapter1.ppt
chapter1.pptchapter1.ppt
chapter1.ppt
 
Operating System BCA 301
Operating System BCA 301Operating System BCA 301
Operating System BCA 301
 
Operating system Chapter One
Operating system Chapter OneOperating system Chapter One
Operating system Chapter One
 
Os concepts 4 functions of os
Os concepts 4 functions of osOs concepts 4 functions of os
Os concepts 4 functions of os
 
Module 1 Introduction.ppt
Module 1 Introduction.pptModule 1 Introduction.ppt
Module 1 Introduction.ppt
 
Operating system 05 functions of os
Operating system 05 functions of osOperating system 05 functions of os
Operating system 05 functions of os
 
OS Content.pdf
OS Content.pdfOS Content.pdf
OS Content.pdf
 
Services and system calls
Services and system callsServices and system calls
Services and system calls
 
Kernel security Concepts
Kernel security ConceptsKernel security Concepts
Kernel security Concepts
 
Os unit 1(cont)
Os unit 1(cont)Os unit 1(cont)
Os unit 1(cont)
 
Operating Systems PPT 1 (1).pdf
Operating Systems PPT 1 (1).pdfOperating Systems PPT 1 (1).pdf
Operating Systems PPT 1 (1).pdf
 
8
88
8
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 

More from infomerlin

GSC-21_029_4_09_TSDSI-R1-1.pptx
GSC-21_029_4_09_TSDSI-R1-1.pptxGSC-21_029_4_09_TSDSI-R1-1.pptx
GSC-21_029_4_09_TSDSI-R1-1.pptxinfomerlin
 
Page Replacement Algorithms.pptx
Page Replacement Algorithms.pptxPage Replacement Algorithms.pptx
Page Replacement Algorithms.pptxinfomerlin
 
Segmentation.ppt
Segmentation.pptSegmentation.ppt
Segmentation.pptinfomerlin
 
Allocating of Frames.pptx
Allocating of Frames.pptxAllocating of Frames.pptx
Allocating of Frames.pptxinfomerlin
 
Contiguous Memory Allocation.ppt
Contiguous Memory Allocation.pptContiguous Memory Allocation.ppt
Contiguous Memory Allocation.pptinfomerlin
 
Allocating Kernel Memory.pptx
Allocating Kernel Memory.pptxAllocating Kernel Memory.pptx
Allocating Kernel Memory.pptxinfomerlin
 
Deadlock Detection.pptx
Deadlock Detection.pptxDeadlock Detection.pptx
Deadlock Detection.pptxinfomerlin
 
Deadlock Prevention.pptx
Deadlock Prevention.pptxDeadlock Prevention.pptx
Deadlock Prevention.pptxinfomerlin
 
Frame detection.pdf
Frame detection.pdfFrame detection.pdf
Frame detection.pdfinfomerlin
 
Deadlock Backgroud.pptx
Deadlock Backgroud.pptxDeadlock Backgroud.pptx
Deadlock Backgroud.pptxinfomerlin
 
5G Hackathon - Brainstorming Session.pptx
5G Hackathon - Brainstorming Session.pptx5G Hackathon - Brainstorming Session.pptx
5G Hackathon - Brainstorming Session.pptxinfomerlin
 
Lecture 4.pptx
Lecture 4.pptxLecture 4.pptx
Lecture 4.pptxinfomerlin
 
System Calls.ppt
System Calls.pptSystem Calls.ppt
System Calls.pptinfomerlin
 
Lec 6 OS structure and Operations.ppt
Lec 6 OS structure and Operations.pptLec 6 OS structure and Operations.ppt
Lec 6 OS structure and Operations.pptinfomerlin
 
Lecture-2 Signal-Spectra-Modulation.pptx
Lecture-2 Signal-Spectra-Modulation.pptxLecture-2 Signal-Spectra-Modulation.pptx
Lecture-2 Signal-Spectra-Modulation.pptxinfomerlin
 
Noise in AM systems.ppt
Noise in AM systems.pptNoise in AM systems.ppt
Noise in AM systems.pptinfomerlin
 
Lecture 22 Threshold effects in FM.pptx
Lecture 22 Threshold effects in FM.pptxLecture 22 Threshold effects in FM.pptx
Lecture 22 Threshold effects in FM.pptxinfomerlin
 

More from infomerlin (20)

GSC-21_029_4_09_TSDSI-R1-1.pptx
GSC-21_029_4_09_TSDSI-R1-1.pptxGSC-21_029_4_09_TSDSI-R1-1.pptx
GSC-21_029_4_09_TSDSI-R1-1.pptx
 
sat-ppt.pptx
sat-ppt.pptxsat-ppt.pptx
sat-ppt.pptx
 
Paging.ppt
Paging.pptPaging.ppt
Paging.ppt
 
Page Replacement Algorithms.pptx
Page Replacement Algorithms.pptxPage Replacement Algorithms.pptx
Page Replacement Algorithms.pptx
 
Segmentation.ppt
Segmentation.pptSegmentation.ppt
Segmentation.ppt
 
Allocating of Frames.pptx
Allocating of Frames.pptxAllocating of Frames.pptx
Allocating of Frames.pptx
 
Contiguous Memory Allocation.ppt
Contiguous Memory Allocation.pptContiguous Memory Allocation.ppt
Contiguous Memory Allocation.ppt
 
Allocating Kernel Memory.pptx
Allocating Kernel Memory.pptxAllocating Kernel Memory.pptx
Allocating Kernel Memory.pptx
 
Deadlock Detection.pptx
Deadlock Detection.pptxDeadlock Detection.pptx
Deadlock Detection.pptx
 
Deadlock Prevention.pptx
Deadlock Prevention.pptxDeadlock Prevention.pptx
Deadlock Prevention.pptx
 
Frame detection.pdf
Frame detection.pdfFrame detection.pdf
Frame detection.pdf
 
Deadlock Backgroud.pptx
Deadlock Backgroud.pptxDeadlock Backgroud.pptx
Deadlock Backgroud.pptx
 
5G Hackathon - Brainstorming Session.pptx
5G Hackathon - Brainstorming Session.pptx5G Hackathon - Brainstorming Session.pptx
5G Hackathon - Brainstorming Session.pptx
 
LNA.ppt
LNA.pptLNA.ppt
LNA.ppt
 
Lecture 4.pptx
Lecture 4.pptxLecture 4.pptx
Lecture 4.pptx
 
System Calls.ppt
System Calls.pptSystem Calls.ppt
System Calls.ppt
 
Lec 6 OS structure and Operations.ppt
Lec 6 OS structure and Operations.pptLec 6 OS structure and Operations.ppt
Lec 6 OS structure and Operations.ppt
 
Lecture-2 Signal-Spectra-Modulation.pptx
Lecture-2 Signal-Spectra-Modulation.pptxLecture-2 Signal-Spectra-Modulation.pptx
Lecture-2 Signal-Spectra-Modulation.pptx
 
Noise in AM systems.ppt
Noise in AM systems.pptNoise in AM systems.ppt
Noise in AM systems.ppt
 
Lecture 22 Threshold effects in FM.pptx
Lecture 22 Threshold effects in FM.pptxLecture 22 Threshold effects in FM.pptx
Lecture 22 Threshold effects in FM.pptx
 

Recently uploaded

latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answersdalebeck957
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfstareducators107
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17Celine George
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactisticshameyhk98
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 

Recently uploaded (20)

latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 

cs-intro-os.ppt

  • 1. Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings
  • 3. What is an Operating System • It is an extended, or virtual, machine – provides a simple, high-level abstraction, i.e., hides the “messy details” which must be performed – presents user with a virtual machine, easier to use – provides services; programs obtain these by system calls • It is a resource manager – provides orderly and controlled allocation for programs in terms of time and space, multiplexing
  • 4. Services Provided by the OS • Process creation • Program execution • Access to I/O devices • Controlled access to resources, e.g. files • System access • Error detection and response • Accounting
  • 5. Operating System • Functions the same way as ordinary computer software – It is a program that is executed, but with extra privileges • Kernel: Portion of operating system that is in main memory – Contains most frequently used functions – Also called the nucleus
  • 6. Evolution of Operating Systems • Serial processing – No operating system – Machines run from a console with display lights (error messages), input device (punch card, tape) and printer (for output) – Setup included loading and compiling the program, and loading and linking common functions – very time consuming (errors!)
  • 7. Simple Batch Systems • Resident Monitor program: scheduling, privileged operations • Users submit jobs to operator • Operator batches jobs • Monitor controls sequence of events to process batch • When one job is finished, control returns to Monitor which reads next job • Monitor handles scheduling (e.g. FIFO, SJF)
  • 8. OS Features • Memory protection – Do not allow the memory area containing the monitor to be altered by user program • Timer – Prevents a job from monopolizing the system (when allocated time is up, job is stopped) • Privileged instructions – Certain machine level instructions (e.g. I/O) can only be executed by the monitor – kernel or supervisor mode vs. user mode
  • 10. Uniprogramming • Processor must wait for I/O instruction to complete before preceding
  • 11. Multiprogramming • Processor has more than one program to execute • The sequence in which the programs are executed depends on their relative priority and whether they are waiting for I/O • After an interrupt handler completes, control may not return to the program that was executing at the time of the interrupt
  • 14.
  • 15. Time Sharing Systems • Using multiprogramming to handle multiple interactive jobs • Processor’s time is shared among multiple users • Multiple users simultaneously access the system through terminals
  • 16. Major OS Concepts • Process • Memory management • Information protection and security • Scheduling and resource management • System structure
  • 17. Process • A program in execution • An instance of a program running on a computer • The entity that can be assigned to and executed on a processor • A unit of activity characterized by – A single sequential thread of execution – A current state – An associated set of system resources: memory image, open files, locks, etc.
  • 19. Memory • Typical memory hierarchy (numbers shown on the right are a bit out-dated)
  • 20. Memory Management • Process isolation • Automatic allocation and management • Support of modular programming • Protection and access control • Long-term storage
  • 21. Process – memory image • Consists of three components, segments – An executable program – code segment – Associated data needed by the program – data segment – Execution context of the program • All information the operating system needs to manage the process – process table entry (state, priority, accounting), stack (entered subprocedures, value of PC in suspended mode)
  • 22.
  • 23. One base-limit pair and two base-limit pairs
  • 24. Virtual Memory • Problems with large programs, growing segments, fragmentation • Addressing memory from a logical point of view • Implementation is by the system – transparent to the programmer
  • 25. Paging • Allows process to be comprised of a number of fixed-size blocks, called pages. Pages are stored in secondary memory (hard disk) • Each page may be loaded into main memory – page frame (may be located anywhere in main memory)
  • 27. Addresses • Virtual or logical address is a page number and an offset within the page --- usually this is generated by the CPU • Real or physical address (in main memory) has to be computed --- this is a page frame number and an offset
  • 28. Page Table • The map between main memory (page frames) and secondary memory (pages) is described in the page tables. • Pages in main memory have a corresponding page frame number --- this is stored in a page table entry in the page table • Some pages may not have corresponding page frames --- page fault (data has to be loaded from secondary memory)
  • 30. Information Protection and Security • Availability – Protecting the system against interruption • Confidentiality (access control) – Assuring that users cannot read data for which access is unauthorized • Data integrity (access control) – Protection of data from unauthorized modification • Authenticity (login) – Proper verification of the identity of users and the validity of messages or data
  • 31. Scheduling and Resource Management • Fairness – Give equal and fair access to resources • Differential responsiveness – Discriminate among different classes of jobs • Efficiency – Maximize throughput, minimize response or turnaround time, and accommodate as many users as possible
  • 32.
  • 33. System Calls • Interface between OS and user programs (to perform privileged operations) • Machine dependent, but can be invoked by standard procedure libraries
  • 34.
  • 35. 11 steps in making read (fd, buffer, nbytes)
  • 36. System Structure • Hierarchical structure: – View the system as a series of levels – Each level performs a related subset of functions – Each level relies on the next lower level to perform more primitive functions • Modular structure: – Different functions carried out by different modules – Communication between the modules
  • 37. Monolithic System Simple structuring model for a monolithic system
  • 38. Layered System • Structure of the THE operating system • MULTICS - concentric rings
  • 39. Machine Level • Level 1 – Objects are registers, memory cells, and logic gates; Operations are clearing a register or reading a memory location • Level 2 – Processor’s instruction set; Operations such as add, subtract, load, and store • Level 3 – Procedure or subroutine, call/return operation • Level 4 – Interrupts
  • 40. Concepts with Multiprogramming • Level 5 – Process as a program in execution – Suspend and resume processes • Level 6 – Secondary storage devices – Transfer of blocks of data • Level 7 – Creates logical address space for processes – Organizes virtual address space into blocks
  • 41. Deal with External Objects • Level 8 – Communication of information and messages between processes (pipe) • Level 9 – Supports long-term storage of named files • Level 10 – Provides access to external devices using standardized interfaces
  • 42. Deal with External Objects • Level 11 – Responsible for maintaining the association between the external (abstract) and internal identifiers, plus access rights • Level 12 – Provides full-featured facility for the support of processes (address space, resources, etc.) • Level 13 – Provides an interface to the OS for the user
  • 43. Microkernel architecture Assigns only a few essential functions to the kernel • Address spaces • Interprocess communication (IPC) • Basic scheduling • Client-server model
  • 44. Distributed operating systems The client-server model in a distributed system
  • 45. Latest Achievements 1 • Multithreading – Process is divided into threads that can run concurrently • Thread – Dispatchable unit of work – Executes sequentially and is interruptable • Process is a collection of one or more threads, which share resources
  • 46. Latest Achievements 2 • Symmetric multiprocessing (SMP) – There are multiple processors – These processors share same main memory and I/O facilities – All processors can perform the same functions – Scheduling! – Cache coherency!
  • 47.
  • 48. Windows Architecture • Modular structure for flexibility • Executes on a variety of hardware platforms • Started with microkernel … and then grew and grew
  • 49.
  • 50. Client/Server Model • Simplifies the Executive – Possible to construct a variety of application programs • Improves reliability – Each server runs outside the kernel, protected from other servers • Provides a uniform means for applications to communicate via RPCs • Provides base for distributed computing (support for SMP)
  • 51. Kernel-Mode Components (1) • Kernel – Consists of the most used low level components: scheduling, process switching, interrupt handling • Hardware abstraction layer (HAL) – Isolates the operating system from platform- specific hardware differences – portability – DMA, bus, interrupts, timer
  • 52. Kernel-Mode Components (2) • Device drivers – Translate user I/O function calls into specific hardware device I/O requests • Windowing and graphics systems – Implements the graphical user interface (GUI)
  • 53. Windows Executive (1) • I/O manager: dispatching device drivers • Cache manager • Object manager: naming, security of objects • Plug and play manager: loading drivers • Power manager
  • 54. Windows Executive (2) • Security reference monitor: enforces access validation • Virtual memory manager: paging, translation between virtual and physical addresses • Process/thread manager • Configuration manager: setting parameters • Local procedure call (LPC) facility: communication between processes
  • 55. UNIX • Monolithic - hardware is surrounded by the operating system software • System V Release 4 (SVR4) • BSD (=> Mac OS) • Solaris 10
  • 56.
  • 57. Linux • Modular structure • Collection of loadable modules: they implement OS functions and execute in kernel mode on behalf of current process – Dynamic linking – Stackable modules: hierarchy between clients and libraries