Intermec ck1 Reference Guide

Page of 390
Appendix A — 
µClinux System 
CK1 SDK Programmer’s Reference Manual 
297 
area with other processes, and synchronize itself with other processes. 
Linux supports a number of IPC mechanisms such as pipes and signals, 
but it also supports many of the Unix System V IPC mechanisms. 
A signal is a very short message allowing the process to communicate the 
occurrence of asynchronous events to other process. It is the oldest inter 
process communication method used by Unix systems. A signal could be 
generated by a software or hardware interrupt or by some error condition, 
for example, a process attempting to access an invalid location in its virtual 
memory. Linux includes a set of defined signals with a prefix of signal that 
the kernel can generate or that can be generated by other processes with 
correct privileges in the system. A set of system calls are also introduced by 
the Linux kernel, which allow programmers to send and determine how 
the signal should be handled. The options for the process to handle the 
signal are to block the signals or either choose to handle themselves or 
allow the kernel to handle them with a default action. The process is also 
in some cases allowed to ignore the signal.  
When sending a signal to another process, the kernel updates the 
descriptor of the destination process, which reads it when it enters to 
running stage. The process running can also choose to wait for a signal by 
entering Suspend mode until the received signal raises an interrupt and 
wakes it up. The signal sending has also some restrictions where the 
normal process can only be sent to a process with a same uid and gid or to 
processes in the same process group. Of course the kernel and the super 
user are capable of sending signals to every other process. 
As signals are only capable of transferring information that was limited to a 
single number, pipes allow more useful data to be exchanged between the 
processes. The term pipe is used to describe the connection where the 
information flow can be done between the processes. A command shell 
pipe can easily be done with a separator. 
ls | lpr 
This previous command line pipes the output from the ls command listing 
into the standard input of the lpr command, which prints the results on 
the default printer. Basically, the idea with pipe command implementation 
is that both data structures point at the same temporary virtual file system 
inode, which is assigned to points at a physical page in memory. As the ls 
writes to the pipe, bytes are copied into the shared data page and the lpr 
copies these bytes again from the same shared data page.  
System V IPC 
The System V IPC mechanisms provide forms of IPC facilities originally 
introduced by Columbus Unix variant but later adopted by AT&T. The 
System V IPC provides tools for performing reliable, system-wide 
communication. It supports the three kinds of different mechanisms: 
message queues, semaphores, and shared memory, which are all 
implemented via the kernel system call. The user mode process can access 
these system calls by passing a unique identifier to the resource, which is