discussion 4

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

According to Prof. Grant's lecture on Threads and Concurrency (10/13/20220) Which of these is an example of a many-to-one thread? --- A. GNU Portable Threads B. POSIX Pthreads C. Windows threads D. Ahmdal's Threads E. Lunaris Blue Threads

A. GNU Portable Threads

According to Dr.Grant Lecture 13 Processes, what are the five states of the Five-State Process Model? --- A. New, Ready, Running, Exit, Blocked B. New, Dispatch, Release,Exit,Running C. Admit, Dispatch, Release, Exit, Blocked D. Blocked, Timeout, Release, New, Admit E. Ready, Running, Exit, Release, Admit

A. New, Ready, Running, Exit, Blocked

According to Dr. Grant's Lecture 13 (processes) from Week 7, what happens if no interrupts are pending the processor? --- A. Proceeds to the fetch stage and fetches the next instruction of the current program in the current process B. Sets the program counter to the starting address of an interrupt handler program C. Switches from user mode to kernel mode so that the interrupt processing code may include privileged instructions D. An error or exception condition generated within the currently running process

A. Proceeds to the fetch stage and fetches the next instruction of the current program in the current process

According to section 4.1 Threads & Concurrency of our book Operating System Concepts, which one of the following is NOT shared by the threads of the same process? --- A. Stack B. Address space C. Open files D. Signals E. Data section

A. Stack

According to Dr. Grant's 13th lecture on October 4th, 2022, what is a child process that has been terminated but is still located in memory called? --- A. Zombie process B. Orphan process C. Sleeping process D. Unallocated process

A. Zombie process

According to Dr. Grant's Lecture 13(processes), In a global trace of running processes which of the following which of the following is NOT true. --- A: After a Timeout the next process in the queue immediately starts either resuming a previous process or starting a new one.B: How long processes can run before Timeouts are controlled by the dispatcherC: The dispatcher runs after I/O RequestsD: Given a process shorter than the Timeout by the dispatcher, the dispatcher is run once that process has ended.E: Given a process longer than the Timeout the process is paused, and then the dispatcher runs.

A: After a Timeout the next process in the queue immediately starts either resuming a previous process or starting a new one.

According to Dr. Grants Lecture over Chapter 4 (chp4.pdf) from October 13th, 2022, which of the following is NOT true about thread cancellation? --- A: Cancellation of a target thread may occur in three different scenarios. B: Thread cancellation involves terminating a thread before it has completed. C: The difficulty with cancellation occurs in situations where resources have been allocated to a canceled thread. D: Canceling a thread asynchronously may not free a necessary system-wide resource. E: Deferred cancellation occurs only after the target thread has checked a flag to determine whether or not it should be canceled.

A: Cancellation of a target thread may occur in three different scenarios.

According to Dr Grant's Lecture 13 and Table 3.2: Which answer below is not one of the reasons of process termination? (Table 3.2 is located on page 111 in the textbook) --- A: Child termination B: Parent termination C: Parent request D: Data misuse E: Bounds violation

A: Child termination

According to Dr.Grant's Lecture 14 (Threads) on October 13, 2022, and ch04.pdf, which of the following characteristics is NOT matched with the correct multithreading model? --- A: Each user-level thread maps to a kernel thread : Many-to-One B: Allows many user level threads to be mapped to many kernel threads : Many-to-Many C: Multiple threads may not run in parallel on muticore system because only one may be in kernel at a time : Many-to-One D: Allows many user level threads to be mapped to many kernel threads : Many-to-Many E: Creating a user-level thread creates a kernel thread : One-to-One

A: Each user-level thread maps to a kernel thread : Many-to-One

According to Dr. Grant's Lecture 14 on Oct 13 and ch04.pdf from week 8, which is not introduction to multithreading models Many-to-One? --- A: Each user-level thread maps to kernel thread. B: Many user-level threads mapped to single kernel thread C: One thread blocking causes all to block D: Multiple threads may not run in parallel on multicore system because only one may be in kernel at a time E: Few systems currently use this model

A: Each user-level thread maps to kernel thread.

According to zyBooks CS3113: Introduction to OS Chapter 4 Section 7, what answer is most correct when asked how a signal may be handled by what possible handlers? A: Either B and C B: A default signal handler C: A user-defined signal handler D: Asynchronous cancellation E: Either B and D

A: Either B and C

According to Dr. Grant's Lecture Slides "ch04.pdf", all of the following are benefits of multi-threading, EXCLUDING? --- A: High Cost B: Responsiveness C: Resource Sharing D: Economy E: Scalability

A: High Cost

According to Dr. Grant's Lecture #13 (Processes) from October 4th, 2022 and the process-ia.pdf, the order of the simplified process control block on the image 3.1 is: --- A: Identifier, state, priority, program counter, memory pointers, context data, I/O status information, accounting information.B: accounting information, Identifier, state, priority, program counter, memory pointers, context data, I/O status information.C: I/O status information, state, priority, context data, program counter, Identifier, memory pointers, accounting information.D: program counter, memory pointers, I/O status information, accounting information, Identifier, state, priority, context data.E: context data, I/O status information, accounting information, Identifier, state, priority, program counter, memory pointers.

A: Identifier, state, priority, program counter, memory pointers, context data, I/O status information, accounting information.

According to Dr. Grant's Lecture Slides "ch04.pdf", which of these is NOT a primary thread library? --- A: Linux B: POSIX Pthreads C: Windows threads D: Java threads

A: Linux

According to processes-ia.pdf and lecture 13 from Week 7, What does a memory table NOT do? --- A: Location in memory being used as the source/destination of the I/O transfer B: Allocation of main memory to processes C: Allocation of secondary memory to processes D: Protection attributes of blocks of main memory or virtual memory E: Information needed to manage virtual memory

A: Location in memory being used as the source/destination of the I/O transfer

According to Dr. Grant's CS-3113 Lecture, 16 on October 13th, 2022, which of the following implies a system can perform more than one task simultaneously? --- A: Parallelism B: Concurrency C: Multicore Programming D: Many-to-one multi-threading models. E: Parallel systems

A: Parallelism

According to Dr. Grant's lecture 13, what is not an example of an event that would cause a process creation? --- A: Parent request B: User login C: New batch job D: Providing service to OS E: Parent calling

A: Parent request

According to the Chapter 4 PDF, what does 'N' represent in Amdahl's law? --- A: Processing Cores B: Serial Portion C: Speedup D: Parallel Components E: Chicken

A: Processing Cores

According to Dr. Grant's lecture #14 on 10/13/2022, what are the benefits of using threads? --- A: Responsiveness, resource sharing, economy, and scalability B: Multiple processes, parallelism, and concurrency C: Data parallelism and task parallelism D: Dividing activities, balance, data splitting, data dependency, testing and debugging E: You can sew clothes together

A: Responsiveness, resource sharing, economy, and scalability

According to Dr. Grant's Lecture 13 (processes) from Week 7, What is NOT a reason for Process Creation? --- A: Spawned by memory table B: New batch job C: Interactive logon D: Created by OS to provide a service E: Spawned by existing process

A: Spawned by memory table

According to threads-i.pdf which of the following is NOT a trait of a vfork? --- A: There is no duplication of virtual memory B: Parent memory is not shared C: The child of vfork() is not always guaranteed to run D: Changes to stack or heap in child are not seen by the parent E: vfork() Creates 2 child processes

A: There is no duplication of virtual memory

According to ch04.pdf, which implicit threading method is designed to create a pool of pre-built threads ready for work commands? --- A: Thread PoolsB: OpenMPC: Grand Central DispatchD: Thread LibraryE: PThread

A: Thread Pools

According to Prof. Grant's lecture on Threads and Concurrency (10/13/20220) which type of multithreading model that allows user thread to be bound to kernel thread and allows many user level threads to be mapped to many kernel threads? --- A: Two-level Model B: Many-to-One Model C: Many-to-Many Model D: One-to-One Model

A: Two-level Model

According to Dr. Grant's lecture on October 13th, which of the following lists best describes what is shared between multi-threaded processes? --- A: code, data, and files B: data, files, stack C: files, registers, stack D: code, files, registers E: nothing is shared between them

A: code, data, and files

According to Dr. Grant's Lecture #13 (Processes) from 2022-10-04,How do you voluntary exit a process? --- A: exit(status); B: kill(pid, signal); C: pthread_exit(void *retval); D: return -1; E: close(int fd);

A: exit(status);

According to Dr. Grant's lecture on Oct 13, what is a downside of multithreading? --- A: it makes it harder for programmers to debug B: you have to do concurrent execution on a single-core system C: you have to do parallelism on a multi-core system D: you can't share information in between the threads E: there are both bugs and rats that you have to deal with

A: it makes it harder for programmers to debug

According to Introduction to Operating Systems Zybooks Chapter 4.5 "Thread libraries", Synchronous Threading is similar to vfork() in which when the parent creates a child(ren), --- A: it must wait for all of its children to terminate. B: the parent resumes and both execute concurrently. C: the child(ren) cannot be guaranteed to be called. D: the parent and child(ren) share little data between them.

A: it must wait for all of its children to terminate.

According to ch04.pdf and Dr. Grant's lecture 16 from Week 8, Which of the following is NOT a parameter for the creation of a Windows thread (pthread_create(?);) --- A: list of joined threads B: creation flags C: security attributes D: stack size E: thread function

A: list of joined threads

According to zybooks CS3113 3.2. Which of the following is not a state that a thread can be in? --- A: skipped B: Running C: Waiting D: Ready E: Terminated

A: skipped

According to the process-ia.pdf slides, which of these functions for an operating system kernel is not correctly matched up with the correct category? --- A. Management of process control blocks; process management B. Allocation of address space to processes; process management C. Buffer management; I/O management D. Swapping; Memory management E. Page and segment management; Memory management

B. Allocation of address space to processes; process management

According to Zybooks chapter 3.7, a blocking send() and a blocking receive() is known as a what? --- A. Synchronous Communication B. Rendezvous C. Asynchronous communication D. Miscommunication

B. Rendezvous

According to Dr. Grant's Lecture on Oct 13, 2022 , What is the fast method of process creation that Pthreads uses? --- A. fork() B. clone() C. vfork() D. exec()

B. clone()

According to Dr. Grant's slideshow presentation titled "threads-i.pdf", which of the following is the correct clone() flag to write the thread ID of a child into ptid? --- A: CLONE_NEWPID B: CLONE_PARENT_SETTID C: CLONE_PID D: CLONE_THREAD E: CLONE_VFORK

B: CLONE_PARENT_SETTID

According to Dr. Grant's Lecture about Threads on October 13, 2022, what is the correct order of steps for a multithreaded server? --- A: Client Requests Server, Thread resumes listening for additional client requests, Server creates new Thread to service the request. B: Client Requests Server, Server Creates new Thread to service the request, Server resumes listening for additional Client requests. C: Server requests Client, Thread creates new Thread to service the request, Thread resumes listening to additional Client requests. D: Thread requests Server, Server creates new Thread to service the request, Client resumes listening for additional Client requests. E: Client requests Thread, Server sits there, Nothing happens

B: Client Requests Server, Server Creates new Thread to service the request, Server resumes listening for additional Client requests.

while a program is executing, it can be uniquely characterized by a number of elements, EXCLUDING? A: Program Counter B: Interpreter C: I/O status information D: State E: Memory Pointers

B: Interpreter

According to Dr. Grant's Lecture on October 4, 2022, process-ia.pdf, and process-i.pdf, what defines a process to be an orphan process? --- A: It is a process running in the background waiting for an event B: It is a process where the parent process terminates before the current child process C: It is a process that has been terminated but is not immediately deallocated from memory D: It is a process that has been terminated and deallocated from memory

B: It is a process where the parent process terminates before the current child process

According to processes-ia.pdf from Dr. Grant's Lecture on 10/4/2022, which is not true of swapping? --- A: It is an I/O operation. B: It will always enhance performance. C: It happens when no processes in main memory are in the Ready state. D: It involves moving part or all of a process from main memory to disk. E: It moves a blocked process into a suspend queue.

B: It will always enhance performance.

According to Zybooks chapter 4.4, which type of multithreading model takes a lot of user-level threads and multiplexes them to "a smaller or equal number of kernel threads" without allowing a user-level thread to be bound to a kernel-level thread? A: Two-level Model B: Many-to-Many Model C: Many-to-One Model D: One-to-One Model

B: Many-to-Many Model

From Zybooks CS3113: Introduction to Operating Systems 4.2 What are some of the benefits of multi-threaded programs? --- A: Less Storage Space B: Responsiveness C: Lower Cost D: Redundancy E: Can be woven into a net

B: Responsiveness

According to Dr. Grant's lecture 16(Threads) from October 13, 2022, Which of the following is used in UNIX systems to notify a process that a particular event has occurred? --- A: Threads B: Signals C: Thread Library D: Parallelism E: Program Counter

B: Signals

According to the ch04.pdf and section 4.6 of the textbook, which is NOT an advantage of threading pools? --- A: Allows the number of threads in the application(s) to be bound to the size of the pool B: Synchronous tasks can be completed with more efficiency C: Usually slightly faster to service a request with an existing thread than create a new thread D: Separating task to be performed from mechanics of creating task allows different strategies for running task

B: Synchronous tasks can be completed with more efficiency

According to Dr. Grant's Lecture #14 (Threads) from October 13, 2022, in the one to one thread model, what is a disadvantage of using this thread technique? --- A: Creating kernel processes slows down the system B: The number of user threads is restricted to the available amount of kernel threads C: Allows OS to create a certain amount of kernel threads D: Many user threads can hold up an assigned kernel thread, thus creating thread blocking E: There are no disadvantages to one to one thread model, it is the single greatest technique in the history of computers.

B: The number of user threads is restricted to the available amount of kernel threads

According to Dr. Grant's lecture on Oct 13, what is an advantage of multithreading? --- A: Decreased potential for deadlock occurrence. B: There is simultaneous and parallelized occurrence of tasks. C: It eliminates overhead switching of context. D: it makes it easier for programmers to debug

B: There is simultaneous and parallelized occurrence of tasks.

According to ch04.pdf slide #43, from Week 8. What windows thread structure can be defined as containing a thread id, user mode stack, and thread local storage, in user space? --- A: Kernel thread block B: Thread environment block C: Executive thread block D: Dynamic link libraries E: Dynamic hotdog block

B: Thread environment block

According to ZyBooks Section 4.6: Implicit Threading, what is the order of events for fork-join? --- A: task, fork, join, main thread B: main thread, fork, task, join C: main thread, task, fork, join D: task, join, main thread, fork E: fork, join, main thread, task

B: main thread, fork, task, join

According to zyBooks Section 4.6 - CS 3113, Grand Central Dispatch (GCD) is a combination of which of the following? --- A: run-time library and language extensions B: run-time library, an API, and language extensions C: An API and language extensions D: run-time library and OpenMP E: An API, language extensions, and OpenMP

B: run-time library, an API, and language extensions

According to 'threads-i.pdf' and 'ch04.pdf' (Week 8): Which of the following statements is not true about threads and processes? --- A. Sharing between threads is easier than sharing between processes. B. A process is an executing program, while threads operate within an executing program. C. Each thread exclusively references different code, data and files, regardless of whether a process is single or multi-threaded. D. Each thread has its own stack and registers, regardless of whether a process is single or multi-threaded. E. Sharing between processes can include implementing shared memory.

C. Each thread exclusively references different code, data and files, regardless of whether a process is single or multi-threaded.

According to Dr.Grant Lecture 13 Processes, in the five-state process model why is the New state needed? --- A: It is there to represent a program starting, no processing happens here. B: It is a state for when a process has a new request for the OS. C: It takes time to allocated and copy into memory what is going to be run. D: The process is waiting for the CPU to finish the process that is currently working on

C: It takes time to allocated and copy into memory what is going to be run.

According to Dr. Grant's Lecture #14 (Threads) from October 13th, 2022 and ch04.pdf from Week 8 Module, which is NOT a benefit to using multi-threaded server architecture? --- A: Responsiveness B: Resource Sharing C: Message passing D: Economy E: Scalability

C: Message passing

According to Dr.Grant's Lecture 14 (Threads) on October 13, 2022, and ch04.pdf, which of the following models is NOT an example of a multithreading model? --- A: Many-to-One B: One-to-One C: One-to-Many D: Many-to-Many

C: One-to-Many

According to Prof. Grant's lecture on Threads and Concurrency (10/13/20220), which one is NOT a Kernel thread? A: Windows B: Solaris C: POSIX D: Linux E: Mac OS X

C: POSIX

According to Dr. Grant's lecture on processes, what signal flag is passed to the kill() function when pressing "ctrl+c" while running a process in the terminal? --- A: SIGTERM B: SIGQUIT C: SIGINT D: SIGHUP E: SIGEND

C: SIGINT

According to Dr. Grant's Lecture #13 (processes) and processes-ia.pdf, what is it called when the OS needs to release sufficient main memory to bring in a process that is ready to execute, in regards to process suspension? --- A: Timing B: Parent process request C: Swapping D: Interactive user request ---

C: Swapping

According to Dr. Grant's lecture on October 13th, 2022 (Threads) and the threads-i slides, which of the following is the correct TID for the thread group leader in a process with PID of 2001 and a thread count of 4? --- A. TID = 2002 B. TID = 2003 C: TID = 2001 D. TID = 2004

C: TID = 2001

According to the "processes-ia.pdf", Which of the following is not part of the Two-State Process Mode? --- A: Not Running B: Running C: Timeout D: Dispatch ---

C: Timeout

According to Prof. Grant's lecture on Threads and Concurrency (10/13/20220) Which is the main difference between the user thread and Kernel threads? --- A: Kernel threads are managed by the user while the operating system manages user threads. B: Kernel threads are faster than User threads C: User threads are managed by the user while the operating system manages kernel threads. D: Kernel threads are mapped to a user thread E: There is no difference

C: User threads are managed by the user while the operating system manages kernel threads.

According to Table 3.3 in the processes-ia.pdf slide deck, which of the following agents cannot cause a process to be placed into a suspended state? --- A: the parent process B: the operating system C: a child process D: the user E: a timer

C: a child process

According to ch04.pdf and Dr.Grant's lecture 14 on October 13, 2022, from Week 8. What are parallel regions? --- A: management done by user-level threads library B: a communication mechanism from the kernel to the upcall handler in the thread library C: blocks of code that can run in parallel D: they notify a process that a particular event has occurred.

C: blocks of code that can run in parallel

According to Dr.Grant's Lecture 16 (Threads) on October 13, 2022, which of the following methods of process creation results in the shortest time required to create large amounts of processes. --- A: vfork() B: fork() C: clone() D: fork() + exec()

C: clone()

According to threads-i.pdf, What method of creating 100,000 processes takes the least amount of time? --- A: fork() B: vfork() C: clone() D: fork() + exec() E: vfork() + exec()

C: clone()

According to zyBooks CS3113: Introduction to Operating Systems Chapter 4 Section 5, what is the Java function call that causes a parent thread to wait for a child thread to finish? A: pthread_join() B: sleep() C: join() D: WaitForSingleObject() E: pthread_create()

C: join()

According to Dr. Grant's lecture #14 from October 13, 2022, which of the following is a challenge due to multicore systems? --- A: parallelism B: concurrency C: responsiveness D: Balance E: Amdahl's law

D: Balance

According to Dr.Grant's Lecture 16 (Threads) , Which of the following is NOT a benefit of Multithreaded Architecture --- A: Scalability B: Economy C: Resource Sharing D: Implementation E: Responsiveness

D: Implementation

According to Dr. Grant's CS-3113 Lecture 16 on October 13th, 2022, Threads, and zyBooks CS3113: Introduction to Operating Systems, Chapter 4 Section 4, Multithreading models, and ch04.pdf, which of the following is NOT true about a One-to-One multithreading model? --- A: Each User-Level Thread connects to a Kernel Thread. B: Creation of a User-Level Thread also creates a Kernel Thread. C: Has more concurrency than Many-to-One multithreading model. D: Multiplexes numerous User-Level Threads to a less than or equal to number of Kernel Threads. E: Negatively impacts the performance of a system if there are a large number of user threads.

D: Multiplexes numerous User-Level Threads to a less than or equal to number of Kernel Threads.

According to zybooks CS3113 3.2, Which of the following is not a valid state of a thread? A: Ready B: Terminated C: Running D: Parsing E: Waiting

D: Parsing

According to Dr. Grant's Lecture 13 (Processes) on October 4, 2022, and processes-ia.pdf, which best describes process control information? --- A: Each process is assigned unique numeric identifier B: Usage of program status word (PSW) C: A process must include a program or a set of programs to be executed D: The additional information needed by the OS to control and coordinate the various active processes E: The collection of program, data, stack, and attributes

D: The additional information needed by the OS to control and coordinate the various active processes

According to processes-ia.pdf and lecture 13 from Week 7, What do file tables NOT provide information about? A: Existence of files B: Location on secondary memory C: Current status D: The contents inside a file E: Other attributes

D: The contents inside a file

According to Operating System Concepts, section 4.3, which of the following options describe the drawback(s) of a many-to-many multithreading model? --- A: With the many-to-many model, only one thread can access the kernel at a time, so multiple threads can not run in parallel on multicore systems. B: Because creating a user thread requires creating a corresponding kernel thread, a large number of threads may be created and burden the performance of a system. C: On a many-to-many model, when a thread performs a blocking system call, the kernel may schedule another thread for execution, preventing blocking of the entire process. D: The many-to-many model is the most difficult to implement, and limiting the number of kernel threads has become less important as technology has advanced. E: A two-level model is superior to the many-to-many model, as it allows a user-level thread to be bound to a kernel thread.

D: The many-to-many model is the most difficult to implement, and limiting the number of kernel threads has become less important as technology has advanced.

According to Dr. Grant's Lecture #13 (Processes) from October 4th, 2022 and ZyBooks Section 4.4, which of the following does NOT require kernel mode privileges? --- A: Halt operations B: Memory management C: I/O device access D: Thread switching E: Recompiling the kernel

D: Thread switching

According to "Operating Systems 10th Edition", what are the two main types of parallelism? --- A. Data parallelism and Task parallelism B. Thread parallelism and Process parallelism C. Computational parallelism and Balanced parallelism D. Implicit parallelism and Explicit parallelism E. Single parallelism and Multi-parallelism

Data parallelism and Task parallelism

During Dr. Grant's lecture #16 on Threads, he showed an example of a Java multithreaded program and a C multithreaded program that calculates the sum of a number. In both programs, run()/runner() had a return type of void. Why would we not return the sum instead? --- A: We should wait until we need the data before retrieving it from the thread. B: The API won't allow us to return a value. C: The thread may still be processing the data, so it might return an incomplete value. D: Some threads may not have anything to return, so the API is written in such a way so they are not forced to return a value. E: If the program has to wait for the thread to return some data, then this defeats the purpose of running more than one thread at a time.

E: If the program has to wait for the thread to return some data, then this defeats the purpose of running more than one thread at a time.

According to Dr. Grant's Lecture #13 (Processes) on. 10-4-22, what is the main responsibility of the dispatcher in process execution? A: It decides when a process should be running. B: It decides what process should be running. C: It creates processes to be executed. D: It gets rid of bad code. E: It decides what process should be running and when it should be running.

E: It decides what process should be running and when it should be running.

According to Dr. Grant's Lecture about Threads on October 13, 2022, which of the following functions cancels a specified POSIX thread (thread)? --- A: pthread_exit(0) B: pthread_join(tid, NULL) C: CloseHandle(Handle) D: join() E: pthread_cancel(tid)

E: pthread_cancel(tid)

According to Dr. Grants lecture 14 from week 8, When you want to end a thread but not end the parent thread, what function should you use? --- A: exit(0); B: pthread_join C: pthread.h D: pthread_create() E: pthread_exit(0);

E: pthread_exit(0);

According to processes-ia.pdf and lecture 13 from Week 7, which answer choice is true regarding the Process Control Block A: It is a key tool that allows for a single process. B: It's not possible to interrupt a process once it's running C: It contains five different process elements. D: You can resume the execution of an interrupted running process E: Created and managed by the user

You can resume the execution of an interrupted running process

According to Dr. Grant's Threads lecture on Thursday, October 13, which system call is the fastest to create processes? --- A: clone() B: vfork() C: fork() D: fork() + exec() E: vfork() + exec

clone()

According to Dr. Grants "processes-ia" slides and his lecture on October 4th, Which of the following are not a characteristic of the System mode of execution? --- A: more privilege mode B: referred to as control mode C: less privilege of the mode D: Kernel of the Operating system

less privilege of the mode


Set pelajaran terkait

ACT English Section Practice: Semicolons, Dashes, and Commas

View Set

Ultimate Glossary of Social Media Terms

View Set

Differential Diagnosis: Nervous System

View Set

Sinners in the Hands of an Angry God Study Guide/Worksheet

View Set