
Top OS concepts asked in TCS, Infosys, Wipro, Amazon & all major placement interviews — with concise answers.
OS is consistently one of the top 3 technical interview topics in India (alongside DBMS and CN). Companies like TCS, Infosys, Wipro, Cognizant, Amazon, and Microsoft all ask OS questions in the Technical round. Aim to cover all 12 questions below.
An OS manages hardware resources, provides a user interface, and runs applications. Core functions: process management, memory management, file system, I/O management, security.
A process is an independent program with its own memory space. A thread is a lightweight unit within a process that shares memory with other threads in the same process.
Deadlock is when processes wait for each other indefinitely. Four conditions: Mutual Exclusion, Hold and Wait, No Preemption, Circular Wait — all must hold simultaneously.
FCFS (First Come First Serve), SJF (Shortest Job First), Priority Scheduling, Round Robin (with time quantum), Multilevel Queue Scheduling.
Virtual memory extends RAM using disk space. Paging divides memory into fixed-size pages — the OS maps virtual pages to physical frames via a page table.
Thrashing occurs when a process spends more time paging than executing — too many page faults. Prevented by working set model or increasing RAM.
Semaphore is an integer variable with two atomic operations: wait() (decrement) and signal() (increment). Used to control access to shared resources.
Preemptive: OS can interrupt a running process (Round Robin, Priority). Non-preemptive: Process runs until it voluntarily gives up CPU (FCFS, SJF non-preemptive).
Saving the state of a running process and loading the state of the next process. Involves saving/restoring registers, program counter, and stack pointer.
Internal: wasted space within an allocated block. External: total free memory is sufficient but not contiguous. Paging eliminates external fragmentation.
A deadlock avoidance algorithm. Before allocating resources, it checks if the system remains in a 'safe state' — a sequence in which all processes can complete.
System calls are the interface between user programs and the OS kernel. Examples: fork(), exec(), read(), write(), open(), close(), wait(), exit().
TomoLink curates OS questions asked by TCS, Infosys, Wipro, Amazon & more.
Start Preparing Now