A Thread Has Its Own Thread Id, Program Counter, Register Set And Heap. True Or False?
Unformatted text preview: Chapter four Multiple Choice 1. ____ is a thread library for Solaris that maps many user-level threads to one kernel thread. A) Pthreads B) Dark-green threads C) Sthreads D) Java threads Ans: B two. Pthreads refers to ____. A) the POSIX standard. B) an implementation for thread beliefs. C) a specification for thread behavior. D) an API for procedure creation and synchronization. Ans: C iii. The ____ multithreading model multiplexes many user-level threads to a smaller or equal number of kernel threads. A) many-to-i model B) i-to-one model C) many-to-many model D) many-to-some model Ans: C iv. Cancellation points are associated with ____ counterfoil. A) asynchronous B) deferred C) synchronous D) non-deferred Ans: B 5. Which of the following would exist an acceptable signal handling scheme for a multithreaded plan? A) Deliver the signal to the thread to which the signal applies. B) Deliver the signal to every thread in the process. C) Evangelize the signal to just certain threads in the process. D) All of the above Ans: D half-dozen. Signals tin can be emulated in windows through ____. A) asynchronous procedure calls B) local procedure calls C) remote procedure calls D) none of the higher up Ans: A 7. Thread-local storage is information that ____. A) is not associated with whatsoever process B) has been modified by the thread, but not yet updated to the parent procedure C) is generated by the thread independent of the thread's procedure D) is unique to each thread Ans: D 8. LWP is ____. A) short for lightweight processor B) placed betwixt system and kernel threads C) placed between user and kernel threads D) common in systems implementing 1-to-one multithreading models Ans: C 9. Windows uses the ____. A) one-to-ane model B) many-to-1 model C) 1-to many-model D) many-to-many model Ans: A 10. A) B) C) D) In multithreaded programs, the kernel informs an awarding about certain events using a process known as a(n) ____. signal upcall event handler pool Ans: B 11. A) B) C) D) _____ is not considered a challenge when designing applications for multicore systems. Deciding which activities can exist run in parallel Ensuring there is a sufficient number of cores Determining if data can be separated so that it is accessed on separate cores Identifying data dependencies betwixt tasks. Ans: B 12. A ____ provides an API for creating and managing threads. A) set of system calls B) multicore system C) thread library D) multithreading model Ans: C 13. The _____ model multiplexes many user-level threads to a smaller or equal number of kernel threads. A) many-to-many B) 2-level C) ane-to-one D) many-to-ane Ans: A 14. The _____ model maps many user-level threads to i kernel thread. A) many-to-many B) 2-level C) one-to-one D) many-to-one Ans: D 15. The _____ model maps each user-level thread to one kernel thread. A) many-to-many B) 2-level C) one-to-i D) many-to-one Ans: C 16. The _____ model allows a user-level thread to exist jump to ane kernel thread. A) many-to-many B) two-level C) one-to-one D) many-to-one Ans: B 17. The most mutual technique for writing multithreaded Java programs is _____. A) extending the Thread class and overriding the run() method B) implementing the Runnable interface and defining its run() method C) designing your own Thread class D) using the CreateThread() office Ans: B eighteen. In Pthreads, a parent uses the pthread_join() part to wait for its child thread to complete. What is the equivalent part in Win32? A) win32_join() B) look() C) WaitForSingleObject() D) join() Ans: C 19. Which of the following statements regarding threads is false? A) Sharing is automatically provided in Coffee threads. B) Both Pthreads and Win32 threads share global information. C) The start() method really creates a thread in the Java virtual motorcar. D) The Java method join() provides similar functionality as the WaitForSingleObject in Win32. Ans: A 20. A _____ uses an existing thread — rather than creating a new one — to consummate a chore. A) lightweight process B) thread puddle C) scheduler activation D) asynchronous procedure call Ans: B 21. According to Amdahl's Constabulary, what is the speedup gain for an application that is sixty% parallel and nosotros run it on a auto with 4 processing cores? A) i.82 B) .vii C) .55 D) one.43 Ans: D 22. _________ involves distributing tasks beyond multiple computing cores. A) Concurrency B) Job parallelism C) Data parallelism D) Parallelism Ans: B 23. When OpenMP encounters the #pragma omp parallel directive, information technology A) constructs a parallel region B) creates a new thread C) creates as many threads as at that place are processing cores D) parallelizes for loops Ans: C 24. Grand Central Dispatch handles blocks by A) placing them on a acceleration queue B) creating a new thread C) placing them on a dispatch stack D) amalgam a parallel region Ans: A 25. ___________ is a formula that identifies potential performance gains from adding boosted calculating cores to an application that has a parallel and series component. A) Task parallelism B) Data parallelism C) Data splitting D) Amdahl's Law Ans: D True/Imitation 1 A traditional (or heavyweight) process has a single thread of control. True 2 A thread is equanimous of a thread ID, programme counter, register set up, and heap. False 3 Well-nigh all contemporary operating systems support kernel threads. True 4 Linux distinguishes between processes and threads. False v In Java, data shared between threads is only declared globally. False six Each thread has its own register set and stack. True 7 Deferred cancellation is preferred over asynchronous cancellation. True eight The single benefit of a thread pool is to control the number of threads. Fake 9 Information technology is possible to create a thread library without whatsoever kernel-level support. True 10 It is possible to accept concurrency without parallelism. True 11 Amdahl'south Law describes performance gains for applications with both a serial and parallel component. True 12 OpenMP only works for C, C++, and Fortran programs. Truthful 13 G Cardinal Dispatch requires multiple threads. False 14 The trend in developing parallel applications is to use implicit threading. True 15 Task parallelism distributes threads and data across multiple computing cores. False Chapter 5 Multiple Option 1. Which of the following is true of cooperative scheduling? A) It requires a timer. B) A procedure keeps the CPU until it releases the CPU either past terminating or by switching to the waiting state. C) It incurs a cost associated with access to shared information. D) A process switches from the running country to the prepare state when an interrupt occurs. Ans: B 2. ____ is the number of processes that are completed per time unit. A) CPU utilization B) Response time C) Turnaround time D) Throughput Ans: D three. ____ scheduling is approximated past predicting the next CPU flare-up with an exponential average of the measured lengths of previous CPU bursts. A) Multilevel queue B) RR C) FCFS D) SJF Ans: D four. The ____ scheduling algorithm is designed especially for time-sharing systems. A) SJF B) FCFS C) RR D) Multilevel queue Ans: C 5. Which of the following scheduling algorithms must be nonpreemptive? A) SJF B) RR C) FCFS D) priority algorithms Ans: C 6. Which of the post-obit is truthful of multilevel queue scheduling? A) Processes can move betwixt queues. B) Each queue has its own scheduling algorithm. C) A queue cannot have absolute priority over lower-priority queues. D) It is the well-nigh general CPU-scheduling algorithm. Ans: B vii. The default scheduling grade for a process in Solaris is ____. A) time sharing B) system C) interactive D) real-fourth dimension Ans: A 8. Which of the post-obit statements are false with regards to the Linux CFS scheduler? A) Each task is assigned a proportion of CPU processing fourth dimension. B) Lower numeric values bespeak higher relative priorities. C) At that place is a single, system-wide value of vruntime. D) The scheduler doesn't directly assign priorities. Ans: C 9. In Little's formula, λ, represents the ____. A) boilerplate waiting time in the queue B) average arrival charge per unit for new processes in the queue C) average queue length D) average CPU utilization Ans: B 10. In Solaris, what is the time quantum (in milliseconds) of an interactive thread with priority 35? A) 25 B) 54 C) 80 D) 35 Ans: C 11. In Solaris, if an interactive thread with priority fifteen uses its entire time quantum, what is its priority recalculated to? A) 51 B) five C) 160 D) It remains at xv Ans: B 12. In Solaris, if an interactive thread with priority 25 is waiting for I/O, what is its priority recalculated to when it is eligible to run over again? A) 15 B) 120 C) 52 D) It remains at 25 Ans: C thirteen. ______ allows a thread to run on only one processor. A) Processor affinity B) Processor gear up C) NUMA D) Load balancing Ans: A fourteen. What is the numeric priority of a Windows thread in the NORMAL_PRIORITY_CLASS with HIGHEST relative priority? A) 24 B) 10 C) 8 D) thirteen Ans: B 15. What is the numeric priority of a Windows thread in the HIGH_PRIORITY_CLASS with ABOVE_NORMAL relative priority? A) 24 B) 10 C) 8 D) xiv Ans: D xvi. What is the numeric priority of a Windows thread in the BELOW_NORMAL_PRIORITY_CLASS with NORMAL relative priority? A) six B) 7 C) 5 D) 8 Ans: A 17. __________ involves the determination of which kernel thread to schedule onto which CPU. A) Process-contention scope B) Organization-contention scope C) Dispatcher D) Round-robin scheduling Ans: B 18. With _______ a thread executes on a processor until a long-latency event (i.e. a memory stall) occurs. A) fibroid-grained multithreading B) fine-grained multithreading C) virtualization D) multicore processors Ans: A nineteen. A meaning problem with priority scheduling algorithms is _____. A) complication B) starvation C) determining the length of the next CPU burst D) determining the length of the time quantum Ans: B 20. The ______ occurs in commencement-come-first-served scheduling when a process with a long CPU burst occupies the CPU. A) dispatch latency B) waiting time C) convoy effect D) system-contention scope Ans: C 21. The charge per unit of a periodic job in a hard real-time arrangement is ____, where p is a catamenia and t is the processing time. A) 1/p B) p/t C) 1/t D) pt Ans: A 22. A) B) C) D) Which of the following is true of the rate-monotonic scheduling algorithm? The chore with the shortest period will have the lowest priority. It uses a dynamic priority policy. CPU utilization is bounded when using this algorithm. Information technology is non-preemptive. Ans: C 23. Which of the following is true of earliest-deadline-get-go (EDF) scheduling algorithm? A) When a process becomes runnable, information technology must announce its borderline requirements to the system. B) Deadlines are assigned equally following: the earlier the borderline, the lower the priority; the after the deadline, the higher the priority. C) Priorities are fixed; that is, they cannot be adapted when a new process starts running. D) It assigns priorities statically according to deadline. Ans: A 24. The two general approaches to load balancing are __________ and ____________. A) soft affinity, difficult affinity B) coarse grained, fine grained C) soft real-time, hard existent-time D) push migration, pull migration Ans: D 25. The Linux CFS scheduler identifies _____________ equally the interval of fourth dimension during which every runnable task should run at least one time. A) virtual run time B) targeted latency C) nice value D) load balancing Ans: B True/Simulated i In preemptive scheduling, the sections of code affected past interrupts must exist guarded from simultaneous utilize. True ii In RR scheduling, the time quantum should be small with respect to the context-switch fourth dimension. False 3 The nearly circuitous scheduling algorithm is the multilevel feedback-queue algorithm. True iv Load balancing is typically only necessary on systems with a common run queue. False v Systems using a one-to-i model (such equally Windows, Solaris , and Linux) schedule threads using process-contention scope (PCS). False 6 Solaris and Windows assign higher-priority threads/tasks longer time quantums and lower-priority tasks shorter time quantums. False 7 A Solaris interactive thread with priority 15 has a higher relative priority than an interactive thread with priority xx. False 8 A Solaris interactive thread with a time quantum of eighty has a college priority than an interactive thread with a time quantum of 120. True nine Windows 7 User-mode scheduling (UMS) allows applications to create and manage thread independently of the kernel. True ten Round-robin (RR) scheduling degenerates to first-come-first-served (FCFS) scheduling if the time quantum is too long. True 11 Load balancing algorithms have no impact on the benefits of processor analogousness. Faux 12 A multicore system allows 2 (or more) threads that are in compute cycles to execute at the same time. True 13 Providing a preemptive, priority-based scheduler guarantees hard real-fourth dimension functionality. False 14 In hard real-time systems, interrupt latency must be bounded. True 15 In Pthread real-time scheduling, the SCHED_FIFO form provides time slicing among threads of equal priority. False 16 In the Linux CFS scheduler, the task with smallest value of vruntime is considered to have the highest priority. True 17 The length of a time quantum assigned by the Linux CFS scheduler is dependent upon the relative priority of a task. Fals 18 The Completely Fair Scheduler (CFS) is the default scheduler for Linux systems. True 19 SMP systems that utilise multicore processors typically run faster than SMP systems that place each processor on separate cores. True ...
View Total Certificate
A Thread Has Its Own Thread Id, Program Counter, Register Set And Heap. True Or False?,
Source: https://www.coursehero.com/file/150951947/testbank351pdf/
Posted by: kingdion1943.blogspot.com
0 Response to "A Thread Has Its Own Thread Id, Program Counter, Register Set And Heap. True Or False?"
Post a Comment