Bootstrap Process Explained
- 43Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is the first action performed by the bootstrap program when a computer starts?
What is the first action performed by the bootstrap program when a computer starts?
43 questions
- 1
What is the first action performed by the bootstrap program when a computer starts?
- A
Displays a menu to choose among multiple operating systems
- B
Loads the operating system directly from the hard disk
- C
Checks the hardware to ensure sufficient resources
- D
Transfers control to a boot loader such as GRUB
Correct answer
CChecks the hardware to ensure sufficient resources
Explanation
The bootstrap program first checks the hardware to ensure the system has enough resources to run. It then searches for a device (e.g., hard disk, USB) containing a more substantial operating system.
- A
- 2
After checking hardware, what does the bootstrap program look for?
- A
Available network connections
- B
A device with an operating system installed
- C
The user's login credentials
- D
A boot loader like GRUB
Correct answer
BA device with an operating system installed
Explanation
The bootstrap program searches for a device (e.g., hard disk, SSD, USB) that contains a full operating system. It then transfers control to that OS.
- A
- 3
What is the role of GRUB in the boot process?
- A
It compiles the Linux kernel from source code
- B
It provides a menu to choose among multiple installed operating systems
- C
It manages device drivers during boot
- D
It checks hardware and loads the operating system directly
Correct answer
BIt provides a menu to choose among multiple installed operating systems
Explanation
GRUB (GRand Unified Bootloader) is a boot loader that allows the user to select from a set of installed operating systems. It is not limited to Linux and works with various OSes.
- A
- 4
Is GRUB exclusively for Linux?
- A
No, it can boot any operating system
- B
Yes, but only if the system uses GRUB Legacy
- C
No, it only supports Unix-based systems
- D
Yes, it is only compatible with Linux distributions
Correct answer
ANo, it can boot any operating system
Explanation
GRUB is not limited to Linux; it supports multiple operating systems, including Windows, making it a versatile boot loader.
- A
- 5
On older PCs (LPCs), where was the operating system required to be located?
- A
Anywhere on the hard disk
- B
On the first part of the hard disk
- C
In a specific partition labeled as active
- D
In a separate ROM chip
Correct answer
BOn the first part of the hard disk
Explanation
Older PCs had a bootstrap loader that expected the operating system to be at the beginning of the hard disk. Modern systems allow the OS to be placed anywhere on the disk.
- A
- 6
Which of the following is one of the five services provided by an operating system?
- A
Database management
- B
Web server hosting
- C
File system management
- D
Graphics rendering
Correct answer
CFile system management
Explanation
The five services mentioned include file system, user interface, I/O systems, memory management, and secondary storage management. File system management is a core OS service.
- A
- 7
In a monolithic operating system, how does adding a new feature typically work?
- A
It can be added as a loadable module without restarting
- B
It is done by inserting a device driver
- C
It requires rewriting the OS and reinstalling it
- D
It is automatically handled by the kernel
Correct answer
CIt requires rewriting the OS and reinstalling it
Explanation
Monolithic operating systems have all components in one large block, so extending them requires modifying the entire OS and reinstalling. This makes them faster but harder to extend.
- A
- 8
Which operating system is known to combine both monolithic and layered approaches?
- A
macOS
- B
iOS
- C
Windows
- D
Linux
Correct answer
CWindows
Explanation
Windows takes both approaches: many services are built into the monolithic kernel, but device drivers and other components can be loaded dynamically, reflecting a layered design.
- A
- 9
What is the kernel of an operating system?
- A
A system program that checks disk health
- B
The user interface that accepts commands
- C
The core component that manages hardware and system resources
- D
A boot loader that starts the OS
Correct answer
CThe core component that manages hardware and system resources
Explanation
The kernel is the central part of the OS that directly interacts with the hardware, managing memory, processes, and devices.
- A
- 10
What is a system call?
- A
A program that checks system health
- B
An API that allows user programs to request OS services
- C
A hardware interrupt generated by a device
- D
A command interpreter that executes user commands
Correct answer
BAn API that allows user programs to request OS services
Explanation
System calls provide an interface (API) between a user program and the operating system, enabling the program to request services like file operations or process creation.
- A
- 11
Which of the following is an example of a system program?
- A
Microsoft Word
- B
Adobe Photoshop
- C
Google Chrome
- D
Windows Task Manager
Correct answer
DWindows Task Manager
Explanation
System programs are utilities that come with the OS to help manage system resources. Task Manager is a system program that shows running processes and resource usage.
- A
- 12
What is the primary purpose of the command interpreter (shell)?
- A
To schedule processes for the CPU
- B
To translate high-level language into machine code
- C
To manage memory allocation
- D
To accept and execute user commands
Correct answer
DTo accept and execute user commands
Explanation
The command interpreter, often called a shell, takes commands from the user and instructs the OS to execute them. It is separate from the kernel to allow different interfaces.
- A
- 13
Why is the command interpreter typically separate from the kernel?
- A
To reduce the size of the kernel
- B
To improve system security by isolating user commands
- C
To allow multiple different shells or interfaces to be used
- D
To speed up command execution
Correct answer
CTo allow multiple different shells or interfaces to be used
Explanation
Separating the command interpreter from the kernel allows the system to support multiple user interfaces (e.g., command-line, GUI) and even different shells like bash or zsh.
- A
- 14
In Unix, which system call does a shell use to create a new process?
- A
wait()
- B
fork()
- C
exec()
- D
exit()
Correct answer
Bfork()
Explanation
The fork() system call creates a new process by duplicating the calling process. The child process can then use exec() to load a different program.
- A
- 15
What distinguishes a process from a program?
- A
A program uses memory; a process does not
- B
There is no difference; the terms are interchangeable
- C
A program is stored on disk; a process is in execution
- D
A process is passive; a program is active
Correct answer
CA program is stored on disk; a process is in execution
Explanation
A program is a static set of instructions stored on disk, while a process is an active instance of a program currently being executed in memory.
- A
- 16
Which component of a process holds the address of the next instruction to be executed?
- A
Program counter
- B
Accumulator
- C
Stack pointer
- D
Heap base
Correct answer
AProgram counter
Explanation
The program counter (PC) keeps track of the memory address of the next instruction to be fetched and executed.
- A
- 17
In a process's memory layout, which area is used for short-term data like function call parameters?
- A
Data section
- B
Heap
- C
Stack
- D
Text section
Correct answer
CStack
Explanation
The stack is used for temporary data such as function call frames, local variables, and return addresses. It grows downward from the top of memory.
- A
- 18
How are the stack and heap typically arranged in a process's memory to maximize space utilization?
- A
Heap starts at the top and grows down; stack starts at the bottom and grows up
- B
They are interleaved in the same memory region
- C
Stack starts at the top and grows down; heap starts at the bottom and grows up
- D
Both start at the same address and expand together
Correct answer
CStack starts at the top and grows down; heap starts at the bottom and grows up
Explanation
To avoid collision as each grows, the stack is placed at the top of memory and grows downward, while the heap is at the bottom and grows upward. They only collide if memory runs out.
- A
- 19
What is a thread in the context of process execution?
- A
A system call used to create new processes
- B
A separate process that shares no resources
- C
A scheduling algorithm for CPU allocation
- D
A lightweight process that shares memory with other threads in the same process
Correct answer
DA lightweight process that shares memory with other threads in the same process
Explanation
A thread is a single execution unit within a process. Multiple threads can run concurrently within the same process, sharing memory and resources.
- A
- 20
In the process state diagram, what is the typical first state when a process is created?
- A
New
- B
Running
- C
Waiting
- D
Ready
Correct answer
ANew
Explanation
When a process is first created, it enters the 'new' state. It then moves to the 'ready' queue when it is ready to be scheduled for execution.
- A
- 21
What event moves a process from the running state to the waiting state?
- A
A higher-priority process becomes ready
- B
The process completes execution
- C
The CPU timer expires
- D
The process requests an I/O operation
Correct answer
DThe process requests an I/O operation
Explanation
When a process performs an I/O request (e.g., reading a file or waiting for keyboard input), it cannot continue and moves to the waiting state until the I/O completes.
- A
- 22
Why might a process be moved from running to the ready state?
- A
It has finished its execution
- B
It encountered a fatal error
- C
It is waiting for an event
- D
It has used its allocated CPU time slice
Correct answer
DIt has used its allocated CPU time slice
Explanation
In a time-sharing system, the scheduler assigns each process a limited time slice. When the time expires, the process is moved back to the ready queue to allow other processes to run.
- A
- 23
When a process terminates, what must the operating system do?
- A
Free its allocated memory and resources
- B
Assign it a new process ID
- C
Move it to the waiting state
- D
Save its state for later resumption
Correct answer
AFree its allocated memory and resources
Explanation
Termination involves cleaning up the process: releasing its memory, closing open files, and deallocating any other resources it held.
- A
- 24
What information is stored in a Process Control Block (PCB)?
- A
Only the program counter and registers
- B
The entire source code of the program
- C
Process state, program counter, registers, memory limits, and more
- D
The list of all devices connected to the system
Correct answer
CProcess state, program counter, registers, memory limits, and more
Explanation
The PCB contains all necessary information about a process, including its state, program counter, CPU registers, memory management info, and I/O status.
- A
- 25
What is context switching in an operating system?
- A
Allocating additional memory to a running process
- B
Changing the user interface from command line to GUI
- C
Moving a process from the ready queue to the waiting queue
- D
Switching from one process to another by saving and loading PCBs
Correct answer
DSwitching from one process to another by saving and loading PCBs
Explanation
Context switching involves saving the PCB of the currently running process and loading the PCB of the next process to run. This allows the CPU to work on multiple processes.
- A
- 26
Why does context switching incur overhead?
- A
It increases the number of system calls
- B
It requires writing data to the hard disk
- C
The CPU is idle while saving and loading process states
- D
It consumes network bandwidth
Correct answer
CThe CPU is idle while saving and loading process states
Explanation
During a context switch, the CPU must save the current process's state and load another, which takes time without performing useful computation. This overhead can impact performance.
- A
- 27
How can hardware help speed up context switching?
- A
By increasing the clock speed of the CPU
- B
By adding more RAM
- C
By providing multiple sets of registers for different processes
- D
By using a faster disk drive
Correct answer
CBy providing multiple sets of registers for different processes
Explanation
Some CPUs have multiple register sets, allowing the operating system to quickly switch between processes without saving/loading all registers, reducing context switch time.
- A
- 28
What is the role of the short-term scheduler (CPU scheduler)?
- A
To handle long-term job scheduling like batch processes
- B
To manage the swapping of processes between memory and disk
- C
To decide which processes are loaded into memory from disk
- D
To select the next process from the ready queue to run on the CPU
Correct answer
DTo select the next process from the ready queue to run on the CPU
Explanation
The short-term scheduler, also called the CPU scheduler, decides which ready process gets the CPU for the next time slice. It runs frequently (milliseconds).
- A
- 29
What does the long-term scheduler (job scheduler) do?
- A
Assigns CPU time to each process
- B
Controls the degree of multiprogramming by deciding which jobs are brought into the ready queue
- C
Handles I/O requests from processes
- D
Selects which processes are moved from memory to disk
Correct answer
BControls the degree of multiprogramming by deciding which jobs are brought into the ready queue
Explanation
The long-term scheduler determines which processes are admitted to the ready queue from the job pool (on disk). It controls the number of processes in memory.
- A
- 30
What is the purpose of the medium-term scheduler (swapper)?
- A
To move processes out of memory to disk and later bring them back
- B
To select the next process for the CPU
- C
To create new processes using fork()
- D
To manage the file system cache
Correct answer
ATo move processes out of memory to disk and later bring them back
Explanation
The medium-term scheduler swaps processes out of memory to disk to free up space, then swaps them back in when needed. This is used when there are too many processes.
- A
- 31
What characterizes a CPU-bound process?
- A
It has many short bursts of CPU activity
- B
It is a batch job that runs at scheduled times
- C
It spends more time computing than waiting for I/O
- D
It spends most of its time waiting for I/O
Correct answer
CIt spends more time computing than waiting for I/O
Explanation
A CPU-bound process uses a lot of CPU time for computation (e.g., video rendering) and has relatively few I/O operations. In contrast, I/O-bound processes wait often for I/O.
- A
- 32
Why is a mix of CPU-bound and I/O-bound processes beneficial for scheduling?
- A
It ensures the CPU is always busy while some processes are waiting for I/O
- B
It eliminates the need for a long-term scheduler
- C
It reduces the number of context switches
- D
It simplifies the scheduler's algorithm
Correct answer
AIt ensures the CPU is always busy while some processes are waiting for I/O
Explanation
When one process is waiting for I/O, the CPU can work on a CPU-bound process. A good mix maximizes CPU utilization and keeps the system responsive.
- A
- 33
How do mobile operating systems like iOS typically handle memory management compared to desktop systems?
- A
They keep only the foreground app active in memory
- B
They use extensive swapping to free memory
- C
They run all processes in the background
- D
They rely on user-managed memory
Correct answer
AThey keep only the foreground app active in memory
Explanation
Mobile systems often conserve memory by keeping only the currently active (foreground) app in memory. Background processes are suspended or terminated to save resources.
- A
- 34
When a parent process terminates, what typically happens to its child processes?
- A
They are moved to another parent
- B
They continue running normally
- C
They become system processes
- D
They are also terminated (cascading termination)
Correct answer
DThey are also terminated (cascading termination)
Explanation
In many systems, termination of a parent process results in cascading termination of its children, preventing orphan processes. However, some OSes allow orphans to be adopted by init.
- A
- 35
What is an orphan process?
- A
A process that has no memory allocated
- B
A child process that cannot communicate with its parent
- C
A process that has been terminated but still has a PCB entry
- D
A process whose parent has terminated but continues running
Correct answer
DA process whose parent has terminated but continues running
Explanation
An orphan process is a child process that continues to run after its parent has terminated. The init process typically adopts it to avoid it becoming a zombie.
- A
- 36
What is a zombie process?
- A
A process that is still executing after its parent has terminated
- B
A process that has been swapped to disk
- C
A terminated process whose parent has not yet called wait(), leaving its PCB entry in the table
- D
A process that uses excessive CPU time
Correct answer
CA terminated process whose parent has not yet called wait(), leaving its PCB entry in the table
Explanation
A zombie process has completed execution but still has an entry in the process table because the parent hasn't waited for its termination status. It uses minimal resources.
- A
- 37
In the context of process communication, what is a socket?
- A
A shared memory region
- B
An endpoint for communication between processes on different computers over a network
- C
A system call to create a child process
- D
A unidirectional pipe between two processes
Correct answer
BAn endpoint for communication between processes on different computers over a network
Explanation
A socket is an endpoint for network communication, identified by an IP address and port number. It enables processes on different computers to exchange data.
- A
- 38
What is the role of a port number in network communication?
- A
It identifies the computer on the network
- B
It determines the speed of data transfer
- C
It specifies which service or application on a host should receive the data
- D
It encrypts the data being sent
Correct answer
CIt specifies which service or application on a host should receive the data
Explanation
Port numbers differentiate between multiple network services on the same IP address. For example, port 80 is typically used for HTTP web traffic.
- A
- 39
What is a pipe in the context of interprocess communication?
- A
A network connection between two computers
- B
A system call that creates a child process
- C
A method for two processes to share memory
- D
A unidirectional communication channel between two processes on the same system
Correct answer
DA unidirectional communication channel between two processes on the same system
Explanation
A pipe provides a one-way flow of data from one process to another. It is commonly used to connect the output of one command to the input of another in Unix shells.
- A
- 40
What distinguishes a named pipe from an ordinary pipe?
- A
It can be used by processes that are not related
- B
It is unidirectional only
- C
It can only connect processes on different machines
- D
It does not require a file system
Correct answer
AIt can be used by processes that are not related
Explanation
Named pipes (FIFOs) have a name in the file system and can be used by any processes that know the name, not just parent-child pairs.
- A
- 41
What is a bidirectional pipe?
- A
A pipe that allows data to flow in both directions, but not simultaneously
- B
A pipe that allows data to flow in one direction only
- C
A pipe that allows simultaneous two-way communication
- D
A pipe that connects more than two processes
Correct answer
CA pipe that allows simultaneous two-way communication
Explanation
A bidirectional pipe enables data to be sent in both directions at the same time (full-duplex). Some pipes are half-duplex, allowing only one direction at a time.
- A
- 42
What problem does middleware like Microsoft IDL solve in interprocess communication?
- A
It encrypts data for secure transmission
- B
It translates between different data representations (e.g., big-endian vs little-endian) on different systems
- C
It compresses data to reduce bandwidth usage
- D
It provides a graphical interface for debugging
Correct answer
BIt translates between different data representations (e.g., big-endian vs little-endian) on different systems
Explanation
Middleware like Microsoft Interface Definition Language (IDL) handles data representation differences (endianness) between systems, allowing them to communicate despite varying hardware architectures.
- A
- 43
What is the difference between big-endian and little-endian byte ordering?
- A
There is no difference; they are identical
- B
Big-endian stores the least significant byte first; little-endian stores the most significant byte first
- C
Big-endian is used only in mainframes; little-endian is used in PCs
- D
Big-endian stores the most significant byte first; little-endian stores the least significant byte first
Correct answer
DBig-endian stores the most significant byte first; little-endian stores the least significant byte first
Explanation
Big-endian systems store the most significant byte at the lowest memory address, while little-endian stores the least significant byte first. This can cause issues when exchanging binary data.
- A

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