Queue implementation in C using linked list


1.0 Queue

A queue is something we see often in our daily lives. People stand in a queue to get into a bus, to get food in a buffet, buy tickets from the ticket counter, etc. Queues are a fair solution of ordering people to get a resource; people are served in the chronological order of their arrival leading to the coinage of the phrase, first come, first served (FCFS).… Read more

POSIX Threads Synchronization in C

1.0 POSIX Threads Synchronization

POSIX Threads provide multiple flows of execution within a process. The threads have their own stacks but share the global data and heap. So the global variables are visible to multiple threads. Also, the threads need to synchronize their actions so that they jointly realize the overall objectives of the process they belong to.… Read more

System V Semaphores

1.0 Semaphores

A semaphore is a mechanism for synchronizing processes and threads. Semaphore, in Unix-like systems, are provided under interprocess communication (IPC) facilities along with message queues and shared memory. While message queues can be used by themselves for interprocess communication, semaphores are needed for implementing shared memory based interprocess communication systems.… Read more

Semaphore Basics



A semaphore is a signalling mechanism used to regulate access to a shared resource like a railroad track. A semaphore is used to signal to the driver of a train whether he can go ahead on the track or not.… Read more

Interprocess communication using System V message queues in Linux

1.0 Message queues

Message queues are one of the interprocess communication mechanisms available under Linux. Message queues, shared memory and semaphores are normally listed as the three interprocess communication mechanisms under Linux. Semaphores, though, are really for process synchronization. In practice, shared memory, aided by semaphores, makes an interprocess communication mechanism.… Read more

Interprocess communication using FIFOs in Linux

Interprocess communication using fifo

1.0 FIFO

FIFOs are pipes with a name and are also commonly referred to as named pipes. Pipes are common on Linux command lines but do not have a system-wide name. So, any two processes that wish to communicate using a pipe need to be related, either parent and child or, sharing a common parent, who sets up the pipe and passes its file descriptors to individual processes.… Read more