Quiz
CS 372 Quiz 2 Practice
Crie uma conta grátis para terminar este quiz
Salve seu progresso e veja sua nota final.
Já tem uma conta? Inicie sessão
Perguntas do quiz (54)
1The ____ of a process contains temporary data such as function parameters, return addresses, and local variables.
- Aprogram counter
- Bdata section
- Ctext section
- Dstack
2Which of the following is true in a Mach operating system?
- AAll messages have the same priority.
- BMultiple messages from the same sender are guaranteed an absolute ordering.
- CThe sending thread must return immediately if a mailbox is full.
- DIt is not designed for distributed systems.
3When 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?
- A21
- B1625
- C23
- D80
4 The ____________ class must be extended when implementing a remote object.
- Ajava.rmi.Remote
- BNaming.lookup
- C None. java allows any class to be a remote object
- Djava.rmi.server.UnicastRemoteObject
5Which of the following statements is true?
- AMessage passing is typically faster than shared memory.
- BMessage passing is most useful for exchanging large amounts of data.
- CShared memory is far more common in operating systems than message passing.
- DShared memory is typically faster than message passing
6 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.
- A150.55.66.77:80 and 202.28.15.123:3500
- B150.55.66.77:80 and 202.28.15.123:80
- C150.55.66.77:2000 and 202.28.15.123:80
- D150.55.66.77:150 and 202.28.15.123:80
7A process control block ____.
- Aincludes information on the process's state
- Bdetermines which process is to be executed next
- C is an example of a process queue
- Dstores the address of the next instruction to be processed by a different process
8The difference between a program and a process is that a program is an active entity while a process is a passive entity.
- AVerdadeiro
- BFalso
9 The exec() system call creates a new process.
- AVerdadeiro
- BFalso
10The list of processes waiting for a particular I/O device is called a(n) ____.
- Adevice queue
- Bready queue
- Cstandby queue
- D interrupt queue
11 All access to POSIX shared memory requires a system call.
- AVerdadeiro
- BFalso
12Local Procedure Calls in Windows XP are similar to Remote Procedure Calls.
- AVerdadeiro
- BFalso
13Java's RMI is a feature similar to RPCs
- AVerdadeiro
- BFalso
14 For a single-processor system, there will never be more than one process in the Running state.
- AVerdadeiro
- BFalso
15Shared memory is a more appropriate IPC mechanism than message passing for distributed systems.
- AVerdadeiro
- BFalso
16 A socket is identified by an IP address concatenated with a port number.
- AVerdadeiro
- BFalso
17Sockets are considered a high-level communications scheme.
- AVerdadeiro
- BFalso
18The Mach operating system treats system calls with message passing.
- AVerdadeiro
- BFalso
19The _____________ refers to the number of processes in memory.
- A long-term scheduler
- Bprocess count
- Cdegree of multiprogramming
- DCPU scheduler
20 When using RMI, remote objects are referenced via a proxy.
- AVerdadeiro
- BFalso
21When a child process is created, which of the following is a possibility in terms of the execution or address space of the child process?
- AThe child is a duplicate of the parent.
- BAll of the above
- CThe child process runs concurrently with the parent.
- DThe child process has a new program loaded into it.
22A _________________ saves the state of the currently running process and restores the state of the next process to run.
- Astate switch
- Bsave-and-restore
- Cnone of the above
- Dcontext switch
23A process may transition to the Ready state by which of the following actions?
- ANewly-admitted process
- BAwaiting its turn on the CPU
- CCompletion of an I/O event
- DAll of the above
24 In a(n) ____ temporary queue, the sender must always block until the recipient receives the message.
- A unbounded capacity
- Bvariable capacity
- C zero capacity
- D bounded capacity
25A blocking send() and blocking receive() is known as a(n) _________________
- Arendezvous
- Basynchronous message
- Cblocked message
- Dsynchronized message
26____ is a thread library for Solaris that maps many user-level threads to one kernel thread.
- APthreads
- BGreen threads
- CJava threads
- DSthreads
27In multithreaded programs, the kernel informs an application about certain events using a procedure known as a(n) ____.
- Aevent handler
- Bsignal
- Cupcall
- D pool
28 _____ is not considered a challenge when designing applications for multicore systems.
- A Identifying data dependencies between tasks.
- BDetermining if data can be separated so that it is accessed on separate cores
- CEnsuring there is a sufficient number of cores
- DDeciding which activities can be run in parallel
29A ____ provides an API for creating and managing threads.
- Athread library
- Bmultithreading model
- Cmulticore system
- D set of system calls
30The _____ model multiplexes many user-level threads to a smaller or equal number of kernel threads.
- Aone-to-one
- Bmany-to-one
- C two-level
- Dmany-to-many
31The _____ model maps many user-level threads to one kernel thread.
- Atwo-level
- B many-to-many
- Cone-to-one
- Dmany-to-one
32The _____ model maps each user-level thread to one kernel thread.
- Amany-to-one
- Bmany-to-many
- C two-level
- Done-to-one
33The _____ model allows a user-level thread to be bound to one kernel thread.
- Aone-to-one
- Bmany-to-many
- Ctwo-level
- Dmany-to-one
34The most common technique for writing multithreaded Java programs is _____.
- A implementing the Runnable interface and defining its run() method
- Busing the CreateThread() function
- Cextending the Thread class and overriding the run() method
- Ddesigning your own Thread class
35In Pthreads, a parent uses the pthread_join() function to wait for its child thread to complete. What is the equivalent function in Win32?
- Ajoin()
- BWaitForSingleObject()
- Cwin32_join()
- Dwait()
36Which of the following statements regarding threads is false?
- ASharing is automatically provided in Java threads.
- BBoth Pthreads and Win32 threads share global data.
- CThe start() method actually creates a thread in the Java virtual machine.
- DThe Java method join() provides similar functionality as the WaitForSingleObject in Win32.
37Pthreads refers to ____.
- Aan API for process creation and synchronization.
- B the POSTFIX standard.
- Can implementation for thread behavior.
- Da specification for thread behavior.
38A _____ uses an existing thread — rather than creating a new one — to complete a task.
- A lightweight process
- B thread pool
- Casynchronous procedure call
- Dscheduler activation
39 Assuming the Java class Worker implements the Runnable interface. Which of the following statements creates a thread using the Worker class?
- AThread worker = new Thread(new Worker());
- BThread worker = new Runnable(new Worker());
- CWorker worker = new Worker();
- DThread worker = new Thread();
40Calling the start() method of a Java thread
- Aonly creates the thread
- Bcreates the thread and invokes its run() method
- Cthe start() method cannot be called directly
- Dcan be either "only creates the thread" or "the start() method cannot be called directly"
41A thread is composed of a thread ID, program counter, register set, and heap.
- AVerdadeiro
- BFalso
42 Virtually all contemporary operating systems support kernel threads.
- AVerdadeiro
- BFalso
43Linux distinguishes between processes and threads.
- AVerdadeiro
- BFalso
44 Cancellation points are associated with ____ cancellation.
- Aasynchronous
- Bdeferred
- Cnon-deferred
- Dsynchronous
45In Java, data shared between threads is simply declared globally.
- AVerdadeiro
- BFalso
46Each thread has its own register set and stack.
- AVerdadeiro
- BFalso
47 Deferred cancellation is preferred over asynchronous cancellation.
- AVerdadeiro
- BFalso
48The single benefit of a thread pool is to control the number of threads.
- AVerdadeiro
- BFalso
49It is possible to create a thread library without any kernel-level support.
- AVerdadeiro
- BFalso
50 Which of the following would be an acceptable signal handling scheme for a multithreaded program?
- ADeliver the signal to every thread in the process.
- BDeliver the signal to the thread to which the signal applies.
- CAll of the above
- D Deliver the signal to only certain threads in the process.
51Signals can be emulated in windows through ____.
- Anone of the above
- B local procedure calls
- Casynchronous procedure calls
- Dremote procedure calls
52Thread-specific data is data that ____.
- Ahas been modified by the thread, but not yet updated to the parent process
- Bis generated by the thread independent of the thread's process
- C is not associated with any process
- Dis copied and not shared with the parent process
53LWP is ____.
- Aplaced between system and kernel threads
- Bcommon in systems implementing one-to-one multithreading models
- Cshort for lightweight processor
- Dplaced between user and kernel threads
54Windows XP uses the ____.
- Amany-to-many model
- Bone-to many-model
- Cmany-to-one model
- Done-to-one model
Informações
- Descrição
- This is the second quiz questions for practice. This is also a partial review for Midterm 1.
- Autor
- Amanda Hatch
- Idioma
- English
- Visualizações
- 591
- Histórico
- Criado em 5 mai 2014 · atualizado em 16 jan 2017
- Avaliação
- Ainda sem avaliações Avalie este quiz