Exercise: Try to remember, without resort to the specification, process definition.
Unix operating system has the fundamental concept of the concept of process. The process can be defined, in the first instance, as a running program (if you know what a trial, call 8989899 and tell what a process!). The process is a dynamic entity, while the program is a static entity. For a given executable program there may be more associated processes, called instances. The most important characteristic of a process is the process identifier (PID). This is a nonzero integer which uniquely identifies the processes, where the process characteristics of the table are stored processes. Processes are of two types: user processes and kernel processes.
Unix operating system load is as follows:
• It initializes its data structures (the nucleus);
• Mounted file system
• The process creates 0, called the swapper, which is the process scheduler is part of the core and he is considered the system.
• It creates a process called init, which is the parent of all processes occurring after the system;
• It executes the init process which initializes its data structures, then read the file / etc / inittab to determine what processes will be created and / etc / rc to start system processes running in memory during the entire operation of the system, called background processes or daemons. Init process reads / etc / ttys to determine the number of terminals in the system and creates one child process for each terminal. Then go in the state blocked the init process to be completed one of the processes. Each child process executes the program associated with a terminal requesting login name and password entry. Data entered is verified by comparison with data from file / etc / passwd. If the user has access to the system, then this process is launched command interpreter chosen by the user. Otherwise, seek reintroduction program login name and password.
Note: The process is called scheduler 0 for paging systems and swapper for exhaust systems.
Process characteristics:
As I mentioned something earlier, a user process can run in user mode and kernel mode. User mode processes have access only to its own area code, data and user stack. Kernel mode process and may contain privileged instructions to access the kernel data structures. Core in terms of processes, not a separate process but becomes an integral part of user process. Virtual address space of a process is between 0 and maximum virtual address accessible process and has three segments: code segment, data segment and stack segment.

Processes arise, are carried out and disappear by using system calls (system functions). Any UNIX process except process 0, is created by fork system call function. Newly created process is called a child process and the process that called fork function is called the parent process. Initially, images of the two memory processes are identical, and then they can have their own image in memory. The process can be run the same code or another. Files opened by parent process before the fork call will be shared between parent and child. Function is used to execute code exec. Mechanism execution of shell commands is:
• The shell reads the command line and separates the order of its arguments;
• The fork call the function after which there will be two processes: the parent (the process that executes shell code) and son (the process that will execute command);
• Parent of a call processor function gives son wait and enter the waiting state;
• child process calls exec which executes a new program (command given). Loading kernel memory area of the new shell program and the process is continued with this program, which they are submitted arguments;
• At the end of the program execution system to call the function exit, which lead to completion of process control play son and father (he comes out of standby) After his son process enter zombie state: although it’s over, but the parent process can eliminate son process in process table.
Most important operations carried out by the kernel by calling the fork function are:
• allocate a new table entry processes;
• Associate a unique descriptor son process;
• Make a copy of the image memory logic parent;
• Communicate the process descriptor son’s father;
• transfer process be stopped in the state (memory or disk evacuated);
In Unix there are mechanisms through which the synchronization process, using several types of signals that can be exchanged between processes. Not applicable to this detail (maybe next year when you can program in C), but I remember only kill function that sends signals to end processes (more details in the next chapter).




