Datasheet

8
Part 1: Starting Out with Ubuntu
Each shared memory segment has an owner that created the segment. Each segment
also has a standard Linux permissions setting that sets the availability of the segment
for other users. The key value is used to allow other users to gain access to the shared
memory segment.
Software Program Management
The Linux operating system calls a running program a process. A process can run in the
foreground, displaying output on a display, or it can run in the background, behind the
scenes. The kernel controls how the Linux system manages all the processes running on
the system.
The kernel creates the first process, called the init process, to start all other processes on
the system. When the kernel starts, it loads the init process into virtual memory. As the
kernel starts each additional process, it allocates to it a unique area in virtual memory to
store the data and code that the process uses.
Most Linux implementations contain a table (or tables) of processes that start automati-
cally on boot-up. This table is often located in the special file
/etc/inittabs. However,
the Ubuntu Linux system uses a slightly different format, storing multiple table les in
the
/etc/event.d folder by default.
The Linux operating system uses an init system that utilizes run levels. A run level can
be used to direct the init process to run only certain types of processes, as dened in
the
/etc/inittabsle or the files in the /etc/event.d folder. There are seven init run
levels in the Linux operating system. Level 0 is for when the system is halted, and level
6 is for when the system is rebooting. Levels 1 through 5 manage the Linux system while
it’s operating.
At run level 1, only the basic system processes are started, along with one console ter-
minal process. This is called Single User mode. Single User mode is most often used for
emergency filesystem maintenance when something is broken. Obviously, in this mode
only one person (usually the administrator) can log into the system to manipulate data.
The standard init run level is 3. At this run level most application software, such as net-
work support software, is started. Another popular run level in Linux is 5. This is the run
level where the system starts the graphical X Window software and allows you to log in
using a graphical desktop window.
The Linux system can control the overall system functionality by controlling the init run
level. By changing the run level from 3 to 5, the system can change from a console-based
system to an advanced, graphical X Window system.
Later on, in Chapter 19, “The Command Line,” you’ll see how to use the
ps command to
view the processes currently running on the Ubuntu system. Here are a few lines extracted
from the output of the
ps command:
test@testbox~$ ps ax
PID TTY STAT TIME COMMAND
1 ? Ss 0:01 /sbin/init
2 ? S< 0:00 [kthreadd]
3 ? S< 0:00 [migration/0]
4 ? S< 0:00 [ksoftirqd/0]
5 ? S< 0:00 [watchdog/0]
4708 ? S< 0:00 [krfcommd]
95080c01.indd 8 3/5/09 12:15:37 AM