Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Carlo B.
C
Carlo B.
Community Contributor
Quizzes Created: 1 | Total Attempts: 119
| Attempts: 119 | Questions: 13
Please wait...
Question 1 / 13
0 %
0/100
Score 0/100
1. One of the challenges in multicore programming is dividing accessed and manipulated by tasks to run on seperate cores. This area is called: _____.

Explanation

The given correct answer for this question is "DATA SPLITTING". In multicore programming, one of the challenges is dividing the data that is accessed and manipulated by tasks to run on separate cores. This process is known as data splitting. By dividing the data, each core can work on a portion of the data simultaneously, improving performance and efficiency in multicore systems.

Submit
Please wait...
About This Quiz
Midterm - Quiz 3 - Quiz

Midterm Quiz 3 explores multicore programming, thread management, and multithreading models, focusing on practical approaches and challenges in concurrent programming.

Personalize your quiz and earn a certificate with your name on it!
2. There are three models of multithreading: one-to-many, one-to-one and many-to-many. 

Explanation

The statement is false because there are actually two models of multithreading, not three. The two models are one-to-one and many-to-many. The one-to-many model does not exist in multithreading.

Submit
3. There are two techniques for creating threads in a lava program. One approach is to create a new class that is derived from the Thread class and to override its run() method, An alternative and more commonly used technique is to define  a class that implements the Runnable interface.

Explanation

The given answer is true because the explanation provided states that there are two techniques for creating threads in a Java program - one is by creating a new class derived from the Thread class and overriding its run() method, and the other is by defining a class that implements the Runnable interface. This implies that it is indeed true that there are two techniques for creating threads in a Java program.

Submit
4. In general, kernel-level threads are faster to create and to manage the user-level threads, because of the kernel's effective intervention.

Explanation

Kernel-level threads are not necessarily faster to create and manage than user-level threads. The speed of creating and managing threads depends on various factors, including the implementation of the operating system and the specific requirements of the application. While kernel-level threads may have the advantage of the kernel's effective intervention, user-level threads can also be efficiently created and managed by the user-level thread library without the need for kernel intervention. Therefore, the statement that kernel-level threads are faster to create and manage than user-level threads is false.

Submit
5. A _____ is used in unix systems to notify a process that a particular event has occured.

Explanation

In Unix systems, a signal is used to notify a process that a particular event has occurred. Signals are a way for processes to communicate with each other and can be used to interrupt a process, terminate a process, or notify a process of an event such as a user input or a hardware interrupt. By sending a signal, one process can inform another process about a specific event, allowing for synchronization and coordination between processes in the Unix system.

Submit
6. PThreads is an implementation, not a specification.

Explanation

pThreads is actually a specification, not just an implementation. It stands for "POSIX Threads" and refers to a set of standard APIs (Application Programming Interfaces) for creating and manipulating threads in a multi-threaded program. It provides a standardized way for developers to work with threads on POSIX-compliant operating systems. Various implementations of pThreads exist, such as the one provided by the GNU C Library (glibc), but the specification itself defines the behavior and functionality of the threading interface. Therefore, the correct answer is False.

Submit
7. Many systems implementing either the many-to-many of the two-level model place an intermediate data structure between the user and kernel threads. This data structure is typically known as _____.

Explanation

In systems implementing the many-to-many or two-level model, there is often a need for an intermediate data structure between the user and kernel threads. This data structure, known as a lightweight process, helps facilitate communication and coordination between the two levels. It provides a layer of abstraction and allows for efficient scheduling and management of threads.

Submit
8. A _____ provides the programmer with an api for creating and managing threads.

Explanation

A thread library is a software component that provides a programmer with an API (Application Programming Interface) for creating and managing threads. It includes functions and methods that allow the programmer to create, start, pause, resume, and terminate threads, as well as perform other operations such as synchronization and communication between threads. The thread library abstracts the underlying operating system's thread management capabilities and provides a higher-level interface for the programmer to work with threads.

Submit
9. User threads are supported above the kernel and managed with kernel support, whereas kernel threads are supported and managed directly by the operating system.

Explanation

User threads are supported and managed directly by the operating system, whereas kernel threads are supported above the kernel and managed with kernel support. This means that kernel threads have direct access to the operating system's resources and can execute in parallel, while user threads rely on the support of the operating system's kernel to manage their execution. Therefore, the correct answer is False.

Submit
10. Whereas creating a seperate thread is certainly superior to creating a seperate process, a multithreaded server nonetheless has potential problems. The first issue concerns the amount of time required to create the thread, The second issue concerns the number of threads concurrently active in the system. Unlimited threads could exhaust system resources, such as cpu time or memory. One solution to this problem is to use a _____

Explanation

A thread pool is a solution to the potential problems of creating and managing multiple threads in a multithreaded server. Instead of creating a new thread for each request, a thread pool allows for the reuse of existing threads. This reduces the overhead of thread creation and destruction, improving performance. Additionally, a thread pool can limit the number of concurrent threads, preventing the exhaustion of system resources. By efficiently managing the allocation and reuse of threads, a thread pool helps optimize the performance and stability of a multithreaded server.

Submit
11. Linux does not distinguish between processes and threads

Explanation

Linux does not distinguish between processes and threads. This means that in Linux, both processes and threads are treated as the same entity. They share the same resources and have the same level of access to the system. This is in contrast to some other operating systems where processes and threads are treated as separate entities with different levels of access and resource allocation. In Linux, this lack of distinction allows for more efficient resource utilization and easier communication between processes and threads.

Submit
12. There are two tpes of parallelism: _____ and _____ . The former focuses on distributing substes of the same data across multiple computing cores and performing the same operation on each core. Whereas the latter distributes threads across multiple computing cores.

Explanation

The correct answer is DATA PARALLELISM and TASK PARALLELISM. Data parallelism refers to distributing subsets of the same data across multiple computing cores and performing the same operation on each core. Task parallelism, on the other hand, involves distributing threads across multiple computing cores.

Submit
13. _____ involves terminating a thread before it has completed. For example, if multiple threads are concurrently searching through a database and one thread returns the result, the remaining threads might be terminated. Another situation might occur when a user presses a button on a web browser that stops a web page from loading any further. A thread that is to be terminated is often referred to as the _____

Explanation

Thread cancellation involves terminating a thread before it has completed. For example, if multiple threads are concurrently searching through a database and one thread returns the result, the remaining threads might be terminated. Another situation might occur when a user presses a button on a web browser that stops a web page from loading any further. A thread that is to be terminated is often referred to as the target thread.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 15, 2023 +

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

  • Current Version
  • Mar 15, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Aug 21, 2019
    Quiz Created by
    Carlo B.
Cancel
  • All
    All (13)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
One of the challenges in multicore programming is dividing accessed...
There are three models of multithreading: one-to-many, one-to-one and...
There are two techniques for creating threads in a lava program. One...
In general, kernel-level threads are faster to create and to manage...
A _____ is used in unix systems to notify a process that a...
PThreads is an implementation, not a specification.
Many systems implementing either the many-to-many of the two-level...
A _____ provides the programmer with an api for creating and...
User threads are supported above the kernel and managed with kernel...
Whereas creating a seperate thread is certainly superior to creating a...
Linux does not distinguish between processes and threads
There are two tpes of parallelism: _____ and _____ ....
_____ involves terminating a thread before it has completed. For...
Alert!

Advertisement