Processes, threads, process states and context switching
40 min · Intermediate
An operating system (OS) is the program that manages a computer's hardware and gives every other program a safe, simple way to use it. Windows, Linux, macOS and Android are operating systems; your Java program runs on top of one and asks it for CPU time, memory and files.
Topics in this lesson
- What an OS does: kernel, user mode and system calls
- Process vs thread: memory, cost, communication
- Process states and the PCB
- Context switching and its cost
- Interview questions with model answers
Interview questions this lesson answers
- What is an operating system?
- What are the main functions of an OS?
- What is the difference between a program and a process?
- What does a process look like in memory?
- What is a kernel?
- What is the difference between a monolithic kernel and a microkernel?
- What is the difference between user mode and kernel mode?
- What is a system call? Give examples.
- What is the difference between an interrupt and a trap?
- What is the difference between a process and a thread?
Sign in free to continue this lesson
Create a free account to read every lesson, practise with the exercises and keep track of your progress.