1. Home
  2. Explore
  3. Computer Science
  4. Bootstrap Process Explained

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Bootstrap Process Explained

  • 43Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Boot Process and Boot Loaders

What is the first action performed by the bootstrap program when a computer starts?

43 questions

  1. 1

    What is the first action performed by the bootstrap program when a computer starts?

    1. A

      Displays a menu to choose among multiple operating systems

    2. B

      Loads the operating system directly from the hard disk

    3. C

      Checks the hardware to ensure sufficient resources

    4. D

      Transfers control to a boot loader such as GRUB

    Correct answer
    C

    Checks 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.

  2. 2

    After checking hardware, what does the bootstrap program look for?

    1. A

      Available network connections

    2. B

      A device with an operating system installed

    3. C

      The user's login credentials

    4. D

      A boot loader like GRUB

    Correct answer
    B

    A 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.

  3. 3

    What is the role of GRUB in the boot process?

    1. A

      It compiles the Linux kernel from source code

    2. B

      It provides a menu to choose among multiple installed operating systems

    3. C

      It manages device drivers during boot

    4. D

      It checks hardware and loads the operating system directly

    Correct answer
    B

    It 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.

  4. 4

    Is GRUB exclusively for Linux?

    1. A

      No, it can boot any operating system

    2. B

      Yes, but only if the system uses GRUB Legacy

    3. C

      No, it only supports Unix-based systems

    4. D

      Yes, it is only compatible with Linux distributions

    Correct answer
    A

    No, 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.

  5. 5

    On older PCs (LPCs), where was the operating system required to be located?

    1. A

      Anywhere on the hard disk

    2. B

      On the first part of the hard disk

    3. C

      In a specific partition labeled as active

    4. D

      In a separate ROM chip

    Correct answer
    B

    On 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.

  6. 6

    Which of the following is one of the five services provided by an operating system?

    1. A

      Database management

    2. B

      Web server hosting

    3. C

      File system management

    4. D

      Graphics rendering

    Correct answer
    C

    File 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.

  7. 7

    In a monolithic operating system, how does adding a new feature typically work?

    1. A

      It can be added as a loadable module without restarting

    2. B

      It is done by inserting a device driver

    3. C

      It requires rewriting the OS and reinstalling it

    4. D

      It is automatically handled by the kernel

    Correct answer
    C

    It 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.

  8. 8

    Which operating system is known to combine both monolithic and layered approaches?

    1. A

      macOS

    2. B

      iOS

    3. C

      Windows

    4. D

      Linux

    Correct answer
    C

    Windows

    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.

  9. 9

    What is the kernel of an operating system?

    1. A

      A system program that checks disk health

    2. B

      The user interface that accepts commands

    3. C

      The core component that manages hardware and system resources

    4. D

      A boot loader that starts the OS

    Correct answer
    C

    The 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.

  10. 10

    What is a system call?

    1. A

      A program that checks system health

    2. B

      An API that allows user programs to request OS services

    3. C

      A hardware interrupt generated by a device

    4. D

      A command interpreter that executes user commands

    Correct answer
    B

    An 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.

  11. 11

    Which of the following is an example of a system program?

    1. A

      Microsoft Word

    2. B

      Adobe Photoshop

    3. C

      Google Chrome

    4. D

      Windows Task Manager

    Correct answer
    D

    Windows 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.

  12. 12

    What is the primary purpose of the command interpreter (shell)?

    1. A

      To schedule processes for the CPU

    2. B

      To translate high-level language into machine code

    3. C

      To manage memory allocation

    4. D

      To accept and execute user commands

    Correct answer
    D

    To 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.

  13. 13

    Why is the command interpreter typically separate from the kernel?

    1. A

      To reduce the size of the kernel

    2. B

      To improve system security by isolating user commands

    3. C

      To allow multiple different shells or interfaces to be used

    4. D

      To speed up command execution

    Correct answer
    C

    To 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.

  14. 14

    In Unix, which system call does a shell use to create a new process?

    1. A

      wait()

    2. B

      fork()

    3. C

      exec()

    4. D

      exit()

    Correct answer
    B

    fork()

    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.

  15. 15

    What distinguishes a process from a program?

    1. A

      A program uses memory; a process does not

    2. B

      There is no difference; the terms are interchangeable

    3. C

      A program is stored on disk; a process is in execution

    4. D

      A process is passive; a program is active

    Correct answer
    C

    A 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.

  16. 16

    Which component of a process holds the address of the next instruction to be executed?

    1. A

      Program counter

    2. B

      Accumulator

    3. C

      Stack pointer

    4. D

      Heap base

    Correct answer
    A

    Program counter

    Explanation

    The program counter (PC) keeps track of the memory address of the next instruction to be fetched and executed.

  17. 17

    In a process's memory layout, which area is used for short-term data like function call parameters?

    1. A

      Data section

    2. B

      Heap

    3. C

      Stack

    4. D

      Text section

    Correct answer
    C

    Stack

    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.

  18. 18

    How are the stack and heap typically arranged in a process's memory to maximize space utilization?

    1. A

      Heap starts at the top and grows down; stack starts at the bottom and grows up

    2. B

      They are interleaved in the same memory region

    3. C

      Stack starts at the top and grows down; heap starts at the bottom and grows up

    4. D

      Both start at the same address and expand together

    Correct answer
    C

    Stack 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.

  19. 19

    What is a thread in the context of process execution?

    1. A

      A system call used to create new processes

    2. B

      A separate process that shares no resources

    3. C

      A scheduling algorithm for CPU allocation

    4. D

      A lightweight process that shares memory with other threads in the same process

    Correct answer
    D

    A 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.

  20. 20

    In the process state diagram, what is the typical first state when a process is created?

    1. A

      New

    2. B

      Running

    3. C

      Waiting

    4. D

      Ready

    Correct answer
    A

    New

    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.

  21. 21

    What event moves a process from the running state to the waiting state?

    1. A

      A higher-priority process becomes ready

    2. B

      The process completes execution

    3. C

      The CPU timer expires

    4. D

      The process requests an I/O operation

    Correct answer
    D

    The 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.

  22. 22

    Why might a process be moved from running to the ready state?

    1. A

      It has finished its execution

    2. B

      It encountered a fatal error

    3. C

      It is waiting for an event

    4. D

      It has used its allocated CPU time slice

    Correct answer
    D

    It 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.

  23. 23

    When a process terminates, what must the operating system do?

    1. A

      Free its allocated memory and resources

    2. B

      Assign it a new process ID

    3. C

      Move it to the waiting state

    4. D

      Save its state for later resumption

    Correct answer
    A

    Free 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.

  24. 24

    What information is stored in a Process Control Block (PCB)?

    1. A

      Only the program counter and registers

    2. B

      The entire source code of the program

    3. C

      Process state, program counter, registers, memory limits, and more

    4. D

      The list of all devices connected to the system

    Correct answer
    C

    Process 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.

  25. 25

    What is context switching in an operating system?

    1. A

      Allocating additional memory to a running process

    2. B

      Changing the user interface from command line to GUI

    3. C

      Moving a process from the ready queue to the waiting queue

    4. D

      Switching from one process to another by saving and loading PCBs

    Correct answer
    D

    Switching 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.

  26. 26

    Why does context switching incur overhead?

    1. A

      It increases the number of system calls

    2. B

      It requires writing data to the hard disk

    3. C

      The CPU is idle while saving and loading process states

    4. D

      It consumes network bandwidth

    Correct answer
    C

    The 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.

  27. 27

    How can hardware help speed up context switching?

    1. A

      By increasing the clock speed of the CPU

    2. B

      By adding more RAM

    3. C

      By providing multiple sets of registers for different processes

    4. D

      By using a faster disk drive

    Correct answer
    C

    By 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.

  28. 28

    What is the role of the short-term scheduler (CPU scheduler)?

    1. A

      To handle long-term job scheduling like batch processes

    2. B

      To manage the swapping of processes between memory and disk

    3. C

      To decide which processes are loaded into memory from disk

    4. D

      To select the next process from the ready queue to run on the CPU

    Correct answer
    D

    To 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).

  29. 29

    What does the long-term scheduler (job scheduler) do?

    1. A

      Assigns CPU time to each process

    2. B

      Controls the degree of multiprogramming by deciding which jobs are brought into the ready queue

    3. C

      Handles I/O requests from processes

    4. D

      Selects which processes are moved from memory to disk

    Correct answer
    B

    Controls 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.

  30. 30

    What is the purpose of the medium-term scheduler (swapper)?

    1. A

      To move processes out of memory to disk and later bring them back

    2. B

      To select the next process for the CPU

    3. C

      To create new processes using fork()

    4. D

      To manage the file system cache

    Correct answer
    A

    To 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.

  31. 31

    What characterizes a CPU-bound process?

    1. A

      It has many short bursts of CPU activity

    2. B

      It is a batch job that runs at scheduled times

    3. C

      It spends more time computing than waiting for I/O

    4. D

      It spends most of its time waiting for I/O

    Correct answer
    C

    It 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.

  32. 32

    Why is a mix of CPU-bound and I/O-bound processes beneficial for scheduling?

    1. A

      It ensures the CPU is always busy while some processes are waiting for I/O

    2. B

      It eliminates the need for a long-term scheduler

    3. C

      It reduces the number of context switches

    4. D

      It simplifies the scheduler's algorithm

    Correct answer
    A

    It 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.

  33. 33

    How do mobile operating systems like iOS typically handle memory management compared to desktop systems?

    1. A

      They keep only the foreground app active in memory

    2. B

      They use extensive swapping to free memory

    3. C

      They run all processes in the background

    4. D

      They rely on user-managed memory

    Correct answer
    A

    They 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.

  34. 34

    When a parent process terminates, what typically happens to its child processes?

    1. A

      They are moved to another parent

    2. B

      They continue running normally

    3. C

      They become system processes

    4. D

      They are also terminated (cascading termination)

    Correct answer
    D

    They 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.

  35. 35

    What is an orphan process?

    1. A

      A process that has no memory allocated

    2. B

      A child process that cannot communicate with its parent

    3. C

      A process that has been terminated but still has a PCB entry

    4. D

      A process whose parent has terminated but continues running

    Correct answer
    D

    A 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.

  36. 36

    What is a zombie process?

    1. A

      A process that is still executing after its parent has terminated

    2. B

      A process that has been swapped to disk

    3. C

      A terminated process whose parent has not yet called wait(), leaving its PCB entry in the table

    4. D

      A process that uses excessive CPU time

    Correct answer
    C

    A 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.

  37. 37

    In the context of process communication, what is a socket?

    1. A

      A shared memory region

    2. B

      An endpoint for communication between processes on different computers over a network

    3. C

      A system call to create a child process

    4. D

      A unidirectional pipe between two processes

    Correct answer
    B

    An 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.

  38. 38

    What is the role of a port number in network communication?

    1. A

      It identifies the computer on the network

    2. B

      It determines the speed of data transfer

    3. C

      It specifies which service or application on a host should receive the data

    4. D

      It encrypts the data being sent

    Correct answer
    C

    It 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.

  39. 39

    What is a pipe in the context of interprocess communication?

    1. A

      A network connection between two computers

    2. B

      A system call that creates a child process

    3. C

      A method for two processes to share memory

    4. D

      A unidirectional communication channel between two processes on the same system

    Correct answer
    D

    A 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.

  40. 40

    What distinguishes a named pipe from an ordinary pipe?

    1. A

      It can be used by processes that are not related

    2. B

      It is unidirectional only

    3. C

      It can only connect processes on different machines

    4. D

      It does not require a file system

    Correct answer
    A

    It 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.

  41. 41

    What is a bidirectional pipe?

    1. A

      A pipe that allows data to flow in both directions, but not simultaneously

    2. B

      A pipe that allows data to flow in one direction only

    3. C

      A pipe that allows simultaneous two-way communication

    4. D

      A pipe that connects more than two processes

    Correct answer
    C

    A 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.

  42. 42

    What problem does middleware like Microsoft IDL solve in interprocess communication?

    1. A

      It encrypts data for secure transmission

    2. B

      It translates between different data representations (e.g., big-endian vs little-endian) on different systems

    3. C

      It compresses data to reduce bandwidth usage

    4. D

      It provides a graphical interface for debugging

    Correct answer
    B

    It 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.

  43. 43

    What is the difference between big-endian and little-endian byte ordering?

    1. A

      There is no difference; they are identical

    2. B

      Big-endian stores the least significant byte first; little-endian stores the most significant byte first

    3. C

      Big-endian is used only in mainframes; little-endian is used in PCs

    4. D

      Big-endian stores the most significant byte first; little-endian stores the least significant byte first

    Correct answer
    D

    Big-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.

Question 1 of 43
Question 1 of 43

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent