-> Pointers in c is variable which points the value stored in another location -> It stores the logical addresses of the variable in which data is stored ->Size of a pointer depends on architecture of a workstation i.e 4bytes … Continue reading
If we use single malloc for a double pointer then it simply means that the memory is allocated to the for the external Pointer i.e, malloc(**ptr) -> Memory is allocated only for external pointer of *(*ptr) which is allocated in … Continue reading
There are different types of INTER PROCESSING COMMUNICATION techniques :– 1)Pipes, 2)FIFO, 3) shared memory, 4)message queue Message queue is a technique through which we can send & receive data. In message queues data is send with data type along … Continue reading
“Shared memory allows two or more processes to share the same region (segment) of physical memory” “One processes simply write data to the shared memory region, which will available to all other processes attached to that region & any of … Continue reading
Behaviour of pipes *pipes provide unidirectional data channel (half duplex ),provides a read and write file descriptors *the communication channel provided by a pipe transfers data in the form of byte stream *if a process attempts to read from empty … Continue reading
Simple Algorithm to initialise a Scull 1->Register device 2->Give memory to scull device 3->Set this memory to NULL using memset 4->After this initialise device 5->Get device status ->>Use Insmod to add to kernel ->>Use rmmod to remove from kernel
We can change the thread attributes by modifying the pthread_attr_t structure. Generally we give NULL in pthread_create , so it takes default attributes while creating a thread , but we can modify this by giving a pointer pointing to pthread_attr_t … Continue reading
Malloc can be called in user space as well as in kernel space.it allocates physically fragmented memory area .It doesnot actually allocate physical memory.Physical memory can be mapped later. Kmalloc can be called only in kernel space.it allocates physically contiguous … Continue reading
Select function helps you to know about the file descriptors which are ready for reading , writing. Basically when there is no data present in the socket during recv call it gets blocked till the data arrives so that meanwhile … Continue reading
256-Bit Encryption is a data/file encryption technique that use a 256-bit key to encrypt and decrypt data or files.it is one of the most secure encryption method after 128 and 192-bit encryption,and is used in most modern encryption algorithms ,protocols … Continue reading
RCS file: intro_shared_memory_by_fork.c,v Working file: intro_shared_memory_by_fork.c head: 1.36 branch: locks: strict emblogic: 1.36 access list: symbolic names: keyword substitution: kv total revisions: 36; selected revisions: 36 description: This is my frist program to know the use of shared memory. We … Continue reading
THIS IS SEND DATA RCS RCS file: msg_send.c,v Working file: msg_send.c head: 1.11 branch: locks: strict emblogic: 1.11 access list: symbolic names: keyword substitution: kv total revisions: 11; selected revisions: 11 description: Here use the msg_queue to send the data. … Continue reading
In order to allocate memory from kernel various types of API(application programming interfaces) are used.Two such API’s are Kmalloc() and Vmalloc(). SYNTAX: void * kmalloc(size_t size , int flags); void * vmalloc(unsigned long size); Kmalloc() is use to allocate memory … Continue reading
As it’s name Inter Process Communication(IPC) , this mechanism is use to communicate between different unrelated processes. In IPC, we set up a way to communicate between different clients & one server that’s our objective. Clients are of two types … Continue reading
rvrs_of_string Generally scanf() ignores the spaces,backslash n,tabs etc while taking input from the user, but by using scanset specifiers we are able to deal with this problem. scanset specifiers are represented by %[]. whether we want to right a character … Continue reading