CS 372 Quiz 2 Practice

Descripción

This is the second quiz questions for practice. This is also a partial review for Midterm 1.
Amanda Hatch
Test por Amanda Hatch, actualizado hace más de 1 año
Amanda Hatch
Creado por Amanda Hatch hace alrededor de 10 años
519
0

Resumen del Recurso

Pregunta 1

Pregunta
The ____ of a process contains temporary data such as function parameters, return addresses, and local variables.
Respuesta
  • program counter
  • data section
  • text section
  • stack

Pregunta 2

Pregunta
Which of the following is true in a Mach operating system?
Respuesta
  • 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.

Pregunta 3

Pregunta
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?
Respuesta
  • 21
  • 1625
  • 23
  • 80

Pregunta 4

Pregunta
The ____________ class must be extended when implementing a remote object.
Respuesta
  • java.rmi.Remote
  • Naming.lookup
  • None. java allows any class to be a remote object
  • java.rmi.server.UnicastRemoteObject

Pregunta 5

Pregunta
Which of the following statements is true?
Respuesta
  • 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

Pregunta 6

Pregunta
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.
Respuesta
  • 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

Pregunta 7

Pregunta
A process control block ____.
Respuesta
  • 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

Pregunta 8

Pregunta
The difference between a program and a process is that a program is an active entity while a process is a passive entity.
Respuesta
  • True
  • False

Pregunta 9

Pregunta
The exec() system call creates a new process.
Respuesta
  • True
  • False

Pregunta 10

Pregunta
The list of processes waiting for a particular I/O device is called a(n) ____.
Respuesta
  • device queue
  • ready queue
  • standby queue
  • interrupt queue

Pregunta 11

Pregunta
All access to POSIX shared memory requires a system call.
Respuesta
  • True
  • False

Pregunta 12

Pregunta
Local Procedure Calls in Windows XP are similar to Remote Procedure Calls.
Respuesta
  • True
  • False

Pregunta 13

Pregunta
Java's RMI is a feature similar to RPCs
Respuesta
  • True
  • False

Pregunta 14

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

Pregunta 15

Pregunta
Shared memory is a more appropriate IPC mechanism than message passing for distributed systems.
Respuesta
  • True
  • False

Pregunta 16

Pregunta
A socket is identified by an IP address concatenated with a port number.
Respuesta
  • True
  • False

Pregunta 17

Pregunta
Sockets are considered a high-level communications scheme.
Respuesta
  • True
  • False

Pregunta 18

Pregunta
The Mach operating system treats system calls with message passing.
Respuesta
  • True
  • False

Pregunta 19

Pregunta
The _____________ refers to the number of processes in memory.
Respuesta
  • long-term scheduler
  • process count
  • degree of multiprogramming
  • CPU scheduler

Pregunta 20

Pregunta
When using RMI, remote objects are referenced via a proxy.
Respuesta
  • True
  • False

Pregunta 21

Pregunta
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?
Respuesta
  • 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.

Pregunta 22

Pregunta
A _________________ saves the state of the currently running process and restores the state of the next process to run.
Respuesta
  • state switch
  • save-and-restore
  • none of the above
  • context switch

Pregunta 23

Pregunta
A process may transition to the Ready state by which of the following actions?
Respuesta
  • Newly-admitted process
  • Awaiting its turn on the CPU
  • Completion of an I/O event
  • All of the above

Pregunta 24

Pregunta
In a(n) ____ temporary queue, the sender must always block until the recipient receives the message.
Respuesta
  • unbounded capacity
  • variable capacity
  • zero capacity
  • bounded capacity

Pregunta 25

Pregunta
A blocking send() and blocking receive() is known as a(n) _________________
Respuesta
  • rendezvous
  • asynchronous message
  • blocked message
  • synchronized message

Pregunta 26

Pregunta
____ is a thread library for Solaris that maps many user-level threads to one kernel thread.
Respuesta
  • Pthreads
  • Green threads
  • Java threads
  • Sthreads

Pregunta 27

Pregunta
In multithreaded programs, the kernel informs an application about certain events using a procedure known as a(n) ____.
Respuesta
  • event handler
  • signal
  • upcall
  • pool

Pregunta 28

Pregunta
_____ is not considered a challenge when designing applications for multicore systems.
Respuesta
  • 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

Pregunta 29

Pregunta
A ____ provides an API for creating and managing threads.
Respuesta
  • thread library
  • multithreading model
  • multicore system
  • set of system calls

Pregunta 30

Pregunta
The _____ model multiplexes many user-level threads to a smaller or equal number of kernel threads.
Respuesta
  • one-to-one
  • many-to-one
  • two-level
  • many-to-many

Pregunta 31

Pregunta
The _____ model maps many user-level threads to one kernel thread.
Respuesta
  • two-level
  • many-to-many
  • one-to-one
  • many-to-one

Pregunta 32

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

Pregunta 33

Pregunta
The _____ model allows a user-level thread to be bound to one kernel thread.
Respuesta
  • one-to-one
  • many-to-many
  • two-level
  • many-to-one

Pregunta 34

Pregunta
The most common technique for writing multithreaded Java programs is _____.
Respuesta
  • 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

Pregunta 35

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

Pregunta 36

Pregunta
Which of the following statements regarding threads is false?
Respuesta
  • 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.

Pregunta 37

Pregunta
Pthreads refers to ____.
Respuesta
  • an API for process creation and synchronization.
  • the POSTFIX standard.
  • an implementation for thread behavior.
  • a specification for thread behavior.

Pregunta 38

Pregunta
A _____ uses an existing thread — rather than creating a new one — to complete a task.
Respuesta
  • lightweight process
  • thread pool
  • asynchronous procedure call
  • scheduler activation

Pregunta 39

Pregunta
Assuming the Java class Worker implements the Runnable interface. Which of the following statements creates a thread using the Worker class?
Respuesta
  • Thread worker = new Thread(new Worker());
  • Thread worker = new Runnable(new Worker());
  • Worker worker = new Worker();
  • Thread worker = new Thread();

Pregunta 40

Pregunta
Calling the start() method of a Java thread
Respuesta
  • 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"

Pregunta 41

Pregunta
A thread is composed of a thread ID, program counter, register set, and heap.
Respuesta
  • True
  • False

Pregunta 42

Pregunta
Virtually all contemporary operating systems support kernel threads.
Respuesta
  • True
  • False

Pregunta 43

Pregunta
Linux distinguishes between processes and threads.
Respuesta
  • True
  • False

Pregunta 44

Pregunta
Cancellation points are associated with ____ cancellation.
Respuesta
  • asynchronous
  • deferred
  • non-deferred
  • synchronous

Pregunta 45

Pregunta
In Java, data shared between threads is simply declared globally.
Respuesta
  • True
  • False

Pregunta 46

Pregunta
Each thread has its own register set and stack.
Respuesta
  • True
  • False

Pregunta 47

Pregunta
Deferred cancellation is preferred over asynchronous cancellation.
Respuesta
  • True
  • False

Pregunta 48

Pregunta
The single benefit of a thread pool is to control the number of threads.
Respuesta
  • True
  • False

Pregunta 49

Pregunta
It is possible to create a thread library without any kernel-level support.
Respuesta
  • True
  • False

Pregunta 50

Pregunta
Which of the following would be an acceptable signal handling scheme for a multithreaded program?
Respuesta
  • 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.

Pregunta 51

Pregunta
Signals can be emulated in windows through ____.
Respuesta
  • none of the above
  • local procedure calls
  • asynchronous procedure calls
  • remote procedure calls

Pregunta 52

Pregunta
Thread-specific data is data that ____.
Respuesta
  • 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

Pregunta 53

Pregunta
LWP is ____.
Respuesta
  • 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

Pregunta 54

Pregunta
Windows XP uses the ____.
Respuesta
  • many-to-many model
  • one-to many-model
  • many-to-one model
  • one-to-one model
Mostrar resumen completo Ocultar resumen completo

Similar

Mejores Sistemas Educativos del Mundo
Diego Santos
Renacimiento en España
Gemma Ruiz Dávila
Primera Guerra Mundial
juanmadj
Capitales del Mundo y Curiosidades
maya velasquez
Arte Prerromano
maya velasquez
Vocabulario Inglés - Tema 2
tanianicolasizqu
ELECTRICIDAD
Raquel Vargas
MARCO CONCEPTUAL NIIF
johanz4
Como disminuir la rotación de personal
ale.chapa
CAUSAS Y CONSECUENCIAS DE TRATA Y TRAFICO DE PERSONAS
claudia layme
IBM Integration Bus V10 Application Development
Jhon Diaz