Interprocess Communication: ( ) CPE Operating Systems
Producer – Consumer Model Ex of Intra-machine communication Editor Compiler Print Manager Machine A
Producer – Consumer Model Ex of Inter-machine communication Browser Web Server Machine A Machine B
Why IPC? Information Sharing Computation Speedup Modularity Convenience
IPC Modes Message PassingShared Memory Figure 3.14
Shared Memory The Good Simple and Easy to Use Fast The Bad Simultaneous Access Problem Network Shared Memory is Difficult Multi-Processor Cache Problems
Simplest Method for Shared Memory File Process 1 Process 2 Shared File
Linux Kernel 2.6 and Later /dev/shm Process 1 Process 2 Shared Ram Disk
Shared Memory Demo
Multi-Processor Cache Problems Inside Intel Core 2 Quad Cache Core Cache Core
Multi-Processor Cache Problems (cont) Inside Intel Core i7
Multi-Processor Cache Problems (cont) Core (Count++) Cache int Count Shared Mem int Count Shared Mem int Count Core (Count++) Cache int Count
Message Passing Methods Direct vs indirect communication (e.g. FTP vs Chat) Synchronous vs asynchronous comm (Chat vs Bit Torrent) Automatic vs explicit buffering (YouTube vs Telnet)
Examples of Message Passing Remote Procedure Call (RPC) Remote Method Invocation (RMI) Simple Object Access Protocol (SOAP) Common Object Request Broker Architecture (CORBA)
Message Passing in Windows XP (Mixed with Shared Memory) Similar to Sockets but contains a shared object to increase speed