Study the following system calls.
Shared memory – shmget, shmat, shmdt, shmctl
Additional optional system calls
Pipe – pipe, mkfifo, mknod, open, read, write, close
Message Queue – msgget, msgsnd, msgrcv, msgctl
Develop the following applications that uses interprocess communication concepts using
1. Develop an application for getting a name in parent and convert it into uppercase in child
using shared memory.
2. Develop an client / server application for file transfer using shared memory.
3. Develop an client/server chat application using shared memory.
This program should be run as a single program in which parent is one process and child is
Client / server:
Keep common code and parent code in one program as server.c
Keep common code and child code in another program as client.c
Run server.c in one terminal and client.c in another terminal. Communicate between the two
Shared memory :
# define NULL 0
// parent writing a char in shared memory and child reads it and prints it.
// you can create a shared memory between parent and child here or you can //create
inside them separately.
id=shmget(111,50,IPC_CREAT | 00666);
// id=shmget(111,50,IPC_CREAT | 00666);
printf(“\n child %c\n”,b);