Linux software application development online test

Module: Linux Inter Process Communication(IPC)



You will learn about linux inter process communication methods(IPC) through this online test. Click to start this online test.

What is IPC mechanism?

    In linux Inter Process Communication(IPC) is a mechanism that allows processes to communicate with each other and synchronize their activities with other processes. Linux supports a number of Inter-Process Communication (IPC) mechanisms such as signals, pipes, message queues, semaphores, shared memory.
    Signals are used to signal asynchronous events to one or more processes. A linux signal could be generated by a keyboard interrupt or an error condition such as the process attempting to access a non-existent location in its virtual memory.
    Message queues allow one or more processes to write messages, which will be read by one or more reading processes.
Message queues
    Message queues allow one or more processes to write messages, which will be read by one or more reading processes.
    semaphore is a location in memory whose value can be tested and set by more than one process. The test and set operation is, so far as each process is concerned, uninterruptible or atomic; once started nothing can stop it. The result of the test and set operation is the addition of the current value of the semaphore and the set value, which can be positive or negative. Depending on the result of the test and set operation one process may have to sleep until the semphore's value is changed by another process. Semaphores can be used to implement critical regions, areas of critical code that only one process at a time should be executing.
Shared memory
    Shared memory allows one or more processes to communicate via memory that appears in all of their virtual address spaces. The pages of the virtual memory is referenced by page table entries in each of the sharing processes' page tables. It does not have to be at the same address in all of the processes' virtual memory. As with all System V IPC objects, access to shared memory areas is controlled via keys and access rights checking. Once the memory is being shared, there are no checks on how the processes are using it.


 Online Tests

Linux software tests
Related Online Tests