EmbLogic's Blog

Category Archives: Project 03: Client Server Communication using Linux and IPC

We need to creat an Inter Process Communication based Client-Server setup. There should be a Server program, Some clients would send requests to the server and the server would further find the appropriate client to process the request. The server then invokes the new client so as to process the request. The new client should then rend the result back to the server , which then sends it forward to the requesting client.

message queues

RCS file: msgq_srvr.c,v Working file: msgq_srvr.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description: —————————- revision 1.1    locked by: root; date: 2014/03/25 04:43:34;  author: root;  state: Exp; … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC, Uncategorized | Tagged | Leave a comment

semaphores

Semaphores are a programming construct designed by E. W. Dijkstra in the late 1960s. Dijkstra’s model was the operation of railroads: consider a stretch of railroad in which there is a single track over which only one train at a … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

FIFO

A FIFO is similar to a pipe. FIFO (First In First Out) is a one-way flow of data. FIFO’s have a name i.e. FIFO is a named pipe. This is the main difference between pipes and FIFOs. To create FIFO,we … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Work on FIFO.

RCS file: 1.c,v Working file: 1.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description: make the fifo do the write operation on fifo. —————————- revision 1.1    locked … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Client server communication using linux and IPC having two client

RCS file: server.c,v Working file: server.c head: 1.1 branch: locks: strict ankit: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description: make the pipe for the client 1 make the fork in the child … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC, Uncategorized | Leave a comment

Common handler using different signal.

RCS file: commonhandler.c,v Working file: commonhandler.c head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3;     selected revisions: 3 description: making the SIGINT and form the ouch function handler. —————————- revision 1.3 date: 2014/03/12 12:32:00;  … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Work on the signal() system call.

RCS file: 1.c,v Working file: 1.c head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;     selected revisions: 2 description: make the signal handler function against the SIGNINT signal. —————————- revision 1.2    locked … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Working of alarm using fork,sleep and pause.

RCS file: ./alarm.c,v Working file: ./alarm.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description: global value for alarm_fired is declared. setting the child process for 5 sec … Continue reading

Posted in Data Structures with C, Project 03: Client Server Communication using Linux and IPC | Leave a comment

Process in Linux

As in our busy life we required multitasking process and with the help of the Linux we can make the multi task processes. Using the fork() system call(its not a function) we can create a newly process, which is known … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

pipe-string of data is read.

RCS file: ./writer.c,v Working file: ./writer.c head: 1.3 branch: locks: strict root: 1.3 access list: symbolic names: keyword substitution: kv total revisions: 3;    selected revisions: 3 description: pipe is created. child process is generated by using fork(). —————————- revision 1.3    … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Pipes

RCS file: ./writer.c,v Working file: ./writer.c head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;    selected revisions: 2 description: pipe is created. child process is generated by using fork(). —————————- revision 1.2    … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Process Management

Any application that runs on a Linux system is assigned a process ID or PID. This is a numerical representation of the instance of the application on the system. It is used by the system administrator who may have to … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Code to demonstrate how to register a signal handler using sigaction() for SIGINT signal.

RCS file: sigaction.c,v Working file: sigaction.c head: 1.5 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 5;    selected revisions: 5 description: Code to establish a simple handler for termination signals using sigaction. The signal handler will … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Program to understand the working of user defined signals:SIGUSR1 and SIGUSR2.

RCS file: sigusr_signal.c,v Working file: sigusr_signal.c head: 1.8 branch: locks: strict root: 1.8 access list: symbolic names: keyword substitution: kv total revisions: 8;    selected revisions: 8 description: Code to understand the working of SIGUSR1 and SIGUSR2. —————————- revision 1.8    locked … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Server process handling the requests of multiple clients using Shared memory IPC mechanism.

RCS file: server.c,v Working file: server.c head: 1.15 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 15;    selected revisions: 15 description: Code of the server process that will handle multiple requests from the clients. In this … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment