access; symbols; locks root:1.1; strict; comment @ * @; 1.1 date 2014.05.10.05.20.35; author root; state Exp; branches; next ; desc @req client for pipe. @ 1.1 log @In server head 1.1; access; symbols; locks root:1.1; strict; comment @ * @; … Continue reading
A pipe is a mechanism for interprocess communication; data written to the pipe by one process can be read by another process. The data is handled in a first-in, first-out (FIFO) order. The pipe has no name; it is created … Continue reading
RCS file: ipc1.c,v Working file: ipc1.c head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: this is program in which i have created child using fork and printed the pid … Continue reading
RCS file: signal1.c,v Working file: signal1.c head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: this is simple program of signal in which i have used SIGINT and SIG_DLF. —————————- … Continue reading
RCS file: start.c,v 3 Working file: start.c 4 head: 1.1 5 branch: 6 locks: strict 7 root: 1.1 8 access list: 9 symbolic names: 10 keyword substitution: kv 11 total revisions: 1; selected revisions: 1 12 description: 13 module param … Continue reading
RCS file: signal.c,v Working file: signal.c head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: This of program of signal to find signal and use of SIGINT. —————————- revision 1.1 … Continue reading
Char devices are accessed through names in the filesystem. Those names are called special files or device files or simply nodes of the filesystem tree; they are conventionally located in the /dev directory. Special files for char drivers are identified … Continue reading
The Internal Representation of Device Numbers Within the kernel, the dev_t type (defined in <linux/types.h>) is used to hold device numbers—both the major and minor parts. As of Version 2.6.0 of the kernel, dev_t is a 32-bit quantity with 12 … Continue reading
#include<stdio.h> #include<sys/types.h> int main() { int i,n; pid_t pid; printf(“enter the no of child\n”); scanf(“%d”,&n); pid=fork(); for(i=1;i<n;i++) { if(pid>0) pid=fork(); } printf(“my id is->%d and my parent id is -> %d\n”,getpid(),getppid()); return 0; }
A Linux driver is a Linux module which can be loaded and linked to the kernel at runtime. The driver operates in kernel space and becomes part of the kernel once loaded, the kernel being monolithic. It can then access the symbols … Continue reading
#include”header.h” #include”declaration.h” int main() { int ret,len,sum,sub,n; int r11[2]; int r12[2]; int r21[2]; int r22[2]; int p11[2]; int p12[2]; int p21[2]; int p22[2]; struct req rq; char br11[4],br12[4],br21[4],br22[4],bp11[4],bp12[4],bp21[4],bp22[4]; ret=pipe(r11); ret=pipe(r21); ret=pipe(r22); ret=pipe(r12); ret=pipe(p11); ret=pipe(p21); ret=pipe(p22); ret=pipe(p12); ret=fork(); if(ret == 0) … Continue reading
#include”header.h” #include”declaration.h” int main() { int r1,p1,ret,len; struct req res; ret=access(“rq1″,F_OK); if(ret <0) { ret=mkfifo(“rq1″,0777); if(ret<0) { perror(“mkfifo”); return -1; } } ret=access(“rq2″,F_OK); if(ret <0) { ret=mkfifo(“rq2″,0777); if(ret<0) { perror(“mkfifo”); return -1; } } ret=access(“rq3″,F_OK); if(ret <0) { ret=mkfifo(“rq3″,0777); if(ret<0) … Continue reading
A socket is one end-point of a two-way communication link between two programs running on the network. A server application normally listens to a specific port waiting for connection requests from a client. When a connection request arrives, the client … Continue reading
#insert the device driver and get register in the kernel i.e get the major number with a register_chrdev which is in fs.h and get unregister using the unregister_chrdev…..:) RCS file: init.c,v Working file: init.c head: 1.17 branch: locks: strict … Continue reading
#this is the insertion of Device Driver in the kernel RCS file: cleanup.c,v Working file: cleanup.c head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: give the defination for the … Continue reading