1.3. Processes

A process defines an instance of a program being executed and its environment. As for files, we will only mention the most important differences; you should refer to the Reference Manual for a more in-depth discussion on this subject.

The most important difference is, once again, directly related to the user concept: each process is executed with the rights of the user whom launched it. Internally, the system identifies processes in a unique way: with a number. This number is called the process ID, or PID. . From this PID, the system knows, among other things, who (which user, that is) has launched the process. Then, it just has to verify the process' "validity". Therefore, if we take our a_file example, a process launched by the peter will be able to open this file in read-only mode, but not in read-write mode, as the rights associated to the file forbid it. Once again, the exception to the rule is root...

thanks to this, GNU/Linux is virtually immune against viruses. In order to operate, viruses must infect executable files. As a user, you do not have any write access to vulnerable system files, so the risk is greatly reduced. Add to this the fact that generally speaking, viruses are very rare in the UNIX world. So far, there have been only three known viruses for Linux, and they were completely harmless when launched by a normal user. Only one user can damage a system by activating these viruses, and once again, it is root.

Interestingly enough, anti-virus software does exist for GNU/Linux, but for DOS/Windows files... The reason for this is that, more and more often, you will see GNU/Linux file servers serving Windows machines with the help of the Samba software package.

Linux makes it easy to control processes. One way to control them are signals. With signals, you can, for example, suspend a process or kill it. Just send the corresponding signal to the process and you are done. However, you are limited to sending signals to your own processes, not processes launched by any other user. The exception to this rule is root. Yes, him again! In "Process control", you will learn how to obtain the PID of a process and send it signals.


Tux on Star from MandrakeSoft Linux is a registered trademark of Linus Torvalds. All other trademarks and copyrights are the property of their respective owners.
Unless otherwise stated, all the content of these pages and all images are Copyright MandrakeSoft S.A. and MandrakeSoft Inc. 2002.
http://www.mandrakelinux.com/