Quiz 1 - Processes & Threads

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Michael
M
Michael
Community Contributor
Quizzes Created: 2 | Total Attempts: 2,065
Questions: 13 | Attempts: 1,683

SettingsSettingsSettings
Microsoft Quizzes & Trivia

.


Questions and Answers
  • 1. 

    The difference between a program and a process is that a program is an active entity while a process is a passive entity.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    The explanation for the given correct answer, which is False, is that the statement is incorrect. The difference between a program and a process is not that a program is an active entity while a process is a passive entity. In fact, it is the opposite. A program is a passive entity that resides on a storage device, while a process is an active entity that is created when a program is loaded into memory and executed. Therefore, the correct answer is False.

    Rate this question:

  • 2. 

    The single benefit of a thread pool is to control the number of threads.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    A thread pool does not only control the number of threads, but it also provides a way to manage and reuse threads efficiently. Instead of creating a new thread for each task, a thread pool maintains a pool of pre-initialized threads that can be assigned to different tasks. This eliminates the overhead of thread creation and destruction, resulting in improved performance and resource management. Therefore, the given statement is false.

    Rate this question:

  • 3. 

    When a child process is created, which of the following is a possibility in terms of the execution or address space of the child process?

    • A.

      The child process has a new program loaded into it

    • B.

      The child process runs concurrently with the parent.

    • C.

      The child is a duplicate of the parent.

    • D.

      All of the above

    Correct Answer
    D. All of the above
    Explanation
    When a child process is created, it is possible for the child process to have a new program loaded into it. This means that the child process can start executing a different program than the parent process. Additionally, the child process can run concurrently with the parent process, meaning that both processes can execute simultaneously. Lastly, the child process can be a duplicate of the parent process, which means that it inherits the same code, data, and resources from the parent process. Therefore, all of the given statements are possibilities in terms of the execution or address space of the child process.

    Rate this question:

  • 4. 

    A process control block ____.

    • A.

      Is an example of a process queue

    • B.

      Determines which process is to be executed next

    • C.

      Includes information on the process's state

    • D.

      Stores the address of the next instruction to be processed by a different process

    Correct Answer
    C. Includes information on the process's state
    Explanation
    A process control block includes information on the process's state. This means that it contains details about the current status of the process, such as the values of its registers, the priority level, the program counter, and other relevant information. This information is crucial for the operating system to manage and control the execution of processes effectively. By having access to the process's state, the operating system can make informed decisions about scheduling, resource allocation, and process management.

    Rate this question:

  • 5. 

    A ____ provides an API for creating and managing threads

    • A.

      Set of system calls

    • B.

      Thread library

    • C.

      Multithreading model

    • D.

      Multicore system

    Correct Answer
    B. Thread library
    Explanation
    A thread library provides an API for creating and managing threads. This library includes various functions and methods that allow programmers to create, start, pause, resume, and terminate threads. It also provides synchronization mechanisms like locks, semaphores, and condition variables to ensure proper coordination and communication between threads. By using a thread library, developers can easily implement multithreading in their applications without having to directly deal with low-level system calls or the complexities of managing threads at the operating system level.

    Rate this question:

  • 6. 

    A _____ uses an existing thread — rather than creating a new one — to complete a task.

    • A.

      Asynchronous procedure call

    • B.

      Lightweight process

    • C.

      Thread pool

    • D.

      Scheduler activation

    Correct Answer
    C. Thread pool
    Explanation
    A thread pool is a mechanism that uses an existing thread, rather than creating a new one, to complete a task. It allows for efficient management and reuse of threads, reducing the overhead of creating and destroying threads for each task. By using a thread pool, tasks can be assigned to available threads, improving performance and resource utilization.

    Rate this question:

  • 7. 

    A thread is composed of a thread ID, program counter, register set, and heap.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    A thread is not composed of a heap. A thread is a lightweight process that consists of a thread ID, program counter, and register set. The heap, on the other hand, is a region of memory used for dynamic memory allocation. Therefore, the statement that a thread is composed of a thread ID, program counter, register set, and heap is false.

    Rate this question:

  • 8. 

    The ____ multithreading model multiplexes many user-level threads to a smaller or equal number of kernel threads.

    • A.

      One-to-one model

    • B.

      Many-to-many model

    • C.

      Many-to-one model

    • D.

      Many-to-some model

    Correct Answer
    B. Many-to-many model
    Explanation
    The many-to-many multithreading model allows for the mapping of many user-level threads to an equal or smaller number of kernel threads. This model provides flexibility and efficiency by allowing multiple user-level threads to be executed concurrently on multiple kernel threads. The mapping between user-level and kernel threads can be dynamically adjusted, allowing for better load balancing and resource utilization.

    Rate this question:

  • 9. 

    It is possible to have concurrency without parallelism.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Concurrency refers to the ability of a system to execute multiple tasks simultaneously, while parallelism refers to the actual execution of those tasks simultaneously. In other words, concurrency is about managing multiple tasks at the same time, but not necessarily executing them simultaneously. Therefore, it is possible to have concurrency without parallelism, where tasks are managed and scheduled to run concurrently, but not necessarily executed in parallel.

    Rate this question:

  • 10. 

    Virtually all contemporary operating systems support kernel threads.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    The statement suggests that most modern operating systems have the capability to support kernel threads. This means that these operating systems can handle multiple tasks simultaneously by dividing them into smaller units of execution called threads. Kernel threads are managed by the operating system's kernel, which allows for efficient multitasking and resource sharing. Therefore, the given statement is true.

    Rate this question:

  • 11. 

    A _________________ saves the state of the currently running process and restores the state of the next process to run.

    • A.

      None of the above

    • B.

      Save-and-restore

    • C.

      Context switch

    • D.

      State switch

    Correct Answer
    C. Context switch
    Explanation
    A context switch is the process of saving the current state of a running process and restoring the state of the next process to be executed. This allows the operating system to efficiently manage multiple processes by temporarily suspending one process and resuming another. During a context switch, the operating system saves the current process's state, including its program counter, registers, and other relevant data, and then loads the saved state of the next process to be executed. This ensures that each process can continue from where it left off, maintaining the illusion of concurrent execution.

    Rate this question:

  • 12. 

    A process that has terminated, but whose parent has not yet called wait(), is known as a ________ process.

    • A.

      Terminated

    • B.

      Orphan

    • C.

      Zombie

    • D.

      Init

    Correct Answer
    C. Zombie
    Explanation
    A zombie process is a process that has terminated but still exists in the process table because its parent process has not yet called the wait() system call to retrieve its exit status. This can happen if the parent process has terminated or is not properly handling its child processes. Zombie processes do not consume system resources but can still occupy space in the process table until they are properly reaped by the parent process.

    Rate this question:

  • 13. 

    For a single-processor system, there will never be more than one process in the Running state.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    In a single-processor system, only one process can be executed at a time. The processor can only handle one instruction at a time and can only switch between processes through context switching. Therefore, it is true that there will never be more than one process in the Running state in a single-processor system.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 25, 2019
    Quiz Created by
    Michael
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.