interprocess communication: ( 3.4-3.6) cpe 261403 - operating systems
TRANSCRIPT
![Page 1: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/1.jpg)
Interprocess Communication: (3.4-3.6)
CPE 261403 - Operating Systems
![Page 2: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/2.jpg)
Producer – Consumer Model
Ex of Intra-machine communication
Editor
Compiler
PrintManager
Machine A
![Page 3: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/3.jpg)
Producer – Consumer Model
Ex of Inter-machine communication
Browser
WebServer
Machine A
Machine B
![Page 4: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/4.jpg)
Why IPC?
Information Sharing
Computation Speedup
Modularity
Convenience
![Page 5: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/5.jpg)
IPC ModesMessage Passing Shared Memory
Figure 3.14
![Page 6: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/6.jpg)
Shared Memory
The Good Simple and Easy to Use Fast
The Bad Simultaneous Access Problem Network Shared Memory is Difficult Multi-Processor Cache Problems
![Page 7: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/7.jpg)
Simplest Method for Shared Memory
File
Process 1Process 1 Process 2Process 2
Shared File
![Page 8: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/8.jpg)
Linux Kernel 2.6 and Later
/dev/shm
Process 1Process 1 Process 2Process 2
Shared Ram Disk
![Page 9: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/9.jpg)
Shared Memory Demo
![Page 10: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/10.jpg)
Multi-Processor Cache Problems
Inside Intel Core 2 Quad
Cache
Core Core
Cache
Core Core
![Page 11: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/11.jpg)
Multi-Processor Cache Problems (cont)
Inside Intel Core i7
![Page 12: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/12.jpg)
Multi-Processor Cache Problems (cont)
Core(Count++)
Cacheint CountCacheint Count
Shared Memint Count
Shared Memint Count
Core(Count++)
Cacheint CountCacheint Count
![Page 13: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/13.jpg)
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)
![Page 14: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/14.jpg)
Examples of Message Passing Remote Procedure Call (RPC)
Remote Method Invocation (RMI)
Simple Object Access Protocol (SOAP)
Common Object Request Broker Architecture (CORBA)
![Page 15: Interprocess Communication: ( 3.4-3.6) CPE 261403 - Operating Systems](https://reader030.vdocuments.us/reader030/viewer/2022032612/56649ebb5503460f94bc4382/html5/thumbnails/15.jpg)
Message Passing in Windows XP
(Mixed with Shared Memory)
Similar to Sockets but contains a shared object to increase speed