SlideShare une entreprise Scribd logo
1  sur  10
Inter-Process Communication (IPC) 
on Mac OS X 
Inter-process communication (IPC) can be defined as set of 
techniques used for exchanging data among multiple 
threads in one or more processes. Processes may be 
running on one or more computers connected by a 
network. IPC methods can divided into methods for 
message passing, synchronization, shared memory, and 
remote procedure calls (RPC).
Need for IPC 
Reasons for allowing two processes to communicate with 
each other may be different : 
 Information sharing 
 Computational speedup 
 Modularity 
 Convenience 
 Privilege separation 
Let's look at various techniques for IPC one by one
Shared File 
Most naive solution where multiple processes will share a 
common file. It could be a simple .txt file or a .sqlite 
database. The obvious problems in this method are 
• Clients need to continuously poll to see if server has 
written something in the file. 
• Write problems if multiple processes are trying to write 
to the shared file at the same time.
Shared Memory 
This is another implementation for IPC where a memory 
section is shared between different processes.In other 
words process A writes to this memory and B can read 
from this memory, or vice verse. This is fast and data 
doesn’t have to be copied around. The downside is that it’s 
really difficult to coordinate changes to the shared memory 
area.
Mach Ports 
The fundamental services and primitives of the OS X kernel are based 
on Mach 3.0. Mach 3.0 was originally conceived as a simple, 
extensible, communications microkernel. It is capable of running as a 
stand–alone kernel, with other traditional operating-system services 
such as I/O, file systems, and networking stacks running as user-mode 
servers. 
However, in OS X, Mach is linked with other kernel components into a 
single kernel address space. This is primarily for performance. It is 
much faster to make a direct call between linked components than it is 
to send messages or do remote procedure calls (RPC) between 
separate tasks. This modular structure results in a more robust and 
extensible system than a monolithic kernel would allow, without the 
performance penalty of a pure microkernel. 
The only disadvantage is complexity of implementation and less 
documentation.
Sockets 
While most TCP/IP connections are established over a 
network between two different machines, it is also possible 
to connect two processes running on the same machine 
without ever touching a network using TCP/IP. 
Using TCP/IP sockets for interprocess communication (IPC) 
is not very different from using them for network 
communications. In fact, they can be used in exactly the 
same way.But if the intent is only for local IPC create a 
socket in the AF_UNIX family to get a socket that’s only for 
local communication and uses more flexible addressing 
than TCP/IP allows.
Apple Events 
These are the only IPC mechanism which is universally 
supported by GUI applications on Mac OS X for remote 
control. Operation like opening a telling a application to 
open a file or to quit etc. can be done using these. 
AppleScript is a scripting language built on top of Apple 
Events which can be used using scripting bridge in a Mac 
application.
Distributed Notifications 
A notification center manages the sending and receiving of notifications. 
It notifies all observers of notifications meeting specific criteria. The 
notification information is encapsulated in NSNotification objects. 
Client objects register themselves with the notification center as 
observers of specific notifications posted by other objects. When an 
event occurs, an object posts an appropriate notification to the 
notification center. 
Posting a distributed notification is an expensive operation. The 
notification gets sent to a system wide server that then distributes it to 
all the processes that have objects registered for distributed 
notifications. The latency between posting the notification and the 
notification’s arrival in another process is unbounded. In fact, if too 
many notifications are being posted and the server’s queue fills up, 
notifications can be dropped.
Pasteboard 
Every time a copy-paste happens between applications, 
that’s IPC happening using pasteboard. Inter-application 
drag and drop also uses the pasteboard. It is possible to 
create custom pasteboards which only desired applications 
can access for passing data back and forth between 
applications. 
Like distributed notifications, pasteboard work by talking to a 
central pasteboard server using mach ports.
Distributed Objects 
This mechanism enables a Cocoa application to call an object 
in a different Cocoa application (or a different thread in the 
same application). The applications can even be running 
on different computers on a network. 
Distributed objects operates by having the server make 
public, an object to which other client processes can 
connect. Once a connection is made, the client process 
invokes one of the public object’s methods as if the object 
existed in the client process. 
Distributed Objects normally runs over mach ports but can 
also be used with sockets, allowing it to work between 
computers as well.

Contenu connexe

Tendances

Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communicationAbDul ThaYyal
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer ProtocolUjjayanta Bhaumik
 
SYNCHRONIZATION IN MULTIPROCESSING
SYNCHRONIZATION IN MULTIPROCESSINGSYNCHRONIZATION IN MULTIPROCESSING
SYNCHRONIZATION IN MULTIPROCESSINGAparna Bhadran
 
Inter process communication
Inter process communicationInter process communication
Inter process communicationRJ Mehul Gadhiya
 
Network address translation
Network address translationNetwork address translation
Network address translationVarsha Honde
 
Inter process communication using Linux System Calls
Inter process communication using Linux System CallsInter process communication using Linux System Calls
Inter process communication using Linux System Callsjyoti9vssut
 
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION
OPERATING SYSTEMSDESIGN AND IMPLEMENTATIONOPERATING SYSTEMSDESIGN AND IMPLEMENTATION
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION sathish sak
 
Flynns classification
Flynns classificationFlynns classification
Flynns classificationYasir Khan
 
Introduction to loaders
Introduction to loadersIntroduction to loaders
Introduction to loadersTech_MX
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)Zubair Khalid
 
Transport Layer Security (TLS)
Transport Layer Security (TLS)Transport Layer Security (TLS)
Transport Layer Security (TLS)Arun Shukla
 
Distributed Operating System,Network OS and Middle-ware.??
Distributed Operating System,Network OS and Middle-ware.??Distributed Operating System,Network OS and Middle-ware.??
Distributed Operating System,Network OS and Middle-ware.??Abdul Aslam
 
Linux command ppt
Linux command pptLinux command ppt
Linux command pptkalyanineve
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process CommunicationAdeel Rasheed
 

Tendances (20)

Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer Protocol
 
SYNCHRONIZATION IN MULTIPROCESSING
SYNCHRONIZATION IN MULTIPROCESSINGSYNCHRONIZATION IN MULTIPROCESSING
SYNCHRONIZATION IN MULTIPROCESSING
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
 
Network address translation
Network address translationNetwork address translation
Network address translation
 
Inter process communication using Linux System Calls
Inter process communication using Linux System CallsInter process communication using Linux System Calls
Inter process communication using Linux System Calls
 
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION
OPERATING SYSTEMSDESIGN AND IMPLEMENTATIONOPERATING SYSTEMSDESIGN AND IMPLEMENTATION
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION
 
Flynns classification
Flynns classificationFlynns classification
Flynns classification
 
Introduction to loaders
Introduction to loadersIntroduction to loaders
Introduction to loaders
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)
 
Linker and Loader
Linker and Loader Linker and Loader
Linker and Loader
 
Transport Layer Security (TLS)
Transport Layer Security (TLS)Transport Layer Security (TLS)
Transport Layer Security (TLS)
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
Distributed Operating System,Network OS and Middle-ware.??
Distributed Operating System,Network OS and Middle-ware.??Distributed Operating System,Network OS and Middle-ware.??
Distributed Operating System,Network OS and Middle-ware.??
 
Linux command ppt
Linux command pptLinux command ppt
Linux command ppt
 
Unix case-study
Unix case-studyUnix case-study
Unix case-study
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
Parallel processing and pipelining
Parallel processing and pipeliningParallel processing and pipelining
Parallel processing and pipelining
 
Signal
SignalSignal
Signal
 
Lexical analysis - Compiler Design
Lexical analysis - Compiler DesignLexical analysis - Compiler Design
Lexical analysis - Compiler Design
 

En vedette

IPC mechanisms in windows
IPC mechanisms in windowsIPC mechanisms in windows
IPC mechanisms in windowsVinoth Raj
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Ravindra Raju Kolahalam
 
Apple continuity
Apple continuityApple continuity
Apple continuityHEM DUTT
 
Linux Ubuntu
Linux UbuntuLinux Ubuntu
Linux Ubuntualxhndz
 
Interprocess Communication
Interprocess CommunicationInterprocess Communication
Interprocess CommunicationDeepak H L
 
Evolution of Microsoft windows operating systems
Evolution of Microsoft windows operating systemsEvolution of Microsoft windows operating systems
Evolution of Microsoft windows operating systemsSai praveen Seva
 
BlackHat USA 2011 - Stefan Esser - iOS Kernel Exploitation
BlackHat USA 2011 - Stefan Esser - iOS Kernel ExploitationBlackHat USA 2011 - Stefan Esser - iOS Kernel Exploitation
BlackHat USA 2011 - Stefan Esser - iOS Kernel ExploitationStefan Esser
 
Mac OS(Operating System)
Mac OS(Operating System)Mac OS(Operating System)
Mac OS(Operating System)Faizan Shaikh
 

En vedette (13)

IPC mechanisms in windows
IPC mechanisms in windowsIPC mechanisms in windows
IPC mechanisms in windows
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
Apple continuity
Apple continuityApple continuity
Apple continuity
 
IPC
IPCIPC
IPC
 
Linux Ubuntu
Linux UbuntuLinux Ubuntu
Linux Ubuntu
 
Ipc in linux
Ipc in linuxIpc in linux
Ipc in linux
 
Interprocess Communication
Interprocess CommunicationInterprocess Communication
Interprocess Communication
 
Evolution of Microsoft windows operating systems
Evolution of Microsoft windows operating systemsEvolution of Microsoft windows operating systems
Evolution of Microsoft windows operating systems
 
A History of Mac OS
A History of Mac OSA History of Mac OS
A History of Mac OS
 
BlackHat USA 2011 - Stefan Esser - iOS Kernel Exploitation
BlackHat USA 2011 - Stefan Esser - iOS Kernel ExploitationBlackHat USA 2011 - Stefan Esser - iOS Kernel Exploitation
BlackHat USA 2011 - Stefan Esser - iOS Kernel Exploitation
 
Lokijs
LokijsLokijs
Lokijs
 
Windows 8 ppt
Windows 8 pptWindows 8 ppt
Windows 8 ppt
 
Mac OS(Operating System)
Mac OS(Operating System)Mac OS(Operating System)
Mac OS(Operating System)
 

Similaire à Inter-Process Communication (IPC) techniques on Mac OS X

Inter-Process-Communication (or IPC for short) are mechanisms provid.pdf
Inter-Process-Communication (or IPC for short) are mechanisms provid.pdfInter-Process-Communication (or IPC for short) are mechanisms provid.pdf
Inter-Process-Communication (or IPC for short) are mechanisms provid.pdfaesalem06
 
distributed-systemsfghjjjijoijioj-chap3.pptx
distributed-systemsfghjjjijoijioj-chap3.pptxdistributed-systemsfghjjjijoijioj-chap3.pptx
distributed-systemsfghjjjijoijioj-chap3.pptxlencho3d
 
Driver Programming Report
Driver Programming ReportDriver Programming Report
Driver Programming ReportShivek Khurana
 
Internetworking
InternetworkingInternetworking
InternetworkingRaghu nath
 
parallel programming models
 parallel programming models parallel programming models
parallel programming modelsSwetha S
 
Osi model and tcpip model.
Osi model and tcpip model.Osi model and tcpip model.
Osi model and tcpip model.kona paul
 
Basic concept of networking
Basic concept of networkingBasic concept of networking
Basic concept of networkingbappyiucse
 
DCN notes adi
DCN notes adiDCN notes adi
DCN notes adiAdiseshaK
 
Networking concepts by Sachidananda M H
Networking concepts by Sachidananda M HNetworking concepts by Sachidananda M H
Networking concepts by Sachidananda M HSachidananda M H
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsAya Mahmoud
 
Chapter 1-Introduction.ppt
Chapter 1-Introduction.pptChapter 1-Introduction.ppt
Chapter 1-Introduction.pptbalewayalew
 
Networking Standards ( Osi Layers )
Networking Standards ( Osi Layers )Networking Standards ( Osi Layers )
Networking Standards ( Osi Layers )Renee Jones
 
Computer_Clustering_Technologies
Computer_Clustering_TechnologiesComputer_Clustering_Technologies
Computer_Clustering_TechnologiesManish Chopra
 
7 Layers OSI model description with 3 unofficial Layers.
7 Layers OSI model description with 3 unofficial Layers.7 Layers OSI model description with 3 unofficial Layers.
7 Layers OSI model description with 3 unofficial Layers.Kanishk Raj
 
Chapter 1 introduction
Chapter 1 introductionChapter 1 introduction
Chapter 1 introductionTamrat Amare
 
Cluster computing pptl (2)
Cluster computing pptl (2)Cluster computing pptl (2)
Cluster computing pptl (2)Rohit Jain
 

Similaire à Inter-Process Communication (IPC) techniques on Mac OS X (20)

Inter-Process-Communication (or IPC for short) are mechanisms provid.pdf
Inter-Process-Communication (or IPC for short) are mechanisms provid.pdfInter-Process-Communication (or IPC for short) are mechanisms provid.pdf
Inter-Process-Communication (or IPC for short) are mechanisms provid.pdf
 
distributed-systemsfghjjjijoijioj-chap3.pptx
distributed-systemsfghjjjijoijioj-chap3.pptxdistributed-systemsfghjjjijoijioj-chap3.pptx
distributed-systemsfghjjjijoijioj-chap3.pptx
 
Driver Programming Report
Driver Programming ReportDriver Programming Report
Driver Programming Report
 
Internetworking
InternetworkingInternetworking
Internetworking
 
parallel programming models
 parallel programming models parallel programming models
parallel programming models
 
7 layer OSI model
7 layer OSI model7 layer OSI model
7 layer OSI model
 
OSI Model and TCP/IP Model.
OSI Model and TCP/IP Model.OSI Model and TCP/IP Model.
OSI Model and TCP/IP Model.
 
Osi model and tcpip model.
Osi model and tcpip model.Osi model and tcpip model.
Osi model and tcpip model.
 
Basic concept of networking
Basic concept of networkingBasic concept of networking
Basic concept of networking
 
DCN notes adi
DCN notes adiDCN notes adi
DCN notes adi
 
Networking concepts by Sachidananda M H
Networking concepts by Sachidananda M HNetworking concepts by Sachidananda M H
Networking concepts by Sachidananda M H
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systems
 
Networking concepts
Networking conceptsNetworking concepts
Networking concepts
 
Lesson 7
Lesson 7Lesson 7
Lesson 7
 
Chapter 1-Introduction.ppt
Chapter 1-Introduction.pptChapter 1-Introduction.ppt
Chapter 1-Introduction.ppt
 
Networking Standards ( Osi Layers )
Networking Standards ( Osi Layers )Networking Standards ( Osi Layers )
Networking Standards ( Osi Layers )
 
Computer_Clustering_Technologies
Computer_Clustering_TechnologiesComputer_Clustering_Technologies
Computer_Clustering_Technologies
 
7 Layers OSI model description with 3 unofficial Layers.
7 Layers OSI model description with 3 unofficial Layers.7 Layers OSI model description with 3 unofficial Layers.
7 Layers OSI model description with 3 unofficial Layers.
 
Chapter 1 introduction
Chapter 1 introductionChapter 1 introduction
Chapter 1 introduction
 
Cluster computing pptl (2)
Cluster computing pptl (2)Cluster computing pptl (2)
Cluster computing pptl (2)
 

Dernier

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburgmasabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durbanmasabamasaba
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 

Dernier (20)

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 

Inter-Process Communication (IPC) techniques on Mac OS X

  • 1. Inter-Process Communication (IPC) on Mac OS X Inter-process communication (IPC) can be defined as set of techniques used for exchanging data among multiple threads in one or more processes. Processes may be running on one or more computers connected by a network. IPC methods can divided into methods for message passing, synchronization, shared memory, and remote procedure calls (RPC).
  • 2. Need for IPC Reasons for allowing two processes to communicate with each other may be different :  Information sharing  Computational speedup  Modularity  Convenience  Privilege separation Let's look at various techniques for IPC one by one
  • 3. Shared File Most naive solution where multiple processes will share a common file. It could be a simple .txt file or a .sqlite database. The obvious problems in this method are • Clients need to continuously poll to see if server has written something in the file. • Write problems if multiple processes are trying to write to the shared file at the same time.
  • 4. Shared Memory This is another implementation for IPC where a memory section is shared between different processes.In other words process A writes to this memory and B can read from this memory, or vice verse. This is fast and data doesn’t have to be copied around. The downside is that it’s really difficult to coordinate changes to the shared memory area.
  • 5. Mach Ports The fundamental services and primitives of the OS X kernel are based on Mach 3.0. Mach 3.0 was originally conceived as a simple, extensible, communications microkernel. It is capable of running as a stand–alone kernel, with other traditional operating-system services such as I/O, file systems, and networking stacks running as user-mode servers. However, in OS X, Mach is linked with other kernel components into a single kernel address space. This is primarily for performance. It is much faster to make a direct call between linked components than it is to send messages or do remote procedure calls (RPC) between separate tasks. This modular structure results in a more robust and extensible system than a monolithic kernel would allow, without the performance penalty of a pure microkernel. The only disadvantage is complexity of implementation and less documentation.
  • 6. Sockets While most TCP/IP connections are established over a network between two different machines, it is also possible to connect two processes running on the same machine without ever touching a network using TCP/IP. Using TCP/IP sockets for interprocess communication (IPC) is not very different from using them for network communications. In fact, they can be used in exactly the same way.But if the intent is only for local IPC create a socket in the AF_UNIX family to get a socket that’s only for local communication and uses more flexible addressing than TCP/IP allows.
  • 7. Apple Events These are the only IPC mechanism which is universally supported by GUI applications on Mac OS X for remote control. Operation like opening a telling a application to open a file or to quit etc. can be done using these. AppleScript is a scripting language built on top of Apple Events which can be used using scripting bridge in a Mac application.
  • 8. Distributed Notifications A notification center manages the sending and receiving of notifications. It notifies all observers of notifications meeting specific criteria. The notification information is encapsulated in NSNotification objects. Client objects register themselves with the notification center as observers of specific notifications posted by other objects. When an event occurs, an object posts an appropriate notification to the notification center. Posting a distributed notification is an expensive operation. The notification gets sent to a system wide server that then distributes it to all the processes that have objects registered for distributed notifications. The latency between posting the notification and the notification’s arrival in another process is unbounded. In fact, if too many notifications are being posted and the server’s queue fills up, notifications can be dropped.
  • 9. Pasteboard Every time a copy-paste happens between applications, that’s IPC happening using pasteboard. Inter-application drag and drop also uses the pasteboard. It is possible to create custom pasteboards which only desired applications can access for passing data back and forth between applications. Like distributed notifications, pasteboard work by talking to a central pasteboard server using mach ports.
  • 10. Distributed Objects This mechanism enables a Cocoa application to call an object in a different Cocoa application (or a different thread in the same application). The applications can even be running on different computers on a network. Distributed objects operates by having the server make public, an object to which other client processes can connect. Once a connection is made, the client process invokes one of the public object’s methods as if the object existed in the client process. Distributed Objects normally runs over mach ports but can also be used with sockets, allowing it to work between computers as well.