Midterm - Quiz 3

13 Questions | Total Attempts: 32

SettingsSettingsSettings
Please wait...
Midterm - Quiz 3

.


Questions and Answers
  • 1. 
    One of the challenges in multicore programming is dividing accessed and manipulated by tasks to run on seperate cores. This area is called: [Blank].
  • 2. 
    There are three models of multithreading: one-to-many, one-to-one and many-to-many. 
    • A. 

      True

    • B. 

      False

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

      True

    • B. 

      False

  • 4. 
    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 [Blank]
  • 5. 
    A [Blank] provides the programmer with an api for creating and managing threads.
  • 6. 
    User threads are supported above the kernel and managed with kernel support, whereas kernel threads are supported and managed directly by the operating system.
    • A. 

      True

    • B. 

      False

  • 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 [Blank].
  • 8. 
    A [Blank] is used in unix systems to notify a process that a particular event has occured.
  • 9. 
    [Blank] 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 [Blank]
  • 10. 
    In general, kernel-level threads are faster to create and to manage the user-level threads, because of the kernel's effective intervention.
    • A. 

      True

    • B. 

      False

  • 11. 
    PThreads is an implementation, not a specification.
    • A. 

      True

    • B. 

      False

  • 12. 
    There are two tpes of parallelism: [Blank] and [Blank] . 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.
  • 13. 
    Linux does not distinguish between processes and threads
    • A. 

      True

    • B. 

      False

Back to Top Back to top