操作系统第4章线程

更新时间:2023-05-07 12:26:55 阅读: 评论:0

Chapter 4 – Threads, SMP, and Microkernels
True / Fal Questions:
1. T / F – The basic unit of dispatching in an operating system is usually referred to as a thread or lightweight process.操作系统的基本单位调度,通常称为一个轻量级线程或线程
ANS:    T
2. T / F – An example of a system that implements a single process with multiple threads is MS-DOS.MS-DOS操作系统是一个单一进程具有多线程的例子.
ANS:    F (Java)
3. T / F – In a multithreaded environment, a process is defined as the unit of resource allocation and a unit of protection.
ANS:    T
4. T / F – The concept of thread synchronization is required in multithreaded systems becau threads of a single process share the process’s process control block (PCB).线程同步的概念是一个多线程系统所必需的,因为单一进程的线程共享进程的进程控制块(PCB). F(因为他们有着相同地址空间)
ANS:    F (becau they share the same address space)
5. T / F – In a pure Ur-Level Thread (ULT) facility, all of the work of thread management is done by the application, but the kernel is aware of the existence of threads.在纯用户级线程(ULT)设备中,所有线程管理的工作都是由应用程序负责、 但内核知道他们的存在.F(内核是不知道线程的存在)
ANS:    F (kernel is not aware of the threads existence)
6. T / F – In the field of distributed operating system design, the One-to-Many (Thread-to-Process) relationship is particularly interesting becau it involves the concept of thread migration.
ANS:    T
7. T / F – One disadvantage to the master/slave shared-memory multiprocessor architecture is that the failure of the master brings down the whole system.
ANS:    T
8. T / F – In a symmetric multiprocessing (SMP) system, each processor has access only to a private main memory area.
            在对称多处理系统(SMP)中,每个处理器进入到各自独立的内存领域.
              F (还获得了内存共享)
ANS:    F (also have access to a shared main memory)
9. T / F – An SMP O/S manages processor and other resources so that the ur may view the system in the same fashion as a multiprogramming uniprocessor system.
ANS:    T
10. T / F – The primary advantage of the basic microkernel design over layered kernel designs involves incread performance.(性能
    内核层设计的基本微内核的主要的优点包括提高性能.F(性能降低)
ANS:    F (performance is a disadvantage)
11. T / F – The philosophy underlying the microkernel is that only absolutely esntial core operating system functions should be in the kernel.
ANS:    T
12. T / F – The basic form of communication between process or threads in a microkernel O/S is messages.
ANS:    T
13. T / F – Linux makes no distinction between a process and a thread.
ANS:    T
14. T / F – Windows 2000 is an object-oriented O/S, but only process (not threads) are implemented as objects in the WIN2K O/S.
    Windows 2000是一个面向对象的操作系统,但在WIN2K系统中只有进程(非线程)是  执行的对象
ANS:    F (threads are also implemented as objects)
15. T / F – In the Solaris O/S, a Ur-Level Thread (ULT) in the active state is assigned to a Light-Weight Process (LWP) and executes while the underlying kernel thread executes.
ANS: T
Multiple Choice Questions:
1. The concept of a process in an operating system embodies two primary characteristics, one of which is:操作系统中进程的概念,体现了两个主要特点的,其中之一是
a. Multithreading
b. Resource ownership
c. Symmetric multiprocessing
d. None of the above
ANS:    B
2. An example of a system that implements a single process with multiple threads is:
a. WIN 2000
b. Solaris
c. Java
d. All of the above
ANS:    C
3. Which of the following is true regarding the relationship between process and threads:
a. It takes far less time to create a new thread in an existing process than to create a new process在现有的进程下创建线程要比建一个新进程下创建线程花的时间要少得多
b. It takes less time to terminate a process than a thread
c. It takes less time to switch between two different process than to switch between two threads within the same process
d. All of the above
ANS:    A
4. The basic thread operation related to the change in thread state that occurs when a thread needs to wait for an event is referred to as the:
      线程基本状态发生变化,需要等待一个事件时称为
a. Unblock operation
b. Spawn operation
c. Block operation 阻塞状态
d. None of the above
ANS:    C
5. One of the disadvantages of Ur-Level Threads (ULTs) compared to Kernel-Level Threads (KLTs) is:
a. Scheduling is application specific
b. When a ULT executes a system call, all threads in the process are blocked 当一个ULT执行一个系统调用,进程中所有的线程都被阻塞
c. Thread switching does not require kernel mode privileges
d. All of the above
ANS:    B
6. In the Linux O/S, multiple threads may be created and executed within a single process.  This is an example of the following Thread-to-Process relationship:
a. 1:1
b. 1:M
c. M:N
d. None of the above
ANS:    D (M:1)
7. The computer system category where a single processor executes a single instruction stream to operate on data stored in a single memory is called:
a. Single Instruction Single Data (SISD) stream 单指令单数据(SISD)流

本文发布于:2023-05-07 12:26:55,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/865494.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:线程   进程   系统
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图