Linux with Operating System Concepts



Download 5,65 Mb.
Pdf ko'rish
bet58/254
Sana22.07.2022
Hajmi5,65 Mb.
#840170
1   ...   54   55   56   57   58   59   60   61   ...   254
Bog'liq
Linux-with-Operating-System-Concepts-Fox-Richard-CRC-Press-2014

Abbreviation
Meaning/Usage
STAT (or S)
Status: D (uninterruptible sleep), R (running), S (interruptible sleep), T 
(stopped), W (paging), X (dead), Z (defunct/zombie)
May be followed by: 
<
(high priority), N (low priority), L (locked pages), s 
(session leader), l (multi-threaded), 
+
(foreground)
%CPU
CPU utilization of process
%MEM
Process’ fraction of memory usage
COMMAND/CMD
Command including all parameters
START
Time process started
TIME
Accumulated CPU time
CLS
Class (used if process was scheduled)
ELAPSED
Elapsed time since process started
F
Flags associated with the process
GID, UID, PID
Group and user ID that owns the process, process ID
LABEL
Security label, primarily used in SE Linux
NI
Niceness value
PPID
Parent process’ ID
RSP
Stack pointer
RSS (or RSZ)
Physical memory usage (does not include swap space)
SESS
Session ID
SZ (or VSZ)
Swap space size
P
Processor executing process (if multiprocessor)
TTY
Terminal window of process, ? if process is not from a terminal window


Managing Processes

145
4.5 MANAGING LINUX PROCESSES
By default, Linux runs processes and threads together by switching off between them. This 
is known as concurrent processing in that processes (and threads) overlap in execution. 
Because of the speed and power of modern processors, the user is typically unaware of the 
time elapsing as the processor moves from one process to another and back. Literally, the 
processor moves back to the first process in under a millisecond (thousandths of a second). 
Concurrent processing of processes is known as multitasking while concurrent processing 
of threads is known as multithreading. Linux does both.
We mentioned the difference between processes and threads in Section 4.2, but let us 
explore this again. A process is a stand-alone entity, it has its own code, data, and sta-
tus information. A thread, sometimes called a lightweight process, shares its code and 
data (or at least some data) with other threads. Threads are in essence portions of a pro-
cess. Threads will communicate with each other through shared data. For the processor 
to switch between threads, it does not have to load new program code into memory as it is 
already present. Switching between processes often requires additional overhead.
We should also define an application. As users, we run programs like Firefox or 
OpenOffice Writer. However, larger applications like these do not consist of single pro-
cesses. Instead, there are many different processes that might run in support of such soft-
ware. Some of these processes are services (parts of the operating system, covered later in 
the textbook). Some of these are multiple processes that support each other. In other cases, 
there may be a single process which spawns child processes or child threads.
Although by default, Linux executes processes and threads using multitasking and mul-
tithreading, it does not mean that all processes run in this fashion. As a user, you can dic-
tate how processes run. The Linux command 
batch
, for instance, forces a process to run 
in batch mode. A batch process is one that does not interact with the user. Therefore, any 
batch process must be provided its input at the time the process executes. Output might be 
sent to a file or to a terminal window. Batch processing in Linux defaults to executing only 
if system load permits it. This occurs when CPU utilization drops below a pre-set amount, 
usually 80%. Background processes that require I/O essentially are stopped so that they 
do not take up CPU time. In effect, if you are running entirely from the command line 
(no GUI at all), and you are not running background processes, then you are running in a 
single tasking mode.
Since the default is to run processes (and threads) concurrently, does the user have any 
control over how these are run? That is, can the user dictate that certain processes are more 
important than others? The answer is yes, by specifying priorities for processes. Priorities 
establish the amount of CPU time that processes are given as the CPU switches off between 
them. The higher the priority, the more attention the CPU provides the given process.
A process’ priority is established by setting its 

Download 5,65 Mb.

Do'stlaringiz bilan baham:
1   ...   54   55   56   57   58   59   60   61   ...   254




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish