wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Operating Systems Quiz - Basic 03 to Basic 04

Total questions: 40

Worksheet time: 20mins

Name
Class
Date
1.

What does the `exec()` system call do in Unix/Linux?

a)

Spawns a new process

b)

Duplicates the process

c)

Replaces the current process with a new program

d)

Exits the current process

2.

Which of the following scheduling algorithms may lead to starvation?

a)

FCFS

b)

Round Robin

c)

Shortest Job First

d)

Priority Scheduling

3.

Which algorithm is used in demand paging to decide which page to replace?

a)

FIFO

b)

LRU

c)

Optimal

d)

All of the above

4.

In UNIX, what happens if a child process is orphaned?

a)

It’s terminated immediately

b)

It’s taken over by the kernel

c)

It’s adopted by the init process

d)

It halts the system

5.

In a multi-core system, CPU affinity helps by:

a)

Restricting a process to run on a specific core

b)

Allowing only one process at a time

c)

Preventing I/O operations

d)

Speeding up memory fetch

6.

Which structure maintains the status of all active memory pages in a system?

a)

Page Map Table

b)

Translation Lookaside Buffer

c)

Page Table

d)

Frame Map

7.

Which of the following is an example of a real-time OS?

a)

MS-DOS

b)

VxWorks

c)

Windows 10

d)

Ubuntu

8.

The difference between a zombie and an orphan process is:

a)

Zombies use more CPU

b)

Orphans are adopted by init; zombies are dead but not reaped

c)

Orphans become zombies

d)

Orphans block I/O

9.

Which Linux utility is best used to trace system calls?

a)

lsof

b)

gdb

c)

strace

d)

netstat

10.

How does Copy-on-Write improve performance during fork()?

a)

Copies entire memory block

b)

Uses memory swapping

c)

Shares memory pages until a write is performed

d)

Skips loading libraries

11.

What does `mmap()` do in Linux systems?

a)

Mounts a device

b)

Allocates memory from heap

c)

Maps a file to memory

d)

Prints memory map

12.

A thread differs from a process in that:

a)

Threads have separate address spaces

b)

Processes are lighter

c)

Threads share code and data segments

d)

Threads are slower to switch

13.

Which OS concept helps in memory protection?

a)

Multitasking

b)

Virtual memory

c)

Paging

d)

Segmentation with paging

14.

Which UNIX signal is used to terminate a process?

a)

SIGSTOP

b)

SIGINT

c)

SIGKILL

d)

SIGCONT

15.

Which system call is used for creating threads in Linux at low level?

a)

clone()

b)

pthread_create()

c)

fork()

d)

spawn()

16.

What is the role of the Translation Lookaside Buffer (TLB)?

a)

Tracks files

b)

Improves disk access

c)

Caches page table entries

d)

Stores network configs

17.

Which of these can cause a segmentation fault?

a)

Reading from a closed file

b)

Accessing a restricted memory location

c)

Network timeouts

d)

Missing kernel module

18.

In Linux, what does the OOM killer do?

a)

Clears swap

b)

Deletes unused files

c)

Kills memory-intensive processes when RAM is full

d)

Resets kernel modules

19.

Which file in Linux logs kernel-level messages?

a)

/var/log/syslog

b)

/etc/logs/kernel.log

c)

/proc/kmsg

d)

/var/log/kern.log

20.

Which command provides a snapshot of process information in real-time in Linux?

a)

kill

b)

ps

c)

top

d)

uptime

21.

In a multi-threaded process, which part is not shared across threads?

a)

Code section

b)

Heap memory

c)

Open file descriptors

d)

Stack

22.

Which mechanism is used to avoid race conditions without busy waiting?

a)

Spinlock

b)

Semaphore

c)

Mutex

d)

Monitor

23.

What does the term 'priority inversion' refer to?

a)

High-priority thread preempting low-priority one

b)

Low-priority task blocking a high-priority task

c)

CPU switches to lower frequency

d)

File permissions being flipped

24.

Which system call in Linux is used for memory mapping of files?

a)

malloc()

b)

mmap()

c)

fork()

d)

fopen()

25.

What is the main purpose of lazy swapping?

a)

Swap pages ahead of time

b)

Swap only when necessary

c)

Increase CPU load

d)

Prevent segmentation faults

26.

In the Linux kernel, which mechanism avoids deadlocks by detecting circular waits?

a)

Banker’s Algorithm

b)

Wait-for Graph

c)

Starvation checker

d)

Lock validator

27.

Which Linux command allows you to control scheduling policies for a process?

a)

taskset

b)

chrt

c)

schedctl

d)

psched

28.

What happens during a context switch?

a)

OS restarts

b)

Registers, PC, and state info are saved and restored

c)

A thread dies

d)

Cache is cleared

29.

How does NUMA affect OS-level memory management?

a)

All memory is pooled globally

b)

Memory is uniformly accessed

c)

Memory is split across multiple nodes and access times vary

d)

Virtual memory is disabled

30.

Which flag in the `clone()` system call helps create threads rather than separate processes?

a)

CLONE_THREAD

b)

CLONE_PARENT

c)

CLONE_FILES

d)

CLONE_NEWNS

31.

Which of the following ensures fair CPU scheduling in modern Linux kernels?

a)

Real-time clock

b)

Fair Queue

c)

Completely Fair Scheduler (CFS)

d)

Priority Queue

32.

Which of the following is an implementation of microkernel architecture?

a)

Windows NT

b)

Linux

c)

Mach

d)

Solaris

33.

What does `ulimit` command control in Linux?

a)

User memory access

b)

File size and process limits

c)

CPU frequency

d)

Root access

34.

Which kernel data structure maps virtual to physical memory in Linux?

a)

inode table

b)

pagemap

c)

vmap

d)

meminfo

35.

Which of the following causes a page fault?

a)

Illegal opcode

b)

Disk read error

c)

Access to page not in main memory

d)

CPU overheating

36.

Which command provides detailed memory usage statistics including shared memory?

a)

free

b)

vmstat

c)

top

d)

smem

37.

Which of these Linux kernel features supports live patching?

a)

LiveCD

b)

Kexec

c)

Ksplice

d)

Initramfs

38.

Which of the following manages memory page swapping in Linux?

a)

init

b)

swapon

c)

swapd

d)

kswapd

39.

Which subsystem in Linux is responsible for cgroups and namespaces?

a)

Systemd

b)

Kernel

c)

LSM

d)

Init

40.

What is the main function of the O(1) scheduler in older Linux kernels?

a)

Deterministic time for scheduling decision

b)

Assigning tasks in round-robin

c)

Prioritizing foreground apps only

d)

Running only real-time tasks