CS 372 Quiz 2 Practice

Beschreibung

This is the second quiz questions for practice. This is also a partial review for Midterm 1.
Amanda Hatch
Quiz von Amanda Hatch, aktualisiert more than 1 year ago
Amanda Hatch
Erstellt von Amanda Hatch vor etwa 10 Jahre
519
0

Zusammenfassung der Ressource

Frage 1

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

Frage 2

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

Frage 3

Frage
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?
Antworten
  • 21
  • 1625
  • 23
  • 80

Frage 4

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

Frage 5

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

Frage 6

Frage
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.
Antworten
  • 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

Frage 7

Frage
A process control block ____.
Antworten
  • 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

Frage 8

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

Frage 9

Frage
The exec() system call creates a new process.
Antworten
  • True
  • False

Frage 10

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

Frage 11

Frage
All access to POSIX shared memory requires a system call.
Antworten
  • True
  • False

Frage 12

Frage
Local Procedure Calls in Windows XP are similar to Remote Procedure Calls.
Antworten
  • True
  • False

Frage 13

Frage
Java's RMI is a feature similar to RPCs
Antworten
  • True
  • False

Frage 14

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

Frage 15

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

Frage 16

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

Frage 17

Frage
Sockets are considered a high-level communications scheme.
Antworten
  • True
  • False

Frage 18

Frage
The Mach operating system treats system calls with message passing.
Antworten
  • True
  • False

Frage 19

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

Frage 20

Frage
When using RMI, remote objects are referenced via a proxy.
Antworten
  • True
  • False

Frage 21

Frage
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?
Antworten
  • 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.

Frage 22

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

Frage 23

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

Frage 24

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

Frage 25

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

Frage 26

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

Frage 27

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

Frage 28

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

Frage 29

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

Frage 30

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

Frage 31

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

Frage 32

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

Frage 33

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

Frage 34

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

Frage 35

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

Frage 36

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

Frage 37

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

Frage 38

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

Frage 39

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

Frage 40

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

Frage 41

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

Frage 42

Frage
Virtually all contemporary operating systems support kernel threads.
Antworten
  • True
  • False

Frage 43

Frage
Linux distinguishes between processes and threads.
Antworten
  • True
  • False

Frage 44

Frage
Cancellation points are associated with ____ cancellation.
Antworten
  • asynchronous
  • deferred
  • non-deferred
  • synchronous

Frage 45

Frage
In Java, data shared between threads is simply declared globally.
Antworten
  • True
  • False

Frage 46

Frage
Each thread has its own register set and stack.
Antworten
  • True
  • False

Frage 47

Frage
Deferred cancellation is preferred over asynchronous cancellation.
Antworten
  • True
  • False

Frage 48

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

Frage 49

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

Frage 50

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

Frage 51

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

Frage 52

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

Frage 53

Frage
LWP is ____.
Antworten
  • 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

Frage 54

Frage
Windows XP uses the ____.
Antworten
  • many-to-many model
  • one-to many-model
  • many-to-one model
  • one-to-one model
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Lern-Fitness-Test aus der Bestnote
Studienstrategie
Globalization
Laura Overhoff
Kunststoffe - Einführung
Fabian B.
GPSY SOPS
Simon Wirsching
Wichtige Fälle/ Patienten aus der Allgemeinen Psychologie (ALPS)
Caroline X
Vetie Histopatho 2012 und 2011
Ann-Kathrin Riedel
Juristische Wirtschaftskompetenz
Lisa Stüttler
Onlinequiz zu MS-4.2 Kapitel_2_Teil_II
Deborah Büscher
Vetie Tierseuchen 2019
Tropsi B
Vetie - Spez. Patho 2017
Anne Käfer
Vetie- Lebensmittel 2018
Ju Pi