赞
踩
List and briefly define the four main elements of a computer.
A processor, which controls the operation of the computer and performs its data processing functions ;
a main memory, which stores both data and instructions;
I/O modules, which move data between the computer and its external environment;
and the system bus, which provides for communication among processors, main memory, and I/O modules.
列出并简要定义计算机的四个组成部分。
Define the two main categories of processor registers.
User-visible registers: Enable the machine- or assembly-language programmer to minimize main memory references by optimizing register use. For high-level languages, an optimizing compiler will attempt to make intelligent choices of which variables to assign to registers and which to main memory locations. Some high-level languages, such as C, allow the programmer to suggest to the compiler which variables should be held in registers.
Control and status registers: Used by the processor to control the operation of the processor and by privileged, operating system routines to control the execution of programs.
定义处理器寄存器的两种主要类别。
用户可见寄存器: 优先使用这些寄存器,可以使机器语言或者汇编语言的程序员减少对主存储器的访问次数。对高级语言而言,由优化编译器负责决定把哪些变量应该分配给主存储器,一些高级语言,如C语言,允许程序言建议编译器把哪些变量保存在寄存器中。
控制和状态寄存器:用以控制处理器的操作,且主要被具有特权的操作系统例程使用,以控制程序的执行。
In general terms, what are the four distinct actions that a machine instruction can specify?
These actions fall into four categories: Processor-memory: Data may be transferred from processor to memory or from memory to processor.
Processor-I/O: Data may be transferred to or from a peripheral device by transferring between the processor and an I/O module.
Data processing: The processor may perform some arithmetic or logic operation on data.
Control: An instruction may specify that the sequence of execution be altered.
一般而言,一条机器指令能指定的四种不同操作是什么?
What is an interrupt?
An interrupt is a mechanism by which other modules (I/O, memory) may interrupt the normal sequencing of the processor.
什么是中断?
中断是指计算机运行过程中,出现某些意外情况需主机干预时,机器能自动停止正在运行的程序并转入处理新情况的程序,处理完毕后又返回原被暂停的程序继续运行。
How are multiple interrupts dealt with?
Two approaches can be taken to dealing with multiple interrupts.
The first is to disable interrupts while an interrupt is being processed.
A second approach is to define priorities for interrupts and to allow an interrupt of higher priority to cause a lower-priority interrupt handler to be interrupted.
处理多中断有两种方法。
What characteristics distinguish the various elements of a memory hierarchy?
The three key characteristics of memory are cost, capacity, and access time.
内存层次各个元素间的特征是什么?
存储器的三个重要特性是:**价格,容量和访问时间。**并且各层次从上到下,每“位”价格降低,容量递增,访问时间递增。
What is cache memory?
Cache memory is a memory that is smaller and faster than main memory and that is interposed between the processor and main memory. The cache acts as a buffer for recently used memory locations.
什么是高速缓存?
高速缓冲存储器是比主存小而快的存储器,用以协调主存跟处理器,作为最近储存地址的缓冲区。
What is the difference between a multiprocessor and a multicore system?
A multicore computer is a special case of a multiprocessor, in which all of the processors are on a single chip.
多处理器系统和多核系统的区别是什么?
多处理器系统(Multiprocessor Systems)是指包含两台或多台功能相近的处理器,处理器之间彼此可以交换数据,所有处理器共享内存,I/O 设备,控制器,及外部设备,整个硬件系统由统一-的操作系统控制,在处理器和程序之间实现作业、任务、程序、数组极其元素各级的全面并行。
多内核(multicore chips) 是指在一枚处理器(chip) 中集成两个或多个完整的计算引擎(内核)。
What is the distinction between spatial locality and temporal locality?
Spatial locality refers to the tendency of execution to involve a number of memory locations that are clustered. Temporal locality refers to the tendency for a processor to access memory locations that have been used recently.
空间局部性和时间局部性的区别是什么?
In general, what are the strategies for exploiting spatial locality and temporal locality?
Spatial locality is generally exploited by using larger cache blocks and by incorporating prefetching mechanisms (fetching items of anticipated use) into the cache control logic. Temporal locality is exploited by keeping recently used instruction and data values in cache memory and by exploiting a cache hierarchy.
开发空间局部性和时间局部性的策略是什么?
我的答案: B正确答案: B
10分
我的答案: C正确答案: C
10分
我的答案: D正确答案: D
10分
我的答案: A正确答案: A
10分
我的答案: C正确答案: C
10分
我的答案: C正确答案: C
10分
我的答案: B正确答案: B
10分
我的答案: B正确答案: B
10分
我的答案: D正确答案: D
10分
我的答案: C正确答案: C
What are three objectives of an OS design?
Convenience: An operating system makes a computer more convenient to use.
Efficiency: An operating system allows the computer system resources to be used in an efficient manner.
Ability to evolve: An operating system should be constructed in such a way as to permit the effective development, testing, and introduction of new system functions without interfering with service.
操作系统设计的三个目标是什么?
What is the kernel of an OS?
The kernel is a portion of the operating system that includes the most heavily used portions of software. Generally, the kernel is maintained permanently in main memory. The kernel runs in a privileged mode and responds to calls from processes and interrupts from devices.
什么是操作系统的内核?
操作系统内核是计算机上最低层的软件,提供计算机最核心的功能,比如:进程管理、内存管理、I/O管理、文件管理、网络管理等。
What is multiprogramming?
Multiprogramming is a mode of operation that provides for the interleaved execution of two or more computer programs by a single processor.
什么是多道程序设计?
两个或两个以上程序在计算机系统中同处于开始到结束之间的状态,这就称为多道程序设计。也就是在计算机内存中同时存放几道相互独立的程序,使它们在管理程序控制之下,相互穿插的运行。多道程序技术运行的特征:多道、宏观上并行、微观上串行。
What is a process?
A process is a program in execution.
A process is controlled and scheduled by the operating system.
什么是进程?
进程由三部分组成:
How is the execution context of a process used by the OS?
The execution context, or process state, is the internal data by which the operating system is able to supervise and control the process.
操作系统是怎么使用进程上下文的?
执行上下文又称为进程状态,是操作系统用来管理和控制所需的内部数据。这种内部信息和进程是分开的,因为操作系统信息不允许被进程直接访问。上下文包括操作系统管理进程以及处理器正确执行进程所需要的所有信息,包括各种处理器寄存器的内容,如程序计数器和数据寄存器。它还包括操作系统使用的信息,如进程优先级以及进程是否在等待特定I/O事件的完成。
List and briefly explain five storage management responsibilities of a typical OS.
Process isolation: The operating system must prevent independent processes from interfering with each other’s memory, both data and instructions.
Automatic allocation and management: Programs should be dynamically allocated across the memory hierarchy as required. Allocation should be transparent to the programmer. Thus, the programmer is relieved of concerns relating to memory limitations, and the operating system can achieve efficiency by assigning memory to jobs only as needed.
Support of modular programming: Programmers should be able to define program modules, and to create, destroy, and alter the size of modules dynamically.
Protection and access control: Sharing of memory, at any level of the memory hierarchy, creates the potential for one program to address the memory space of another. This is desirable when sharing is needed by particular applications. At other times, it threatens the integrity of programs and even of the operating system itself. The operating system must allow portions of memory to be accessible in various ways by various users.
列出并简要介绍操作系统的五种典型存储管理职责。
Explain the distinction between a real address and a virtual address.
A virtual address refers to a memory location in virtual memory. That location is on disk and at some times in main memory.
A real address is an address in main memory.
解释实地址和虚地址的区别。
实地址:指的是主存中的地址,实际的主存储器的地址,对应主存空间,即物理空间。
虚地址:指的是存在于虚拟内存中的地址,它有时候在磁盘中,有时候在主存中。
Describe the round-robin scheduling technique.
Round robin is a scheduling algorithm in which processes are activated in a fixed cyclic order; that is, all processes are in a circular queue. A process that cannot proceed because it is waiting for some event (e.g. termination of a child process or an input/output operation) returns control to the scheduler.
描述时间片轮询调度技术。
轮询调度是一种调度算法,所有的进程存放在一个环形队列中并按固定循序依次激活。因为等待一些事件(例如:等待一个子进程或者一个I/O操作)的发生而不能被处理的进程将控制权交给调度器。
Explain the difference between a monolithic kernel and a microkernel.
A monolithic kernel is a large kernel containing virtually the complete operating system, including scheduling, file system, device drivers, and memory management. All the functional components of the kernel have access to all of its internal data structures and routines. Typically, a monolithic kernel is implemented as a single process, with all elements sharing the same address space.
A microkernel is a small privileged operating system core that provides process scheduling, memory management, and communication services and relies on other processes to perform some of the functions traditionally associated with the operating system kernel.
解释单体内核和微内核的区别。
What is multithreading?
Multithreading is a technique in which a process, executing an application, is divided into threads that can run concurrently.
什么是多线程?
多线程技术是指把执行一个应用程序的进程划分为可以同时运行的多个线程。
List the key design issues for an SMP operating system.
Simultaneous concurrent processes or threads;
scheduling;
synchronization;
memory management;
reliability and fault tolerance.
列出对称多处理器操作系统设计时要考虑的关键问题。
What does it mean to preempt a process?
Process preemption occurs when an executing process is interrupted by the processor so that another process can be executed.
抢占一个进程是什么意思?
处理器为了执行另外的进程而终止当前正在执行的进程,这就叫进程抢占。
Why does Figure 3.9b have two blocked states?
There are two independent concepts: whether a process is waiting on an event (blocked or not), and whether a process has been swapped out of main memory (suspended or not). To accommodate this 2 ×2 combination, we need two Ready states and two Blocked states.
为什么图3.9(b)中有两个阻塞态?
有两个独立的概念:进程是否在等待一个事件(阻塞与否)以及进程是否已经被患处主存(挂起与否)。为适应这种2*2的组合,需要两个阻塞态和两个挂起态。
What is the difference between an interrupt and a trap?
An interrupt is due to some sort of event that is external to and
中断和陷阱有什么区别?
Give three examples of an interrupt.
Clock interrupt, I/O interrupt, memory fault.
举出中断的三个例子。
时钟中断,I/O中断,内存失效。
For what types of entities does the OS maintain tables of information for management purposes?
The OS maintains tables for entities related to memory, I/O, files, and processes. See Table 3.10 for details.
对于哪类实体,操作系统为了管理它而维护其信息表?
内存,I/O、文件和进程。
For the processing model of Figure 3.6, briefly define each state.
Running: The process that is currently being executed. Ready: A
简要定义图3.6所示进程模型中的每种状态。
What common events lead to the creation of a process?
New batch job; interactive logon; created by OS to provide a service; spawned by existing process. See Table 3.1 for details.
通常哪些事件会导致创建一个进程?
List four characteristics of a suspended process.
列出挂起状态进程的4个特点。
What are the steps performed by an OS to create a new process?
1.Assign a unique process identifier to the new process.
操作系统创建一个新进程所执行的步骤是什么?
What is an instruction trace?
An instruction trace for a program is the sequence of instructions that execute for that process.
什么是指令跟踪?
指令跟踪是指为该进程而执行的指令序列。
List three general categories of information in a process control block.
Process identification, processor state information, and process control information.
列出进程控制块中的三类信息。
进程标识,处理器状态信息,进程控制信息。
Why are two modes (user and kernel) needed?
The user mode has restrictions on the instructions that can be executed and the memory areas that can be accessed. This is to protect the operating system from damage or alteration.
In kernel mode, the operating system does not have these restrictions, so that it can perform its tasks.
为什么需要两种模式(用户模式和内核模式)?
用户模式下可以执行的指令和访问的内存区域都受到限制。这是为了防止操作系统受到破坏或者修改。
而在内核模式下则没有这些限制,从而使它能够完成其功能。
What is swapping and what is its purpose?
Swapping involves moving part or all of a process from main memory to disk. When none of the processes in main memory is in the Ready state, the operating system swaps one of the blocked processes out onto disk into a suspend queue, so that another process may be brought into main memory to execute.
什么是交换,其目的是什么?
交换是指把主存中某个进程的一部分或者全部内容转移到磁盘。当主存中没有处于就绪态的进程时,操作系统就把一个阻塞的进程换出到磁盘中的挂起队列,从而使另一个进程可以进入主存执行。
我的答案: D
10分
我的答案: C
10分
我的答案: B
10分
我的答案: B
10分
我的答案: B
10分
我的答案: A
10分
我的答案: C
10分
我的答案: C
10分
我的答案: C
10分
我的答案: C
What resources are typically shared by all of the threads of a process?
Address space, file resources, execution privileges are examples.
哪些资源通常被一个进程中的所有线程共享?
进程中的所有线程共享该进程的状态和资源,例如地址空间,文件资源,执行特权等。
What are the two separate and potentially independent characteristics embodied in the concept of process?
Resource ownership and scheduling/execution.
在进程概念中体现出的两个独立且无关的特点是什么?
List reasons why a mode switch between threads may be cheaper than a mode switch between processes.
Less state information is involved.
请列出线程间的模式切换比进程间的模式切换开销更低的原因。
包含的状态信息更少。
Give four general examples of the use of threads in a single-user multiprocessing system.
Foreground/background work;
asynchronous processing;
speedup of execution by parallel processing of data;
modular program structure.
给出在单用户多处理系统中使用线程的四个例子。
List three advantages of ULTs over KLTs.
列出用户级线程优于内核级线程的三个优点。
由于所有线程管理数据结构都在一个进程的用户地址空间中,线程切换不需要内核级模式的特权,因此,进程不需要为了线程管理而切换到内核模式,这节省了在两种模式间进行切换(从用户模式到内核模式;从内核模式返回用户模式)的开销。
调用可以是应用程序专用的。一个应用程序可能倾向于就按单的轮询调度算法,而另一个应用程序可能倾向于基于优先级的调度算法。调度算法可以去适应应用程序,而不会扰乱底层的操作系统调度器。
用户级线程可以在任何操作系统中运行,不需要对底层内核进行修改以支持用户级线程。线程库是一组供所有应用程序共享的应用级软件包。
Table 3.5 lists typical elements found in a process control block for an unthreaded OS. Of these, which should belong to a thread control block and which should belong to a process control block for a multithreaded system?
This will differ from system to system, but in general, resources are owned by the process and each thread has its own execution state. A few general comments about each category in Table 3.5:
表3.5列出了在一个没有线程的操作系统中进程控制块的基本元素。对于多线程系统,这些元素中哪些可能属于线程控制块,哪些可能属于进程控制块?
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-aWrtFn71-1683979954941)(D:#######\Typora\os\1843722-20210108164135430-1225869098.png)]
这对于不同的系统来说通常是不同的,但一般来说,进程是资源的所有者,而每个线程都有它自己的执行状态。关于表3.5中的每一项的一些结论如下:
List two disadvantages of ULTs compared to KLTs.
列出用户级线程相较于内核级线程的两个缺点。
Define jacketing.
Jacketing converts a blocking system call into a nonblocking system call by using an application-level I/O routine which checks the status of the I/O device.
定义”套管“jacketing.
Jacketing通过调用一个应用级的I/O例程来检查I/O设备的状态,从而将一个产生阻塞的系统调用转化为一个不产生阻塞的系统调用。
List four design issues for which the concept of concurrency is relevant.
Communication among processes, sharing of and competing for resources, synchronization of the activities of multiple processes, and allocation of processor time to processes.
进程之间的通信、资源的共享和竞争、多个进程活动的同步以及为进程分配处理器时间。
列出与并发相关的4个设计问题。
What are three contexts in which concurrency arises?
Multiple applications, structured applications, operating-system
产生并发的三种上下文是什么?
What is the basic requirement for the execution of concurrent processes?
The ability to enforce mutual exclusion.
执行并发进程的最基本要求是什么?
最基本要求是增加进程间的互斥能力。
List three degrees of awareness between processes and briefly define each.
Processes unaware of each other: These are independent processes that are not intended to work together.
列出进程间的三种互相知道的程度,并简要给出各自的定义。
What is the distinction between competing processes and cooperating processes?
Competing processes need access to the same resource at the same time, such as a disk, file, or printer. Cooperating processes either share access to a common object, such as a memory buffer or are able to communicate with each other, and cooperate in the performance of some application or activity.
竞争进程和合作进程间有何区别?
竞争进程需要同时访问相同的资源,像磁盘,文件或打印机。合作进程要么共享访问一个共有的资源,像一个内存访问区,要么就与其他进程相互通信,在一些应用程序或活动上进行合作。
List the three control problems associated with competing processes and briefly define each.
Mutual exclusion: competing processes can only access a resource that both wish to access one at a time; mutual exclusion mechanisms must enforce this one-at-a-time policy. Deadlock: if competing processes need exclusive access to more than one resource then deadlock can occur if each processes gained control of one resource and is waiting for the other resource. Starvation: one of a set of competing processes may be indefinitely denied access to a needed resource because other members of the set are monopolizing that resource.
列出与竞争进程相关的三个控制问题,并简要给出各自的定义。
List the requirements for mutual exclusion.
列出对互斥的要求。
要提供对互斥的支持,必须满足以下要求:
What operations can be performed on a semaphore?
在信号量上可以执行什么操作?
为达到预期效果,可把信号量视为-一个值为整数的变量,整数值上定义了三个操作:
What is the difference between binary and general semaphores?
A binary semaphore may only take on the values 0 and 1. A general semaphore may take on any integer value.
二进制信号量只能取0和1的值。通用信号量可以取任何整数值。
二元信号量和一般信号量有何区别?
What is the difference between strong and weak semaphores?
A strong semaphore requires that processes that are blocked on that semaphore are unblocked using a first-in-first-out policy. A weak semaphore does not dictate the order in which blocked processes are unblocked.
强信号量和弱信号量有何区别?
强信号量要求在信号量上等待的进程按照先进先出的规则从队列中移出。弱信号量没有此规则。
What is a monitor?
A monitor is a programming language construct providing abstract data types and mutually exclusive access to a set of procedures
什么是管程?
管程是由一个或多个过程,一个初始化序列和局部数据组成的软件模块,其主要特定如下:
我的答案: B正确答案: B
10分
我的答案: D正确答案: D
10分
我的答案: D正确答案: D
10分
我的答案: D正确答案: D
10分
我的答案: D正确答案: D
10分
我的答案: D正确答案: D
10分
我的答案: B正确答案: B
10分
我的答案: B正确答案: B
10分
我的答案: D正确答案: D
10分
我的答案: B正确答案: B
10分
Give examples of reusable and consumable resources.
Examples of reusable resources are processors, I/O channels, main and secondary memory, devices, and data structures such as files, databases, and semaphores. Examples of consumable resources are interrupts, signals, messages, and information in I/O buffers.
给出可重用资源和可消耗资源的例子。
What are the three conditions that must be present for deadlock to be possible?
Mutual exclusion. Only one process may use a resource at a time.
产生死锁的三个必要条件是什么?
What are the four conditions that create deadlock?
The above three conditions, plus: Circular wait. A closed chain of processes exists, such that each process holds at least one resource needed by the next process in the chain.
产生死锁的 4个条件是什么?
How can the hold-and-wait condition be prevented?
The hold-and-wait condition can be prevented by requiring that a process request all of its required resources at one time, and blocking the process until all requests can be granted simultaneously.
如何防止占有且等待条件?
为预防占有且等待的条件,可以要求进程一次性地请求所有 需要的资源,并阻塞这个进程直到所有请求都同时满足。这种方法有两个方面的低效性。首先,一个进程可能被阻塞很长时间,以等待满足其所有的资源请求。而实际上,只要有一部分资源, 它就可以继续执行。其次,分配给一个进程的资源可能会在相当长的一段时间不会被该进程使用,且不能被其他进程使用。另一个问题是一个进程可能事先并不知道它所需要的所有资源。
List two ways in which the no-preemption condition can be prevented.
First, if a process holding certain resources is denied a further request, that process must release its original resources and, if necessary, request them again together with the additional resource. Alternatively, if a process requests a resource that is currently held by another process, the operating system may preempt the second process and require it to release its resources.
给出防止不可抢占条件的两种方法。
How can the circular-wait condition be prevented?
The circular-wait condition can be prevented by defining a linear ordering of resource types. If a process has been allocated resources of type R, then it may subsequently request only those resources of types following R in the ordering.
如何防止循环等待条件?
循环等待条件可通过定义资源类型的线性顺序来预防。若一 个进程已分配了R类型的资源,则其接下来求的资源只能是那些排在R类型之后的资源。为证明这种策略的正确性,我们给每种资源类型指定一个下标。 当i<j时,资源R排在资源R,前面。现在假设两个进程A和B死锁,原因是A获得R并请求R,而B获得R,并请求R,那么这个条件不可能,因为这意味着i<j且j<i。
What is the difference among deadlock avoidance, detection, and prevention?
Deadlock prevention constrains resource requests to prevent at least one of the four conditions of deadlock; this is either done indirectly, by preventing one of the three necessary policy conditions (mutual exclusion, hold and wait, no preemption), or directly, by preventing circular wait.
死锁避免、 检测和预防之间的区别是什么?
处理死锁通常有三种方法:预防、检测和避免。
死锁预防通过确保不满足死锁的一个必要条件来避免发生死锁。
操作系统总是同意资源请求时,需要进行死锁检测。操作系统必须周期性地检查死锁,并采取行动打破死锁。
死锁避免涉及分析新的资源请求,以确定它是否会导致死锁,且仅当不可能发生死锁时才同意该请求。
What are some reasons to allow two or more processes to all have access to a particular region of memory?
If a number of processes are executing the same program, it is advantageous to allow each process to access the same copy of the program rather than have its own separate copy. Also, processes that are cooperating on some task may need to share access to the same data structure.
允许两个或多 个进程访问内存某一特定区域的原因是什么?
任何保护机制都必须具有一定的灵活性,以允许多个进程访问内存的同一部分。例如,多个进程正在执行同一个程序时,允许每个进程访问该程序的同一个副本,要比让每个进程有自己单独的副本更有优势。合作完成同一个任务的进程可能需要共享访问相同的数据结构。因此,内存管理系统在不损害基本保护的前提下,必允许对内存共享区域进行受控访问。我们将会看到用于支持重定位的机制也支持共享。
In a fixed-partitioning scheme, what are the advantages of using unequal-size
By using unequal-size fixed partitions: 1. It is possible to provide one or
在固定分区方案中,使用大小不等的分区有何好处?
可缓解因程序太大而无法放到固定大小的分区和因程序太小产生大量内部碎片的问题。
What is the difference between a page and a segment?
An alternative way in which the user program can be subdivided is segmentation. In this case, the program and its associated data are divided into a number of segments. It is not required that all segments of all programs be of the same length, although there is a maximum segment length.
页和段有何区别?
页大小相等,段可以大小不等;分页对程序员来说是透明的,而分段通常是可见的。
Why is it not possible to enforce memory protection at compile time?
Because the location of a program in main memory is unpredictable, it is impossible to check absolute addresses at compile time to assure protection. Furthermore, most programming languages allow the dynamic calculation of addresses at run time, for example by computing an array subscript or a pointer into a data structure. Hence all memory references generated by a process must be checked at run time to ensure that they refer only to the memory space allocated to that
为何不可能在编译时实施内存保护?
由于程序在内存中的位置不可预测,因而在编译时不可能检查绝对地址来确保保护。此外,大多数程序设计语言允许在运行时进行地址的动态计算。因此必须在运行时检查进程产生的所有内存访问。
What are the distinctions among logical, relative, and physical addresses?
A logical address is a reference to a memory location independent of the current assignment of data to memory; a translation must be made to a physical address before the memory access can be achieved. A relative address is a particular example of logical address, in which the address is expressed as a location relative to some known point, usually the beginning of the program. A physical address, or absolute address, is an actual location in main memory.
逻辑地址、相对地址和物理地址有何区别?
What is the difference between internal and external fragmentation?
Internal fragmentation refers to the wasted space internal to a partition due to the fact that the block of data loaded is smaller than the partition. External fragmentation is a phenomenon associated with dynamic partitioning, and refers to the fact that a large number of small areas of main memory external to any partition accumulates.
内部碎片和外部碎片有何区别?
What is the difference between a page and a frame?
In a paging system, programs and data stored on disk or divided into equal, fixed-sized blocks called pages, and main memory is divided into blocks of the same size called frames. Exactly one page can fit in one frame.
页和页框有何区别?
What requirements is memory management intended to satisfy?
Relocation, protection, sharing, logical organization, physical organization.
内存管理需要满足哪些需求?
Why is the capability to relocate processes desirable?
Typically, it is not possible for the programmer to know in advance which other programs will be resident in main memory at the time of execution of his or her program. In addition, we would like to be able to swap active processes in and out of main memory to maximize processor utilization by providing a large pool of ready processes to execute. In both these cases, the specific location of the process in main memory is unpredictable.
为何需要重定位进程的能力?
在多道程序设计系统中,可用的内存空间通常被多个进程共享。通常情况下,程序员事先并不知道在某个程序执行期间会有其他哪些程序驻留在内存中。此外,我们还希望提供一个巨大的就绪进程池,以便把活动进程换入或换出内存,进而使处理器的利用率最大化。程序换出到磁盘中后,下次换入时要放到与换出前相同的内存区域会很困难。相反,我们需要把进程重定位(relocate) 到内存的不同区域。
我的答案: B
10分
我的答案: B
10分
我的答案: D
10分
我的答案: C
10分
我的答案: C
10分
我的答案: B
10分
我的答案: A
10分
我的答案: A
10分
我的答案: B
10分
我的答案: B
10分
Briefly define the alternative page fetch policies.
With demand paging, a page is brought into main memory only when a reference is made to a location on that page. With prepaging, pages other than the one demanded by a page fault are brought in.
简单定义两种可供选择的页面读取策略。
请求分页,只有当访问到某页中的一个单元时才将该页取入内存。若内存管理的其他策略比较合适,将发生下述情况:当一个进程首次启动时,会在一段时间出现大量的缺页中断:取入越来越多的页后,局部性原理表明大多数将来访问的页都是最近读取的页。因此,在一段时间后错误会逐渐减少,缺页中断的数量会降到很低。
预先分页,读取的页并不是缺页中断请求的页。预先分页利用了大多数辅存设备(如磁盘)的特性,这些设备有寻道时间和合理的延迟。若一 个进程的页连续存储在辅存中,则一次读取许多连续的页要比隔一段时间读取一 页有效。 当然,若大多数额外读取的页未引用到,则这个策略是低效的。
What elements are typically found in a page table entry? Briefly define each element.
the sequential number that identifies a page in main memory; present bit: indicates whether this page is currently in main memory;
哪些元素是页表项中能找到的典型元素?简单定义每个元素。
What is the relationship between FIFO and clock page replacement algorithms?
The clock policy is similar to FIFO, except that in the clock policy, any frame with a use bit of 1 is passed over by the algorithm.
FIFO 和时钟页面置换算法有何联系?
最简单的时钟策略需要给每个页框关联一个称为使用位的附加位。FIFO和时钟页面置换算法都会扫描缓冲区,FIFO直接置换出最老的页,而在时钟策略中会跳过使用位为1的页框。
What is the difference between resident set management and page replacement policy?
Resident set management deals with the following two issues:
(1) how many page frames are to be allocated to each active process;
(2) whether the set of pages to be considered for replacement should be limited to those of the process that caused the page fault or encompass all the page frames in main memory. Page replacement policy deals with the following issue: among the set of pages considered, which particular page should be selected for replacement.
驻留集管理和页面置换策略有何区别?
驻留集管理的概念为:
(1)给每个活动进程分配多少页框。
(2)计划置换的页集是局限于那些缺页中断的进程,还是局限于所有页框都在内存中的进程。
置换策略的概念为:在计划置换的页集中,选择换出哪一页。
Why is it not possible to combine a global replacement policy and a fixed allocation policy?
Because a fixed allocation policy requires that the number of frames allocated to a process is fixed, when it comes time to bring in a new page for a process, one of the resident pages for that process must be swapped out (to maintain the number of frames allocated at the same amount), which is a local replacement policy.
为什么不能把全局置换策略和固定分配策略组合起来?
因为固定分配策略下,驻留集的大小是固定不变的,从内存中移出的一页必须由同一个进程的另一页置换。
What is accomplished by page buffering?
(1) If a page is taken out of a resident set but is soon needed, it is still
页缓冲实现什么功能?
为提升性能,不丢弃置换出的页,被置换出的页任然驻留在内存中。因此,若进程访问该页,则可迅速返回该进程的驻留集,且代价很小。
What is the difference between a resident set and a working set?
The resident set of a process is the current number of pages of that process in main memory.
The working set of a process is the number of pages of that process that have been referenced recently.
驻留集和工作集有何区别?
驻留集表示进程在内存中的页集,工作集表示进程在过去的一段时间中被访问到的页集。
What is the purpose of a translation lookaside buffer?
The TLB is a cache that contains those page table entries that have been most recently used. Its purpose is to avoid, most of the time, having to go to disk to retrieve a page table entry.
转换检测缓冲区的目的是什么?
原则上,每次虚存访问都可能会引起两次物理内存访问:一次取相应的页表项,另一次取需要的数据。因此,简单的虚拟内存方案会导致内存访问时间加倍。为克服这个问题,大多数虚拟内存方案都为页表项使用了一个特殊的高速缓存,通常称为转换检测缓冲区(TranslationLookaside Buffer, TLB)。
Why is the principle of locality crucial to the use of virtual memory?
Algorithms can be designed to exploit the principle of locality to avoid thrashing. In general, the principle of locality allows the algorithm to predict which resident pages are least likely to be referenced in the near future and are therefore good candidates for being swapped out.
为何在使用虚拟内存时,局部性原理至关重要?
局部性原理描述了一个进程中程序和数据引用的集簇倾向。因此,假设在很短的时间内仅需要进程的一部分块是合理的。同时,还可以对将来可能会访问的块进行猜测,从而避免系统抖动。局部性原理表明虚拟内存方案是可行的。
Explain thrashing.
Thrashing is a phenomenon in virtual memory schemes, in which the processor spends most of its time swapping pieces rather than executing instructions.
什么是抖动?
当操作系统读取一块内存时,它必须把另一块换出。 如果一块正好在将要用到之前换出,操作系统就不得不很快地把它取回。这类操作通常会导致一种称为系统抖动(thrashing)的情况。这样会使处理器的大部分时间都用于交换块而非执行指令。
What is the difference between simple paging and virtual memory paging?
Simple paging: all the pages of a process must be in main memory for process to run, unless overlays are used. Virtual memory paging: not all pages of a process need be in main memory frames for the process to run.; pages may be read in as needed
简单分页与虚拟内存分页有何区别?
进程运行时,简单分页的所有页必须都在内存中,除非使用了覆盖技术,虚存分页并非所有页都须在内存页框中,仅在需要时才读入页,把一页读入内存可能需要把另一页写出到磁盘。
Briefly describe the three types of processor scheduling.
简要描述三种类型的处理器调度。
长程调度:决定加入待执行进程池。
中称调度:决定加入部分或全部位于内存中的进程集合。
短程调度: 决定可用I/O设备处理哪个进程挂起的I/O请求。
What is usually the critical performance requirement in an interactive operating system?
在交互式操作系统中,通常最重要的性能要求是什么?
响应时间
What is the difference between turnaround time and response time?
周转时间和响应时间有何区别?
周转时间指一个进程从提交到完成之间的时间间隔,包括实际执行时间和等待资源(包括处理器资源)的时间;
响应时间指从提交一个请求到开始接收响应之间的时间间隔。
For process scheduling, does a low-priority value represent a low priority or a high priority?
对于进程调度, 较小的优先级值是表示较低的优先级还是表示较高的优先级?
What is the difference between preemptive and nonpreemptive scheduling?
抢占式调度和非抢占式调度有何区别?
Briefly define FCFS scheduling.
简单定义FCFS调度。
每个进程就绪后,会加入就绪队列。当前正运行的进程停止执行时,选择就绪队列中存在时间最长的进程运行。
Briefly define round-robin scheduling.
简单定义轮转调度。
这种算法周期性地产生时钟中断,出现中断时,当前正运行的进程会放置到就绪队列中,然后基于FCFS策略选择下一个就绪作业运行。
Briefly define shortest-process-next scheduling.
简单定义最短进程优先调度。
这是一个非抢占策略,其原则是下次选择预计处理时间最短的进程。
Briefly define shortest-remaining-time scheduling.
简单定义最短剩余时间调度。
最短剩余时间是在SPN中增加了抢占机制的策略。在这种情况下,调度程序总是选择预期剩余时间最短的进程。
Briefly define highest-response-ratio-next scheduling.
简单定义最高响应比优先调度。
当前进程完成或被阻塞时,选择R值最大的就绪进程。调度决策基于对归一化周转时间的估计。
Briefly define feedback scheduling.
简单定义反馈调度。
调度基于抢占原则并使用动态优先级机制。建立一组调度队列,基于每个进程的执行历史和其他一 些规则,把它们分配到各个队列中。
B
B
C
D
B
C
A
A
C
F
A
C
D
B
C
C
C
List and briefly define three techniques for performing I/O.
列出并简单定义执行 I/O 的三种技术。
What is the difference between logical I/O and device I/O?
逻辑 I/O 和设备 I/O 有什么区别?
逻辑 I/O:逻辑 I/O 模块把设备当作一个逻辑资源来处理,它并不关心实际控制设备的细节。逻辑 I/O 模块代表用户进程管理的一般 I/O 功能,允许它们根据设备标识符以及诸如打开、关闭、读、写之类的简单命令与设备打交道。
设备 I/O:请求的操作和数据(缓冲的数据、记录等)被转换成适当的 I/O 指令序列、通道命令和控制器命令。可以使用缓冲技术,以提高使用率。
What is the difference between block-oriented devices and stream-oriented devices?
面向块的设备和面向流的设备有什么区别?请举例说明。
Why would you expect improved performance using a double buffer rather than a single buffer for I/O?
为什么希望用双缓冲区而不是单缓冲区来提高 I/O 的性能?
对于面向块的传送,我们可以粗略地估计执行时间为max[C,T]。因此,若C<= T,则有可能使面向块的设备全速运行;另一方面,若C>T,则双缓冲能确保该进程不需要等待I/O。
What delay elements are involved in a disk read or write?
在磁盘读或写时有哪些延迟因素?
Briefly define the disk scheduling policies illustrated in Figure 11.7.
简单定义图 11.7 中描述的磁盘调度策略。
Briefly define the seven RAID levels.
简单定义图 7 层 RAID。
What is the typical disk sector size?
典型的磁盘扇区大小是多少?
512 Byte
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。