Processes

3.2 Compare and contrast components of an operating system.

📘CompTIA ITF+ (FC0-U61)


1. What is a Process?

  • A process is a program or task that the operating system is currently running.
  • Every time you open an application, like Microsoft Word, Chrome, or a server script, the operating system creates a process for it.
  • A process includes:
    1. The program code – what the program does.
    2. Resources – memory, CPU time, files, and input/output devices the process uses.
    3. Process state information – like whether the process is running, waiting, or stopped.

Example: If you start a backup script on a server, the OS creates a process for that script to manage its execution.


2. Process States

A process goes through different states while it runs. The main ones are:

StateDescriptionIT Example
NewProcess is created but not yet running.A script is uploaded to a server but hasn’t started.
ReadyProcess is waiting to use the CPU.A web server process is waiting for CPU time to handle a request.
RunningProcess is actively using the CPU.An antivirus scan is running on the system.
Waiting / BlockedProcess is waiting for some resource (like disk or network).A database query is waiting for data from a slow hard drive.
Terminated / ExitProcess has finished execution.A scheduled report script completes and stops.

3. Process Management by the OS

The operating system manages all processes to make sure the computer works efficiently. It handles:

  1. Creating processes
    • When a user runs a program or a system service starts, the OS creates a process.
    • IT Example: A server starts the nginx web server process when the server boots.
  2. Scheduling processes
    • The OS decides which process gets CPU time and when.
    • IT Example: On a busy database server, multiple queries compete for CPU; the OS scheduler ensures each query gets time to execute.
  3. Terminating processes
    • The OS stops a process when it finishes or if it needs to free resources.
    • IT Example: A log-cleanup script finishes after removing old logs, and the OS ends the process.
  4. Suspending and resuming processes
    • The OS can pause a process temporarily and resume it later.
    • IT Example: A backup process might be paused while high-priority updates run, then resumed after.

4. Multitasking and Processes

  • Modern OSes allow multitasking, meaning multiple processes can run at the same time.
  • The OS switches between processes very quickly (CPU scheduling), so it seems like everything runs simultaneously.
  • IT Example: On a server, the web server, database, and backup scripts all appear to run at the same time, but the OS schedules CPU usage for each process.

5. Process Identifiers and Priority

  • Every process has a unique Process ID (PID).
  • Processes can have priority levels:
    • High-priority processes get CPU time first.
    • Low-priority processes wait.
  • IT Example: A critical system monitoring process may have higher priority than a batch report generation.

6. Process Control Tools

  • IT administrators often manage processes using tools:
    • Task Manager (Windows) or htop/top (Linux) to view and manage running processes.
    • kill command in Linux to stop a misbehaving process.
    • Services.msc in Windows to manage system processes/services.

7. Key Exam Points to Remember

  1. A process is a running instance of a program.
  2. Processes have states: New, Ready, Running, Waiting, Terminated.
  3. OS handles creation, scheduling, termination, and suspension of processes.
  4. Multitasking is managed by switching CPU time between processes.
  5. Each process has a PID and a priority.
  6. IT admins use tools to monitor and control processes.

8. Quick IT Examples

ConceptIT Example
ProcessA database backup script running on a server.
ReadyA web server waiting for CPU to handle incoming requests.
RunningAntivirus scanning all files.
WaitingA print job waiting for the printer.
TerminatedA script that completes log cleanup.
High-prioritySecurity monitoring process.
Low-priorityNightly report generation.
Buy Me a Coffee