SlideShare a Scribd company logo
1 of 20
4
(PROCESS)
concurrent)
4.1 Process Concept)
job
user program) task MS-DOS Macintosh
interactive) batch)
jobs process
4.1.1 (The Process)
process)
program counter ( register CPU) ,stack ( , data section
( global)
passive entity)
active entity) program counter
2
4.1.2 (Process State)
- New :
- Running :
(
- Waiting :
- Ready :
- Terminate :
1
Ready)
waiting)
4.1.3 (Process Control Block – PCB)
PCB)
Task Control Block
PCB
- Process State) new , running ,
waiting , ready terminate
- program counter)
- CPU Register) Register
Accumulator Register, Index Register, Stack Pointer
, General-purpose Register , Condition-Code Information
- CPU Scheduling
Information) Priority) , ,
- Memory – Management Information)
base register) limit register)
page tables) segment tables)
- Accounting Information)
, , ,
- I/O Status Information) –
, ,
,
PCB
4.2 Process Scheduling)
multiprogramming
Uniprocessor system) 1
4.2.1 (Scheduling Queue)
Job Queue)
Link List)
Ready Queue)
Pointer) PCB)
PCB
PCB
----
“ ” (Device Queue)
1
“ ” (Queuing Diagram)
2
-
- fork)
-
2
4.2.2 (Schedulers)
Scheduler)
- Long-Term Scheduler)
- Short-Term Scheduler CPU Scheduler)
2-3
10
CPU-Bound Job)
I/O-
bound job)
time-sharing)
Medium-term scheduler)
Degree of
Multiprogramming)
swapping)
Process
mix)
4.2.3 (Context Switch)
register)
Context Switch)
switch
4.3 Operations on Process)
4.3.1 (Process Creation)
Parent Process)
Children Process)
, , ,
---
execute) 2
- concurrent)
-
2
- duplicate)
- load
UNIX Process
Identifier) Integer)
fork
fork
fork
fork
execve
wait
4.3.2 (Process Termination)
exit
output)
wait
abort)
-
-
-
Cascading Termination)
UNIX
exit
wait
UNIX
,
4.4 Cooperating Processes)
independent
processes) cooperation processes)
-
-
1. Information sharing)
shared)
2. Computation Speedup)
CPU
3. Modularity)
1
4. Convenience)
producer – consumer)
Printer driver)
assembly compiler
Loader)
Buffer)
Unbounded-buffer)
Bounded-buffer)
share memory)
share
var n;
type item = … ;
var buffer: array [0..n-1] of item;
in,out: 0..n-1;
- in out 0 in , out 0 n – 1
- Circular array)
- in
- out
in = out in + 1) MOD n = out
repeat
…
produce an item in nextp
…
while (in + 1) mod n = out do no-op; //
buffer[in] := nextp;
in := (in + 1) mod n; //
until false;
nextp local variable)
no-op (No-operation)
nextc
repeat
while in = out do no-op;
nextc := buffer[out];
out := (out + 1) mod n; //
…
consume the item in nextc
…
until false;
n – 1
4.6 Interprocess Communication IPC)
IPC
synchronize) message system)
4.6.1 (Basic Structure)
share variable) IPC
2
- send (message)
- receive (message)
p q
communication link
Link
- physical share memory) , hardware bus
network)
- logical logical properties)
implement) link
- link
- link 2
- link
- link link
- link
variable-size) fixed-sized)
- Link unidirectional) bidirectional)
unidirectional link
link logical
-
- symmetric asymmetric
- explicit)
- copy) reference)
- fixed-sized) variable-sized)
4.6.2 (Naming)
4.6.2.1 (Direct Communication)
send (P ,message) P (send to P)
receive (Q, message) Q (receive from Q)
Link
- Link
- Link 1 Link 2
- Link 2
producer-consumer)
repeat
…
produce an item in nextp
…
send (consumer, nextp);
until false;
repeat
receive (producer , nextc);
…
consume the item in nextc
…
until false;
4.6.2.2 (Indirect Communication)
mailboxes) ( port)
unique identification)
2
share mailbox)
Link
- Link
- Link associated)
- link link
1
- Link
P1 , P2 P3 A P1
A P2 P3 A
P1
- link 2
- P2 P3
-
-
-
P A
Q P Q A
4.6.3 (Buffering)
link
Queue) 3
- Zero capacity) 0
link
synchronization) rendezvous
- Bounded capacity) n
n queue)
- Unbounded capacity)
send operation)
P Q
P
send (Q, message);
receive (Q, message);
Q
receive (P, message);
send (P, “acknowledgment”);
P,Q) asynchronous
-
-
Remote Procedure Call –
RPC)
4.6.4 (Exception Condition)
4.6.4.1 (Process Terminates)
terminate)
2
1. P Q
P block
P P Q
2. P Q
automatic-buffering scheme)
P P
Q P Q acknowledgment)
P block 1
P P Q
4.6.4.2 (Lost Messages)
P Q
3
1.
2.
3.
timeout
4.6.4.3 (Scrambled Messages)
Checksum),
parity), CRC
4.6.5 Windows NT
NT multiple) subsystem)
client server NT
NT Local
Procedure Call Facility (LPC)) LPC NT 2
client
2 port) NT
connection port) communication port)
communication channel)
- client
- client
- server 2 client 1
- client server
reply)
NT 3
1. queue) port)
256
2. client section object (share memory)
client channel)
client section
object server
section object section object
pointer section object
3. client server Quick
LPC

More Related Content

What's hot

Making a Process (Virtualizing Memory)
Making a Process (Virtualizing Memory)Making a Process (Virtualizing Memory)
Making a Process (Virtualizing Memory)David Evans
 
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"LogeekNightUkraine
 
Lesson12 recovery architectures
Lesson12 recovery architecturesLesson12 recovery architectures
Lesson12 recovery architecturesRaval Vijay
 
Parallel R in snow (english after 2nd slide)
Parallel R in snow (english after 2nd slide)Parallel R in snow (english after 2nd slide)
Parallel R in snow (english after 2nd slide)Cdiscount
 
InfluxDB IOx Tech Talks: The Impossible Dream: Easy-to-Use, Super Fast Softw...
InfluxDB IOx Tech Talks: The Impossible Dream:  Easy-to-Use, Super Fast Softw...InfluxDB IOx Tech Talks: The Impossible Dream:  Easy-to-Use, Super Fast Softw...
InfluxDB IOx Tech Talks: The Impossible Dream: Easy-to-Use, Super Fast Softw...InfluxData
 
Logging Last Resource Optimization for Distributed Transactions in Oracle…
Logging Last Resource Optimization for Distributed Transactions in  Oracle…Logging Last Resource Optimization for Distributed Transactions in  Oracle…
Logging Last Resource Optimization for Distributed Transactions in Oracle…Gera Shegalov
 
Linux process management
Linux process managementLinux process management
Linux process managementRaghu nath
 
Advance computer architecture
Advance computer architectureAdvance computer architecture
Advance computer architecturesuma1991
 

What's hot (15)

Making a Process (Virtualizing Memory)
Making a Process (Virtualizing Memory)Making a Process (Virtualizing Memory)
Making a Process (Virtualizing Memory)
 
Gur1009
Gur1009Gur1009
Gur1009
 
Cache recap
Cache recapCache recap
Cache recap
 
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
 
Linux memory
Linux memoryLinux memory
Linux memory
 
Recovery system
Recovery systemRecovery system
Recovery system
 
Lesson12 recovery architectures
Lesson12 recovery architecturesLesson12 recovery architectures
Lesson12 recovery architectures
 
Parallel R in snow (english after 2nd slide)
Parallel R in snow (english after 2nd slide)Parallel R in snow (english after 2nd slide)
Parallel R in snow (english after 2nd slide)
 
10 replication
10 replication10 replication
10 replication
 
InfluxDB IOx Tech Talks: The Impossible Dream: Easy-to-Use, Super Fast Softw...
InfluxDB IOx Tech Talks: The Impossible Dream:  Easy-to-Use, Super Fast Softw...InfluxDB IOx Tech Talks: The Impossible Dream:  Easy-to-Use, Super Fast Softw...
InfluxDB IOx Tech Talks: The Impossible Dream: Easy-to-Use, Super Fast Softw...
 
Logging Last Resource Optimization for Distributed Transactions in Oracle…
Logging Last Resource Optimization for Distributed Transactions in  Oracle…Logging Last Resource Optimization for Distributed Transactions in  Oracle…
Logging Last Resource Optimization for Distributed Transactions in Oracle…
 
Multimaster
MultimasterMultimaster
Multimaster
 
Linux process management
Linux process managementLinux process management
Linux process management
 
Spanner osdi2012
Spanner osdi2012Spanner osdi2012
Spanner osdi2012
 
Advance computer architecture
Advance computer architectureAdvance computer architecture
Advance computer architecture
 

Similar to บทที่ 4 กระบวนการ

Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das
Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das
Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das Databricks
 
งานนำเสนอ..
งานนำเสนอ..งานนำเสนอ..
งานนำเสนอ..amphaiboon
 
งานPowerpoint ลูกศร1
งานPowerpoint ลูกศร1งานPowerpoint ลูกศร1
งานPowerpoint ลูกศร1amphaiboon
 
งานPowerpoint ลูกศร1
งานPowerpoint ลูกศร1งานPowerpoint ลูกศร1
งานPowerpoint ลูกศร1amphaiboon
 
เทคโนโลยีสารสนเทศสำหรับครู
เทคโนโลยีสารสนเทศสำหรับครูเทคโนโลยีสารสนเทศสำหรับครู
เทคโนโลยีสารสนเทศสำหรับครูBeauso English
 
Taking Spark Streaming to the Next Level with Datasets and DataFrames
Taking Spark Streaming to the Next Level with Datasets and DataFramesTaking Spark Streaming to the Next Level with Datasets and DataFrames
Taking Spark Streaming to the Next Level with Datasets and DataFramesDatabricks
 
Apache Flink: Better, Faster & Uncut - Piotr Nowojski, data Artisans
Apache Flink: Better, Faster & Uncut - Piotr Nowojski, data ArtisansApache Flink: Better, Faster & Uncut - Piotr Nowojski, data Artisans
Apache Flink: Better, Faster & Uncut - Piotr Nowojski, data ArtisansEvention
 
A Deep Dive into Structured Streaming in Apache Spark
A Deep Dive into Structured Streaming in Apache Spark A Deep Dive into Structured Streaming in Apache Spark
A Deep Dive into Structured Streaming in Apache Spark Anyscale
 
Operating System 3
Operating System 3Operating System 3
Operating System 3tech2click
 
[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4Open Networking Summits
 
What’s new in 9.6, by PostgreSQL contributor
What’s new in 9.6, by PostgreSQL contributorWhat’s new in 9.6, by PostgreSQL contributor
What’s new in 9.6, by PostgreSQL contributorMasahiko Sawada
 
Workshop NGS data analysis - 1
Workshop NGS data analysis - 1Workshop NGS data analysis - 1
Workshop NGS data analysis - 1Maté Ongenaert
 
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiNatural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiDatabricks
 
บทที่ 3 โครงสร้างของระบบปฏิบัติการ
บทที่ 3 โครงสร้างของระบบปฏิบัติการบทที่ 3 โครงสร้างของระบบปฏิบัติการ
บทที่ 3 โครงสร้างของระบบปฏิบัติการChamp Phinning
 
Zenith Networks: Jump Start JUNOS
Zenith Networks: Jump Start JUNOSZenith Networks: Jump Start JUNOS
Zenith Networks: Jump Start JUNOSZenith Networks
 
Performance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro ProcessorPerformance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro ProcessorDileep Bhandarkar
 

Similar to บทที่ 4 กระบวนการ (20)

Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das
Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das
Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das
 
Apache Cassandra at Macys
Apache Cassandra at MacysApache Cassandra at Macys
Apache Cassandra at Macys
 
งานนำเสนอ..
งานนำเสนอ..งานนำเสนอ..
งานนำเสนอ..
 
Dpdk applications
Dpdk applicationsDpdk applications
Dpdk applications
 
งานPowerpoint ลูกศร1
งานPowerpoint ลูกศร1งานPowerpoint ลูกศร1
งานPowerpoint ลูกศร1
 
งานPowerpoint ลูกศร1
งานPowerpoint ลูกศร1งานPowerpoint ลูกศร1
งานPowerpoint ลูกศร1
 
เทคโนโลยีสารสนเทศสำหรับครู
เทคโนโลยีสารสนเทศสำหรับครูเทคโนโลยีสารสนเทศสำหรับครู
เทคโนโลยีสารสนเทศสำหรับครู
 
Taking Spark Streaming to the Next Level with Datasets and DataFrames
Taking Spark Streaming to the Next Level with Datasets and DataFramesTaking Spark Streaming to the Next Level with Datasets and DataFrames
Taking Spark Streaming to the Next Level with Datasets and DataFrames
 
Apache Flink: Better, Faster & Uncut - Piotr Nowojski, data Artisans
Apache Flink: Better, Faster & Uncut - Piotr Nowojski, data ArtisansApache Flink: Better, Faster & Uncut - Piotr Nowojski, data Artisans
Apache Flink: Better, Faster & Uncut - Piotr Nowojski, data Artisans
 
A Deep Dive into Structured Streaming in Apache Spark
A Deep Dive into Structured Streaming in Apache Spark A Deep Dive into Structured Streaming in Apache Spark
A Deep Dive into Structured Streaming in Apache Spark
 
Operating System 3
Operating System 3Operating System 3
Operating System 3
 
[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4
 
4 process
4 process4 process
4 process
 
What’s new in 9.6, by PostgreSQL contributor
What’s new in 9.6, by PostgreSQL contributorWhat’s new in 9.6, by PostgreSQL contributor
What’s new in 9.6, by PostgreSQL contributor
 
Workshop NGS data analysis - 1
Workshop NGS data analysis - 1Workshop NGS data analysis - 1
Workshop NGS data analysis - 1
 
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiNatural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
 
บทที่ 3 โครงสร้างของระบบปฏิบัติการ
บทที่ 3 โครงสร้างของระบบปฏิบัติการบทที่ 3 โครงสร้างของระบบปฏิบัติการ
บทที่ 3 โครงสร้างของระบบปฏิบัติการ
 
Zenith Networks: Jump Start JUNOS
Zenith Networks: Jump Start JUNOSZenith Networks: Jump Start JUNOS
Zenith Networks: Jump Start JUNOS
 
MPI
MPIMPI
MPI
 
Performance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro ProcessorPerformance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro Processor
 

Recently uploaded

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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Recently uploaded (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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

บทที่ 4 กระบวนการ

  • 1. 4 (PROCESS) concurrent) 4.1 Process Concept) job user program) task MS-DOS Macintosh interactive) batch) jobs process 4.1.1 (The Process) process) program counter ( register CPU) ,stack ( , data section ( global) passive entity) active entity) program counter 2
  • 2. 4.1.2 (Process State) - New : - Running : ( - Waiting : - Ready : - Terminate : 1 Ready) waiting) 4.1.3 (Process Control Block – PCB) PCB) Task Control Block
  • 3. PCB - Process State) new , running , waiting , ready terminate - program counter) - CPU Register) Register Accumulator Register, Index Register, Stack Pointer , General-purpose Register , Condition-Code Information
  • 4. - CPU Scheduling Information) Priority) , , - Memory – Management Information) base register) limit register) page tables) segment tables) - Accounting Information) , , , - I/O Status Information) – , , , PCB 4.2 Process Scheduling) multiprogramming
  • 5. Uniprocessor system) 1 4.2.1 (Scheduling Queue) Job Queue) Link List) Ready Queue) Pointer) PCB) PCB PCB ---- “ ” (Device Queue)
  • 6. 1 “ ” (Queuing Diagram) 2
  • 7. - - fork) - 2 4.2.2 (Schedulers) Scheduler) - Long-Term Scheduler) - Short-Term Scheduler CPU Scheduler) 2-3 10
  • 9. Degree of Multiprogramming) swapping) Process mix) 4.2.3 (Context Switch) register) Context Switch) switch 4.3 Operations on Process) 4.3.1 (Process Creation)
  • 10. Parent Process) Children Process) , , , --- execute) 2 - concurrent) - 2 - duplicate) - load UNIX Process Identifier) Integer) fork fork fork fork execve
  • 11. wait 4.3.2 (Process Termination) exit output) wait abort) - - - Cascading Termination) UNIX exit wait UNIX , 4.4 Cooperating Processes) independent processes) cooperation processes)
  • 12. - - 1. Information sharing) shared) 2. Computation Speedup) CPU 3. Modularity) 1 4. Convenience) producer – consumer) Printer driver) assembly compiler Loader)
  • 13. Buffer) Unbounded-buffer) Bounded-buffer) share memory) share var n; type item = … ; var buffer: array [0..n-1] of item; in,out: 0..n-1; - in out 0 in , out 0 n – 1 - Circular array) - in - out in = out in + 1) MOD n = out repeat … produce an item in nextp … while (in + 1) mod n = out do no-op; // buffer[in] := nextp; in := (in + 1) mod n; // until false; nextp local variable)
  • 14. no-op (No-operation) nextc repeat while in = out do no-op; nextc := buffer[out]; out := (out + 1) mod n; // … consume the item in nextc … until false; n – 1 4.6 Interprocess Communication IPC) IPC synchronize) message system) 4.6.1 (Basic Structure) share variable) IPC 2 - send (message) - receive (message) p q communication link Link - physical share memory) , hardware bus network) - logical logical properties) implement) link - link
  • 15. - link 2 - link - link link - link variable-size) fixed-sized) - Link unidirectional) bidirectional) unidirectional link link logical - - symmetric asymmetric - explicit) - copy) reference) - fixed-sized) variable-sized) 4.6.2 (Naming) 4.6.2.1 (Direct Communication) send (P ,message) P (send to P) receive (Q, message) Q (receive from Q) Link - Link - Link 1 Link 2 - Link 2 producer-consumer) repeat …
  • 16. produce an item in nextp … send (consumer, nextp); until false; repeat receive (producer , nextc); … consume the item in nextc … until false; 4.6.2.2 (Indirect Communication) mailboxes) ( port) unique identification) 2 share mailbox) Link - Link - Link associated) - link link 1 - Link P1 , P2 P3 A P1 A P2 P3 A P1 - link 2 - P2 P3 -
  • 17. - - P A Q P Q A 4.6.3 (Buffering) link Queue) 3 - Zero capacity) 0 link synchronization) rendezvous - Bounded capacity) n n queue) - Unbounded capacity) send operation) P Q P send (Q, message); receive (Q, message); Q receive (P, message); send (P, “acknowledgment”); P,Q) asynchronous
  • 18. - - Remote Procedure Call – RPC) 4.6.4 (Exception Condition) 4.6.4.1 (Process Terminates) terminate) 2 1. P Q P block P P Q 2. P Q automatic-buffering scheme) P P Q P Q acknowledgment) P block 1 P P Q 4.6.4.2 (Lost Messages) P Q 3 1. 2. 3.
  • 19. timeout 4.6.4.3 (Scrambled Messages) Checksum), parity), CRC 4.6.5 Windows NT NT multiple) subsystem) client server NT NT Local Procedure Call Facility (LPC)) LPC NT 2 client 2 port) NT connection port) communication port) communication channel) - client - client - server 2 client 1 - client server reply) NT 3 1. queue) port) 256 2. client section object (share memory)
  • 20. client channel) client section object server section object section object pointer section object 3. client server Quick LPC