Nepedia
Back to Discover
Fluent Reader
💻

Process (computing)

technology Maturity 9-11 Next article →

A computer program is a collection of instructions. These instructions stay still on a disk. A process is what happens when the computer actually runs those instructions.

Concepts- Program vs. Process vs. Thread
Concepts- Program vs. Process vs. Thread

When you start a program, it is loaded into the computer's memory. This turns the passive file into an active process. One program can even start many different processes at once. This happens if you open the same app several times. A process is like a living task that takes up time. It needs specific resources to do its job correctly.

To work, a process needs several important things. It needs a copy of its machine code in the memory. It also needs a space called a heap for temporary data. It uses a call stack to keep track of its current events. The operating system gives the process permission to use certain files. These are often called file descriptors in Unix systems. It also needs the processor, or CPU, to follow its instructions. The system keeps track of all this in a process control block.

Process states
Process states

Computers use multitasking to handle many processes at once. A single CPU core can only do one thing at a time. To solve this, the computer uses a trick called concurrency. It performs a context switch to swap between different tasks. This switch happens very fast so it looks like they run together. The computer might switch when a task waits for a user to click a mouse. It can also switch when a task has used its fair share of time. This keeps the processor busy instead of letting it sit idle.

Processes go through different stages while they work. First, a process is created when it is loaded into memory. Then, it enters a waiting state for its turn to run. When the scheduler picks it, the state changes to running. If the process must wait for a file, it enters a blocked state.

Htop 3.0.1 screenshot
Htop 3.0.1 screenshot

Once the work is done, the process is terminated. The operating system then removes it from the main memory. This cycle allows the computer to manage many jobs safely.

KSysGuard 5.22.0 process table screenshot
KSysGuard 5.22.0 process table screenshot

This way of working started many years ago. In the early 1960s, software was just for controlling computers. As computers got faster, multiprogramming became very important. This meant running several programs at once to save time. Later, new ideas like time-sharing and networks changed everything. These changes led to the multitasking we use today. You can see this in action when you move a mouse. The computer gives high priority to your movements so they feel instant. This is why your music or video plays smoothly while you work.

439 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (4)
File:Concepts- Program vs. Process vs. Thread.jpg
Concepts- Program vs. Process vs. Thread.jpg
File:Htop_3.0.1_screenshot.png
Htop_3.0.1_screenshot.png
File:KSysGuard 5.22.0 process table screenshot.png
KSysGuard 5.22.0 process table screenshot.png
File:Process states.svg
Process states.svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.