SlideShare a Scribd company logo
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.

More Related Content

What's hot

Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Ravindra Raju Kolahalam
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
Adeel Rasheed
 
Tcp IP Model
Tcp IP ModelTcp IP Model
Tcp IP Model
Ankur Kumar
 
The constrained application protocol (CoAP)
The constrained application protocol (CoAP)The constrained application protocol (CoAP)
The constrained application protocol (CoAP)
Hamdamboy (함담보이)
 
IPC
IPCIPC
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communicationAbDul ThaYyal
 
Mobile computing : Indirect TCP
Mobile computing : Indirect TCPMobile computing : Indirect TCP
Mobile computing : Indirect TCP
Sushant Kushwaha
 
Physical layer ppt
Physical layer pptPhysical layer ppt
Physical layer ppt
Najam Khattak
 
Wap ppt
Wap pptWap ppt
Wap ppt
Abhijit Nath
 
Mobile IP
Mobile IPMobile IP
Mobile IP
Mukesh Chinta
 
Introduction to MPI
Introduction to MPI Introduction to MPI
Introduction to MPI
Hanif Durad
 
Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing
marwan aldulaimy
 
POP3 Post Office Protocol
POP3 Post Office ProtocolPOP3 Post Office Protocol
POP3 Post Office Protocol
Samreen Reyaz Ansari
 
Lecture 1 introduction to parallel and distributed computing
Lecture 1   introduction to parallel and distributed computingLecture 1   introduction to parallel and distributed computing
Lecture 1 introduction to parallel and distributed computing
Vajira Thambawita
 
Mobile computing notes and material
Mobile computing notes and materialMobile computing notes and material
Mobile computing notes and material
SDMCET DHARWAD
 
It6601 mobile computing unit2
It6601 mobile computing unit2It6601 mobile computing unit2
It6601 mobile computing unit2
RMK ENGINEERING COLLEGE, CHENNAI
 
Ethernet
EthernetEthernet
Ethernet
sijil chacko
 
IEEE 802.11 Architecture and Services
IEEE 802.11 Architecture and ServicesIEEE 802.11 Architecture and Services
IEEE 802.11 Architecture and Services
Sayed Chhattan Shah
 
Mobile Computing (Part-1)
Mobile Computing (Part-1)Mobile Computing (Part-1)
Mobile Computing (Part-1)
Ankur Kumar
 

What's hot (20)

6LoWPAN.pptx
6LoWPAN.pptx6LoWPAN.pptx
6LoWPAN.pptx
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
Tcp IP Model
Tcp IP ModelTcp IP Model
Tcp IP Model
 
The constrained application protocol (CoAP)
The constrained application protocol (CoAP)The constrained application protocol (CoAP)
The constrained application protocol (CoAP)
 
IPC
IPCIPC
IPC
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 
Mobile computing : Indirect TCP
Mobile computing : Indirect TCPMobile computing : Indirect TCP
Mobile computing : Indirect TCP
 
Physical layer ppt
Physical layer pptPhysical layer ppt
Physical layer ppt
 
Wap ppt
Wap pptWap ppt
Wap ppt
 
Mobile IP
Mobile IPMobile IP
Mobile IP
 
Introduction to MPI
Introduction to MPI Introduction to MPI
Introduction to MPI
 
Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing
 
POP3 Post Office Protocol
POP3 Post Office ProtocolPOP3 Post Office Protocol
POP3 Post Office Protocol
 
Lecture 1 introduction to parallel and distributed computing
Lecture 1   introduction to parallel and distributed computingLecture 1   introduction to parallel and distributed computing
Lecture 1 introduction to parallel and distributed computing
 
Mobile computing notes and material
Mobile computing notes and materialMobile computing notes and material
Mobile computing notes and material
 
It6601 mobile computing unit2
It6601 mobile computing unit2It6601 mobile computing unit2
It6601 mobile computing unit2
 
Ethernet
EthernetEthernet
Ethernet
 
IEEE 802.11 Architecture and Services
IEEE 802.11 Architecture and ServicesIEEE 802.11 Architecture and Services
IEEE 802.11 Architecture and Services
 
Mobile Computing (Part-1)
Mobile Computing (Part-1)Mobile Computing (Part-1)
Mobile Computing (Part-1)
 

Viewers also liked

Apple continuity
Apple continuityApple continuity
Apple continuity
HEM DUTT
 
Linux Ubuntu
Linux UbuntuLinux Ubuntu
Linux Ubuntu
alxhndz
 
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 Communication
Deepak 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 systems
Sai praveen Seva
 
A History of Mac OS
A History of Mac OSA History of Mac OS
A History of Mac OS
Damian T. Gordon
 
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
Stefan Esser
 
Lokijs
LokijsLokijs
Windows 8 ppt
Windows 8 pptWindows 8 ppt
Windows 8 ppt
Shan Singhai
 
Mac OS(Operating System)
Mac OS(Operating System)Mac OS(Operating System)
Mac OS(Operating System)
Faizan Shaikh
 

Viewers also liked (12)

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)
 

Similar to 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.pdf
aesalem06
 
distributed-systemsfghjjjijoijioj-chap3.pptx
distributed-systemsfghjjjijoijioj-chap3.pptxdistributed-systemsfghjjjijoijioj-chap3.pptx
distributed-systemsfghjjjijoijioj-chap3.pptx
lencho3d
 
Driver Programming Report
Driver Programming ReportDriver Programming Report
Driver Programming Report
Shivek Khurana
 
Internetworking
InternetworkingInternetworking
InternetworkingRaghu nath
 
parallel programming models
 parallel programming models parallel programming models
parallel programming models
Swetha S
 
7 layer OSI model
7 layer OSI model7 layer OSI model
7 layer OSI model
penetration Tester
 
OSI Model and TCP/IP Model.
OSI Model and TCP/IP Model.OSI Model and TCP/IP Model.
OSI Model and TCP/IP Model.
City University, Dhaka, Bangladesh
 
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 networking
bappyiucse
 
DCN notes adi
DCN notes adiDCN notes adi
DCN notes adi
AdiseshaK
 
Networking concepts by Sachidananda M H
Networking concepts by Sachidananda M HNetworking concepts by Sachidananda M H
Networking concepts by Sachidananda M H
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
Aya Mahmoud
 
Networking concepts
Networking conceptsNetworking concepts
Networking concepts
Prof. Dr. K. Adisesha
 
Lesson 7
Lesson 7Lesson 7
Lesson 7
Gicheru Onesmus
 
Chapter 1-Introduction.ppt
Chapter 1-Introduction.pptChapter 1-Introduction.ppt
Chapter 1-Introduction.ppt
balewayalew
 
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
 

Similar to 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)
 

Recently uploaded

A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 

Recently uploaded (20)

A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 

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.