CSC 415 Operating System Principles Chapter 4

¡Supera tus tareas y exámenes ahora con Quizwiz!

What is the degree of multiprogramming for a single-processor system?

1

_____ is not considered a challenge when designing applications for multicore systems. Deciding which activities can be run in parallel Ensuring there is a sufficient number of cores Determining if data can be separated so that it is accessed on separate cores Identifying data dependencies between tasks.

Ensuring there is a sufficient number of cores

A traditional (or heavyweight) process has a single thread of control. Select one: True False

True

Each thread has its own register set and stack. Select one: True False

True

It is possible to create a thread library without any kernel-level support. Select one: True False

True

It is possible to have concurrency without parallelism. Select one: True False

True

OpenMP only works for C, C++, and Fortran programs. True False

True

The default signal handler can be overridden by a user-defined signal handler. True False

True

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

True

Virtually all contemporary operating systems support kernel threads. True False

True

Where does thread execution begin after calling pthread_create? Select one: a. From the start of main. b. From the start of the function passed into pthread_create c. At the instruction following the call to pthread_create d. From the start of the procedure labeled "thread"

b. From the start of the function passed into pthread_create

Amdahl's Law describes performance gains for applications with both a serial and parallel component. Select one: a. False b. True

b. True

Deferred cancellation is preferred over asynchronous cancellation. Select one: a. False b. True

b. True

One-to-one model provides more concurrency than the many-to-one model by allowing another thread to run when a thread makes a blocking system call. Select one: a. False b. True

b. True

Pthreads refers to ____. Select one: a. the POSIX standard. b. a specification for thread behavior. c. an API for process creation and synchronization. d. an implementation for thread behavior.

b. a specification for thread behavior.

Which of the following cancellation modes are supported by Pthreads? Select one: a. deferred mode b. all of the other answers c. off mode d. asynchronous mode

b. all of the other answers

Which of the following options to deliver signals in multithreaded program should be applied to a synchronous signal? Select one: a. deliver the signal to every thread in the process b. deliver the signal to the thread to which the signal applies c. assign a specific thread to receive all signals for the process d. deliver the signal to certain threads in the process e. all of the other answers

b. deliver the signal to the thread to which the signal applies

Thread-local storage is data that ____. Select one: a. has been modified by the thread, but not yet updated to the parent process b. is unique to each thread c. is generated by the thread independent of the thread's process d. is not associated with any process

b. is unique to each thread

Which of the following Pthread function is used to respond to a cancellation request using deferred cancellation? pthread attr init pthread_create pthread_join pthread_testcancel

pthread_testcancel

Which of the following is an asynchronous signal? illegal memory access division by zero terminating a process with specific keystrokes none of the above

terminating a process with specific keystrokes

To associate each thread created using an implicit technique such as a thread pool, with its unique transaction identifier, we could use ____? global variable local variable static data thread-local storage

thread-local storage

In Pthreads, a parent uses the pthread_join() function to wait for its child thread to complete. What is the equivalent function in Win32? Select one: a. wait() b. win32_join() c. WaitForSingleObject() d. join()

c. WaitForSingleObject()

Which of the following cancellation modes is the default cancellation type? Select one: a. off mode b. all of the other answers c. deferred mode d. asynchronous mode

c. deferred mode

Which of the following options to deliver signals in multithreaded program should be applied to an asynchronous signal that terminates a process (<control><C>, for example)? Select one: a. deliver the signal to the thread to which the signal applies b. assign a specific thread to receive all signals for the process c. deliver the signal to every thread in the process d. all of the other answers e. deliver the signal to certain threads in the process

c. deliver the signal to every thread in the process

The _____ model maps many user-level threads to one kernel thread. Select one: a. two-level b. one-to-one c. many-to-one d. many-to-many

c. many-to-one

Windows uses the ____. Select one: a. many-to-one-model b. many-to-many model c. one-to-one model d. one-to-many model

c. one-to-one model

A ____ provides an API for creating and managing threads. Select one: a. set of system calls b. multi-core system c. thread library d. multi-threading model

c. thread library

In multithreaded programs, the kernel informs an application about certain events using a procedure known as a(n) ____. Select one: a. pool b. signal c. upcall d. event handler

c. upcall

Which of the following items are shared across multiple threads belonging to the same process? code, data, files registers stack all of the above

code, data, files

Which of the following refers to the capability to allow multiple tasks make progress on a single processor system? concurrency parallelism data parallelism task parallelism

concurrency

A thread is composed of a thread ID, program counter, register set, and heap. Select one: True False

False

Concurrency is inherently equivalent to parallelism. True False

False

Linux distinguishes between processes and threads. Select one: True False

False

Parallelism can be achieved on single-processor systems. True False

False

Task parallelism distributes threads and data across multiple computing cores. True False

False

Threads, unlike forked processes, share a stack. Select one: True False

False

Grand Central Dispatch requires multiple threads. Select one: a. True b. False

b. False

Thread-local storage is inherently equivalent to local variables. Select one: a. True b. False

b. False

When fork() is invoked, it is passed a set of flags that determine how much sharing is to take place between the parent and child tasks. Select one: a. True b. False

b. False

In Java, data shared between threads is simply declared globally. Select one: a. False b. True

a. False

The single benefit of a thread pool is to control the number of threads. Select one: a. False b. True

a. False

In a multithreaded server architecture, which of the following is used to service a new user request? Select one: a. a new created thread b. a new created process c. none of the other answers d. the same process for prior users

a. a new created thread

Signals can be emulated in windows through ____. Select one: a. asynchronous procedure calls b. remote procedure calls c. local procedure calls d. none of the other answers

a. asynchronous procedure calls

The ____ multithreading model multiplexes many user-level threads to a smaller or equal number of kernel threads. Select one: a. many-to-many model b. many-to-one model c. many-to-some model d. one-to-one model

a. many-to-many model

Which of the following information is shared when the flag CLONE_VM is set up? Select one: a. memory space b. file-system information c. set of open files d. signal handlers

a. memory space

To associate each thread created using an implicit technique such as a thread pool, with its unique transaction identifier, we could use ____? Select one: a. thread-local storage b. static data c. local variable d. global variable

a. thread-local storage

The ready queue can be implemented as a _______________. tree priority queue unordered linked list FIFO queue all of the above

all of the above

Which are included in the context of a thread? register set stacks private storage area all of the above

all of the above

Which of the following benefits go to multithreaded programming? economy scalability responsiveness resource sharing all of the above

all of the above

Which of the following cases could force a process removed from the CPU? fork a child I/O request interrupt or time slice expired all of the above

all of the above

Which of the following is a function that can be provided by Pthreads API for constructing a multithreaded program? pthread attr init pthread_create pthread_join all of the above

all of the above

Which of the following is a method for implicit threading? thread pools OpenMP grand central dispatch all of the above

all of the above

Which of the following options exist to deliver signals in multithreaded program? deliver the signal to the thread to which the signal applies deliver the signal to every thread in the process deliver the signal to certain threads in the process all of the above

all of the above

Which of the following would be an acceptable signal handling scheme for a multithreaded program? Select one: a. Deliver the signal to only certain threads in the process. b. Deliver the signal to every thread in the process. c. Deliver the signal to the thread to which the signal applies. d. All the other answers

d. All the other answers

___________ is a formula that identifies potential performance gains from adding additional computing cores to an application that has a parallel and serial component. Select one: a. Data splitting b. Data parallelism c. Task parallelism d. Amdahl's Law

d. Amdahl's Law

____ is a thread library for Solaris that maps many user-level threads to one kernel thread. Select one: a. Sthreads b. Pthreads c. Java threads d. Green threads

d. Green threads

Which of the following statements regarding threads is false? Select one: a. The start() method actually creates a thread in the Java virtual machine. b. The Java method join() provides similar functionality as the WaitForSingleObject in Win32. c. Both Pthreads and Win32 threads share global data. d. Sharing is automatically provided in Java threads.

d. Sharing is automatically provided in Java threads.

_________ involves distributing tasks across multiple computing cores. Select one: a. Parallelism b. Data parallelism c. Concurrency d. Task parallelism

d. Task parallelism

Which of the following models are possible for the relationship between the user threads and kernel threads? Select one: a. one-to-one model b. many-to-one model c. many-to-many model d. all of the above

d. all of the above

The most common technique for writing multithreaded Java programs is _____. Select one: a. using the CreateThread() function b. designing your own Thread class c. extending the Thread class and overriding the run() method d. implementing the Runnable interface and defining its run() method

d. implementing the Runnable interface and defining its run() method

The _____ model multiplexes many user-level threads to a smaller or equal number of kernel threads. Select one: a. two-level b. one-to-one c. many-to-one d. many-to-many

d. many-to-many

LWP is ____. Select one: a. placed between system and kernel threads b. short for lightweight processor c. common in systems implementing one-to-one multithreading models d. placed between user and kernel threads

d. placed between user and kernel threads

The _____ model allows a user-level thread to be bound to one kernel thread. Select one: a. many-to-many b. many-to-one c. one-to-one d. two-level e. one-to-many

d. two-level

Which of the following implicit threading methodology involves dispatch queues? thread pools OpenMP grand central dispatch all of the above

grand central dispatch

Which of the following is a synchronous signal? illegal memory access terminating a process with specific keystrokes having a timer expire none of the above

illegal memory access

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

one-to-one


Conjuntos de estudio relacionados

Reading Bowl - The Epic Fail of Arturo Zamora

View Set

Lab 6: Blood Pressure & Pulse Lab

View Set

Newton's Laws Of Motion & Forces

View Set

Chapter 56: Management of Patients with Dermatologic Disorders

View Set

CH 3 Scanning The Marketing Environment

View Set

Chp 7 - Chromosomal Structure and Chromosomal Mutations (From textbook and ppt)

View Set

MT 11 LAB: Laboratory Hazards and Safety

View Set