Beginner Topic 5 of 51 Operating Systems
Processes
Running instances of programs with their own resources.
How it works
A process is a running instance of a program with its own virtual address space containing code, data, heap and stack, plus resources such as open files, credentials and at least one thread. The OS tracks it in a process control block. Processes are isolated from each other, so one cannot read another's memory without explicit sharing, and they have a parent-child hierarchy.
Step-by-step walkthrough
- A program is only a file on disk.
- Starting it creates a process.
- The process gets its own address space of code, heap and stack.
- The scheduler gives it CPU time.
- It also holds open files and other resources.
Where it is used
Every application you launch is a process, and shells, web servers and compilers create many. Multi-process designs such as browsers isolate tabs for stability and security.
Common pitfall
Creating processes is heavier than creating threads, and communicating between them needs IPC. Zombie processes remain if parents do not wait for children, and orphaned processes are adopted by init. Leaked processes, runaway forks and unbounded memory use can exhaust system limits, so set ulimits and clean up children.
Where it fits in the course
Processes is topic 5 of 51 in Operating Systems, rated Beginner. It follows System Calls. The next topic is Process States.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Operating Systems quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Operating Systems quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Processes?
Where do people use Processes?
What is the most common mistake with Processes?
What should I learn before this topic?
How can I practice it?
Is Processes hard to learn?
How long does it take to learn Processes?
Which topics are related to Processes?
What should I study after Processes?
Related topics
- System Calls (Operating Systems)
- Process States (Operating Systems)
- User Mode vs Kernel Mode (Operating Systems)
- Process Control Block (Operating Systems)
- Communicating Sequential Processes (Concurrency & Parallelism)
- Stochastic Processes (Math for Computing)