data structurefor a process in unix

data structurefor a process in unix

DATA STRUCTURE FOR PROCESS
1. THE COMPILATION PROCESS:
This describes the structure of a process and some process data structures used for memory management.
A process is the execution of a program and consists of patterns of bytes that the CPU interprets as machine instructions (called "text"), data and stack. Many processes appear to execute simultaneously as the kernel schedules them for execution, and several processes may be instances of one program. A process executes by following a strict sequence of instructions that is self-contained and does not jump to that of another process; it reads and writes its data and stack sections, but it cannot read or write the data and stack of other processes. Processes communicate with other processes and with the rest of the world via system calls.
In practical terms, a process on a UNIX system is the entity that is created by the fork system call. Every process except process 0 is created when another process executes the fork system call. The process that invoked the fork system call is called the parent process and the newly created process is the child process. Every process has one parent process, but a process can have many child processes. The kernel identifies each process by its process number, called the process ID (PID). Process 0 is a special process that is created "by hand" when the system boots; after forking a child process (process 1), process 0 becomes the swapper process. Process 1, knows as in it, is the ancestor of every other process in the system and enjoys a special relationship with them.
A user compiles the source code of a program to create an executable file, which consists of several parts:
1. a set of headers that describe the attributes of the file,
2. the program text,
3. a machine language representation of data that has initial values when the program starts execution, and an indication of how much space the kernel should allocate for uninitialized data, called bss (the...

Similar Essays