• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/40

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

40 Cards in this Set

  • Front
  • Back

1. ____ is a thread library for Solaris that maps manyuser-level threads to one kernel thread.


A) Pthreads


B) Green threads


C) Sthreads


D) Java threads

Ans: B


Feedback: 4.3.1 Difficulty: Medium

2. Pthreads refers to ____.


A) the POSIX standard.


B) an implementation for thread behavior.


C) a specification for thread behavior.


D) an API for process creation and synchronization.

Ans: C


Feedback: 4.4.1 Difficulty: Medium

Import Settings:3. The ____ multithreading model multiplexes many user-levelthreads to a smaller or equal number of kernel threads.


A) many-to-one model


B) one-to-one model


C) many-to-many model


D) many-to-some model

Ans: C


Feedback: 4.3.3 Difficulty: Easy

4. Cancellation points are associated with ____ cancellation.


A) asynchronous


B) deferred


C) synchronous


D) non-deferred

Ans: B


Feedback: 4.6.3 Difficulty: Medium

5. Which of the following would be an acceptable signal handling scheme for a multithreaded program?


A) Deliver the signal to the thread to which the signal applies.


B) Deliver the signal to every thread in the process.


C) Deliver the signal to only certain threads in the process.


D) All of the above

Ans: D


Feedback: 4.6.2 Difficulty: Medium

Import Settings:6. Signals can be emulated in windows through ____.


A) asynchronous procedure calls


B) local procedure calls


C) remote procedure calls


D) none of the above

Ans: A


Feedback: 4.6.2 Difficulty: Medium

7. Thread-local storage is data that ____.


A) is not associated with any process


B) has been modified by the thread, but not yet updated to the parent process


C) is generated by the thread independent of the thread's process


D) is unique to each thread

Ans: D


Feedback: 4.6.4 Difficulty: Medium

8. LWP is ____.


A) short for lightweight processor


B) placed between system and kernel threads


C) placed between user and kernel threads


D) common in systems implementing one-to-one multithreading models

Ans: C


Feedback: 4.6.5 Difficulty: Easy

9. Windows uses the ____.


A) one-to-one model


B) many-to-one model


C) one-to many-model


D) many-to-many model

Ans: A


Feedback: 4.7.1 Difficulty: Easy

Im10. In multithreaded programs, the kernel informs an applicationabout certain events using a procedure known as a(n) ____.


A) signal


B) upcall


C) event handler


D) pool

Ans: B


Feedback: 4.6.5 Difficulty: Medium

11. _____ is not considered a challenge when designing applications for multicore systems.


A) Deciding which activities can be run in parallel


B) Ensuring there is a sufficient number of cores C) Determining if data can be separated so that it is accessed on separate cores


D) Identifying data dependencies between tasks.

Ans: B


Feedback: 4.2.1 Difficulty: Medium

12. A ____ provides an API for creating and managing threads.


A) set of system calls


B) multicore system


C) thread library


D) multithreading model

Ans: C


Feedback: 4.4 Difficulty: Easy

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


A) many-to-many


B) two-level


C) one-to-one


D) many-to-one

Ans: A


Feedback: 4.3.3 Difficulty: Easy

14. The _____ model maps many user-level threads to one kernel thread.


A) many-to-many


B) two-level


C) one-to-one


D) many-to-one

Ans: D


Feedback: 4.3.1 Difficulty: Easy

15. The _____ model maps each user-level thread to one kernel thread.


A) many-to-many


B) two-level


C) one-to-one


D) many-to-one

Ans: C


Feedback: 4.3.2 Difficulty: Easy

16. The _____ model allows a user-level thread to be bound to one kernel thread.


A) many-to-many


B) two-level


C) one-to-one


D) many-to-one y

Ans: B Feedback: 4.3.3 Difficulty: Eas

17. The most common technique for writing multithreaded Java programs is _____.


A) extending the Thread class and overriding the run() method


B) implementing the Runnable interface and defining its run() method


C) designing your own Thread class


D) using the CreateThread() function

Ans: B


Feedback: 4.4.3 Difficulty: Easy

18. In Pthreads, a parent uses the pthread_join()function to wait for its child thread to complete. What is the equivalentfunction in Win32?


A) win32_join()


B) wait()


C) WaitForSingleObject()


D) join()

Ans: C


Section 4.4.2 Difficulty: Medium

19. Which of the following statements regarding threads is false?


A) Sharing is automatically provided in Java threads.


B) Both Pthreads and Win32 threads share global data.


C) The start() method actually creates a thread in the Java virtual machine.


D) The Java method join() provides similar functionality as the WaitForSingleObject in Win32.

Ans: A


Feedback: 4.4.3 Difficulty: Medium

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


A) lightweight process


B) thread pool


C) scheduler activation


D) asynchronous procedure call

Ans: B


Feedback: 4.5.1 Difficulty: Easy

21. According to Amdahl's Law, what is the speedup gain for an application that is 60% parallel and we run it on a machine with 4 processing cores?


A) 1.82


B) .7


C) .55


D) 1.43

Ans: D


Feedback: 4.2 Difficulty: Medium

22. _________ involves distributing tasks across multiple computing cores.


A) Concurrency


B) Task parallelism


C) Data parallelism


D) Parallelism

Ans: B


Feedback: 4.2.2 Difficulty: Medium

23. ___________ is a formula that identifies potential performance gains from adding additional computing cores to an application that has a parallel and serial component.


A) Task parallelism


B) Data parallelism


C) Data splitting


D) Amdahl's Law

Ans: D


Feedback: 4.2 Difficulty: Medium

24. When OpenMP encounters the #pragma omp parallel directive, it


A) constructs a parallel region


B) creates a new thread


C) creates as many threads as there are processing cores


D) parallelizes for loops

Ans: C


Feedback: 4.5.2 Difficulty: Medium

25. Grand Central Dispatch handles blocks by


A) placing them on a dispatch queue


B) creating a new thread C) placing them on a dispatch stack


D) constructing a parallel region

Ans: A


Feedback: 4.5.3 Difficulty: Medium

41. A traditional (or heavyweight) process has a single threadof control.

Ans: True


Feedback: 4.1 Difficulty: Easy

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

Ans: False


Feedback: 4.1 Difficulty: Medium

43. Virtually all contemporary operating systems support kernel threads.

Ans: True


Feedback: 4.1.1 Difficulty: Easy

44. Linux distinguishes between processes and threads.

Ans: False


Feedback: 4.7.2 Difficulty: Easy

45. In Java, data shared between threads is simply declared globally.

Ans: False


Feedback: 4.4.3 Difficulty: Medium

46. Each thread has its own registerset and stack.

Ans: True


Feedback: 4.1 Difficulty: Easy

47. Deferred cancellation is preferred over asynchronous cancellation.

Ans: True


Feedback: 4.6.3 Difficulty: Easy

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

Ans: False


Feedback: 4.5.1 Difficulty: Easy

49. It is possible to create a thread library without any kernel-level support.

Ans: True


Feedback: 4.4 Difficulty: Medium

50. It is possible to have concurrency without parallelism.

And: True


Feedback: 4.2 Difficulty: Medium

51. Amdahl's Law describes performance gains for applications with both a serial and parallel component.

Ans: True


Feedback: 4.2 Difficulty: Medium

52. OpenMP only works for C, C++, and Fortran programs.

Ans: True


Feedback 4.5.2: Difficulty: Medium

53. Grand Central Dispatch requires multiple threads.

Ans: False


Feedback: 4.5.3 Difficulty: Medium

54. The trend in developing parallel applications is to use implicit threading.

Ans: True


Feedback: 4.5 Difficulty: Medium

55. Task parallelism distributes threads and data across multiple computing cores.

Ans: False


Feedback: 4.2.2 Difficulty: Difficult