SlideShare ist ein Scribd-Unternehmen logo
1 von 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.

Weitere ähnliche Inhalte

Was ist angesagt?

Networking in linux
Networking in linuxNetworking in linux
Networking in linuxVarnnit Jain
 
카카오톡의 서버사이드 코틀린
카카오톡의 서버사이드 코틀린카카오톡의 서버사이드 코틀린
카카오톡의 서버사이드 코틀린if kakao
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSKathirvel Ayyaswamy
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file managementKalai Selvi
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Ravindra Raju Kolahalam
 
4.file service architecture
4.file service architecture4.file service architecture
4.file service architectureAbDul ThaYyal
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communicationAbDul ThaYyal
 
Implementation of Pipe in Linux
Implementation of Pipe in LinuxImplementation of Pipe in Linux
Implementation of Pipe in LinuxTushar B Kute
 
Darktrace_Threat_Visualizer_User_Guide.pdf
Darktrace_Threat_Visualizer_User_Guide.pdfDarktrace_Threat_Visualizer_User_Guide.pdf
Darktrace_Threat_Visualizer_User_Guide.pdfLeninHernnCortsLlang
 
Basic Multithreading using Posix Threads
Basic Multithreading using Posix ThreadsBasic Multithreading using Posix Threads
Basic Multithreading using Posix ThreadsTushar B Kute
 
Kafka as Message Broker
Kafka as Message BrokerKafka as Message Broker
Kafka as Message BrokerHaluan Irsad
 

Was ist angesagt? (20)

Networking in linux
Networking in linuxNetworking in linux
Networking in linux
 
Process management
Process managementProcess management
Process management
 
Ipc ppt
Ipc pptIpc ppt
Ipc ppt
 
카카오톡의 서버사이드 코틀린
카카오톡의 서버사이드 코틀린카카오톡의 서버사이드 코틀린
카카오톡의 서버사이드 코틀린
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
Chapter 14 - Protection
Chapter 14 - ProtectionChapter 14 - Protection
Chapter 14 - Protection
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
 
Introduction to OpenMP
Introduction to OpenMPIntroduction to OpenMP
Introduction to OpenMP
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
4.file service architecture
4.file service architecture4.file service architecture
4.file service architecture
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 
Implementation of Pipe in Linux
Implementation of Pipe in LinuxImplementation of Pipe in Linux
Implementation of Pipe in Linux
 
Darktrace_Threat_Visualizer_User_Guide.pdf
Darktrace_Threat_Visualizer_User_Guide.pdfDarktrace_Threat_Visualizer_User_Guide.pdf
Darktrace_Threat_Visualizer_User_Guide.pdf
 
6.Distributed Operating Systems
6.Distributed Operating Systems6.Distributed Operating Systems
6.Distributed Operating Systems
 
IPC
IPCIPC
IPC
 
Group policy objects
Group policy objectsGroup policy objects
Group policy objects
 
Basic Multithreading using Posix Threads
Basic Multithreading using Posix ThreadsBasic Multithreading using Posix Threads
Basic Multithreading using Posix Threads
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
 
Exception handling
Exception handlingException handling
Exception handling
 
Kafka as Message Broker
Kafka as Message BrokerKafka as Message Broker
Kafka as Message Broker
 

Andere mochten auch

IPC mechanisms in windows
IPC mechanisms in windowsIPC mechanisms in windows
IPC mechanisms in windowsVinoth Raj
 
Apple continuity
Apple continuityApple continuity
Apple continuityHEM DUTT
 
Linux Ubuntu
Linux UbuntuLinux Ubuntu
Linux Ubuntualxhndz
 
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
 
Interprocess Communication
Interprocess CommunicationInterprocess Communication
Interprocess CommunicationDeepak H L
 
Inter process communication
Inter process communicationInter process communication
Inter process communicationMohd Tousif
 
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
 

Andere mochten auch (13)

IPC mechanisms in windows
IPC mechanisms in windowsIPC mechanisms in windows
IPC mechanisms in windows
 
Apple continuity
Apple continuityApple continuity
Apple continuity
 
Linux Ubuntu
Linux UbuntuLinux Ubuntu
Linux Ubuntu
 
Ipc in linux
Ipc in linuxIpc in linux
Ipc in linux
 
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
 
Interprocess Communication
Interprocess CommunicationInterprocess Communication
Interprocess Communication
 
Inter process communication
Inter process communicationInter process communication
Inter process 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)
 

Ähnlich wie 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
 

Ähnlich wie 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)
 

Kürzlich hochgeladen

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
%+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
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
%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
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...chiefasafspells
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 

Kürzlich hochgeladen (20)

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%+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...
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%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
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 

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.