Professional Documents
Culture Documents
¿Qué es GNU/Linux?
GNU es un sistema operativo creado en 1983 por Richard Stallman, este sistema es
mantenido actualmente por la Free Software Foundation. Este sistema operativo está
basado en cómo está construido UNIX y mantiene su compatibilidad con él, la prueba hay
instrucciones de la consola de comandos que son compatibles tanto en UNIX como en
GNU. La principal diferencia entre UNIX y GNU, es que GNU es de software libre.
Cuando se comenzó a trabajar en este sistema operativo también se comenzó a trabajar en
su núcleo llamado hard núcleo que hasta el día de hoy no tiene ninguna versión estable,
todo sistema operativo debe tener un núcleo para poder funcionar, así que decidieron
integrar el núcleo de Linux al sistema operativo GNU.
Linux es un núcleo de sistema desarrollado en 1991 por Linus Torvalds y también está
basado en UNIX. En 1992 GNU y Linux se unen para formar un sistema operativo
funcional con carácter de software libre.
Introducción
“Un sistema operativo es el software encargado de ejercer el control y coordinar el uso del
hardware entre diferentes programas de aplicación y los diferentes usuarios. El sistema
operativo se encarga de crear el vínculo entre los recursos materiales, el usuario y las
aplicaciones (procesador de texto, videojuegos, etcétera).” (Galvin, Silberschatz, Gagne
(2005). Fundamentos de sistemas operativos. McGraw-Hill.)
Cada proceso en Linux tiene un nivel de prioridad que oscila entre -20 (prioridad más
alta) y 20 (prioridad más baja). Cuanto mayor sea el nivel de prioridad, más lentamente
se ejecutará el proceso.
Todos estos comandos van acompañados por parámetros que establecen diferentes acciones del
mismo, estos pueden ser vistos empleando el comando man +comando.
What is GNU/Linux?
Linux is a system kernel developed in 1991 by Linus Torvalds and is also based on UNIX.
In 1992 GNU and Linux came together to form a functional operating system with a free
software character.
Introduction
"An operating system is the software responsible for controlling and coordinating the use of
hardware between different application programs and different users. The operating system
is responsible for creating the link between the material resources, the user and the
applications (word processor, video games, etc.). (Galvin, Silberschatz, Gagne (2005).
Operating system fundamentals. McGraw-Hill.)
Starting from the definition of an Operating System, any program that runs on any OS is a
process that requires resources, which are assigned and managed by the kernel, thus
fulfilling one of the OS functionalities. Good process management and a good multiplexing
of hardware resources declare that operating systems perform well. This is why it is
important for us to know how this management works, more exactly in the GNU/Linux OS.
Each process is represented in the operating system with a Process Control Block (PCB). A
number of information items are stored on this PCB. In turn, each PCB generated is
inserted into the process table.
In Linux, initially, the Process Table was a fixed size task_strcut<linux/sched.h> vector, so
the maximum number of processes was limited. Currently, the Process Table is actually a
doubly linked list using the next_task and prev_task pointers.
These elements that make up the PCB are: process identifier (PID), process status, CPU
registers (accumulators, stack pointers, index registers and general registers), CPU planning
information (process priority, pointers to planning queues, etc.), memory management
information, accounting information (CPU usage time, process numbers, etc.), I/O device
status information (list of open files, etc.).
Done (TASK_RUNNING). The process could be executed, but another process is currently
running.
Zombie (TASK_ZOMBIE). The process is finished but, for some reason, its task structure
must still remain in the process table.
Knowing the necessary information that the GNU/Linux operating system uses regarding
the processes, we now proceed to know the basic commands for the administration and
management of these:
o Pstree command: This command shows the hierarchy of the processes through a tree
structure. Thus we can see the relationships that exist between the processes.
If the PID of a process is specified, the tree will start from that process, otherwise the tree
will start from the init process (PID=1) and show all the processes in the system.
Specifying a valid user will display the hierarchy of all user processes.
o Kill command: Used to kill or stop a process, it works by giving its ID. The kill command
allows you to send an arbitrary message to a process, or several processes, with a PID equal
to pids. The sigspec parameter is the integer value of the signal or the name of the signal to
be sent to the process.
o Pkill and killall commands: These commands can kill processes by giving them their
name. This command is slightly different from the kill command for two reasons; it first
uses the process name instead of the pid, and then sends the signal to all processes with the
same name.
o Top command: Displays a list similar to that of the "ps" command, but it is updated in
real time.
o Using & after the name of a process, it is possible to execute it in the background, while
assigning it a JobsID, the same function fulfills the commands CTRL + Z.
o Jobs command: Displays on the screen the JobsID + the processes that are running in the
background.
Each process on Linux has a priority level ranging from -20 (highest priority) to 20 (lowest
priority). The higher the priority level, the slower the process will run.
All these commands are accompanied by parameters that set different actions of the same,
they can be seen using the command common +command.