Operating System Basics
- 52Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What analogy does the lecturer use to describe the hidden activity inside a computer that makes it work smoothly?
What analogy does the lecturer use to describe the hidden activity inside a computer that makes it work smoothly?
52 questions
- 1
What analogy does the lecturer use to describe the hidden activity inside a computer that makes it work smoothly?
- A
An electronic court of Versailles
- B
A symphony orchestra
- C
A beehive of busy bees
- D
A well-oiled machine
Correct answer
AAn electronic court of Versailles
Explanation
The lecturer describes the operating system as an intricate command and control structure, a sort of electronic court of Versailles, scurrying around to make the computer work smoothly.
- A
- 2
In the early days of computing, what was the 'open shop' system?
- A
Programs were run in batches without user interaction
- B
The computer designer, programmer, and user were often the same person
- C
The machine room was open for anyone to enter
- D
The computer was available for public use at any time
Correct answer
BThe computer designer, programmer, and user were often the same person
Explanation
The open shop meant that the computer designer, programmer, and user were pretty much the same person, programming by flicking switches directly on the console.
- A
- 3
Who is shown sitting at a UNIVAC terminal as an example of early programming?
- A
Linus Torvalds
- B
Dennis Ritchie
- C
Ken Thompson
- D
Grace Hopper
Correct answer
DGrace Hopper
Explanation
The picture shows Grace Hopper, one of the most famous programmers of all time, at a UNIVAC terminal.
- A
- 4
How was the IBM 701 system managed to satisfy demand?
- A
By splitting the open shop into 15-minute slots
- B
By using a first-come-first-served queue
- C
By running jobs in random order
- D
By allowing only one user per day
Correct answer
ABy splitting the open shop into 15-minute slots
Explanation
The open shop was split into 15-minute slots, with programmers getting 15 minutes of access.
- A
- 5
On the IBM 701, approximately how much time was wasted on setup during a 15-minute slot?
- A
8 minutes
- B
3 minutes
- C
5 minutes
- D
10 minutes
Correct answer
D10 minutes
Explanation
Roughly 10 minutes of the 15-minute slot were spent setting up tapes and dealing with output, leaving only 5 minutes of actual run time.
- A
- 6
What was the mean time between failures (MTBF) of the IBM 701?
- A
1.5 hours
- B
5.5 hours
- C
3.5 hours
- D
7 hours
Correct answer
C3.5 hours
Explanation
The IBM 701 had a mean time between failures of three and a half hours.
- A
- 7
What fundamental shift occurred from early computing to the present day?
- A
From mainframes to personal computers
- B
From batch processing to real-time processing
- C
From many users sharing one machine to one user using many machines
- D
From command-line to graphical user interfaces
Correct answer
CFrom many users sharing one machine to one user using many machines
Explanation
The shift is from many users sharing a single expensive machine to one user having access to multiple machines to get work done quickly.
- A
- 8
What was the 'closed shop' processing model introduced in the 1960s?
- A
Only operators were allowed in the machine room; users submitted jobs via punch cards
- B
A single user had exclusive use of the machine for a full day
- C
The machine room was locked to prevent unauthorized access
- D
Users could only access the computer after hours
Correct answer
AOnly operators were allowed in the machine room; users submitted jobs via punch cards
Explanation
In the closed shop, only a few high priests were allowed into the machine room; users wrote programs on remote terminals and submitted them as batches of punch cards or tape.
- A
- 9
What is a context switch in an operating system?
- A
Changing the priority of a running process
- B
Saving the state of one process and loading the state of another
- C
Switching between user mode and kernel mode
- D
Moving a process from memory to disk
Correct answer
BSaving the state of one process and loading the state of another
Explanation
A context switch saves the state of the current process (e.g., registers, program counter) into a program control block and loads the state of another process.
- A
- 10
What signal typically triggers a context switch?
- A
A system call
- B
A page fault
- C
An interrupt
- D
A timer tick
Correct answer
CAn interrupt
Explanation
An interrupt is a signal to the computer to interrupt what it is doing, leading to a context switch to handle the interrupt or schedule another process.
- A
- 11
What is stored in a process control block (PCB) during a context switch?
- A
The scheduling priority and CPU time used
- B
The entire contents of the process's memory
- C
The list of open files and network connections
- D
The state of the CPU registers and program counter
Correct answer
DThe state of the CPU registers and program counter
Explanation
The PCB saves the state of the CPU as it was when the interrupt occurred, including all registers and local memory, plus the program counter indicating where the process was.
- A
- 12
What is process switch latency (ΔT)?
- A
The time between starting and completing a process
- B
The delay caused by waiting for I/O
- C
The time required to save and load process states
- D
The time spent in the ready queue
Correct answer
CThe time required to save and load process states
Explanation
The delta T at the bottom of the context switch diagram represents the process switch latency, which should be as fast as possible.
- A
- 13
What distinguishes a thread from a heavyweight process?
- A
A thread requires saving less state, making it a lightweight process
- B
A thread runs in user space while a process runs in kernel space
- C
A thread has its own memory address space
- D
A thread is always a kernel-level construct
Correct answer
AA thread requires saving less state, making it a lightweight process
Explanation
A thread is a lightweight process (or sub-process) that requires saving less context, allowing faster context switches.
- A
- 14
In the knitting analogy for context switching, what does the 'stack' represent?
- A
The set of instructions for each task
- B
The order in which tasks are executed
- C
The memory area where paused tasks are stored
- D
The priority level of each task
Correct answer
CThe memory area where paused tasks are stored
Explanation
The side table where knitting and ingredients are piled up represents the stack, which gets longer and shorter as tasks are paused and resumed.
- A
- 15
What does the interrupt processor do when it receives an interrupt?
- A
It immediately saves the current process state and switches to the interrupt handler
- B
It determines whether the interrupt is important enough to interrupt the current task
- C
It queues the interrupt for later processing
- D
It sends a signal to the user to handle the interrupt
Correct answer
BIt determines whether the interrupt is important enough to interrupt the current task
Explanation
The interrupt processor checks the priority of the interrupt and decides whether it is important enough to interrupt the current high-priority task.
- A
- 16
What is the role of a scheduler in an operating system?
- A
It decides which process to run next and generates a software interrupt to switch
- B
It handles I/O requests from user programs
- C
It manages the allocation of memory to processes
- D
It enforces security policies between processes
Correct answer
AIt decides which process to run next and generates a software interrupt to switch
Explanation
The scheduler splits the timeline into chunks, decides the priority tasks, and generates a software interrupt to switch contexts.
- A
- 17
What are protected instructions in a computer system?
- A
Instructions that are encrypted to prevent tampering
- B
Instructions that are hardware-specific and not portable
- C
Instructions that can only be executed by the operating system in supervisor mode
- D
Instructions that require special permission from the user
Correct answer
CInstructions that can only be executed by the operating system in supervisor mode
Explanation
Protected instructions are only for the part of the operating system that does the work, preventing user processes from accessing certain hardware or performing privileged operations.
- A
- 18
Why are privilege levels necessary in an operating system?
- A
To reduce the complexity of the kernel
- B
To prevent one user process from interfering with another or with the OS
- C
To improve performance by limiting context switches
- D
To allow only the administrator to install software
Correct answer
BTo prevent one user process from interfering with another or with the OS
Explanation
Privilege levels (e.g., super user vs. user) prevent a malign agent from affecting other users and stop user processes from accessing resources they do not own.
- A
- 19
What is virtual memory?
- A
A backup of memory contents on a secondary storage
- B
A technique to use disk space as if it were RAM
- C
An illusion created by the OS that each program has exclusive access to a linear block of memory
- D
A method to compress memory to fit more programs
Correct answer
CAn illusion created by the OS that each program has exclusive access to a linear block of memory
Explanation
Virtual memory gives each user a programmers model of memory that appears as a linear block, while behind the scenes the OS manages actual physical memory and backing store.
- A
- 20
In paging, what is a page?
- A
A fixed-size block of memory used for mapping between virtual and physical memory
- B
A section of the page table
- C
A segment of a process's address space
- D
A unit of data transferred between RAM and disk
Correct answer
AA fixed-size block of memory used for mapping between virtual and physical memory
Explanation
Memory is split into blocks called pages, which are the units used in virtual memory mapping between virtual addresses and physical frames or disk storage.
- A
- 21
What is a page table used for?
- A
To store the contents of each page in memory
- B
To map virtual pages to physical pages or to backing store on disk
- C
To translate logical addresses to physical addresses
- D
To keep track of free and allocated pages
Correct answer
BTo map virtual pages to physical pages or to backing store on disk
Explanation
The page table maps virtual pages (e.g., A, B, C) to either physical memory pages or to locations on the backing store (disk).
- A
- 22
What happens when a page fault occurs?
- A
The page table is updated without any I/O
- B
The system loads the required page from disk into physical memory
- C
The process is terminated due to an invalid memory access
- D
The system swaps out the entire process to disk
Correct answer
BThe system loads the required page from disk into physical memory
Explanation
When a requested page is not in physical memory (page fault), the paging system loads it from the backing store (disk) into memory, possibly evicting another page.
- A
- 23
What is thrashing in virtual memory systems?
- A
When multiple processes compete for the same page
- B
When the system spends more time swapping pages than executing processes
- C
When the page table becomes too large to fit in memory
- D
When the disk fails due to excessive reading
Correct answer
BWhen the system spends more time swapping pages than executing processes
Explanation
Thrashing occurs when the amount of time spent shuffling pages in and out of disk exceeds the time spent doing useful work, leading to performance degradation.
- A
- 24
What is the purpose of a cache in a virtual memory system?
- A
To store the page table entries for quick lookup
- B
To buffer disk writes to improve throughput
- C
To temporarily hold pages that have been evicted from memory
- D
To speed up access to frequently used data by storing it closer to the CPU
Correct answer
DTo speed up access to frequently used data by storing it closer to the CPU
Explanation
A cache mediates the shuffling of pages to and from the backing store, making access faster by storing frequently used data in faster memory.
- A
- 25
What was the selling point of the VMS operating system for the VAX computer?
- A
It had a graphical user interface
- B
It was the first microkernel-based OS
- C
It offered a virtual memory system
- D
It supported real-time processing
Correct answer
CIt offered a virtual memory system
Explanation
VMS stands for Virtual Memory System, which was a big selling point for Digital Equipment Corporation's VAX computers.
- A
- 26
Who invented the Unix operating system?
- A
Per Brinch Hansen
- B
Dennis Ritchie and Ken Thompson
- C
Linus Torvalds
- D
Grace Hopper
Correct answer
BDennis Ritchie and Ken Thompson
Explanation
Unix was created by Dennis Ritchie and Ken Thompson at Bell Labs in 1969.
- A
- 27
What are the three main parts of the Unix operating system?
- A
The kernel, the file system, and the device drivers
- B
The kernel, the shell, and the utility programs
- C
The shell, the GUI, and the applications
- D
The kernel, the scheduler, and the memory manager
Correct answer
BThe kernel, the shell, and the utility programs
Explanation
Unix is made up of the kernel (manages hardware and scheduling), the shell (command interpreter), and utility programs (e.g., editors, sorters).
- A
- 28
What is the kernel in an operating system?
- A
The graphical user interface that provides visual interaction
- B
The core part that manages hardware and supervises scheduling
- C
The set of utility programs for file management
- D
The command-line interface that the user interacts with
Correct answer
BThe core part that manages hardware and supervises scheduling
Explanation
The kernel is the inner part of the operating system that manages the control of the machine and supervises scheduling of user programs.
- A
- 29
What is the shell in Unix?
- A
The graphical desktop environment
- B
A set of libraries for application development
- C
The outer layer of the kernel that handles system calls
- D
The command interpreter that communicates between the user and the system
Correct answer
DThe command interpreter that communicates between the user and the system
Explanation
The shell (named SH for shell) is the command interpreter that looks after communication between the user and the system.
- A
- 30
Why are standard interfaces important in an operating system?
- A
They improve performance by reducing system call overhead
- B
They allow the OS to run on multiple hardware platforms without modification
- C
They provide a consistent programmer interface to different hardware, avoiding code rewrites
- D
They enforce security by limiting access to system calls
Correct answer
CThey provide a consistent programmer interface to different hardware, avoiding code rewrites
Explanation
Standard interfaces allow programs to run on different hardware without rewriting, because the OS hides hardware differences behind a consistent interface.
- A
- 31
What is a device driver?
- A
A configuration file for hardware settings
- B
A library for network communication
- C
A utility program that manages file systems
- D
A kernel module that interfaces with a specific hardware device
Correct answer
DA kernel module that interfaces with a specific hardware device
Explanation
Device drivers are the interfaces with bits of hardware, part of the kernel that handles hardware-specific operations.
- A
- 32
What characterizes a monolithic operating system?
- A
Only the minimum necessary code runs in privileged mode
- B
All operating system services run in supervisor mode as a single large block
- C
The kernel is split into multiple independent servers
- D
The OS is built from dynamically loadable modules
Correct answer
BAll operating system services run in supervisor mode as a single large block
Explanation
In a monolithic OS, all components (device drivers, file systems, etc.) run in protected mode and are part of a single large block of code.
- A
- 33
What is a microkernel?
- A
An OS design where only a minimal set of functions runs in privileged mode
- B
A kernel designed for embedded systems with limited resources
- C
A kernel that is smaller in size but still contains all OS services
- D
A kernel that uses virtual memory to reduce its footprint
Correct answer
AAn OS design where only a minimal set of functions runs in privileged mode
Explanation
A microkernel follows the principle of least privilege, running only the essential functions in supervisor mode and moving other services to user space.
- A
- 34
What is the L4 microkernel known for?
- A
It was the first microkernel for Unix
- B
It is a formally verified operating system microkernel
- C
It is used in all Android devices
- D
It was developed at Microsoft
Correct answer
BIt is a formally verified operating system microkernel
Explanation
The L4 microkernel has a high-assurance version called SEL4 that has been formally verified, meaning it is mathematically proven to behave as intended.
- A
- 35
What kernel does Android use?
- A
A Windows NT kernel
- B
A Unix kernel
- C
A microkernel
- D
A modified Linux kernel
Correct answer
DA modified Linux kernel
Explanation
Android is based on a version of the Linux kernel, which is itself a Unix-like operating system.
- A
- 36
What is dynamic linking of libraries?
- A
Libraries are shared across processes via a network
- B
Libraries are dynamically generated by the OS
- C
Libraries are loaded at runtime only when needed, reducing executable size
- D
Libraries are compiled into the executable at build time
Correct answer
CLibraries are loaded at runtime only when needed, reducing executable size
Explanation
Dynamic linking adds code only when it is called, as opposed to static linking which includes all library code at compile time, reducing bloat but causing DLL hell.
- A
- 37
What is DLL hell?
- A
An infinite loop in the dynamic linker
- B
A crash caused by a faulty device driver
- C
A security vulnerability in shared libraries
- D
Conflicts between different versions of dynamically linked libraries
Correct answer
DConflicts between different versions of dynamically linked libraries
Explanation
DLL hell occurs when the version of a dynamic link library used by a program is incompatible with the version present on the system.
- A
- 38
In the Solaris operating system, what is the default time slice length for scheduling?
- A
10 milliseconds
- B
50 milliseconds
- C
100 milliseconds
- D
20 milliseconds
Correct answer
D20 milliseconds
Explanation
Solaris by default uses 20-millisecond time slots for scheduling.
- A
- 39
How does the Solaris scheduler handle high-priority threads?
- A
They are run first; after using their time slice, their priority is decreased
- B
They are preempted by higher priority hardware interrupts
- C
They are given a larger time slice than low-priority threads
- D
They are always allowed to run until completion
Correct answer
AThey are run first; after using their time slice, their priority is decreased
Explanation
High-priority threads are dealt with first; once they have used their time slice, their priority is decreased, and they go to the back of the queue.
- A
- 40
What does 'real-time' mean in the context of operating systems?
- A
The system responds immediately to user input
- B
The system can process data as fast as possible
- C
A task must be completed within a fixed time constraint
- D
The system uses specialized hardware for timing
Correct answer
CA task must be completed within a fixed time constraint
Explanation
Real-time means that a task must be done within a fixed time, not just fast. It is about meeting deadlines.
- A
- 41
What is a race condition?
- A
An unexpected result caused by concurrent access to a shared variable without synchronization
- B
A hardware malfunction due to timing differences
- C
A situation where the scheduler gives priority to the fastest process
- D
A condition where two processes run at the same speed
Correct answer
AAn unexpected result caused by concurrent access to a shared variable without synchronization
Explanation
A race condition occurs when the outcome depends on the order of execution, e.g., two processes reading and writing a shared variable X without synchronization.
- A
- 42
In the race condition example with variable X, what is a possible incorrect result?
- A
X becomes undefined
- B
X becomes 0 due to a conflict
- C
X becomes 1 instead of 2 after two increments
- D
X becomes 3 due to a double increment
Correct answer
CX becomes 1 instead of 2 after two increments
Explanation
If both processes read X before either writes, they both read 0, increment to 1, and write 1, so X ends up as 1 instead of 2.
- A
- 43
What is priority inversion?
- A
The system freezes due to conflicting priorities
- B
A high-priority task is preempted by a medium-priority task
- C
The scheduler mistakenly assigns high priority to a low-priority task
- D
A low-priority task holds a resource needed by a high-priority task, causing high priority to wait
Correct answer
DA low-priority task holds a resource needed by a high-priority task, causing high priority to wait
Explanation
Priority inversion occurs when a low-priority task locks a resource, blocking a high-priority task, and a medium-priority task runs, causing the high-priority task to wait indefinitely.
- A
- 44
What is deadlock in the context of concurrent processes?
- A
A loss of communication between processes
- B
A state where each process waits indefinitely for resources held by another
- C
A situation where the scheduler cannot decide which process to run
- D
A crash caused by an infinite loop
Correct answer
BA state where each process waits indefinitely for resources held by another
Explanation
Deadlock is a situation where processes block each other by holding resources and waiting for others, leading to a standstill.
- A
- 45
What does SaaS stand for in cloud computing?
- A
System as a Service
- B
Security as a Service
- C
Software as a Service
- D
Storage as a Service
Correct answer
CSoftware as a Service
Explanation
SaaS stands for Software as a Service, where applications run remotely and are provided to users over the internet.
- A
- 46
What does IaaS stand for?
- A
Information as a Service
- B
Integration as a Service
- C
Infrastructure as a Service
- D
Internet as a Service
Correct answer
CInfrastructure as a Service
Explanation
IaaS stands for Infrastructure as a Service, providing virtual servers and other computing infrastructure over the cloud.
- A
- 47
What does PaaS stand for?
- A
Programming as a Service
- B
Platform as a Service
- C
Protocol as a Service
- D
Processing as a Service
Correct answer
BPlatform as a Service
Explanation
PaaS stands for Platform as a Service, offering a platform for customers to develop, run, and manage applications without managing the underlying infrastructure.
- A
- 48
What is a hypervisor?
- A
A tool for migrating physical machines to the cloud
- B
A hardware component that accelerates virtualization
- C
A security layer for cloud environments
- D
An operating system of operating systems that manages virtual machines
Correct answer
DAn operating system of operating systems that manages virtual machines
Explanation
A hypervisor (or virtual machine manager) is an operating system specifically configured to run processes that are themselves operating systems, managing multiple virtual machines.
- A
- 49
Which operating system dominates the server market?
- A
Linux
- B
macOS
- C
Android
- D
Windows
Correct answer
ALinux
Explanation
Servers are dominated by Linux and various varieties of Unix.
- A
- 50
Which mobile operating system has the largest market share and is based on Linux?
- A
Android
- B
Windows Phone
- C
Symbian
- D
iOS
Correct answer
AAndroid
Explanation
Android is based on a Linux kernel and currently holds the largest share of mobile operating systems.
- A
- 51
What is macOS based on?
- A
A Linux kernel
- B
A proprietary kernel from Apple
- C
A Windows NT kernel
- D
A Unix-based hybrid kernel (macOS uses a microkernel and monolithic kernel hybrid)
Correct answer
DA Unix-based hybrid kernel (macOS uses a microkernel and monolithic kernel hybrid)
Explanation
macOS is based on a microkernel called Mac (actually XNU, a hybrid kernel) that is a version of Unix, combining elements of a microkernel and a monolithic kernel.
- A
- 52
What is a kernel panic?
- A
A severe error in the kernel that requires a system shutdown
- B
A warning that the kernel is overloaded
- C
A condition where the kernel runs out of memory
- D
A hardware failure detected by the kernel
Correct answer
AA severe error in the kernel that requires a system shutdown
Explanation
A kernel panic occurs when something badly goes wrong in the kernel, causing it to print an error message and attempt an orderly shutdown, often resulting in data loss.
- A

Ask anything
We've read this whole study set, so questions about it get the best answers.