[FreeBSD] Interprocess Communication

2024. 6. 29. 22:56ComputerScience/FreeBSD

 

 

 

 

2.12 Interprocess Communication

  • Interprocess communication in FreeBSD is organized in communication domains. The most important domains currently supported include the local domain, for communication between processes executing on the same machine;
    the
    IPv4 domain, for communication between processes using the TCP/IP protocol suite (version 4);
    and the
    IPv6 domain, which is the newest version of the Internet protocols. (주소 부족한 문제를 해결하기 위해) 
  • Within a domain, communication takes place between communication endpoints known as sockets. As mentioned in Section 2.7, the socket system call creates a socket and returns a descriptor; other IPC system calls are described in Chapter 12. Each socket has a type that defines its communications semantics; these semantics include properties such as reliability, ordering, and prevention of the duplication of messages.

 

  • Each socket has associated with it a communication protocol. This protocol provides the semantics (의미) required by the socket according to the latter’s type. Applications may request a specific protocol when creating a socket or may allow the system to select a protocol that is appropriate for the type of socket being created.
  • Sockets may have addresses bound to them. The form and meaning of socket addresses are dependent on the communication domain in which the socket is created. Binding a name to a socket in the local domain causes a file to be created in the filesystem, while binding an IP address to a socket only updates an entry in the socket structure.
  • Normal data transmitted and received through sockets are untyped. Data-representation issues are the responsibility of libraries built on top of the interprocess-communication facilities. (presentation layer?) 

 

  • Networking implementations on UNIX before 4.2BSD usually worked by overloading the character-device interfaces. One goal of the socket interface was for naive programs to be able to work without change on stream-style connections. Such programs can work only if the read and write system calls are unchanged. Consequently, the original interfaces were left intact and were made to work on stream-type sockets. A new interface was added for datagram sockets, where a destination address must be presented with each send call.

 

  • Implementations of the sockets API exist for pretty much every modern operating system, including several that differ greatly from UNIX. FreeBSD also supports several local IPC mechanisms not related to networking, including semaphores, message queues, and shared memory. These mechanisms are covered in Section 7.2.
  • The increasing power of computer systems has lead to the virtualization of many kernel services, including those related to IPC. A recent feature of FreeBSD is a virtualized network stack in which elements such as sockets, network addresses, and network routing tables may not be global across the entire system, but contained within a single network stack instance. (global하지 않다 == virtualization?) The purpose of these virtualization features is to allow a system administrator to configure a single system to serve several separate networks as might be common at an ISP.

 

 

 

https://xxxxxxxxxxxxxxxxx.tistory.com/entry/OS-Inter-Process-Communication-IPC

 

 

 

'ComputerScience > FreeBSD' 카테고리의 다른 글

[FreeBSD] Kernel Organization  (0) 2024.07.09
[FreeBSD] Network Layer Protocols, TCP/UDP and Bootstrapping  (0) 2024.07.06
[FreeBSD] ZFS and NFS  (0) 2024.06.29
[FreeBSD] The Fast Filesystem  (0) 2024.06.29
[FreeBSD] Devices  (0) 2024.06.29