Unix/Linux IPC Tools Assignment Help

Assignment Help: >> Operating System >> Unix/Linux IPC Tools

UNIX/Linux IPC Tools are described below

UNIX and Linux operating systems give many tools and devices for the interprocess communication, mostly in the form of the APIs but some also for use at the command line. Here are some of the frequently supported IPC tools in the two operating systems.

1)   Pipe

2)   Named pipe (FIFO)

3)   BSD Socket

4)   TLI

5)   Message queue

6)   Shared memory

 

Unix/Linux IPC Tools/devices are described below

The UNIX and Linux operating systems provide number of tools for the interprocess communication (IPC). The three majorly used tools are:

1)   Pipe: Pipes are used for communication between related processes on the system, as shown in Figure drawn below. The communicating processes are typically related by sibling or parent-child relationship.

 2247_pipe.png

Figure of Pipes on a UNIX/Linux system

1)   Named pipe (FIFO) FIFOs (also known as named pipes) are used for communication between related or unrelated processes on a UNIX/Linux system, as shown in Figure drawn below

1180_pipe1.png

Figure of Pipes on a UNIX/Linux system

2)   BSD Socket: The BSD sockets are used for communication between related or unrelated processes on the same system or unrelated processes on different systems, as shown in Figure drawn above.

2211_pipe2.png

Figure drawn Sockets used for IPC between processes on different UNIX/Linux systems

 

The open() System call

The open() system call is used to open or create a file. Its synopsis is as follows:

 

#include <sys/types.h>

#include <sys/stat.h>

#include <fcntl.h>

 

int open(const char *pathname, int flags);

int open(const char pathname, int oflag, /* mode_t mode */);

 

The call  converts a pathname into a file descriptor (a small, non-negative integer for use in subsequent I/O as with read, write, etc.).  When the call is done successfully, the file descriptor returned will be the lowest file descriptor not presently open for the process. This system call can also specify whether read or write will be blocking or non-blocking.

The ‘oflag’ argument specifies the purpose of opening the file and ‘mode’ specifies permission on the file if it is to be created. ‘oflag’ value is made by ORing various flags:, O_WRONLY, O_RDWR, O_RDONLY O_NDELAY (or O_NONBLOCK), O_CREAT, O_APPEND, etc.

The open() system call can fail for various reasons, some of which are given below:

1)   Non-existent file

2)   Operation specified is not allowed due to file permissions


3)   Search not allowed on a component of pathname

4)   User’s disk quota on the file system has been exhausted

The file descriptor returned by the open() system call is used in the read() and

write() calls for file (or pipe) I/O.

 

The read() system call

We discussed the read() system call in the notes for lecture 8. The call may fail for various reasons, including the following:

1)   Invalid ‘fildes’, ‘buf’, or ‘nbyte’

2)   Signal caught during read

 

The write() system call

The call may fail for various reasons, including the following:

1)   Invalid argument

2)   File size limit for process or for system would exceed

4)   Disk is full

 

The  close() system call

As discussed in the notes for lecture 8, the close() system call is used to close a file

descriptor. It takes a file (or pipe) descriptor as an argument and closes the corresponding file (or pipe end).

Email based Operating System  assignment help - homework help at Expertsmind

Are you searching Operating System expert for help with Unix/Linux IPC Tools questions?  Unix/Linux IPC Tools topic is not easier to learn without external help?  We at www.expertsmind.com offer finest service of operating system assignment help and operating system homework help. Live experts are available for 24x7 hours helping students in their Unix/Linux IPC Tools related problems. We provide step by step Unix/Linux IPC Tools question's answers with 100% plagiarism free content. We prepare quality content and notes for Unix/Linux IPC Tools topic under operating system theory and study material. These are avail for subscribed users and they can get advantages anytime.

Why Expertsmind for assignment help

  1. Higher degree holder and experienced tutors network
  2. Punctuality and responsibility of work
  3. Quality solution with 100% plagiarism free answers
  4. Time on Delivery
  5. Privacy of information and details
  6. Excellence in solving operating system questions in excels and word format.
  7. Best tutoring assistance 24x7 hours
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd