Amanda Hatch
Test por , creado hace más de 1 año

This is the second quiz questions for practice. This is also a partial review for Midterm 1.

524
0
0
Sin etiquetas
Amanda Hatch
Creado por Amanda Hatch hace alrededor de 10 años
Cerrar

CS 372 Quiz 2 Practice

Pregunta 1 de 54

1

The ____ of a process contains temporary data such as function parameters, return addresses, and local variables.

Selecciona una de las siguientes respuestas posibles:

  • program counter

  • data section

  • text section

  • stack

Explicación

Pregunta 2 de 54

1

Which of the following is true in a Mach operating system?

Selecciona una de las siguientes respuestas posibles:

  • All messages have the same priority.

  • Multiple messages from the same sender are guaranteed an absolute ordering.

  • The sending thread must return immediately if a mailbox is full.

  • It is not designed for distributed systems.

Explicación

Pregunta 3 de 54

1

When communicating with sockets, a client process initiates a request for a connection and is assigned a port by the host computer. Which of the following would be a valid port assignment for the host computer?

Selecciona una de las siguientes respuestas posibles:

  • 21

  • 1625

  • 23

  • 80

Explicación

Pregunta 4 de 54

1

The ____________ class must be extended when implementing a remote object.

Selecciona una de las siguientes respuestas posibles:

  • java.rmi.Remote

  • Naming.lookup

  • None. java allows any class to be a remote object

  • java.rmi.server.UnicastRemoteObject

Explicación

Pregunta 5 de 54

1

Which of the following statements is true?

Selecciona una de las siguientes respuestas posibles:

  • Message passing is typically faster than shared memory.

  • Message passing is most useful for exchanging large amounts of data.

  • Shared memory is far more common in operating systems than message passing.

  • Shared memory is typically faster than message passing

Explicación

Pregunta 6 de 54

1

Imagine that a host with IP address 150.55.66.77 wishes to download a file from the web server at IP address 202.28.15.123. Select a valid socket pair for a connection between this pair of hosts.

Selecciona una de las siguientes respuestas posibles:

  • 150.55.66.77:80 and 202.28.15.123:3500

  • 150.55.66.77:80 and 202.28.15.123:80

  • 150.55.66.77:2000 and 202.28.15.123:80

  • 150.55.66.77:150 and 202.28.15.123:80

Explicación

Pregunta 7 de 54

1

A process control block ____.

Selecciona una de las siguientes respuestas posibles:

  • includes information on the process's state

  • determines which process is to be executed next

  • is an example of a process queue

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

Explicación

Pregunta 8 de 54

1

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

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 9 de 54

1

The exec() system call creates a new process.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 10 de 54

1

The list of processes waiting for a particular I/O device is called a(n) ____.

Selecciona una de las siguientes respuestas posibles:

  • device queue

  • ready queue

  • standby queue

  • interrupt queue

Explicación

Pregunta 11 de 54

1

All access to POSIX shared memory requires a system call.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 12 de 54

1

Local Procedure Calls in Windows XP are similar to Remote Procedure Calls.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 13 de 54

1

Java's RMI is a feature similar to RPCs

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 14 de 54

1

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

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 15 de 54

1

Shared memory is a more appropriate IPC mechanism than message passing for distributed systems.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 16 de 54

1

A socket is identified by an IP address concatenated with a port number.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 17 de 54

1

Sockets are considered a high-level communications scheme.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 18 de 54

1

The Mach operating system treats system calls with message passing.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 19 de 54

1

The _____________ refers to the number of processes in memory.

Selecciona una de las siguientes respuestas posibles:

  • long-term scheduler

  • process count

  • degree of multiprogramming

  • CPU scheduler

Explicación

Pregunta 20 de 54

1

When using RMI, remote objects are referenced via a proxy.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 21 de 54

1

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?

Selecciona una de las siguientes respuestas posibles:

  • The child is a duplicate of the parent.

  • All of the above

  • The child process runs concurrently with the parent.

  • The child process has a new program loaded into it.

Explicación

Pregunta 22 de 54

1

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

Selecciona una de las siguientes respuestas posibles:

  • state switch

  • save-and-restore

  • none of the above

  • context switch

Explicación

Pregunta 23 de 54

1

A process may transition to the Ready state by which of the following actions?

Selecciona una de las siguientes respuestas posibles:

  • Newly-admitted process

  • Awaiting its turn on the CPU

  • Completion of an I/O event

  • All of the above

Explicación

Pregunta 24 de 54

1

In a(n) ____ temporary queue, the sender must always block until the recipient receives the message.

Selecciona una de las siguientes respuestas posibles:

  • unbounded capacity

  • variable capacity

  • zero capacity

  • bounded capacity

Explicación

Pregunta 25 de 54

1

A blocking send() and blocking receive() is known as a(n) _________________

Selecciona una de las siguientes respuestas posibles:

  • rendezvous

  • asynchronous message

  • blocked message

  • synchronized message

Explicación

Pregunta 26 de 54

1

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

Selecciona una de las siguientes respuestas posibles:

  • Pthreads

  • Green threads

  • Java threads

  • Sthreads

Explicación

Pregunta 27 de 54

1

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

Selecciona una de las siguientes respuestas posibles:

  • event handler

  • signal

  • upcall

  • pool

Explicación

Pregunta 28 de 54

1

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

Selecciona una de las siguientes respuestas posibles:

  • Identifying data dependencies between tasks.

  • Determining if data can be separated so that it is accessed on separate cores

  • Ensuring there is a sufficient number of cores

  • Deciding which activities can be run in parallel

Explicación

Pregunta 29 de 54

1

A ____ provides an API for creating and managing threads.

Selecciona una de las siguientes respuestas posibles:

  • thread library

  • multithreading model

  • multicore system

  • set of system calls

Explicación

Pregunta 30 de 54

1

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

Selecciona una de las siguientes respuestas posibles:

  • one-to-one

  • many-to-one

  • two-level

  • many-to-many

Explicación

Pregunta 31 de 54

1

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

Selecciona una de las siguientes respuestas posibles:

  • two-level

  • many-to-many

  • one-to-one

  • many-to-one

Explicación

Pregunta 32 de 54

1

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

Selecciona una de las siguientes respuestas posibles:

  • many-to-one

  • many-to-many

  • two-level

  • one-to-one

Explicación

Pregunta 33 de 54

1

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

Selecciona una de las siguientes respuestas posibles:

  • one-to-one

  • many-to-many

  • two-level

  • many-to-one

Explicación

Pregunta 34 de 54

1

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

Selecciona una de las siguientes respuestas posibles:

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

  • using the CreateThread() function

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

  • designing your own Thread class

Explicación

Pregunta 35 de 54

1

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

Selecciona una de las siguientes respuestas posibles:

  • join()

  • WaitForSingleObject()

  • win32_join()

  • wait()

Explicación

Pregunta 36 de 54

1

Which of the following statements regarding threads is false?

Selecciona una de las siguientes respuestas posibles:

  • Sharing is automatically provided in Java threads.

  • Both Pthreads and Win32 threads share global data.

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

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

Explicación

Pregunta 37 de 54

1

Pthreads refers to ____.

Selecciona una de las siguientes respuestas posibles:

  • an API for process creation and synchronization.

  • the POSTFIX standard.

  • an implementation for thread behavior.

  • a specification for thread behavior.

Explicación

Pregunta 38 de 54

1

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

Selecciona una de las siguientes respuestas posibles:

  • lightweight process

  • thread pool

  • asynchronous procedure call

  • scheduler activation

Explicación

Pregunta 39 de 54

1

Assuming the Java class Worker implements the Runnable interface. Which of the following statements creates a thread using the Worker class?

Selecciona una de las siguientes respuestas posibles:

  • Thread worker = new Thread(new Worker());

  • Thread worker = new Runnable(new Worker());

  • Worker worker = new Worker();

  • Thread worker = new Thread();

Explicación

Pregunta 40 de 54

1

Calling the start() method of a Java thread

Selecciona una de las siguientes respuestas posibles:

  • only creates the thread

  • creates the thread and invokes its run() method

  • the start() method cannot be called directly

  • can be either "only creates the thread" or "the start() method cannot be called directly"

Explicación

Pregunta 41 de 54

1

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

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 42 de 54

1

Virtually all contemporary operating systems support kernel threads.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 43 de 54

1

Linux distinguishes between processes and threads.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 44 de 54

1

Cancellation points are associated with ____ cancellation.

Selecciona una de las siguientes respuestas posibles:

  • asynchronous

  • deferred

  • non-deferred

  • synchronous

Explicación

Pregunta 45 de 54

1

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

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 46 de 54

1

Each thread has its own register set and stack.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 47 de 54

1

Deferred cancellation is preferred over asynchronous cancellation.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 48 de 54

1

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

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 49 de 54

1

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

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 50 de 54

1

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

Selecciona una de las siguientes respuestas posibles:

  • Deliver the signal to every thread in the process.

  • Deliver the signal to the thread to which the signal applies.

  • All of the above

  • Deliver the signal to only certain threads in the process.

Explicación

Pregunta 51 de 54

1

Signals can be emulated in windows through ____.

Selecciona una de las siguientes respuestas posibles:

  • none of the above

  • local procedure calls

  • asynchronous procedure calls

  • remote procedure calls

Explicación

Pregunta 52 de 54

1

Thread-specific data is data that ____.

Selecciona una de las siguientes respuestas posibles:

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

  • is generated by the thread independent of the thread's process

  • is not associated with any process

  • is copied and not shared with the parent process

Explicación

Pregunta 53 de 54

1

LWP is ____.

Selecciona una de las siguientes respuestas posibles:

  • placed between system and kernel threads

  • common in systems implementing one-to-one multithreading models

  • short for lightweight processor

  • placed between user and kernel threads

Explicación

Pregunta 54 de 54

1

Windows XP uses the ____.

Selecciona una de las siguientes respuestas posibles:

  • many-to-many model

  • one-to many-model

  • many-to-one model

  • one-to-one model

Explicación