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.

About Signals

Signals ======== – A signal is an event generated by UNIX/LINUX system in response to some condition. – On receipt of a signal, process may in turn take some action. – Signals are generated by some error conditions such as:- … Continue reading

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

Replacing a Process Image

Replacing a Process Image ========================= – The exec function replaces current process with a new process. – The path of new process is specified as argument to exec. – It is defined in header : #include<unistd.h> – Last argument of … Continue reading

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

Orphan Process

Orphan Process =============== If in a process, the parent process is terminated before the child process, the child process become orphan – It takes the lowest possible process as its parent – And its PPID is changed to the PID … Continue reading

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

Zombie or Defunct Process

Zombie or Defunct Process ========================== If a child proces tries to teminate,its association with parent remains until the parent terminates normally or calls wait. – The child process entry in process table is therfore not freed up immediately. – Althougth … Continue reading

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

waiting for a process

Waiting For a Process ===================== – Sometime we would like to find out when a child process has finished. – It is needed for parent process to wait until the child finishes before continuing by calling wait. – It has … Continue reading

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

Process Duplication using fork

Process Duplication using system call fork ============================== – A new process is created using fork(). – fork() is a system call. – fork duplicates the current process. – It creates a new entry in the process table with many of … Continue reading

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

Types of Interprocess Communications in Linux

Types of Inter-process Communications (IPCs) in Linux : 1. Pipes 2. Named Pipes/FIFO 3. Signals 4. Semaphores 5. Message Queue 6. Shared Memory  

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

Client Server Using IPC by using message queues and pipes for single user

logfile of project ============= ============= RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;    selected revisions: 2 description: It includes basic headers for implementation It includes … Continue reading

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

CIient Server using IPC for FIFO,Pipes and Signals for n clients

RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;    selected revisions: 2 description: It includes basic headerfiles for FIFOs. It contains stdio.h, fcntl.h, unistd.h, sys/types.h, sys/stat.h … Continue reading

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

Client Server communication in IPC using FIFO for 3 clients

Logfile of Project ——————————– ——————————– RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description: It includes basic headerfiles for FIFOs. It contains … Continue reading

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

Client Server Communication using FIFO for single server and a client when result FIFO created by client

Logfile of Project ———————————— ———————————— RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;    selected revisions: 2 description: It contains basic header files for communication using … Continue reading

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

IPC using FIFO for single server and a client when both FIFO(result and request) created by server

RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;    selected revisions: 2 description: It contains basic header files for communication using FIFO. —————————- revision 1.2    locked … Continue reading

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

PID, PPID and NICE value of a process

PCB (Process Control Board) ———————————- Every Process has its Process Control Board(PCB) which tells about the process. PCB contains PID,PPID,PC(program counter),nice value of process. PID :- * PID is Process Identification of any process. * It is a number . … Continue reading

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

IPC using Pipes for single user

RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;    selected revisions: 2 description: stdio.h , fcntl.h, unistd.h, sys/types.h are included. —————————- revision 1.2    locked by: root; … Continue reading

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

Passing a local variable in thread function

if we simply pass the address of local variable to a thread function then when that function ends then address of that variable lost(if variable is automatic) and we try to access that address or variable the it doesn’t give … Continue reading

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