OPS102 - Week 5 - Adi - ProcessManagement
.docx
keyboard_arrow_up
School
Seneca College *
*We aren’t endorsed by this school
Course
102
Subject
Information Systems
Date
Dec 6, 2023
Type
docx
Pages
21
Uploaded by DrQuail3570
OPS102 – Week 5 – Process Management - Sample Lab
Student Name: Aditya Mahesh Tambe
Student ID: 171969223
Introduction
Both Linux and Windows, as powerful operating systems, provides robust process management
capabilities. Understanding how to manage processes is crucial for effectively utilizing the
operating system. A process refers to an executing program or task, whether it is a system
service, a user application, or a background utility.
Here are some fundamental concepts related to process management:
Processes and Process IDs (PIDs):
Every process in Linux or Windows is assigned a
unique identifier called a Process ID (PID). PIDs enable the system to track and manage
processes effectively. You can view the PIDs of running processes using various
commands and utilities.
Process States
: Processes can be in different states, such as running, sleeping, stopped,
or terminated. Understanding these states helps in monitoring and controlling processes
effectively. Commands like ps and top provide insights into process states.
Process Ownership
: Each process is associated with an owner, typically the user who
initiated or owns the process. Process ownership is essential for managing permissions
and access control.
Process Hierarchy
: processes follow a hierarchical structure. A process can create child
processes, and those child processes can, in turn, spawn their own subprocesses. This
hierarchical arrangement helps organize and manage related processes.
Process Control
: Linux provides various commands and tools to control processes. You
can start, stop, pause, resume, or terminate processes using commands like kill, killall,
pkill, and signals such as SIGSTOP and SIGCONT. Windows offers multiple methods to
control processes. The Task Manager, a built-in Windows utility, allows you to view and
manage running processes. It enables you to end processes, change process priorities,
and analyze resource usage.
F
oreground and Background Processes
: Both Linux and windows allow executing
processes either in the foreground or background. Foreground processes run directly in
the terminal, while background processes operate independently, freeing up the
terminal for other tasks. You can switch between foreground and background using
commands like &, fg, and bg commands in Linux. In windows, Task Manager and
PowerShell provide options to manage processes in both modes.
Process Monitoring and Resource Usage
: Monitoring the performance and resource
usage of processes is essential for system administrators. In Linux, tools like top, htop,
and ps provide real-time information on CPU usage, memory consumption, and other
vital statistics. In Windows, Task Manager provides real-time information on CPU usage,
memory consumption, disk activity, and network utilization. Performance Monitor
(PerfMon) is a powerful tool for in-depth process monitoring.
Activity 1: Monitoring Linux Processes with ps command
Perform the following steps:
1.
Make certain that you are logged into your Matrix account
2.
Issue a Linux command to confirm that you are located in your
home
directory.
3.
The
ps
_
command provides a list of processes that are running, or at least
that were running at the time the command was called. Run the command
ps
in your terminal
What output you see, take a screenshot and paste below.
Ans. With the ps command, I am able to see the total files and directories in my matrix account.
4.
How many processes are currently running? What information is displayed for each process?
Answer below.
Ans. There are 0 process running in the matrix account because as a student login in we don’t
have access, to see the foreground as well as background.
5.
Use the ps command with the ‘-e’ option to display information about all processes in the
system. Run the command
ps -e
6.
Analyze the output and identify the running processes on your system. Note the PID, TTY, and
CMD columns. What do these column mean?
PID
stands for unique process ID
TTY
stands for terminal type that the user is logged into.
CMD
stands for the name of the command that has been started or launched the process.
7.
Use the 'ps' command with the '-f' option to display a full-format listing of the processes.
Run
the command
ps -f
8.
Examine the output, which provides detailed information about each process, including UID, PID,
PPID, CPU%, MEM%, START, and CMD
UID
stands for the user who created or initiated the process and it identifies the owner of the
process and helps in accessing the control and security for it.
PID
stands for unique numerical identifier assigned to each process, and allows us to interact
with specific processes.
PPID
stands for parent process ID which indicates the PID of the parent process that spawned
the current or working process, It demonstrates the process hierarchy.
CPU%
stands for the CPU usage and shows the percentage of CPU resources that process is
currently using or utilizing. It helps in monitoring the usage of resource.
9.
Use the 'ps' command with the '-l' option to display a long listing format of processes. Execute
the following command:
ps -l
10.
Analyze the output and observe the columns displayed, including F, S, UID, PID, PPID, PRI, NI,
ADDR, SZ, RSS, WCHAN, STAT, TTY, TIME, and CMD.
F
stands for flags and indicates different process status flags, whether the process is in
foreground or in background.
S
stands for state which show the current state for the process is it running, stopped.
UID
stands for the user who created or initiated the process and it identifies the owner of the
process and helps in accessing the control and security for it.
PID
stands for unique numerical identifier assigned to each process, and allows us to interact
with specific processes.
PPID
stands for parent process ID which indicates the PID of the parent process that spawned
the current or working process, It demonstrates the process hierarchy.
PRI
stands for the priority and prioritize the process according to its importance.
NI
stand Nice value which helps the CPU to prioritize the CPU queue.
ADDR
stands for the memory address and showing its location in the memory
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help