-interprocess communication or ipc:
-ipc is the mechanism of sharing data between multiple processes.
-the idea behind ipc is - efficiency - system speed, resource utilization.
-two fundamental models of ipc:
. shared memory
. message passing
-shared mem - a region of mem is marked to be shared bet processes.
-mesg pass - processes talk and share data via mesgs.
-shared mem is faster, more complex to implement. kernel intervention not reqd.
-mesg pass is slower, less complex to implement. requires kernel intervention.
-certain shared mem terms in linux/unix - shmget(), shmat(), shmmax, shmmin, shmsize etc..
-while ipc can be useful for communication between processes in a system, other mechanisms are needed for remote proc comm.
-a client server system is an example of remote process communication.
-three models of client server system are:
. sockets
. remote procedure call (rpc)
. pipes (ordinary or named)
-sockets are an endpoint of communication - usually a 'host-ip:port' pair.
-in a client server socket system, there is a pair of sockets on the client and server side.
-rpc is a call from a local app to a remote app using at the kernel layer.
-pipes allow two processes to talk and share their data.
-ordinary pipes are one way - like parent child - ie child inherits the data and atrributes of the parent.
-named pipes are two way - no parent child - ie procs can exist independent of each other.
-in linux, named pipes are called fifo and created using mkfifo() system call.
-once created they can be operated with regular system calls like open(), read(), write(), close().
-ipc is the mechanism of sharing data between multiple processes.
-the idea behind ipc is - efficiency - system speed, resource utilization.
-two fundamental models of ipc:
. shared memory
. message passing
-shared mem - a region of mem is marked to be shared bet processes.
-mesg pass - processes talk and share data via mesgs.
-shared mem is faster, more complex to implement. kernel intervention not reqd.
-mesg pass is slower, less complex to implement. requires kernel intervention.
-certain shared mem terms in linux/unix - shmget(), shmat(), shmmax, shmmin, shmsize etc..
-while ipc can be useful for communication between processes in a system, other mechanisms are needed for remote proc comm.
-a client server system is an example of remote process communication.
-three models of client server system are:
. sockets
. remote procedure call (rpc)
. pipes (ordinary or named)
-sockets are an endpoint of communication - usually a 'host-ip:port' pair.
-in a client server socket system, there is a pair of sockets on the client and server side.
-rpc is a call from a local app to a remote app using at the kernel layer.
-pipes allow two processes to talk and share their data.
-ordinary pipes are one way - like parent child - ie child inherits the data and atrributes of the parent.
-named pipes are two way - no parent child - ie procs can exist independent of each other.
-in linux, named pipes are called fifo and created using mkfifo() system call.
-once created they can be operated with regular system calls like open(), read(), write(), close().
No comments:
Post a Comment