AITeky Learn

Operating systems

Processes and threads, scheduling, deadlock, memory and paging. 19 questions with model answers.

1. What is an operating system? What does it do? Basic

An operating system is the software that manages a computer's hardware and gives programs a simple way to use it. It runs and schedules processes, manages memory, handles files and storage, talks to devices through drivers, keeps programs and users apart for security, and gives a user interface. Programs ask it for these services through system calls.

What the interviewer listens for

  • Manager between hardware and programs
  • Process, memory, file and device management
  • Security and protection
  • System calls

They may ask next: What is the kernel?

2. What is the difference between a process and a thread? Basic

A process is a program that is running, with its own memory space, files and resources. A thread is a unit of work inside a process; threads of one process share its memory and files but each has its own stack and registers. Threads are cheaper to create and switch, and talk through shared memory, but a bug in one thread can affect the whole process. Processes are isolated from each other.

What the interviewer listens for

  • Process: own memory and resources
  • Thread: inside a process, shares memory
  • Own stack and registers per thread
  • Threads lighter, processes isolated

Common mistake: Saying threads have their own memory space.

They may ask next: What is a context switch, and why is it costly?

3. What are the states of a process? Basic

New: being created. Ready: waiting for the CPU. Running: using the CPU. Waiting or blocked: waiting for something such as disk input. Terminated: finished. A running process goes back to ready when its time slice ends, to waiting when it asks for input or output, and from waiting back to ready when that finishes.

What the interviewer listens for

  • New, ready, running, waiting, terminated
  • Transitions between them
  • Time slice ending versus waiting for I/O

They may ask next: What is held in the process control block?

These are 3 of the 19 questions. The rest, and practice rounds with Ari, come with Campus Ready.

Sign up free to take the placement tests and see your readiness

It takes a minute with your email. AiTeky Pass (₹999/month or ₹9,999/year) is free for your first 30 days.

We use essential cookies to run the site. With your permission we also set one anonymous ID to count unique visitors, and analytics cookies to see which pages help learners. Cookie notice

Join AiTeky Learn. It's free.

Create a free account to track your progress, save items for later and get study suggestions.

Sign up free Log in