CoreHRx Jobs

Apply in one click, save jobs and take free mock tests.

Register free Log in
Hiring? Post jobs with CoreHRx
My account
user

View & update profile

Operating Systems mock test: free online practice

15 to 30 random questions in 15 to 30 minutes, by the level you choose: processes, scheduling, synchronization, deadlocks, memory and files. After you submit you get your score, your strong and weak topics, and the right answer with an explanation for every question.

Want to revise first? Read the Operating Systems interview questions and answers.

Choose your level

Free with a CoreHRx Jobs account: you will be asked to sign in or create one first.

What does the Operating Systems mock test cover?

The test covers 12 topics across three levels. Each attempt picks 15 to 30 questions at random, by the level you choose, so every attempt is different.

  • CPU Scheduling
  • Virtual Memory
  • Process Synchronization
  • Processes and Threads
  • Linux and Unix Concepts
  • Paging and Segmentation
  • Deadlocks
  • File Systems
  • OS Basics and System Calls
  • Disk Scheduling
  • Memory Management
  • I/O and Interrupts

Sample Operating Systems mock test questions

One question from each level, the way they appear in the test. A new set comes on the 1st of every month. Try it, then open the answer.

  1. EasyFile Systems

    Which file allocation method gives fast sequential and random access but suffers from external fragmentation?

    • Contiguous allocation
    • Indexed allocation
    • FAT-based linked allocation
    • Linked allocation
    Show the answer

    Answer: Contiguous allocation. With contiguous allocation a file is one run of blocks, so block i is at start + i: very fast. But files of different sizes leave holes between them, and growing a file may mean moving it. Linked and indexed schemes avoid this.

  2. MediumProcess Synchronization

    Why should pthread_cond_wait() be called inside a while loop that checks the condition again?

    • A while loop makes the wait faster than a single if statement would
    • The loop is needed so that the mutex gets unlocked at the end
    • The thread may wake spuriously, or the state may change before it gets the lock
    • pthread_cond_wait() returns at once the first time it is called by a thread
    Show the answer

    Answer: The thread may wake spuriously, or the state may change before it gets the lock. POSIX allows spurious wakeups, and with signal-and-continue semantics another thread can take the item before the woken thread gets the mutex. Rechecking in a loop makes the code correct in both cases; an if can act on a false condition.

  3. HardOS Basics and System Calls

    On Linux x86-64, how can clock_gettime(CLOCK_MONOTONIC, ...) usually return without entering the kernel?

    • A vDSO page mapped into each process lets it read the kernel's clock data in user mode
    • glibc caches the time at program start and adds the CPU cycles it counts since then
    • The call is queued and answered later by a kernel thread without a mode switch
    • The CPU keeps a separate copy of the kernel for each process to answer such calls
    Show the answer

    Answer: A vDSO page mapped into each process lets it read the kernel's clock data in user mode. The vDSO (virtual dynamic shared object) is a small shared library the kernel maps into every process. It reads a time data page that the kernel keeps up to date plus the CPU time stamp counter, so common time calls avoid the cost of a real system call.

Take the full Operating Systems mock test: 15 to 30 questions and 15 to 30 minutes, by level.

How is the Operating Systems mock test scored?

A question counts as right only when you pick exactly the right option, or all the right options where it says so; a question left blank counts as wrong. Your score is the share of the test's questions you got right (15 to 30, by level). The result also scores every topic, so you know what to revise before the interview.

  • 75% or more in a topica strength
  • 50% to 74%worth a revision
  • Under 50%a topic to work on

Operating Systems mock test: questions people ask

Is the Operating Systems mock test free?

Yes. The Operating Systems mock test is free. You need a free CoreHRx Jobs account to start it, so your score and the topics to work on are saved.

How many questions are in the Operating Systems mock test?

It depends on the level: Easy has 15 questions in 15 minutes, Medium has 20 questions in 20 minutes, Hard has 30 questions in 30 minutes. They are multiple-choice questions picked at random from a larger bank of Operating Systems questions at your level, so every attempt is different.

Which Operating Systems topics does the test cover?

The questions cover CPU Scheduling, Virtual Memory, Process Synchronization, Processes and Threads, Linux and Unix Concepts, Paging and Segmentation, Deadlocks, File Systems, OS Basics and System Calls, Disk Scheduling, Memory Management, I/O and Interrupts. Your result shows how you did in each topic.

Which level should I choose?

Easy: Processes, threads, system calls and scheduling basics. Medium: Scheduling problems, synchronization, deadlocks and paging. Hard: Virtual memory, page replacement and tricky concurrency, for top scores. Start with Easy and move up.

Can employers see my Operating Systems score?

Only your best Operating Systems score, and only when it is 60% or more. It shows on the job applications you send on CoreHRx. Lower scores stay private.

Can I take the Operating Systems mock test again?

Yes, up to 10 tests a day. Each attempt picks questions you have not seen recently first.

All mock tests