10/28/2005 Trn Hnh Nhi 1
BAØI GING 3 : LIEÂN LAÏC GIÖÕA CAÙC TIEÁN TRÌNH
CÔ CHE
CÔ CHEÁÁ?
?
VA
VAÁÁN
N Ñ
ÑE
EÀÀ?
?
TRAO
TRAO Ñ
ÑO
OÅÅI THOÂNG TIN GI
I THOÂNG TIN GIÖ
ÖÕA CA
ÕA CAÙÙC TIE
C TIEÁÁN TRÌNH
N TRÌNH
G
GÆ
ÆAI PHA
AI PHAÙÙP ?
P ?
10/28/2005 Trn Hnh Nhi 2
NhuCaàuLieânLaïc
Q
L
P
Chia seû thoâng tin
R
Phoái hôïp xöû lyù
P
JOB
R1
R2
L
Q
10/28/2005 Trn Hnh Nhi 3
Caùc cheá lieân laïc
Chia seû taøi nguyeân chung
Signal
Pipe
Shared Memory
Trao ñoåi thoâng ñieäp
Message
Socket
10/28/2005 Trn Hnh Nhi 4
IPC theo nguyeân taéc chia seû taøi nguyeân chung
User Process User Process
OS - Kernel
shared
resources
Caùc tieán trình chia seû
Memory
File System Space
Communication Facilities, Common communication protocol
10/28/2005 Trn Hnh Nhi 5
Signal
Signal
Meaning
Handler
Ñònh nghóa tröôùc khi thöïc hieän lieân laïc
SIGINT, SIGSTOP…
SIGUSR1, SIGUSER2
Hoã trôï lieân laïc
Kernel vôùi User Process
Process Error
Timer
Child Process keát thuùc…
User process vôí nhau
Terminate Process
Suspend, Resume…
OS
Process
Signal handler
Signal Action
Signal