The clone system call creates a new process like fork does, but it offers more control of which elements in the execution context (memory space, table of file descriptors, table of signal handlers, file system information, process id, etc) are intended to be shared between the child and parent processes. The main use of clone is to implement LinuxThreads, which are multiple threads of control in a program that run concurrently in a shared memory space.
The implementation of clone is carried out completely in the application address space, i.e, no interactions with the kernel or servers are necessary. clone builds on K42's user-level thread model. Even though the kernel does not allocate these thread PIDs we still need a mechanism to guarantee unique PIDs across the system. We do this by reserving a bit range in the PID space for cline PIDs. PIDs are 32 bit in Linux. K42 uses 20 bits to identify the target K42 process and 12 bits to identify the clone within the process. This allows clone PIDs to be assigned locally by each process and still ensure that clone PIDs are globally unique.