SlideShare a Scribd company logo
1 of 32
Download to read offline
https://github.com/syaifulahdan/os­practice|Operating System Practice |1 to 45 
OPERATING SYSTEMS PRACTICE
Process and Management Process
Practice : 4A

Process on Linux Operating System

Process Management on Linux Operating Systems
https://github.com/syaifulahdan/os­practice|
https://github.com/syaifulahdan/os­practice|Operating System Practice |2 to 45 
A. Objectives
1. Understand the process concepts in Linux operating system.
2. Shows some ways of showing parent and child process
relationships.
3. Displays the status of a process with several different formats.
4. Controlling the process on the shell.
5. Understanding priority scheduling.
https://github.com/syaifulahdan/os­practice|Operating System Practice |3 to 45 
B. Basic Theory
https://github.com/syaifulahdan/os­practice|Operating System Practice |4 to 45 
1. Concept Proces on linux OS

Process is the program being executed.

Whenever using the system utility or application
program from the shell, one or more "child" processes
will be created by the shell according to the given
command.

Each time the instruction is given in the Linux shell, the
kernel creates an id-process.

This process is also called the Unix terminology as a
Job.

The process Id (PID) starts from 0, the INIT process,
followed by the next process (listed in /etc 
/inittab).
https://github.com/syaifulahdan/os­practice|Operating System Practice |5 to 45 

Several types of processes:

Foreground
Processes created by the user directly at the terminal
(interactive, dialog)

Batch
Processes are collected and executed sequentially (one by
one). Batch Prose is not associated (interacting) with terminal.

Daemon
Processes that wait for requests from other processes and
perform tasks according to the request.
If there is no request, then this program will be in "idle" and do
not use CPU count time. Generally the name of the daemon
process in UNIX ends in d, for example inetd,  named, 
popd etc.
https://github.com/syaifulahdan/os­practice|Operating System Practice |6 to 45 
2. Signal
The process can send and receive signals from and to
other processes. The process of sending a signal
through the instruction "kill" with the format.
kill [­nomor sinyal] PID
Signal number: 1 to maximum signal number defined by
system The most important signal number standard is:
https://github.com/syaifulahdan/os­practice|Operating System Practice |7 to 45 
No Signal Name Description
1 SIGHUP
Hangup, signals are sent when the process
is disconnected, for example through the
breaking of the modem connection
2 SIGINT Interrupt signal, through ^ C
3 SIGQUIT Quit signal, via ^ 
9 SIGKILL Signal Kill, stop the process
15 SIGTERM Software termination signals
https://github.com/syaifulahdan/os­practice|Operating System Practice |8 to 45 
3. Sending Signal
Sending a signal is a communication tool between processes,
which tells the ongoing process that something must be
controlled. Based on the signal sent this process can react and
the administrator / programmer can determine the reaction.
Sending signals using instructions
kill [­nomor sinyal] PID
Before sending the PID signal the process to be sent must be
known first.
https://github.com/syaifulahdan/os­practice|Operating System Practice |9 to 45 
4. Control Process on Shell

Shell provides a job control facility that allows control of
multiple jobs or processes that are running at the same
time.

For example when doing text file editing and want to do
interrupt editing to do other things.

When done, can return (switch) to the editor and do the text
file editing again.

Job works on foreground or background.

In foreground only for one job at a time.

Job on the foreground will control the shell - receive input
from the keyboard and send output to the screen.

The job in the background does not accept input from the
terminal, usually running without requiring interaction.
https://github.com/syaifulahdan/os­practice|Operating System Practice |10 to 45 

Job on the foreground may be suspended, with press [Ctrl-
Z].

A paused job can be re-run in the foreground or background
as needed by pressing "fg" or "bg".

For the record, stopping a temporary job is very different
from doing an interrupt job (usually using [Ctrl-C]), where
the interrupted job will be permanently disabled and can not
be executed again.
https://github.com/syaifulahdan/os­practice|Operating System Practice |11 to 45 
5. Control Other Process

The ps command can be used to indicate all running
processes on the machine (not just processes in the current
shell) with the format :
ps –fae or
ps ­aux

Some versions of UNIX have a so-called top system utility
that provides an interactive way to monitor system activity.

Statistics in detail with running processes are displayed and
continually refreshed. The process is displayed in sequence
from the CPU utility. A useful key on the top is
https://github.com/syaifulahdan/os­practice|Operating System Practice |12 to 45 
s – set update frequency
u – display proses dari satu user
k – kill proses (dengan PID)
q – quit
The utility for performing process controls can be found on
UNIX systems is the killall command. This command will
stop the process according to PID or job number process.
https://github.com/syaifulahdan/os­practice|Operating System Practice |13 to 45 
C. Step by Step
https://github.com/syaifulahdan/os­practice|Operating System Practice |14 to 45 
1 Login as user.
2
Download the C ++ program to display primes
named primes.
3
Conduct the experiments below and then analyze
the experimental results.
4 Complete the practice questions.
https://github.com/syaifulahdan/os­practice|Operating System Practice |15 to 45 
D. Experiment
https://github.com/syaifulahdan/os­practice|Operating System Practice |16 to 45 
$ ps
Experiment 1 : Process Status
1. Move to the command line terminal (tty2) by
pressing Ctrl + Alt + F2 and login to terminal as user.
2. The ps (process status) instruction is used to view
the process conditions. PID is the Process Identity
Number, TTY is the terminal name where the process
is active, STAT contains S (Sleeping) and R (Running),
COMMAND is the instruction used.
https://github.com/syaifulahdan/os­practice|Operating System Practice |17 to 45 
$ ps -u
3. To see other factors / elements, use the -u (user)
option. %CPU is the CPU time presentation used by
the process, %MEM is the memory system
presentation used by the process, SIZE is the sum
memory used, RSS (Real System Storage) is the
amount of memory used, START is when the process is
enabled...
4. Looking for user-specific processes. The above
process is only limited to the user process, where the
user is logged in.
$ ps -u
$ ps –u <user>
https://github.com/syaifulahdan/os­practice|Operating System Practice |18 to 45 
5. Looking for other processes use the a (all) and au
(all user) options
6. Logout and press Alt + F7 to return to graphics
mode
$ ps –a
$ ps –au
https://github.com/syaifulahdan/os­practice|Operating System Practice |19 to 45 
Experiment 2 : Displays the Parent
and Child Process Relationships
1. Move to command line terminal (tty2) by pressing
Ctrl + Alt + F2 and login to terminal as user.
2. Type ps -eH and press Enter. Option e selects all
processes and options H produce a hierarchical
process view. The child process appears below parent
rocess. The child process is marked by multiple spaces.
$ ps ­eH
https://github.com/syaifulahdan/os­practice|Operating System Practice |20 to 45 
$ ps –e f
3. Type ps -e f and press Enter. The view is similar
to step 2. The -f option will display the status of the
process with graphic characters ( and _ )
4. Type pstree and press Enter. Will show all
processes on the system in the form of parent / child
hierarchy. Process the parent to the left of the child
process. For example the init process as a parent
(ancestor) of all processes on the system. Some child
from init has a child. Login process has bash process
as child. The bash process has a child startx process.
The startx process has child xinit and so on.
$ pstree
https://github.com/syaifulahdan/os­practice|Operating System Practice |21 to 45 
$ pstree | grep mingetty
5. Type pstree | grep mingetty and press Enter. Will
show all the mingetty process that runs on the system
in the form of virtual console. In addition to displaying all
processes, the process is grouped in a row with a
number as the number of running processes.
6. To view all PIDs for the process use the ­p option.
$ pstree –p
7. To show the process and ancestor in bold use option
­h.
$ pstree –h
https://github.com/syaifulahdan/os­practice|Operating System Practice |22 to 45 
$ ps -e | more
Experiment 3 : Displays the Status of
Processes with Different Formats
1. Move to command line terminal (tty2) by pressing
Ctrl + Alt + F2 and login to terminal as user.
2. Type ps -e | more and press Enter. The -e option
displays all processes in the form of 4 columns: PID, TTY,
TIME and CMD.
If the full page shows a prompt --More-- at the bottom of the
screen, press q to return to the command prompt....
https://github.com/syaifulahdan/os­practice|Operating System Practice |23 to 45 
3. Type ps ax | more and press Enter. Option a will
show all processes the resulting terminal (TTY).
The x option displays all processes the terminal does
not generate.
Logically this option is the same as the -e option.
There are 5 columns: PID, TTY, STAT, TIME and
COMMAND.
$ ps ax | more
If the full page shows a prompt --More-- at the
bottom of the screen, press q to return to the
command prompt....
https://github.com/syaifulahdan/os­practice|Operating System Practice |24 to 45 
4. Type ps -e f | more and press Enter. The -e f
option will display all processes in full list format.
$ ps ef | more
If the full page shows a prompt --More-- at the
bottom of the screen, press q to return to the
command prompt....
5. Type ps -eo pid, cmd | more and press Enter.
The -eo option will display all processes in the format
according to the user definition that consists of PID
and CMD columns.
$ ps –eo pid,cmd | more
https://github.com/syaifulahdan/os­practice|Operating System Practice |25 to 45 
If the full page shows a prompt --More-- at the
bottom of the screen, press q to return to the
command prompt....
6. Type ps -eo pid, ppid,% mem, cmd | more and
press Enter. Will display PID, PPID and% MEM columns.
PPID is the process ID of the parent process.
% MEM displays the percentage of memory system
used by the process. If the process uses only a small
amount of memory the system will get 0.
$ ps –eo pid,ppid,%mem,cmd | more
7. Logout and press Alt + F7 to return to graphics mode
https://github.com/syaifulahdan/os­practice|Operating System Practice |26 to 45 
$ yes
Experiment 4 : Control the process
on the shell.
1. Move to command line terminal (tty2) by pressing
Ctrl + Alt + F2 and login to terminal as user
2. Use the yes command that sends output y that never
stops
To stop it use Ctrl-C.
https://github.com/syaifulahdan/os­practice|Operating System Practice |27 to 45 
3. Turn standard output to /dev /null.
$ yes > /dev/null
If the full page shows a prompt --More-- at the
bottom of the screen, press q to return to the
command prompt....
To stop it use Ctrl-C.
4. One way to keep the yes command running but
the shell is still used for something else by putting
the process in the background by adding characters
& at the end of the command
$ yes > /dev/null &
The number in "[ ]" is a job number followed by PID.
https://github.com/syaifulahdan/os­practice|Operating System Practice |28 to 45 
5. To view the status of the process use the jobs
command.
$ jobs
6. To stop a job, use the kill command followed by
the job number or PID process. To identify job
number, followed by prefix with character "%".
$ kill %<nomor job> contoh: kill %1
7. View job status after termination
$ jobs
https://github.com/syaifulahdan/os­practice|Operating System Practice |29 to 45 
E. Exercise
https://github.com/syaifulahdan/os­practice|Operating System Practice |30 to 45 

Exercise : Practice 4A
1 Try the following command:
 
 $ ps
 $ ps ­u
 $ ps ­u <user>
 $ ps au
 $ ps ­eH
 $ ps ­e f
 $ pstree
 $ ps ­e | more
 $ ps ax | more
 $ ps ­ef | more
 $ jobs
 $ kill %<jobs number>
 
https://github.com/syaifulahdan/os­practice|Operating System Practice |31 to 45 

Practice Report : Practice 4A
1 Analyze your experimental results.
2 Analyze the exercises that have been done.
3 Give a conclusion from this lab.
Command Descripton
ps
ps ­u
ps ­u <user>
ps ­eH
pstree
jobs
kill %<jobs number>
https://github.com/syaifulahdan/os­practice|Operating System Practice |32 to 45 

“Pleasure in a job makes perfection on the results 
achieved”. Aristoteles

“Believe you can. You're halfway”. Theodore Roosevelt

“You might be able to delay, but time will not wait”. 
Benjamin Franklin 

“The effort will work if someone does not give up”. 
Napoleon Hill

“Opportunity to find a better strength in us arises 
when life seems to be very challenging”. Joseph 
Campbell

More Related Content

What's hot

Ch7 Process Synchronization galvin
Ch7 Process Synchronization galvinCh7 Process Synchronization galvin
Ch7 Process Synchronization galvinShubham Singh
 
Lec11 semaphores
Lec11 semaphoresLec11 semaphores
Lec11 semaphoresanandammca
 
Synchronization hardware
Synchronization hardwareSynchronization hardware
Synchronization hardwareSaeram Butt
 
How to build a feedback loop in software
How to build a feedback loop in softwareHow to build a feedback loop in software
How to build a feedback loop in softwareSandeep Joshi
 
Process synchronization(deepa)
Process synchronization(deepa)Process synchronization(deepa)
Process synchronization(deepa)Nagarajan
 
Operating System - Monitors (Presentation)
Operating System - Monitors (Presentation)Operating System - Monitors (Presentation)
Operating System - Monitors (Presentation)Experts Desk
 
Operating Systems - Process Synchronization and Deadlocks
Operating Systems - Process Synchronization and DeadlocksOperating Systems - Process Synchronization and Deadlocks
Operating Systems - Process Synchronization and DeadlocksMukesh Chinta
 

What's hot (10)

Monitors
MonitorsMonitors
Monitors
 
Process synchronization in operating system
Process synchronization in operating systemProcess synchronization in operating system
Process synchronization in operating system
 
Ch7 Process Synchronization galvin
Ch7 Process Synchronization galvinCh7 Process Synchronization galvin
Ch7 Process Synchronization galvin
 
Lec11 semaphores
Lec11 semaphoresLec11 semaphores
Lec11 semaphores
 
Synchronization hardware
Synchronization hardwareSynchronization hardware
Synchronization hardware
 
How to build a feedback loop in software
How to build a feedback loop in softwareHow to build a feedback loop in software
How to build a feedback loop in software
 
SYNCHRONIZATION
SYNCHRONIZATIONSYNCHRONIZATION
SYNCHRONIZATION
 
Process synchronization(deepa)
Process synchronization(deepa)Process synchronization(deepa)
Process synchronization(deepa)
 
Operating System - Monitors (Presentation)
Operating System - Monitors (Presentation)Operating System - Monitors (Presentation)
Operating System - Monitors (Presentation)
 
Operating Systems - Process Synchronization and Deadlocks
Operating Systems - Process Synchronization and DeadlocksOperating Systems - Process Synchronization and Deadlocks
Operating Systems - Process Synchronization and Deadlocks
 

Similar to Operating System Practice : Meeting 5- process and manajemen proces-a-slide

Operating System Practice : Meeting 6- process and manajemen proces-b-slide
Operating System Practice : Meeting 6- process and manajemen proces-b-slideOperating System Practice : Meeting 6- process and manajemen proces-b-slide
Operating System Practice : Meeting 6- process and manajemen proces-b-slideSyaiful Ahdan
 
Operating System Practice : Meeting 3 - operasi input output-slide
Operating System Practice : Meeting 3 - operasi input output-slideOperating System Practice : Meeting 3 - operasi input output-slide
Operating System Practice : Meeting 3 - operasi input output-slideSyaiful Ahdan
 
Lab report 201001067_201001104
Lab report 201001067_201001104Lab report 201001067_201001104
Lab report 201001067_201001104swena_gupta
 
Lab report 201001067_201001104
Lab report 201001067_201001104Lab report 201001067_201001104
Lab report 201001067_201001104swena_gupta
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linuxMazenetsolution
 
System Administration: Linux Process
System Administration: Linux ProcessSystem Administration: Linux Process
System Administration: Linux Processlucita cabral
 
Operating System Practice : Meeting 2-basic commands linux operating system-s...
Operating System Practice : Meeting 2-basic commands linux operating system-s...Operating System Practice : Meeting 2-basic commands linux operating system-s...
Operating System Practice : Meeting 2-basic commands linux operating system-s...Syaiful Ahdan
 
Managing Processes in Unix.pptx
Managing Processes in Unix.pptxManaging Processes in Unix.pptx
Managing Processes in Unix.pptxHarsha Patel
 
Managing Processes in Unix.pptx
Managing Processes in Unix.pptxManaging Processes in Unix.pptx
Managing Processes in Unix.pptxHarsha Patel
 
Write a program in C or C++ which simulates CPU scheduling in an opera.pdf
Write a program in C or C++ which simulates CPU scheduling in an opera.pdfWrite a program in C or C++ which simulates CPU scheduling in an opera.pdf
Write a program in C or C++ which simulates CPU scheduling in an opera.pdfsravi07
 
ECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/SnaptutorialECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/Snaptutorialpinck2380
 
ECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/SnaptutorialECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/Snaptutorialpinck200
 

Similar to Operating System Practice : Meeting 5- process and manajemen proces-a-slide (20)

Operating System Practice : Meeting 6- process and manajemen proces-b-slide
Operating System Practice : Meeting 6- process and manajemen proces-b-slideOperating System Practice : Meeting 6- process and manajemen proces-b-slide
Operating System Practice : Meeting 6- process and manajemen proces-b-slide
 
Operating System Practice : Meeting 3 - operasi input output-slide
Operating System Practice : Meeting 3 - operasi input output-slideOperating System Practice : Meeting 3 - operasi input output-slide
Operating System Practice : Meeting 3 - operasi input output-slide
 
LP-Unit3.docx
LP-Unit3.docxLP-Unit3.docx
LP-Unit3.docx
 
Lab report 201001067_201001104
Lab report 201001067_201001104Lab report 201001067_201001104
Lab report 201001067_201001104
 
Lab report 201001067_201001104
Lab report 201001067_201001104Lab report 201001067_201001104
Lab report 201001067_201001104
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linux
 
System Administration: Linux Process
System Administration: Linux ProcessSystem Administration: Linux Process
System Administration: Linux Process
 
Operating System Practice : Meeting 2-basic commands linux operating system-s...
Operating System Practice : Meeting 2-basic commands linux operating system-s...Operating System Practice : Meeting 2-basic commands linux operating system-s...
Operating System Practice : Meeting 2-basic commands linux operating system-s...
 
OS (1).pptx
OS (1).pptxOS (1).pptx
OS (1).pptx
 
Os lab final
Os lab finalOs lab final
Os lab final
 
Process management
Process managementProcess management
Process management
 
Managing Processes in Unix.pptx
Managing Processes in Unix.pptxManaging Processes in Unix.pptx
Managing Processes in Unix.pptx
 
Managing Processes in Unix.pptx
Managing Processes in Unix.pptxManaging Processes in Unix.pptx
Managing Processes in Unix.pptx
 
Write a program in C or C++ which simulates CPU scheduling in an opera.pdf
Write a program in C or C++ which simulates CPU scheduling in an opera.pdfWrite a program in C or C++ which simulates CPU scheduling in an opera.pdf
Write a program in C or C++ which simulates CPU scheduling in an opera.pdf
 
ECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/SnaptutorialECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/Snaptutorial
 
ECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/SnaptutorialECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/Snaptutorial
 
ch3 (1).ppt
ch3 (1).pptch3 (1).ppt
ch3 (1).ppt
 
ch3.ppt
ch3.pptch3.ppt
ch3.ppt
 
Lecture_Process.ppt
Lecture_Process.pptLecture_Process.ppt
Lecture_Process.ppt
 
ch3.ppt
ch3.pptch3.ppt
ch3.ppt
 

More from Syaiful Ahdan

Sertifikat EC00202128391
 Sertifikat EC00202128391 Sertifikat EC00202128391
Sertifikat EC00202128391Syaiful Ahdan
 
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...Syaiful Ahdan
 
Sertifikat ec00202059774
Sertifikat ec00202059774Sertifikat ec00202059774
Sertifikat ec00202059774Syaiful Ahdan
 
Sertifikat ec00202059775
Sertifikat ec00202059775Sertifikat ec00202059775
Sertifikat ec00202059775Syaiful Ahdan
 
Sertifikat EC00202045078
Sertifikat EC00202045078Sertifikat EC00202045078
Sertifikat EC00202045078Syaiful Ahdan
 
Sertifikat EC00202044723
 Sertifikat EC00202044723 Sertifikat EC00202044723
Sertifikat EC00202044723Syaiful Ahdan
 
Sertifikat EC00202023523
Sertifikat EC00202023523Sertifikat EC00202023523
Sertifikat EC00202023523Syaiful Ahdan
 
Sertifikat EC00201826309
Sertifikat EC00201826309Sertifikat EC00201826309
Sertifikat EC00201826309Syaiful Ahdan
 
Sertifikat EC00202023149
Sertifikat EC00202023149Sertifikat EC00202023149
Sertifikat EC00202023149Syaiful Ahdan
 
Sertifikat EC00202022868
Sertifikat EC00202022868Sertifikat EC00202022868
Sertifikat EC00202022868Syaiful Ahdan
 
Sertifikat EC00202021343
Sertifikat EC00202021343Sertifikat EC00202021343
Sertifikat EC00202021343Syaiful Ahdan
 
Sertifikat EC00202022755
Sertifikat EC00202022755Sertifikat EC00202022755
Sertifikat EC00202022755Syaiful Ahdan
 
Sertifikat EC00201987196
Sertifikat EC00201987196Sertifikat EC00201987196
Sertifikat EC00201987196Syaiful Ahdan
 
Sertifikat EC00201856484
Sertifikat EC00201856484Sertifikat EC00201856484
Sertifikat EC00201856484Syaiful Ahdan
 
Sertifikat EC00201856352
Sertifikat EC00201856352Sertifikat EC00201856352
Sertifikat EC00201856352Syaiful Ahdan
 
Sertifikat EC00201856994
Sertifikat EC00201856994Sertifikat EC00201856994
Sertifikat EC00201856994Syaiful Ahdan
 
Sertifikat EC00201856895
Sertifikat EC00201856895Sertifikat EC00201856895
Sertifikat EC00201856895Syaiful Ahdan
 
Meeting 2 introdcution network administrator
Meeting 2   introdcution network administratorMeeting 2   introdcution network administrator
Meeting 2 introdcution network administratorSyaiful Ahdan
 

More from Syaiful Ahdan (20)

Sertifikat EC00202128391
 Sertifikat EC00202128391 Sertifikat EC00202128391
Sertifikat EC00202128391
 
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
 
Sertifikat ec00202059774
Sertifikat ec00202059774Sertifikat ec00202059774
Sertifikat ec00202059774
 
Sertifikat ec00202059775
Sertifikat ec00202059775Sertifikat ec00202059775
Sertifikat ec00202059775
 
Sertifikat EC00202045078
Sertifikat EC00202045078Sertifikat EC00202045078
Sertifikat EC00202045078
 
Sertifikat EC00202044723
 Sertifikat EC00202044723 Sertifikat EC00202044723
Sertifikat EC00202044723
 
Sertifikat EC00202023523
Sertifikat EC00202023523Sertifikat EC00202023523
Sertifikat EC00202023523
 
Sertifikat EC00201826309
Sertifikat EC00201826309Sertifikat EC00201826309
Sertifikat EC00201826309
 
Sertifikat EC00202023149
Sertifikat EC00202023149Sertifikat EC00202023149
Sertifikat EC00202023149
 
Sertifikat EC00202022868
Sertifikat EC00202022868Sertifikat EC00202022868
Sertifikat EC00202022868
 
Sertifikat EC00202021343
Sertifikat EC00202021343Sertifikat EC00202021343
Sertifikat EC00202021343
 
Sertifikat EC00202022755
Sertifikat EC00202022755Sertifikat EC00202022755
Sertifikat EC00202022755
 
Sertifikat EC00201987196
Sertifikat EC00201987196Sertifikat EC00201987196
Sertifikat EC00201987196
 
Sertifikat EC00201856484
Sertifikat EC00201856484Sertifikat EC00201856484
Sertifikat EC00201856484
 
Sertifikat EC00201856352
Sertifikat EC00201856352Sertifikat EC00201856352
Sertifikat EC00201856352
 
Sertifikat EC00201856994
Sertifikat EC00201856994Sertifikat EC00201856994
Sertifikat EC00201856994
 
Sertifikat EC00201856895
Sertifikat EC00201856895Sertifikat EC00201856895
Sertifikat EC00201856895
 
Meeting 2 introdcution network administrator
Meeting 2   introdcution network administratorMeeting 2   introdcution network administrator
Meeting 2 introdcution network administrator
 
Pertemuan 5
Pertemuan 5Pertemuan 5
Pertemuan 5
 
Pertemuan 4
Pertemuan 4Pertemuan 4
Pertemuan 4
 

Recently uploaded

Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 

Recently uploaded (20)

Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 

Operating System Practice : Meeting 5- process and manajemen proces-a-slide

  • 1. https://github.com/syaifulahdan/os­practice|Operating System Practice |1 to 45  OPERATING SYSTEMS PRACTICE Process and Management Process Practice : 4A  Process on Linux Operating System  Process Management on Linux Operating Systems https://github.com/syaifulahdan/os­practice|
  • 2. https://github.com/syaifulahdan/os­practice|Operating System Practice |2 to 45  A. Objectives 1. Understand the process concepts in Linux operating system. 2. Shows some ways of showing parent and child process relationships. 3. Displays the status of a process with several different formats. 4. Controlling the process on the shell. 5. Understanding priority scheduling.
  • 4. https://github.com/syaifulahdan/os­practice|Operating System Practice |4 to 45  1. Concept Proces on linux OS  Process is the program being executed.  Whenever using the system utility or application program from the shell, one or more "child" processes will be created by the shell according to the given command.  Each time the instruction is given in the Linux shell, the kernel creates an id-process.  This process is also called the Unix terminology as a Job.  The process Id (PID) starts from 0, the INIT process, followed by the next process (listed in /etc  /inittab).
  • 5. https://github.com/syaifulahdan/os­practice|Operating System Practice |5 to 45   Several types of processes:  Foreground Processes created by the user directly at the terminal (interactive, dialog)  Batch Processes are collected and executed sequentially (one by one). Batch Prose is not associated (interacting) with terminal.  Daemon Processes that wait for requests from other processes and perform tasks according to the request. If there is no request, then this program will be in "idle" and do not use CPU count time. Generally the name of the daemon process in UNIX ends in d, for example inetd,  named,  popd etc.
  • 6. https://github.com/syaifulahdan/os­practice|Operating System Practice |6 to 45  2. Signal The process can send and receive signals from and to other processes. The process of sending a signal through the instruction "kill" with the format. kill [­nomor sinyal] PID Signal number: 1 to maximum signal number defined by system The most important signal number standard is:
  • 7. https://github.com/syaifulahdan/os­practice|Operating System Practice |7 to 45  No Signal Name Description 1 SIGHUP Hangup, signals are sent when the process is disconnected, for example through the breaking of the modem connection 2 SIGINT Interrupt signal, through ^ C 3 SIGQUIT Quit signal, via ^ 9 SIGKILL Signal Kill, stop the process 15 SIGTERM Software termination signals
  • 8. https://github.com/syaifulahdan/os­practice|Operating System Practice |8 to 45  3. Sending Signal Sending a signal is a communication tool between processes, which tells the ongoing process that something must be controlled. Based on the signal sent this process can react and the administrator / programmer can determine the reaction. Sending signals using instructions kill [­nomor sinyal] PID Before sending the PID signal the process to be sent must be known first.
  • 9. https://github.com/syaifulahdan/os­practice|Operating System Practice |9 to 45  4. Control Process on Shell  Shell provides a job control facility that allows control of multiple jobs or processes that are running at the same time.  For example when doing text file editing and want to do interrupt editing to do other things.  When done, can return (switch) to the editor and do the text file editing again.  Job works on foreground or background.  In foreground only for one job at a time.  Job on the foreground will control the shell - receive input from the keyboard and send output to the screen.  The job in the background does not accept input from the terminal, usually running without requiring interaction.
  • 10. https://github.com/syaifulahdan/os­practice|Operating System Practice |10 to 45   Job on the foreground may be suspended, with press [Ctrl- Z].  A paused job can be re-run in the foreground or background as needed by pressing "fg" or "bg".  For the record, stopping a temporary job is very different from doing an interrupt job (usually using [Ctrl-C]), where the interrupted job will be permanently disabled and can not be executed again.
  • 11. https://github.com/syaifulahdan/os­practice|Operating System Practice |11 to 45  5. Control Other Process  The ps command can be used to indicate all running processes on the machine (not just processes in the current shell) with the format : ps –fae or ps ­aux  Some versions of UNIX have a so-called top system utility that provides an interactive way to monitor system activity.  Statistics in detail with running processes are displayed and continually refreshed. The process is displayed in sequence from the CPU utility. A useful key on the top is
  • 12. https://github.com/syaifulahdan/os­practice|Operating System Practice |12 to 45  s – set update frequency u – display proses dari satu user k – kill proses (dengan PID) q – quit The utility for performing process controls can be found on UNIX systems is the killall command. This command will stop the process according to PID or job number process.
  • 14. https://github.com/syaifulahdan/os­practice|Operating System Practice |14 to 45  1 Login as user. 2 Download the C ++ program to display primes named primes. 3 Conduct the experiments below and then analyze the experimental results. 4 Complete the practice questions.
  • 16. https://github.com/syaifulahdan/os­practice|Operating System Practice |16 to 45  $ ps Experiment 1 : Process Status 1. Move to the command line terminal (tty2) by pressing Ctrl + Alt + F2 and login to terminal as user. 2. The ps (process status) instruction is used to view the process conditions. PID is the Process Identity Number, TTY is the terminal name where the process is active, STAT contains S (Sleeping) and R (Running), COMMAND is the instruction used.
  • 17. https://github.com/syaifulahdan/os­practice|Operating System Practice |17 to 45  $ ps -u 3. To see other factors / elements, use the -u (user) option. %CPU is the CPU time presentation used by the process, %MEM is the memory system presentation used by the process, SIZE is the sum memory used, RSS (Real System Storage) is the amount of memory used, START is when the process is enabled... 4. Looking for user-specific processes. The above process is only limited to the user process, where the user is logged in. $ ps -u $ ps –u <user>
  • 18. https://github.com/syaifulahdan/os­practice|Operating System Practice |18 to 45  5. Looking for other processes use the a (all) and au (all user) options 6. Logout and press Alt + F7 to return to graphics mode $ ps –a $ ps –au
  • 19. https://github.com/syaifulahdan/os­practice|Operating System Practice |19 to 45  Experiment 2 : Displays the Parent and Child Process Relationships 1. Move to command line terminal (tty2) by pressing Ctrl + Alt + F2 and login to terminal as user. 2. Type ps -eH and press Enter. Option e selects all processes and options H produce a hierarchical process view. The child process appears below parent rocess. The child process is marked by multiple spaces. $ ps ­eH
  • 20. https://github.com/syaifulahdan/os­practice|Operating System Practice |20 to 45  $ ps –e f 3. Type ps -e f and press Enter. The view is similar to step 2. The -f option will display the status of the process with graphic characters ( and _ ) 4. Type pstree and press Enter. Will show all processes on the system in the form of parent / child hierarchy. Process the parent to the left of the child process. For example the init process as a parent (ancestor) of all processes on the system. Some child from init has a child. Login process has bash process as child. The bash process has a child startx process. The startx process has child xinit and so on. $ pstree
  • 21. https://github.com/syaifulahdan/os­practice|Operating System Practice |21 to 45  $ pstree | grep mingetty 5. Type pstree | grep mingetty and press Enter. Will show all the mingetty process that runs on the system in the form of virtual console. In addition to displaying all processes, the process is grouped in a row with a number as the number of running processes. 6. To view all PIDs for the process use the ­p option. $ pstree –p 7. To show the process and ancestor in bold use option ­h. $ pstree –h
  • 22. https://github.com/syaifulahdan/os­practice|Operating System Practice |22 to 45  $ ps -e | more Experiment 3 : Displays the Status of Processes with Different Formats 1. Move to command line terminal (tty2) by pressing Ctrl + Alt + F2 and login to terminal as user. 2. Type ps -e | more and press Enter. The -e option displays all processes in the form of 4 columns: PID, TTY, TIME and CMD. If the full page shows a prompt --More-- at the bottom of the screen, press q to return to the command prompt....
  • 23. https://github.com/syaifulahdan/os­practice|Operating System Practice |23 to 45  3. Type ps ax | more and press Enter. Option a will show all processes the resulting terminal (TTY). The x option displays all processes the terminal does not generate. Logically this option is the same as the -e option. There are 5 columns: PID, TTY, STAT, TIME and COMMAND. $ ps ax | more If the full page shows a prompt --More-- at the bottom of the screen, press q to return to the command prompt....
  • 24. https://github.com/syaifulahdan/os­practice|Operating System Practice |24 to 45  4. Type ps -e f | more and press Enter. The -e f option will display all processes in full list format. $ ps ef | more If the full page shows a prompt --More-- at the bottom of the screen, press q to return to the command prompt.... 5. Type ps -eo pid, cmd | more and press Enter. The -eo option will display all processes in the format according to the user definition that consists of PID and CMD columns. $ ps –eo pid,cmd | more
  • 25. https://github.com/syaifulahdan/os­practice|Operating System Practice |25 to 45  If the full page shows a prompt --More-- at the bottom of the screen, press q to return to the command prompt.... 6. Type ps -eo pid, ppid,% mem, cmd | more and press Enter. Will display PID, PPID and% MEM columns. PPID is the process ID of the parent process. % MEM displays the percentage of memory system used by the process. If the process uses only a small amount of memory the system will get 0. $ ps –eo pid,ppid,%mem,cmd | more 7. Logout and press Alt + F7 to return to graphics mode
  • 26. https://github.com/syaifulahdan/os­practice|Operating System Practice |26 to 45  $ yes Experiment 4 : Control the process on the shell. 1. Move to command line terminal (tty2) by pressing Ctrl + Alt + F2 and login to terminal as user 2. Use the yes command that sends output y that never stops To stop it use Ctrl-C.
  • 27. https://github.com/syaifulahdan/os­practice|Operating System Practice |27 to 45  3. Turn standard output to /dev /null. $ yes > /dev/null If the full page shows a prompt --More-- at the bottom of the screen, press q to return to the command prompt.... To stop it use Ctrl-C. 4. One way to keep the yes command running but the shell is still used for something else by putting the process in the background by adding characters & at the end of the command $ yes > /dev/null & The number in "[ ]" is a job number followed by PID.
  • 28. https://github.com/syaifulahdan/os­practice|Operating System Practice |28 to 45  5. To view the status of the process use the jobs command. $ jobs 6. To stop a job, use the kill command followed by the job number or PID process. To identify job number, followed by prefix with character "%". $ kill %<nomor job> contoh: kill %1 7. View job status after termination $ jobs
  • 30. https://github.com/syaifulahdan/os­practice|Operating System Practice |30 to 45   Exercise : Practice 4A 1 Try the following command:    $ ps  $ ps ­u  $ ps ­u <user>  $ ps au  $ ps ­eH  $ ps ­e f  $ pstree  $ ps ­e | more  $ ps ax | more  $ ps ­ef | more  $ jobs  $ kill %<jobs number>  
  • 31. https://github.com/syaifulahdan/os­practice|Operating System Practice |31 to 45   Practice Report : Practice 4A 1 Analyze your experimental results. 2 Analyze the exercises that have been done. 3 Give a conclusion from this lab. Command Descripton ps ps ­u ps ­u <user> ps ­eH pstree jobs kill %<jobs number>
  • 32. https://github.com/syaifulahdan/os­practice|Operating System Practice |32 to 45   “Pleasure in a job makes perfection on the results  achieved”. Aristoteles  “Believe you can. You're halfway”. Theodore Roosevelt  “You might be able to delay, but time will not wait”.  Benjamin Franklin   “The effort will work if someone does not give up”.  Napoleon Hill  “Opportunity to find a better strength in us arises  when life seems to be very challenging”. Joseph  Campbell