Interview kitsBlog

Your dream job? Lets Git IT.
Interactive technical interview preparation platform designed for modern developers.

XGitHub

Platform

  • Categories

Resources

  • Blog
  • About the app
  • FAQ
  • Feedback

Legal

  • Privacy Policy
  • Terms of Service

© 2026 LetsGit.IT. All rights reserved.

Operating Systems

Recruitment and knowledge question base. Filter, search and test your knowledge.

Topics

Processes vs threads — what’s the difference and when does it matter?

easyprocessesthreadsconcurrency
Open question

Answer

A process has its own address space and resources; threads share the same address space within a process. It matters for isolation, memory overhead, and how you manage shared state and concurrency.

What is context switching and why is it expensive?

mediumcontext-switchschedulerperformance
Open question

Answer

Context switching is when the CPU switches from one thread/process to another. It’s expensive because the OS must save/restore registers, switch memory mappings, and flush caches/TLBs.

Explain virtual memory and paging.

mediumvirtual-memorypagingperformance
Open question

Answer

Virtual memory gives each process its own address space mapped to physical memory. Paging moves fixed-size pages between RAM and disk, enabling isolation and larger memory than RAM.

How does CPU scheduling work (preemptive vs cooperative)?

mediumschedulingcpupriorities
Open question

Answer

Preemptive scheduling lets the OS interrupt tasks to ensure fairness and responsiveness. Cooperative scheduling relies on tasks yielding voluntarily, which can cause starvation if they don’t.

What is a system call and why do we need user/kernel mode?

easysyscallkerneluser-mode
Open question

Answer

A system call is the controlled entry point into the OS kernel for privileged operations (I/O, memory, processes). User/kernel mode separation protects the system from buggy or malicious applications.

What are file descriptors and how does I/O buffering work?

mediumfile-descriptorsiobuffering
Open question

Answer

A file descriptor is a numeric handle to an open file or socket. Buffering batches I/O in memory to reduce syscalls and improve throughput, at the cost of delayed writes.

What causes deadlocks and how can you prevent them?

mediumdeadlocklocksconcurrency
Open question

Answer

Deadlocks require four conditions: mutual exclusion, hold-and-wait, no preemption, and circular wait. Prevention breaks at least one condition (e.g., ordering locks or using timeouts).

Mutex vs semaphore vs read-write lock — when do you use each?

mediummutexsemaphorerw-lock
Open question

Answer

A mutex provides exclusive access, a semaphore controls access to a limited number of resources, and a read-write lock allows multiple readers or one writer. Use them based on contention and access patterns.

What are signals and how do processes handle them?

mediumsignalsprocesslifecycle
Open question

Answer

Signals are asynchronous notifications sent to a process (e.g., SIGTERM, SIGINT). A process can handle them with signal handlers, ignore them, or use default actions like termination.

What is memory-mapped I/O (mmap) and when would you use it?

hardmmapmemoryio
Open question

Answer

mmap maps a file or device into a process’s address space so it can be accessed like memory. It’s useful for large files, random access, and zero-copy sharing.