SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
Processes
Based on Tanenbaum, Modern Operating Systems 3 e 2
Processes
Platform Technologies
Processes
Based on Tanenbaum, Modern Operating Systems 3 e 3
• A process is an abstraction of a running program
• It enables doing several things at the same time
• support the ability to have (pseudo) concurrent operation
• Ex. consider a user PC ??
• In a multiprogramming system, the CPU switches from process to
process quickly, running each for tens or hundreds of milliseconds
Based on Tanenbaum, Modern Operating Systems 3 e 4
Process and Program
• A process is an activity of some
kind
• A program is something that
may be stored on disk, not doing
anything
• Ex: baking vs. recipe
Based on Tanenbaum, Modern Operating Systems 3 e 5
The Process Model
• All the runnable software on the computer, sometimes including the
operating system, is organized into a number of sequential processes
• To understand the system, it is much easier to think about a collection
of processes running in (pseudo) parallel
• This rapid switching back and forth is called multiprogramming
Based on Tanenbaum, Modern Operating Systems 3 e 6
The Process Model
a) Multiprogramming four programs.
b) Conceptual model of four independent, sequential processes.
c) Only one program is active at once.
(we assume there is only one CPU, simpler to understand)
Based on Tanenbaum, Modern Operating Systems 3 e 7
Process Creation
• Events which cause processes creation:
1. System initialization.
2. Execution of a process creation system call by a running process.
3. A user request to create a new process.
4. Initiation of a batch job.
• In all these cases, a new process is created by having an existing
process execute a process creation system call.
Based on Tanenbaum, Modern Operating Systems 3 e 8
Process
Termination
• Events which cause process termination:
1. Normal exit (voluntary).
2. Error exit (voluntary).
3. Fatal error (involuntary).
4. Killed by another process (involuntary).
Based on Tanenbaum, Modern Operating Systems 3 e 9
Process States
• Three states a process may be in:
1. Running (actually using the CPU at that instant).
2. Ready (runnable; temporarily stopped to let another process run).
3. Blocked (unable to run until some external event happens).
Based on Tanenbaum, Modern Operating Systems 3 e 10
Implementation of
Processes
• The lowest layer of a process-structured operating system handles
interrupts and scheduling.
• Above that layer are sequential processes.
Based on Tanenbaum, Modern Operating Systems 3 e 11
Process Table
• One entry per process
• Contains important information
about the process’ state
• Information that must be saved
when the process is switched
from running to ready or blocked
state so that it can be restarted
later
Based on Tanenbaum, Modern Operating Systems 3 e 12
Interrupt Handling and
Scheduling
• Skeleton of what the lowest level of the operating system does when
an interrupt occurs.
Based on Tanenbaum, Modern Operating Systems 3 e 13
Modelling
Multiprogramming
• CPU utilization as a function of the number of processes in memory.
Based on Tanenbaum, Modern Operating Systems 3 e 14
Threads
• In many applications, multiple activities are going on at once
• Threads give the ability for the parallel entities to share an address
space and all of its data
• not possible with multiple processes (with their separate address spaces)
• Threads are lighter weight than processes, so they are easier (i.e.,
faster) to create and destroy
• Threads allow computing and IO activities to overlap
Based on Tanenbaum, Modern Operating Systems 3 e 15
Thread Usage - A Word
Processor
• First thread interacts with the user.
• Second thread handles reformatting in the background.
• Third thread handles the disk backups.
Based on Tanenbaum, Modern Operating Systems 3 e 16
Thread Usage - A Multithreaded Web
Server
• The dispatcher reads incoming requests for work from the
network and chooses an idle (i.e., blocked) worker thread to
hand the request
Based on Tanenbaum, Modern Operating Systems 3 e 17
The Classical Thread Model
• Multithreading is the situation of allowing multiple threads in the
same process
(a) Three processes each with one thread. (b) One process with three threads.
Based on Tanenbaum, Modern Operating Systems 3 e 18
The Classical Thread Model
• The first column lists some items shared by all threads in a process.
• The second one lists some items private to each thread.
Based on Tanenbaum, Modern Operating Systems 3 e 19
Advantages of Thread over
Process
• Responsiveness:
• If the process is divided into multiple threads, one thread can complete its
execution and its output can be immediately returned.
• Faster context switch:
• Context switch time between threads is lower compared to process context
switch. Process context switching needs more CPU overhead.
• Effective utilization of multiprocessor system:
• If we have multiple threads in a single process, then we can schedule multiple
threads on multiple processor.
Based on Tanenbaum, Modern Operating Systems 3 e 20
Advantages of Thread over
Process
• Resource sharing:
• Resources like code, data, and files can be shared among all threads within a
process. (Stack and registers can’t be shared)
• Communication:
• Communication between multiple threads is easier, as the threads shares
common address space. while in process we have to follow some specific
communication technique for communication between two process.
• Enhanced throughput of the system:
• If a process is divided into multiple threads, and each thread function is
considered as one job, then the number of jobs completed per unit of time is
increased, thus increasing the throughput of the system.
Based on Tanenbaum, Modern Operating Systems 3 e 21
Inter-process Communication
(IPC)
• Processes frequently need to
communicate with other
processes:
• To pass information from process
to another
• To enable proper sequencing
when dependencies are present
• To ensure that no two processes
are ever in their critical regions at
the same time.
• Mechanisms for IPC:
• Atomic read/write
• Locks
• Semaphores
• Monitors
• Message Passing
Based on Tanenbaum, Modern Operating Systems 3 e 22
Race Conditions
• Two or more processes are
reading or writing some shared
data and the final result depends
on who runs precisely when
• Ex. two processes want to access
the printer spooler directory at
the same time
Based on Tanenbaum, Modern Operating Systems 3 e 23
Conditions Required to Avoid Race
Condition
1. No two processes may be simultaneously inside their critical regions.
– Mutual Exclusion (mutex)
2. No assumptions may be made about speeds or the number of CPUs.
– No Assumption
3. No process running outside its critical region may block other processes.
– Progress
4. No process should have to wait forever to enter its critical region.
– No Starvation
Based on Tanenbaum, Modern Operating Systems 3 e 24
Mutual Exclusion using Critical
Regions
• Critical region – the part of the program where shared variables are
accessed
Based on Tanenbaum, Modern Operating Systems 3 e 25
Mutual Exclusion with Busy
Waiting
• Disabling interrupts
• Each process disables all interrupts just after entering its critical region and
re-enable them just before leaving it
• In a multicore (i.e., multiprocessor system) disabling the interrupts of one
CPU does not prevent other CPUs from interfering with operations the first
CPU is performing
• Lock variables
• A single, shared (lock) variable, process sets it to 1 and enters the critical
region. If the lock is already 1, the process just waits until it becomes 0.
• Has the same fatal flaw that we saw in the spooler directory.
Based on Tanenbaum, Modern Operating Systems 3 e 26
Mutual Exclusion with Busy
Waiting
• Strict alternation
• two processes strictly alternate in entering their critical regions
• it is not really a serious candidate as a solution because it violates condition 3
• Peterson's solution
• The TSL instruction
Classical IPC Problems
Based on Tanenbaum, Modern Operating Systems 3 e 29
• Producer–consumer problem
• Models access to a bounded-
buffer
• Producer won't try to add data
into the buffer if it's full
• Consumer won't try to remove
data from an empty buffer
Classical IPC Problems
Based on Tanenbaum, Modern Operating Systems 3 e 30
• Dining philosophers problem
(Dijkstra)
• Models processes competing for
exclusive access to a limited
number of resources such as I/O
devices
Classical IPC Problems
Based on Tanenbaum, Modern Operating Systems 3 e 31
• Readers–writers problem
• Models access to a database
• Two readers can read at once
• A writer should not wait longer
than needed
• Fairness for both readers and
writers
Based on Tanenbaum, Modern Operating Systems 3 e 32

Contenu connexe

Tendances

Linux operating system
Linux operating systemLinux operating system
Linux operating systemITz_1
 
panahon ng pagkamulat
panahon ng pagkamulatpanahon ng pagkamulat
panahon ng pagkamulatshekainalea
 
introduction to system administration
introduction to system administrationintroduction to system administration
introduction to system administrationgamme123
 
Operating Systems: History of Windows
Operating Systems: History of WindowsOperating Systems: History of Windows
Operating Systems: History of WindowsDamian T. Gordon
 
How to create windows 10 bootable usb drive from iso using Command Prompt
How to create windows 10 bootable usb drive from iso using Command PromptHow to create windows 10 bootable usb drive from iso using Command Prompt
How to create windows 10 bootable usb drive from iso using Command PromptViney Dhiman
 
17. Computer System Configuration And Methods
17. Computer System   Configuration And Methods17. Computer System   Configuration And Methods
17. Computer System Configuration And MethodsNew Era University
 
Panitikan sa Panahon ng Kastila
Panitikan sa Panahon ng KastilaPanitikan sa Panahon ng Kastila
Panitikan sa Panahon ng KastilaMerland Mabait
 
Computer specifications
Computer specificationsComputer specifications
Computer specificationsLeonel Rivas
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architecturejeetesh036
 
Fundamentals of information technology
Fundamentals       of          information   technologyFundamentals       of          information   technology
Fundamentals of information technologyhaider ali
 
Computer maintenance 1 lesson 1
Computer maintenance 1 lesson 1Computer maintenance 1 lesson 1
Computer maintenance 1 lesson 1abbas mohd
 
User administration concepts and mechanisms
User administration concepts and mechanismsUser administration concepts and mechanisms
User administration concepts and mechanismsDuressa Teshome
 
Server configuration
Server configurationServer configuration
Server configurationAisha Talat
 
A History of Microsoft Windows
A History of Microsoft WindowsA History of Microsoft Windows
A History of Microsoft WindowsDamian T. Gordon
 
1-LESSON-SOCIAL AND PROFESSIONAL ISSUES.pptx
1-LESSON-SOCIAL AND PROFESSIONAL ISSUES.pptx1-LESSON-SOCIAL AND PROFESSIONAL ISSUES.pptx
1-LESSON-SOCIAL AND PROFESSIONAL ISSUES.pptxMarvenParay
 

Tendances (20)

Linux operating system
Linux operating systemLinux operating system
Linux operating system
 
panahon ng pagkamulat
panahon ng pagkamulatpanahon ng pagkamulat
panahon ng pagkamulat
 
Basic Troubleshooting
Basic TroubleshootingBasic Troubleshooting
Basic Troubleshooting
 
Network operating system
Network operating systemNetwork operating system
Network operating system
 
introduction to system administration
introduction to system administrationintroduction to system administration
introduction to system administration
 
Operating Systems: History of Windows
Operating Systems: History of WindowsOperating Systems: History of Windows
Operating Systems: History of Windows
 
How to create windows 10 bootable usb drive from iso using Command Prompt
How to create windows 10 bootable usb drive from iso using Command PromptHow to create windows 10 bootable usb drive from iso using Command Prompt
How to create windows 10 bootable usb drive from iso using Command Prompt
 
17. Computer System Configuration And Methods
17. Computer System   Configuration And Methods17. Computer System   Configuration And Methods
17. Computer System Configuration And Methods
 
Word Lesson 1: Word Basics
Word Lesson 1: Word BasicsWord Lesson 1: Word Basics
Word Lesson 1: Word Basics
 
Panitikan sa Panahon ng Kastila
Panitikan sa Panahon ng KastilaPanitikan sa Panahon ng Kastila
Panitikan sa Panahon ng Kastila
 
Computer specifications
Computer specificationsComputer specifications
Computer specifications
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architecture
 
Fundamentals of information technology
Fundamentals       of          information   technologyFundamentals       of          information   technology
Fundamentals of information technology
 
Computer maintenance 1 lesson 1
Computer maintenance 1 lesson 1Computer maintenance 1 lesson 1
Computer maintenance 1 lesson 1
 
Presentation (sharing folder)
Presentation (sharing folder)Presentation (sharing folder)
Presentation (sharing folder)
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
User administration concepts and mechanisms
User administration concepts and mechanismsUser administration concepts and mechanisms
User administration concepts and mechanisms
 
Server configuration
Server configurationServer configuration
Server configuration
 
A History of Microsoft Windows
A History of Microsoft WindowsA History of Microsoft Windows
A History of Microsoft Windows
 
1-LESSON-SOCIAL AND PROFESSIONAL ISSUES.pptx
1-LESSON-SOCIAL AND PROFESSIONAL ISSUES.pptx1-LESSON-SOCIAL AND PROFESSIONAL ISSUES.pptx
1-LESSON-SOCIAL AND PROFESSIONAL ISSUES.pptx
 

Similaire à Platform Technology (2).pdf

Operating system
Operating systemOperating system
Operating systemyogitamore3
 
Chapter -2 operating system presentation
Chapter -2 operating system presentationChapter -2 operating system presentation
Chapter -2 operating system presentationchnrketan
 
How Operating system works.
How Operating system works. How Operating system works.
How Operating system works. Fahad Farooq
 
Processes, Threads and Scheduler
Processes, Threads and SchedulerProcesses, Threads and Scheduler
Processes, Threads and SchedulerMunazza-Mah-Jabeen
 
Synchronization
SynchronizationSynchronization
SynchronizationSara shall
 
Operating Systems PPT 1 (1).pdf
Operating Systems PPT 1 (1).pdfOperating Systems PPT 1 (1).pdf
Operating Systems PPT 1 (1).pdfFahanaAbdulVahab
 
UNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptx
UNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptxUNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptx
UNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptxLeahRachael
 
cs1311lecture25wdl.ppt
cs1311lecture25wdl.pptcs1311lecture25wdl.ppt
cs1311lecture25wdl.pptFannyBellows
 
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...morganjohn3
 
Engg-0505-IT-Operating-Systems-2nd-year.pdf
Engg-0505-IT-Operating-Systems-2nd-year.pdfEngg-0505-IT-Operating-Systems-2nd-year.pdf
Engg-0505-IT-Operating-Systems-2nd-year.pdfnikhil287188
 
Classifications of OS.pptx
Classifications of OS.pptxClassifications of OS.pptx
Classifications of OS.pptxBalamurugan M
 
Insider operating system
Insider   operating systemInsider   operating system
Insider operating systemAditi Saxena
 
03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.ppt03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.pptChABiDRazZaQ
 

Similaire à Platform Technology (2).pdf (20)

Computer Architecture
Computer ArchitectureComputer Architecture
Computer Architecture
 
Operating system
Operating systemOperating system
Operating system
 
Chapter -2 operating system presentation
Chapter -2 operating system presentationChapter -2 operating system presentation
Chapter -2 operating system presentation
 
How Operating system works.
How Operating system works. How Operating system works.
How Operating system works.
 
tan2.ppt
tan2.ppttan2.ppt
tan2.ppt
 
Processes, Threads and Scheduler
Processes, Threads and SchedulerProcesses, Threads and Scheduler
Processes, Threads and Scheduler
 
Synchronization
SynchronizationSynchronization
Synchronization
 
Operating Systems PPT 1 (1).pdf
Operating Systems PPT 1 (1).pdfOperating Systems PPT 1 (1).pdf
Operating Systems PPT 1 (1).pdf
 
Operating System
Operating SystemOperating System
Operating System
 
UNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptx
UNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptxUNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptx
UNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptx
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 
cs1311lecture25wdl.ppt
cs1311lecture25wdl.pptcs1311lecture25wdl.ppt
cs1311lecture25wdl.ppt
 
OS Thr schd.ppt
OS Thr schd.pptOS Thr schd.ppt
OS Thr schd.ppt
 
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
 
Engg-0505-IT-Operating-Systems-2nd-year.pdf
Engg-0505-IT-Operating-Systems-2nd-year.pdfEngg-0505-IT-Operating-Systems-2nd-year.pdf
Engg-0505-IT-Operating-Systems-2nd-year.pdf
 
Classifications of OS.pptx
Classifications of OS.pptxClassifications of OS.pptx
Classifications of OS.pptx
 
Insider operating system
Insider   operating systemInsider   operating system
Insider operating system
 
OS Content.pdf
OS Content.pdfOS Content.pdf
OS Content.pdf
 
03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.ppt03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.ppt
 
vp.pdf
vp.pdfvp.pdf
vp.pdf
 

Plus de FranzLawrenzDeTorres1

Plus de FranzLawrenzDeTorres1 (20)

enterprisearchitectureppt-181203183218.pdf
enterprisearchitectureppt-181203183218.pdfenterprisearchitectureppt-181203183218.pdf
enterprisearchitectureppt-181203183218.pdf
 
finaldemo-ict10-180801142047.pdf
finaldemo-ict10-180801142047.pdffinaldemo-ict10-180801142047.pdf
finaldemo-ict10-180801142047.pdf
 
functionsandformulas-131221213835-phpapp01.pdf
functionsandformulas-131221213835-phpapp01.pdffunctionsandformulas-131221213835-phpapp01.pdf
functionsandformulas-131221213835-phpapp01.pdf
 
ER-and-EE-Lesson-1.pdf
ER-and-EE-Lesson-1.pdfER-and-EE-Lesson-1.pdf
ER-and-EE-Lesson-1.pdf
 
JDVP-Parents-Orientation.pptx
JDVP-Parents-Orientation.pptxJDVP-Parents-Orientation.pptx
JDVP-Parents-Orientation.pptx
 
Evolution of System.pptx
Evolution of System.pptxEvolution of System.pptx
Evolution of System.pptx
 
ICTConcepts.ppt
ICTConcepts.pptICTConcepts.ppt
ICTConcepts.ppt
 
animated-meeting-agenda-toolbox.pptx
animated-meeting-agenda-toolbox.pptxanimated-meeting-agenda-toolbox.pptx
animated-meeting-agenda-toolbox.pptx
 
SIA LESSON.pptx
SIA LESSON.pptxSIA LESSON.pptx
SIA LESSON.pptx
 
LESSON_8_1_NETWORK_CABLE.pptx
LESSON_8_1_NETWORK_CABLE.pptxLESSON_8_1_NETWORK_CABLE.pptx
LESSON_8_1_NETWORK_CABLE.pptx
 
English-10.pptx
English-10.pptxEnglish-10.pptx
English-10.pptx
 
personal-relationships11.ppsx
personal-relationships11.ppsxpersonal-relationships11.ppsx
personal-relationships11.ppsx
 
Ch02.ppt
Ch02.pptCh02.ppt
Ch02.ppt
 
chapter01-160621234231.pptx
chapter01-160621234231.pptxchapter01-160621234231.pptx
chapter01-160621234231.pptx
 
bahagingfeasib-180917140000.pptx
bahagingfeasib-180917140000.pptxbahagingfeasib-180917140000.pptx
bahagingfeasib-180917140000.pptx
 
THE CONDOM.pptx
THE CONDOM.pptxTHE CONDOM.pptx
THE CONDOM.pptx
 
INTRODUCTION TO MANAGEMENT SCIENCE.pptx
INTRODUCTION TO MANAGEMENT SCIENCE.pptxINTRODUCTION TO MANAGEMENT SCIENCE.pptx
INTRODUCTION TO MANAGEMENT SCIENCE.pptx
 
trisha pangit.pptx
trisha pangit.pptxtrisha pangit.pptx
trisha pangit.pptx
 
CSS.pptx
CSS.pptxCSS.pptx
CSS.pptx
 
bahagingpananalita-171106104815.pptx
bahagingpananalita-171106104815.pptxbahagingpananalita-171106104815.pptx
bahagingpananalita-171106104815.pptx
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Dernier (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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...
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Platform Technology (2).pdf

  • 1. Processes Based on Tanenbaum, Modern Operating Systems 3 e 2 Processes Platform Technologies
  • 2. Processes Based on Tanenbaum, Modern Operating Systems 3 e 3 • A process is an abstraction of a running program • It enables doing several things at the same time • support the ability to have (pseudo) concurrent operation • Ex. consider a user PC ?? • In a multiprogramming system, the CPU switches from process to process quickly, running each for tens or hundreds of milliseconds
  • 3. Based on Tanenbaum, Modern Operating Systems 3 e 4 Process and Program • A process is an activity of some kind • A program is something that may be stored on disk, not doing anything • Ex: baking vs. recipe
  • 4. Based on Tanenbaum, Modern Operating Systems 3 e 5 The Process Model • All the runnable software on the computer, sometimes including the operating system, is organized into a number of sequential processes • To understand the system, it is much easier to think about a collection of processes running in (pseudo) parallel • This rapid switching back and forth is called multiprogramming
  • 5. Based on Tanenbaum, Modern Operating Systems 3 e 6 The Process Model a) Multiprogramming four programs. b) Conceptual model of four independent, sequential processes. c) Only one program is active at once. (we assume there is only one CPU, simpler to understand)
  • 6. Based on Tanenbaum, Modern Operating Systems 3 e 7 Process Creation • Events which cause processes creation: 1. System initialization. 2. Execution of a process creation system call by a running process. 3. A user request to create a new process. 4. Initiation of a batch job. • In all these cases, a new process is created by having an existing process execute a process creation system call.
  • 7. Based on Tanenbaum, Modern Operating Systems 3 e 8 Process Termination • Events which cause process termination: 1. Normal exit (voluntary). 2. Error exit (voluntary). 3. Fatal error (involuntary). 4. Killed by another process (involuntary).
  • 8. Based on Tanenbaum, Modern Operating Systems 3 e 9 Process States • Three states a process may be in: 1. Running (actually using the CPU at that instant). 2. Ready (runnable; temporarily stopped to let another process run). 3. Blocked (unable to run until some external event happens).
  • 9. Based on Tanenbaum, Modern Operating Systems 3 e 10 Implementation of Processes • The lowest layer of a process-structured operating system handles interrupts and scheduling. • Above that layer are sequential processes.
  • 10. Based on Tanenbaum, Modern Operating Systems 3 e 11 Process Table • One entry per process • Contains important information about the process’ state • Information that must be saved when the process is switched from running to ready or blocked state so that it can be restarted later
  • 11. Based on Tanenbaum, Modern Operating Systems 3 e 12 Interrupt Handling and Scheduling • Skeleton of what the lowest level of the operating system does when an interrupt occurs.
  • 12. Based on Tanenbaum, Modern Operating Systems 3 e 13 Modelling Multiprogramming • CPU utilization as a function of the number of processes in memory.
  • 13. Based on Tanenbaum, Modern Operating Systems 3 e 14 Threads • In many applications, multiple activities are going on at once • Threads give the ability for the parallel entities to share an address space and all of its data • not possible with multiple processes (with their separate address spaces) • Threads are lighter weight than processes, so they are easier (i.e., faster) to create and destroy • Threads allow computing and IO activities to overlap
  • 14. Based on Tanenbaum, Modern Operating Systems 3 e 15 Thread Usage - A Word Processor • First thread interacts with the user. • Second thread handles reformatting in the background. • Third thread handles the disk backups.
  • 15. Based on Tanenbaum, Modern Operating Systems 3 e 16 Thread Usage - A Multithreaded Web Server • The dispatcher reads incoming requests for work from the network and chooses an idle (i.e., blocked) worker thread to hand the request
  • 16. Based on Tanenbaum, Modern Operating Systems 3 e 17 The Classical Thread Model • Multithreading is the situation of allowing multiple threads in the same process (a) Three processes each with one thread. (b) One process with three threads.
  • 17. Based on Tanenbaum, Modern Operating Systems 3 e 18 The Classical Thread Model • The first column lists some items shared by all threads in a process. • The second one lists some items private to each thread.
  • 18. Based on Tanenbaum, Modern Operating Systems 3 e 19 Advantages of Thread over Process • Responsiveness: • If the process is divided into multiple threads, one thread can complete its execution and its output can be immediately returned. • Faster context switch: • Context switch time between threads is lower compared to process context switch. Process context switching needs more CPU overhead. • Effective utilization of multiprocessor system: • If we have multiple threads in a single process, then we can schedule multiple threads on multiple processor.
  • 19. Based on Tanenbaum, Modern Operating Systems 3 e 20 Advantages of Thread over Process • Resource sharing: • Resources like code, data, and files can be shared among all threads within a process. (Stack and registers can’t be shared) • Communication: • Communication between multiple threads is easier, as the threads shares common address space. while in process we have to follow some specific communication technique for communication between two process. • Enhanced throughput of the system: • If a process is divided into multiple threads, and each thread function is considered as one job, then the number of jobs completed per unit of time is increased, thus increasing the throughput of the system.
  • 20. Based on Tanenbaum, Modern Operating Systems 3 e 21 Inter-process Communication (IPC) • Processes frequently need to communicate with other processes: • To pass information from process to another • To enable proper sequencing when dependencies are present • To ensure that no two processes are ever in their critical regions at the same time. • Mechanisms for IPC: • Atomic read/write • Locks • Semaphores • Monitors • Message Passing
  • 21. Based on Tanenbaum, Modern Operating Systems 3 e 22 Race Conditions • Two or more processes are reading or writing some shared data and the final result depends on who runs precisely when • Ex. two processes want to access the printer spooler directory at the same time
  • 22. Based on Tanenbaum, Modern Operating Systems 3 e 23 Conditions Required to Avoid Race Condition 1. No two processes may be simultaneously inside their critical regions. – Mutual Exclusion (mutex) 2. No assumptions may be made about speeds or the number of CPUs. – No Assumption 3. No process running outside its critical region may block other processes. – Progress 4. No process should have to wait forever to enter its critical region. – No Starvation
  • 23. Based on Tanenbaum, Modern Operating Systems 3 e 24 Mutual Exclusion using Critical Regions • Critical region – the part of the program where shared variables are accessed
  • 24. Based on Tanenbaum, Modern Operating Systems 3 e 25 Mutual Exclusion with Busy Waiting • Disabling interrupts • Each process disables all interrupts just after entering its critical region and re-enable them just before leaving it • In a multicore (i.e., multiprocessor system) disabling the interrupts of one CPU does not prevent other CPUs from interfering with operations the first CPU is performing • Lock variables • A single, shared (lock) variable, process sets it to 1 and enters the critical region. If the lock is already 1, the process just waits until it becomes 0. • Has the same fatal flaw that we saw in the spooler directory.
  • 25. Based on Tanenbaum, Modern Operating Systems 3 e 26 Mutual Exclusion with Busy Waiting • Strict alternation • two processes strictly alternate in entering their critical regions • it is not really a serious candidate as a solution because it violates condition 3 • Peterson's solution • The TSL instruction
  • 26. Classical IPC Problems Based on Tanenbaum, Modern Operating Systems 3 e 29 • Producer–consumer problem • Models access to a bounded- buffer • Producer won't try to add data into the buffer if it's full • Consumer won't try to remove data from an empty buffer
  • 27. Classical IPC Problems Based on Tanenbaum, Modern Operating Systems 3 e 30 • Dining philosophers problem (Dijkstra) • Models processes competing for exclusive access to a limited number of resources such as I/O devices
  • 28. Classical IPC Problems Based on Tanenbaum, Modern Operating Systems 3 e 31 • Readers–writers problem • Models access to a database • Two readers can read at once • A writer should not wait longer than needed • Fairness for both readers and writers
  • 29. Based on Tanenbaum, Modern Operating Systems 3 e 32