CS3060 Chapter 2 Quiz PDF

Title CS3060 Chapter 2 Quiz
Course Operating Systems Theory
Institution Utah Valley University
Pages 4
File Size 84 KB
File Type PDF
Total Downloads 98
Total Views 187

Summary

Chapter 2 Quiz questions and answers for Spring 2019 CS-3060 with Jingpeng Tang....


Description

CS-3060 Chapter 2 Quiz - Processes and Threads 1. All processes in UNIX first translate to a zombie process upon termination. True 2. A process that has terminated, but whose parent has not yet called wait(), is known as a ________ process. a. zombie b. orphan c. terminated d. init 3. Which of the following statements is true? a. Shared memory is typically faster than message passing. b. Message passing is typically faster than shared memory. c. Message passing is most useful for exchanging large amounts of data. d. Shared memory is far more common in operating systems than message passing. 4. A _________________ saves the state of the currently running process and restores the state of the next process to run. a. save-and-restore b. state switch c. context switch d. process control block 5. Child processes inherit UNIX ordinary pipes from their parent process because: a. The pipe is part of the code and children inherit code from their parents. b. A pipe is treated as a file descriptor and child processes inherit open file descriptors from their parents. c. The STARTUPINFO structure establishes this sharing. d. All IPC facilities are shared between the parent and child processes. 6. The _______ process is assigned as the parent to orphan processes. a. zombie b. init c. main d. renderer

7. The ____ of a process contains temporary data such as function parameters, return addresses, and local variables. a. text section b. data section c. program counter d. stack 8. The list of processes waiting for a particular I/O device is called a(n) ____. a. standby queue b. device queue c. ready queue d. interrupt queue 9. The _____________ refers to the number of processes in memory. a. process count b. long-term scheduler c. degree of multiprogramming d. CPU scheduler 10. A process control block ____. a. includes information on the process's state b. stores the address of the next instruction to be processed by a different process c. determines which process is to be executed next d. is an example of a process queue 11. According to Amdahl's Law, what is the speedup gain for an application that is 60% parallel and we run it on a machine with 4 processing cores? a. 1.82 Speedup ≤ Speedup ≤

c. 0.55

(1 − S) N

1 0.4 +

(1 − 0.4) 4



Since Parallel is 60%, Serial is 40% => S = 0.4



N = Number of Cores = 4

≈ 1.82 b. 0.7

1 S+

d. 1.43 12. A ____ provides an API for creating and managing threads. a. set of system calls b. multicore system c. thread library d. multithreading model 13. Thread-local storage is data that ____. a. is not associated with any process b. has been modified by the thread, but not yet updated to the parent process c. is generated by the thread independent of the thread's process d. is unique to each thread 14. A _____ uses an existing thread — rather than creating a new one — to complete a task. a. lightweight process b. thread pool c. scheduler activation d. asynchronous procedure call 15. _________ involves distributing tasks across multiple computing cores. a. Concurrency b. Task parallelism c. Data parallelism d. Parallelism 16. Pthreads refers to ____. a. the POSIX standard. b. an implementation for thread behavior. c. a specification for thread behavior. d. an API for process creation and synchronization. 17. Which of the following would not be an acceptable signal handling scheme for a multithreaded program? a. Deliver the signal to the thread to which the signal applies. b. Deliver the signal to every thread in the process. c. Deliver the signal to only certain threads in the process. d. Do not deliver the signal to any of the threads in the process.

18. Signals can be emulated in windows through ____. a. asynchronous procedure calls b. local procedure calls c. remote procedure calls d. synchronous procedure calls 19. The ____ multithreading model multiplexes many user-level threads to a smaller or equal number of kernel threads. a. many-to-one model b. one-to-one model c. many-to-many model d. many-to-some model 20. _____ is not considered a challenge when designing applications for multicore systems. a. Deciding which activities can be run in parallel b. Ensuring there is a sufficient number of cores c. Determining if data can be separated so that it is accessed on separate cores d. Identifying data dependencies between tasks....


Similar Free PDFs