操作系统概念第七版1-3章习题答案(中文版)

合集下载

操作系统概念第七版习题答案(中文版)完整版之欧阳术创编

操作系统概念第七版习题答案(中文版)完整版之欧阳术创编

1.1 在多道程序和分时环境中,多个用户同时共享一个系统,这种情况导致多种安全问题。

a. 列出此类的问题b.在一个分时机器中,能否确保像在专用机器上一样的安全度?并解释之。

Answer:a.窃取或者复制某用户的程序或数据;没有合理的预算来使用资源(CPU,内存,磁盘空间,外围设备)b.应该不行,因为人类设计的任何保护机制都会不可避免的被另外的人所破译,而且很自信的认为程序本身的实现是正确的是一件困难的事。

1.2 资源的利用问题在各种各样的操作系统中出现。

试例举在下列的环境中哪种资源必须被严格的管理。

(a)大型电脑或迷你电脑系统(b)与服务器相联的工作站(c)手持电脑Answer: (a)大型电脑或迷你电脑系统:内存和 CPU 资源,外存,网络带宽(b)与服务器相联的工作站:内存和 CPU 资源(c)手持电脑:功率消耗,内存资源1.3 在什么情况下一个用户使用一个分时系统比使用一台个人计算机或单用户工作站更好?Answer:当另外使用分时系统的用户较少时,任务十分巨大,硬件速度很快,分时系统有意义。

充分利用该系统可以对用户的问题产生影响。

比起个人电脑,问题可以被更快的解决。

还有一种可能发生的情况是在同一时间有许多另外的用户在同一时间使用资源。

当作业足够小,且能在个人计算机上合理的运行时,以及当个人计算机的性能能够充分的运行程序来达到用户的满意时,个人计算机是最好的,。

1.4 在下面举出的三个功能中,哪个功能在下列两种环境下,(a)手持装置(b)实时系统需要操作系统的支持?(a)批处理程序(b)虚拟存储器(c)分时Answer:对于实时系统来说,操作系统需要以一种公平的方式支持虚拟存储器和分时系统。

对于手持系统,操作系统需要提供虚拟存储器,但是不需要提供分时系统。

批处理程序在两种环境中都是非必需的。

1.5 描述对称多处理(SMP)和非对称多处理之间的区别。

多处理系统的三个优点和一个缺点?Answer:SMP意味着所以处理器都对等,而且I/O 可以在任何处理器上运行。

操作系统 习题答案(中文版)

操作系统  习题答案(中文版)

操作系统概第七版中文版习题答案(全)1.1在多道程序和分时环境中,多个用户同时共享一个系统,这种情况导致多种安全问题。

a. 列出此类的问题 b.在一个分时机器中,能否确保像在专用机器上一样的安全度?并解释之。

答:a.窃取或者复制某用户的程序或数据;没有合理的预算来使用资源(CPU,内存,磁盘空间,外围设备)b.应该不行,因为人类设计的任何保护机制都会不可避免的被另外的人所破译,而且很自信的认为程序本身的实现是正确的是一件困难的事。

1.2资源的利用问题在各种各样的操作系统中出现。

试例举在下列的环境中哪种资源必须被严格的管理。

(a)大型电脑或迷你电脑系统(b)与服务器相联的工作站(c)手持电脑答:(a)大型电脑或迷你电脑系统:内存和CPU资源,外存,网络带宽(b)与服务器相联的工作站:内存和CPU资源(c)手持电脑:功率消耗,内存资源1.3在什么情况下一个用户使用一个分时系统比使用一台个人计算机或单用户工作站更好?答:当另外使用分时系统的用户较少时,任务十分巨大,硬件速度很快,分时系统有意义。

充分利用该系统可以对用户的问题产生影响。

比起个人电脑,问题可以被更快的解决。

还有一种可能发生的情况是在同一时间有许多另外的用户在同一时间使用资源。

当作业足够小,且能在个人计算机上合理的运行时,以及当个人计算机的性能能够充分的运行程序来达到用户的满意时,个人计算机是最好的,。

1.4在下面举出的三个功能中,哪个功能在下列两种环境下,(a)手持装置(b)实时系统需要操作系统的支持?(a)批处理程序(b)虚拟存储器(c)分时答:对于实时系统来说,操作系统需要以一种公平的方式支持虚拟存储器和分时系统。

对于手持系统,操作系统需要提供虚拟存储器,但是不需要提供分时系统。

批处理程序在两种环境中都是非必需的。

1.5描述对称多处理(SMP)和非对称多处理之间的区别。

多处理系统的三个优点和一个缺点?答:SMP意味着所以处理器都对等,而且I/O可以在任何处理器上运行。

操作系统概念第七版习题答案(中文版)完整版之欧阳语创编

操作系统概念第七版习题答案(中文版)完整版之欧阳语创编

1.1 在多道程序和分时环境中,多个用户同时共享一个系统,这种情况导致多种安全问题。

a. 列出此类的问题b.在一个分时机器中,能否确保像在专用机器上一样的安全度?并解释之。

Answer:a.窃取或者复制某用户的程序或数据;没有合理的预算来使用资源(CPU,内存,磁盘空间,外围设备)b.应该不行,因为人类设计的任何保护机制都会不可避免的被另外的人所破译,而且很自信的认为程序本身的实现是正确的是一件困难的事。

1.2 资源的利用问题在各种各样的操作系统中出现。

试例举在下列的环境中哪种资源必须被严格的管理。

(a)大型电脑或迷你电脑系统(b)与服务器相联的工作站(c)手持电脑Answer: (a)大型电脑或迷你电脑系统:内存和 CPU 资源,外存,网络带宽(b)与服务器相联的工作站:内存和 CPU 资源(c)手持电脑:功率消耗,内存资源1.3 在什么情况下一个用户使用一个分时系统比使用一台个人计算机或单用户工作站更好?Answer:当另外使用分时系统的用户较少时,任务十分巨大,硬件速度很快,分时系统有意义。

充分利用该系统可以对用户的问题产生影响。

比起个人电脑,问题可以被更快的解决。

还有一种可能发生的情况是在同一时间有许多另外的用户在同一时间使用资源。

当作业足够小,且能在个人计算机上合理的运行时,以及当个人计算机的性能能够充分的运行程序来达到用户的满意时,个人计算机是最好的,。

1.4 在下面举出的三个功能中,哪个功能在下列两种环境下,(a)手持装置(b)实时系统需要操作系统的支持?(a)批处理程序(b)虚拟存储器(c)分时Answer:对于实时系统来说,操作系统需要以一种公平的方式支持虚拟存储器和分时系统。

对于手持系统,操作系统需要提供虚拟存储器,但是不需要提供分时系统。

批处理程序在两种环境中都是非必需的。

1.5 描述对称多处理(SMP)和非对称多处理之间的区别。

多处理系统的三个优点和一个缺点?Answer:SMP意味着所以处理器都对等,而且I/O 可以在任何处理器上运行。

操作系统概念第七版习题答案(中文版)完整版之欧阳体创编

操作系统概念第七版习题答案(中文版)完整版之欧阳体创编

1.1 在多道程序和分时环境中,多个用户同时共享一个系统,这种情况导致多种安全问题。

a. 列出此类的问题b.在一个分时机器中,能否确保像在专用机器上一样的安全度?并解释之。

Answer:a.窃取或者复制某用户的程序或数据;没有合理的预算来使用资源(CPU,内存,磁盘空间,外围设备)b.应该不行,因为人类设计的任何保护机制都会不可避免的被另外的人所破译,而且很自信的认为程序本身的实现是正确的是一件困难的事。

1.2 资源的利用问题在各种各样的操作系统中出现。

试例举在下列的环境中哪种资源必须被严格的管理。

(a)大型电脑或迷你电脑系统(b)与服务器相联的工作站(c)手持电脑Answer: (a)大型电脑或迷你电脑系统:内存和 CPU 资源,外存,网络带宽(b)与服务器相联的工作站:内存和 CPU 资源(c)手持电脑:功率消耗,内存资源1.3 在什么情况下一个用户使用一个分时系统比使用一台个人计算机或单用户工作站更好?Answer:当另外使用分时系统的用户较少时,任务十分巨大,硬件速度很快,分时系统有意义。

充分利用该系统可以对用户的问题产生影响。

比起个人电脑,问题可以被更快的解决。

还有一种可能发生的情况是在同一时间有许多另外的用户在同一时间使用资源。

当作业足够小,且能在个人计算机上合理的运行时,以及当个人计算机的性能能够充分的运行程序来达到用户的满意时,个人计算机是最好的,。

1.4 在下面举出的三个功能中,哪个功能在下列两种环境下,(a)手持装置(b)实时系统需要操作系统的支持?(a)批处理程序(b)虚拟存储器(c)分时Answer:对于实时系统来说,操作系统需要以一种公平的方式支持虚拟存储器和分时系统。

对于手持系统,操作系统需要提供虚拟存储器,但是不需要提供分时系统。

批处理程序在两种环境中都是非必需的。

1.5 描述对称多处理(SMP)和非对称多处理之间的区别。

多处理系统的三个优点和一个缺点?Answer:SMP意味着所以处理器都对等,而且I/O 可以在任何处理器上运行。

操作系统概念第七版答案(含编程代码)

操作系统概念第七版答案(含编程代码)

操作系统概念第七版答案(含编程代码)Operating system concepts(Seventh edition) 2021.3solutions to the exercisesChapter 11.1 In a multiprogramming and time-sharing environment, several usersshare the system simultaneously. This situation can result in various security problems. a. What are two such problems? b. Can we ensure the same degree of security in a time-shared machine as in a dedicated machine? Explain your answer.Answer: a. Stealing or copying one’s programs or data; using systemresources (CPU, memory, disk space, peripherals) without proper accounting.b. Probably not, since any protection scheme devised by humans caninevitably be broken by a human, and the more complex the scheme, the moredifficult it is to feel confident of its correct implementation.1.2 The issue of resource utilization shows up in different forms indifferent types of operating systems. List what resources must be managedcarefully in the following settings: a. Mainframe or minicomputer systems b. Workstations connected to servers c. Handheld computersAnswer:a. Mainframes:memory and CPU resources, storage, network bandwidth.b. Workstations: memory and CPU resoucesc. Handheld computers: power consumption, memory resources.1.3 Under what circumstances would a user be better off using atimesharing system rather than a PC or single-user workstation?Answer: When there are few other users, the task is large, and thehardware is fast, time-sharingmakes sense. The full power of the system can be brought to bear on the user’s problem. The problemcan be solved faster thanon a personal computer. Another case occurs when lots of other users need resources at the same time.A personal computer is best when the job is small enough to be executed reasonably on it and when performance is sufficient to execute the program tothe user’s satisfaction.1.4 Which of the functionalities listed below need to be supported by the operating system for the following two settings: (a) handheld devices and (b)real-time systems. a. Batch programming b. Virtual memory c. TimesharingAnswer: For real-time systems, the operating system needs to supportvirtual memoryOperating system concepts(Seventh edition) 2021.3and time sharing in a fair manner. For handheld systems,the operatingsystem needs to provide virtual memory, but does not need to provide time-sharing. Batch programming is not necessary in both settings.1.5 Describe the differences between symmetric and asymmetric multiprocessing.What are three advantages and one disadvantage ofmultiprocessor systems?Answer: Symmetric multiprocessing treats all processors as equals, and I/Ocan be processed on any CPU. Asymmetric multiprocessing has one master CPU andthe remainder CPUs are slaves. The master distributes tasks among the slaves,and I/O is usually done by the master only.Multiprocessors can save money by not duplicating power supplies,housings,and peripherals. They can execute programs more quickly and can have increased reliability. They are also more complex in both hardware and software than uniprocessor systems.1.6 How do clustered systems differ from multiprocessor systems? What is required for two machines belonging to a cluster to cooperate to provide ahighly available service?Answer: Clustered systems are typically constructed by combining multiple computers into a single system to perform a computational task distributedacross the cluster. Multiprocessor systems on the other hand could be a singlephysical entity comprising of multiple CPUs. A clustered system is lesstightly coupled than a multiprocessor system.Clustered systems communicateusing messages, while processors in a multiprocessor system could communicate using shared memory.In order for twomachines to provide a highly available service, the stateon the two machines should be replicated and should be consistently updated. When one of the machines fail, the other could then take-over thefunctionality of the failed machine.1.7 Distinguish between the client-server and peer-to-peer models of distributed systems.Answer: The client-server model firmly distinguishes the roles of theclient and server. Under this model, the client requests services that are provided by the server. The peer-to-peer model doesn’t have such strict roles.In fact, all nodes in the system are considered peers and thus may act aseither clients or servers - or both. A node may request a service from another peer, or the node may in fact provide such a service to other peers in the system.For example, let’s consider a system of nodes that share cookingrecipes.Under the client-server model, all recipes are stored with the server.If a client wishes to access a recipe, it must request the recipe from the specified server. Using the peer-to-peer model, a peer node could ask otherpeer nodes for the specified recipe.Operating system concepts(Seventh edition) 2021.3The node (or perhaps nodes) with the requested recipe could provide it tothe requesting node. Notice how each peer may act as both a client (i.e. itmay request recipes) and as a server (it may provide recipes.)1.8 Consider a computing cluster consisting of twonodes runningadatabase.Describe two ways in which the cluster software can manage access tothe data on the disk. Discuss the benefits and disadvantages of each.Answer: Consider the following two alternatives: asymmetric clustering and parallel clustering. With asymmetric clustering, one host runs the database application with the other host simply monitoring it. If the server fails, the monitoring host becomes the active server. This is appropriate for providingredundancy. However, it does not utilize the potential processing power ofboth hosts. With parallel clustering, the database application can run inparallel on both hosts. The difficulty implementing parallel clusters isproviding some form of distributed locking mechanism for files on the shared disk.1.9 How are network computers different from traditional personalcomputers? Describe some usage scenarios in which it is advantageous to use network computers.Answer: A network computer relies on a centralized computer for most ofits services. It can therefore have a minimal operating system to manage its resources. A personal computer on the other hand has to be capable ofproviding all of the required functionality in a standalonemanner withoutrelying on a centralized manner. Scenarios where administrative costs are highand where sharing leads to more efficient use of resources are precisely those settings where network computers are preferred.1.10 What is the purpose of interrupts? What are the differences between a trap and an interrupt? Can traps be generated intentionally by a user program?If so, for what purpose?Answer: An interrupt is a hardware-generated change-of-flow within the system. An interrupt handler is summoned to deal with the cause of theinterrupt; control is then returned to the interrupted context and instruction.A trap is a software-generated interrupt. An interrupt can be used to signalthe completion of an I/O to obviate the need for device polling. A trap can be used to call operating system routines or to catch arithmetic errors.1.11 Direct memory access is used for high-speed I/O devices in order toavoid increasing the CPU′s execution load.a. How does the CPU interface with the device to coordinate the transfer?b. How does the CPU know when the memory operations are complete?c. The CPU is allowed to execute other programs while the DMA controllerisOperating system concepts(Seventh edition) 2021.3transferring data. Does this process interfere with the execution of theuser programs? If so, describe what forms of interference are caused.Answer: The CPU can initiate a DMA operation by writing values into special registers that can be independently accessed by the device.The device initiates the corresponding operation once it receives a command from the CPU. When the device is finished with its operation, it interrupts the CPU to indicate the completion of the operation.Both the device and the CPU can be accessing memory simultaneously.The memory controller provides access to the memory bus in a fair manner to these two entities. A CPU might therefore be unable to issue memory operations at peak speeds since it has to compete with the device in order to obtain access to the memory bus.1.12 Some computer systems do not provide a privileged mode of operation in hardware. Is it possible to construct a secure operating system for these computer systems? Give arguments both that it is and that it is not possible.Answer: An operating system for a machine of this type would need to remain in control (or monitor mode) at all times. This could be accomplished by two methods:a. Software interpretation of all user programs (like some BASIC,Java, and LISP systems, for example). The software interpreter would provide, in software, what the hardware does not provide.b. Require meant that all programs be written in high-level languages so that all object code is compiler-produced. The compiler would generate (either in-line or by function calls) the protection checks that the hardware is missing.1.13 Give two reasons why caches are useful.What problems do they solve? What problems do they cause? If a cache can be made as large as the device for which it is caching (for instance, a cache as large as a disk), why not makeit that large and eliminate the device?Answer: Caches are useful when two or more components need to exchange data, and the components perform transfers at differing speeds.Caches solve the transfer problem by providing a buffer of intermediate speed between the components. If the fast device finds the data it needs in the cache, it need not wait for the slower device. The data in the cache must be kept consistent with the data in the components. If a omponent has a data value change, and the datum is also in the cache, the cache must also be updated. This is especially a problem on multiprocessor systemswhere more than one process maybe accessing a datum.Acomponent may be eliminated by an equal-sized cache, but only if: (a) the cache and the component have equivalent state-saving capacity (that is,if the component retains its data when electricity is removed, thecache must retain data as well), and (b) the cache is affordable, becausefaster storage tends to be more expensive.Operating system concepts(Seventh edition) 2021.31.14 Discuss, with examples, how the problem of maintaining coherence of cached data manifests itself in the following processing environments: a.Single-processor systems b. Multiprocessor systems c. Distributed systemsAnswer: In single-processor systems, the memory needs to be updated when a processor issues updates to cached values. These updates can be performed immediately or in a lazy manner. In amultiprocessor system,differentprocessors might be caching the same memory location in its local caches. When updates are made, the other cached locations need to be invalidated or updated.In distributed systems, consistency of cached memory values is not an issue. However, consistency problems might arise when a client caches file data.1.15 Describe a mechanism for enforcing memory protection in order toprevent a program from modifying the memory associated with other programs.Answer: The processor could keep track of what locations are associatedwith each process and limit access to locations that are outside of aprogram’s extent. Information regarding the extent of a program’s memorycould be maintained by using base and limits registers and by performing acheck for every memory access.1.16 What network configuration would best suit the following environments?a. A dormitory floorb. A university campusc. A stated. A nationAnswer:a. A dormitory floor - A LAN.b. A university campus - A LAN, possible a WAN for very large campuses.c.A state - AWAN. d. A nation - A WAN.1.17 Define the essential properties of the following types of operating systems: a. Batchb. Interactivec. Time sharingd. Real timee. Networkf. Parallelg. Distributedh. Clusteredi. Handheld感谢您的阅读,祝您生活愉快。

操作系统概念第七版习题答案完整版

操作系统概念第七版习题答案完整版

1.1 在多道程序和分时环境中,多个用户同时共享一个系统,这种情况导致多种安全问题。

a. 列出此类的问题 b. 在一个分时机器中,能否确保像在专用机器上一样的安全度?并解释之。

Answer:a. 窃取或者复制某用户的程序或数据;没有合理的预算来使用资源(CPU内存,磁盘空间,外围设备)b.应该不行,因为人类设计的任何保护机制都会不可避免的被另外的人所破译,而且很自信的认为程序本身的实现是正确的是一件困难的事。

1.2资源的利用问题在各种各样的操作系统中出现。

试例举在下列的环境中哪种资源必须被严格的管理。

(a)大型电脑或迷你电脑系统(b)与服务器相联的工作站(c)手持电脑An swer: (a)大型电脑或迷你电脑系统:内存和CPU资源,外存,网络带宽(b)与服务器相联的工作站:内存和CPU资源(c)手持电脑:功率消耗,内存资源1.3在什么情况下一个用户使用一个分时系统比使用一台个人计算机或单用户工作站更好?Answer: 当另外使用分时系统的用户较少时,任务十分巨大,硬件速度很快,分时系统有意义。

充分利用该系统可以对用户的问题产生影响。

比起个人电脑,问题可以被更快的解决。

还有一种可能发生的情况是在同一时间有许多另外的用户在同一时间使用资源。

当作业足够小,且能在个人计算机上合理的运行时,以及当个人计算机的性能能够充分的运行程序来达到用户的满意时,个人计算机是最好的,。

1.4在下面举出的三个功能中,哪个功能在下列两种环境下,(a) 手持装置(b)实时系统需要操作系统的支持?(a)批处理程序(b)虚拟存储器(c) 分时An swer:对于实时系统来说,操作系统需要以一种公平的方式支持虚拟存储器和分时系统。

对于手持系统,操作系统需要提供虚拟存储器,但是不需要提供分时系统。

批处理程序在两种环境中都是非必需的。

1.5描述对称多处理(SMP )和非对称多处理之间的区别。

多处理系统的三个优点和一个缺点?Answer: SMP意味着所以处理器都对等,而且I/O 可以在任何处理器上运行。

操作系统概念(中文版)课后答案1分析解析36页文档

操作系统概念(中文版)课后答案1分析解析36页文档

操作系统概念(中文版)课后答案1分析 解析
1、战鼓一响,法律无声。——英国 2、任何法律的根本;不,不成文法本 身就是 讲道理 ……法 律,也 ----即 明示道 理。— —爱·科 克
3、法律是最保险的头盔。——爱·科 克 4、一个国家如果纲纪不正,其国风一 定颓败 。—— 塞内加 5、法律不能使人人平等,但是在法律 面前人 人是平 等的。 ——波 洛克
ห้องสมุดไป่ตู้
谢谢
11、越是没有本领的就越加自命不凡。——邓拓 12、越是无能的人,越喜欢挑剔别人的错儿。——爱尔兰 13、知人者智,自知者明。胜人者有力,自胜者强。——老子 14、意志坚强的人能把世界放在手中像泥块一样任意揉捏。——歌德 15、最具挑战性的挑战莫过于提升自我。——迈克尔·F·斯特利

操作系统概念第七版习题答案(中文版)完整版之欧阳家百创编

操作系统概念第七版习题答案(中文版)完整版之欧阳家百创编

1.1 在多道程序和分时环境中,多个用户同时共享一个系统,这种情况导致多种安全问题。

a. 列出此类的问题 b.在一个分时机器中,能否确保像在专用机器上欧阳家百(2021.03.07)一样的安全度?并解释之。

Answer:a.窃取或者复制某用户的程序或数据;没有合理的预算来使用资源(CPU,内存,磁盘空间,外围设备)b.应该不行,因为人类设计的任何保护机制都会不可避免的被另外的人所破译,而且很自信的认为程序本身的实现是正确的是一件困难的事。

1.2 资源的利用问题在各种各样的操作系统中出现。

试例举在下列的环境中哪种资源必须被严格的管理。

(a)大型电脑或迷你电脑系统(b)与服务器相联的工作站(c)手持电脑Answer: (a)大型电脑或迷你电脑系统:内存和 CPU 资源,外存,网络带宽(b)与服务器相联的工作站:内存和 CPU 资源(c)手持电脑:功率消耗,内存资源1.3 在什么情况下一个用户使用一个分时系统比使用一台个人计算机或单用户工作站更好?Answer:当另外使用分时系统的用户较少时,任务十分巨大,硬件速度很快,分时系统有意义。

充分利用该系统可以对用户的问题产生影响。

比起个人电脑,问题可以被更快的解决。

还有一种可能发生的情况是在同一时间有许多另外的用户在同一时间使用资源。

当作业足够小,且能在个人计算机上合理的运行时,以及当个人计算机的性能能够充分的运行程序来达到用户的满意时,个人计算机是最好的,。

1.4 在下面举出的三个功能中,哪个功能在下列两种环境下,(a)手持装置(b)实时系统需要操作系统的支持?(a)批处理程序(b)虚拟存储器(c)分时Answer:对于实时系统来说,操作系统需要以一种公平的方式支持虚拟存储器和分时系统。

对于手持系统,操作系统需要提供虚拟存储器,但是不需要提供分时系统。

批处理程序在两种环境中都是非必需的。

1.5 描述对称多处理(SMP)和非对称多处理之间的区别。

多处理系统的三个优点和一个缺点?Answer:SMP意味着所以处理器都对等,而且I/O 可以在任何处理器上运行。

操作系统概念第七版习题答案(中文版)完整版之欧阳法创编

操作系统概念第七版习题答案(中文版)完整版之欧阳法创编

1.1 在多道程序和分时环境中,多个用户同时共享一个系统,这种情况导致多种安全问题。

a. 列出此类的问题b.在一个分时机器中,能否确保像在专用机器上一样的安全度?并解释之。

Answer:a.窃取或者复制某用户的程序或数据;没有合理的预算来使用资源(CPU,内存,磁盘空间,外围设备)b.应该不行,因为人类设计的任何保护机制都会不可避免的被另外的人所破译,而且很自信的认为程序本身的实现是正确的是一件困难的事。

1.2 资源的利用问题在各种各样的操作系统中出现。

试例举在下列的环境中哪种资源必须被严格的管理。

(a)大型电脑或迷你电脑系统(b)与服务器相联的工作站(c)手持电脑Answer: (a)大型电脑或迷你电脑系统:内存和CPU 资源,外存,网络带宽(b)与服务器相联的工作站:内存和 CPU 资源(c)手持电脑:功率消耗,内存资源1.3 在什么情况下一个用户使用一个分时系统比使用一台个人计算机或单用户工作站更好?Answer:当另外使用分时系统的用户较少时,任务十分巨大,硬件速度很快,分时系统有意义。

充分利用该系统可以对用户的问题产生影响。

比起个人电脑,问题可以被更快的解决。

还有一种可能发生的情况是在同一时间有许多另外的用户在同一时间使用资源。

当作业足够小,且能在个人计算机上合理的运行时,以及当个人计算机的性能能够充分的运行程序来达到用户的满意时,个人计算机是最好的,。

1.4 在下面举出的三个功能中,哪个功能在下列两种环境下,(a)手持装置(b)实时系统需要操作系统的支持?(a)批处理程序(b)虚拟存储器(c)分时Answer:对于实时系统来说,操作系统需要以一种公平的方式支持虚拟存储器和分时系统。

对于手持系统,操作系统需要提供虚拟存储器,但是不需要提供分时系统。

批处理程序在两种环境中都是非必需的。

1.5 描述对称多处理(SMP)和非对称多处理之间的区别。

多处理系统的三个优点和一个缺点?Answer:SMP意味着所以处理器都对等,而且I/O 可以在任何处理器上运行。

操作系统概念第七版答案

操作系统概念第七版答案

操作系统概念第七版答案【篇一:操作系统概念第七版答案(含编程代码)】> chapter 11.1 in a multiprogramming and time-sharing environment, several users share the system simultaneously. this situation can result in various security problems. a. what are two such problems?b. can we ensure the same degree of security in a time-shared machine as in a dedicated machine? explain your answer.answer:a. stealing or copying one’s programs or data; using system resources (cpu, memory, disk space, peripherals) without proper accounting.b. probably not, since any protection scheme devised by humans can inevitably be broken by a human, and the more complex the scheme, the more difficult it is to feel confident of its correct implementation.1.2 the issue of resource utilization shows up in different forms in different types of operating systems. list what resources must be managedcarefully in the following settings: a. mainframe or minicomputer systems b. workstations connected to serversc. handheld computersanswer:a. mainframes:memory and cpu resources, storage, network bandwidth.b. workstations: memory and cpu resoucesc. handheld computers: power consumption, memory resources.1.3 under what circumstances would a user be better off using a timesharing system rather than a pc or single-user workstation?answer: when there are few other users, the task is large, and the hardware is fast, time-sharingmakes sense. the full power of the system can be brought to bear on the user’s problem. the problemcan be solved faster than on a personal computer. another case occurs when lots of other users need resources at the same time.a personal computer is best when the job is small enough to be executed reasonably on it and when performance is sufficient to execute the prog ram to the user’s satisfaction.1.4 which of the functionalities listed below need to be supported by the operating system for the following two settings: (a) handheld devices and (b) real-time systems. a. batch programmingb. virtual memoryc. time sharinganswer: for real-time systems, the operating system needs to support virtual memoryand time sharing in a fair manner. for handheld systems,the operating system needs to provide virtual memory, but does not need to provide time-sharing. batch programming is not necessary in both settings.1.5 describe the differences between symmetric and asymmetric multiprocessing.what are three advantages and one disadvantage of multiprocessor systems?answer: symmetric multiprocessing treats all processors as equals, and i/o can be processed on any cpu. asymmetric multiprocessing has one master cpu and the remainder cpus are slaves. the master distributes tasks among the slaves, and i/o is usually done by the master only.multiprocessors can save money by not duplicating power supplies,housings, and peripherals. they can execute programs more quickly and can have increased reliability. they are also more complex in both hardware and software than uniprocessor systems.1.6 how do clustered systems differ from multiprocessor systems? what is required for two machines belonging to a cluster to cooperate to provide a highly available service?answer: clustered systems are typically constructed by combining multiple computers into a single system to perform a computational task distributed across the cluster. multiprocessor systems on the other hand could be a single physical entity comprising of multiple cpus. a clustered system is less tightly coupled than a multiprocessorsystem.clustered systems communicate using messages, while processors in a multiprocessor system could communicate using shared memory.in order for twomachines to provide a highly available service, the state on the two machines should be replicated and shouldbe consistently updated. when one of the machines fail, the other could then take-over the functionality of the failed machine.1.7 distinguish between the client-server and peer-to-peer models of distributed systems.answer: the client-server model firmly distinguishes the roles of the client and server. under this model, the client requests services that are provided by the server. the peer-to-peer model doesn’t have such strict roles. in fact, all nodes in the system are considered peers and thus may act as either clients or servers - or both. a node may request a service from another peer, or the node may in fact provide such a service to other peers in the system.for example, let’s consider a system of nodes tha t share cooking recipes.under the client-server model, all recipes are stored with the server. if a client wishes to access a recipe, it must request the recipe from the specified server. using the peer-to-peer model, a peer node could ask other peer nodesfor the specified recipe.the node (or perhaps nodes) with the requested recipe could provide it to the requesting node. notice how each peer may act as both a client (i.e. it may request recipes) and as a server (it may provide recipes.)1.8 consider a computing cluster consisting of twonodes running adatabase.describe two ways in which the cluster software can manage access to the data on the disk. discuss the benefits and disadvantages of each.answer: consider the following two alternatives: asymmetric clustering and parallel clustering. with asymmetric clustering, one host runs the database application with the other host simply monitoring it. if the server fails, the monitoring host becomes the active server. this is appropriate for providing redundancy. however, it does not utilize the potential processing power of both hosts. with parallel clustering, the database application can run in parallel on both hosts. the difficulty implementing parallel clusters is providing some form of distributed locking mechanism for files on the shared disk.1.9 how are network computers different from traditional personal computers? describe some usage scenarios in which it is advantageous to use network computers.answer: a network computer relies on a centralized computer for most of its services. it can therefore have a minimal operating system to manage its resources. a personal computer on the other hand has to be capable of providing all of the required functionality in a standalonemanner without relying on a centralized manner. scenarios where administrative costs are high and where sharing leads to more efficient use of resources are precisely those settings where network computers are preferred.1.10 what is the purpose of interrupts? what are the differences between a trap and an interrupt? can traps be generated intentionally by a user program? if so, for what purpose?answer: an interrupt is a hardware-generated change-of-flow within the system. an interrupt handler is summoned to deal with the cause of the interrupt; control is then returned to the interrupted context and instruction. a trap is a software-generated interrupt. an interrupt can be used to signal the completion of an i/o to obviate the need for device polling. a trap can be used to call operating system routines or to catch arithmetic errors.1.11 direct memory access is used for high-speed i/o devices in order to avoid increasing the cpu′s execution load.a. how does the cpu interface with the device to coordinate the transfer?b. how does the cpu know when the memory operations are complete?c. the cpu is allowed to execute other programs while the dma controller istransferring data. does this process interfere with the execution of the user programs? if so, describe what forms of interference are caused.answer: the cpu can initiate a dma operation by writing values into special registers that can be independently accessed by the device.the device initiates the corresponding operation once it receives a command from the cpu. when the device is finished with its operation, it interrupts the cpu to indicate the completion of the operation.both the device and the cpu can be accessing memory simultaneously.the memory controller provides access to the memory bus in a fair manner to these two entities.a cpu might therefore be unable to issue memory operationsat peak speeds since it has to compete with the device in order to obtain access to the memory bus.answer: an operating system for a machine of this type would need to remain in control (or monitor mode) at all times. this could be accomplished by two methods:a. software interpretation of all user programs (like some basic,java, and lisp systems, for example). the software interpreter would provide, in software, what the hardware does not provide.b. require meant that all programs be written in high-level languages so that all object code is compiler-produced. the compiler would generate (either in-line or by function calls) the protection checks that the hardware is missing.1.13 give two reasons why caches are useful.what problems do they solve? what problems do they cause? if a cache canbe made as large as the device for which it is caching (for instance, a cache as large as a disk), why not make it that large and eliminate the device?answer: caches are useful when two or more components need to exchange data, and the components perform transfers at differing speeds.caches solve the transfer problem by providing a buffer of intermediate speed between the components. if the fast device finds the data it needs in the cache, it need not wait for the slower device. the data in the cache must be kept consistent with the data in the components. if a omponent has a data value change, and the datum is also in the cache, the cache must also be updated. this is especially a problem on multiprocessor systemswhere more than one process may be accessing adatum.acomponent may be eliminated by an equal-sized cache, but only if: (a) the cache and the component have equivalent state-saving capacity (that is,if the component retains its data when electricity is removed, the cache must retain data as well), and (b) the cache is affordable, because faster storage tends to be more expensive.1.14 discuss, with examples, how the problem of maintaining coherence of cached data manifests itself in the following processing environments:a. single-processor systemsb. multiprocessor systemsc. distributed systemsanswer: in single-processor systems, the memory needs tobe updated when a processor issues updates to cached values. these updates can be performed immediately or in a lazy manner. in amultiprocessor system,different processors might be caching the same memory location in its local caches. when updates are made, the other cached locations need to be invalidated or updated. in distributed systems, consistency of cached memory values is not an issue. however, consistency problems might arise when a client caches file data.1.15 describe a mechanism for enforcing memory protectionin order to prevent a program from modifying the memory associated with other programs.answer: the processor could keep track of what locations are associated with each process and limit access to locationsthat are outside of a program’s extent. informatio n regarding the extent of a program’s memory could be maintained by using base and limits registers and by performing a check for every memory access.1.16 what network configuration would best suit the following environments? a. a dormitory floorb. a university campusc. a stated. a nationanswer:a. a dormitory floor - a lan.b. a university campus - a lan, possible a wan for very large campuses.c. a state - awan.d. a nation - a wan.1.17 define the essential properties of the following types of operating systems: a. batchb. interactivec. time sharingd. real timee. networkf. parallelg. distributedh. clusteredi. handheld【篇二:操作系统概念第七版4-6章课后题答案(中文版)】举两个多线程程序设计的例子来说明多线程不比单线程方案提高性能答:1)任何形式的顺序程序对线程来说都不是一个好的形式。

操作系统概念第七版习题答案(中文版)完整版

操作系统概念第七版习题答案(中文版)完整版

操作系统概念第七版习题答案(中文版)完整版操作系统概念第七版习题答案(中文版)完整版本文为《操作系统概念第七版习题答案(中文版)》的完整版,旨在提供对该书中习题的详细解答和解析。

以下将按照章节顺序,逐一介绍各章习题的解答及相应的说明。

第一章:引言1. 操作系统的定义操作系统是计算机体系结构的重要组成部分。

它是一种软件,用于管理计算机硬件资源和提供用户与计算机系统之间的接口。

操作系统的主要目标是实现对计算机系统的控制和协调,以确保计算机系统的正确运行。

2. 操作系统的功能操作系统具有以下主要功能:- 管理系统资源:操作系统负责管理计算机系统的硬件资源,包括内存、CPU、硬盘和外部设备等。

- 提供用户接口:操作系统提供了用户与计算机系统之间的接口,使用户能够方便地使用计算机。

- 调度任务:操作系统根据一定的调度算法,决定进程的执行顺序,以实现对系统资源的合理利用。

- 存储管理:操作系统管理计算机的内存资源,为进程分配内存空间,并进行内存的读写操作。

- 文件系统:操作系统负责管理计算机系统中的文件,包括文件的创建、读写和删除等操作。

- 错误处理:操作系统能够检测和处理可能出现的错误,确保计算机系统的稳定和安全。

第二章:进程与线程1. 进程与线程的概念及区别进程是计算机系统中正在运行的程序的实例。

一个进程由程序、数据和进程控制块组成,拥有独立的内存空间和系统资源。

线程是进程中的一个实体,是进程的执行单位,共享进程的数据空间和系统资源。

进程和线程的主要区别在于资源的占用和拥有关系,进程拥有独立的资源,而线程共享进程的资源。

2. 进程调度算法常见的进程调度算法包括先来先服务(FCFS)、短作业优先(SJF)、最高优先权调度(HPF)、时间片轮转调度(RR)等。

不同的调度算法适用于不同的场景和需求,可以根据系统的实际情况选择合适的调度算法。

第三章:处理机调度与死锁1. 死锁的概念死锁是指系统中若干进程因竞争系统资源而陷入无限等待的状态,无法继续执行下去。

操作系统概念课后习题答案

操作系统概念课后习题答案

操作系统概念课后习题答案操作系统概念课后习题答案第一章:引论1.操作系统的定义:操作系统是计算机系统中的一个软件层,它管理和控制计算机硬件资源,为用户和应用程序提供接口和服务。

2.操作系统的功能:处理器管理、存储器管理、设备管理、文件管理和用户界面等。

第二章:进程管理1.进程的概念:进程是一个正在执行的程序的实例,它由代码、数据和执行环境组成。

2.进程状态:就绪、运行和阻塞。

3.进程调度算法:先来先服务、最短作业优先、时间片轮转和优先级调度等。

第三章:线程管理1.线程的概念:线程是进程的一个执行单元,一个进程可以包含多个线程。

2.线程与进程的区别:线程共享相同的地质空间和文件描述符,而进程拥有独立的地质空间和文件描述符。

3.线程模型:用户级线程模型和内核级线程模型。

第四章:内存管理1.内存管理的目标:实现内存的分配与回收、内存的保护和共享。

2.内存分配的概念:连续分配、非连续分配和虚拟内存分配。

3.地质转换:逻辑地质到物理地质的转换过程,包括分段、分页和段页式等。

第五章:存储器管理1.存储器的层次结构:主存储器、辅助存储器和高速缓存。

2.页面置换算法:最佳置换算法、先进先出算法、最近最久未使用算法和时钟置换算法等。

3.虚拟内存的概念:将存储器抽象成一组连续的地质空间,实现大容量存储和地质共享。

第六章:设备管理1.设备管理的功能:设备分配、设备驱动程序和设备中断处理等。

2.设备分配算法:先来先服务、最短作业优先和轮转法等。

3.磁盘调度算法:先来先服务、最短寻道时间优先和扫描算法等。

第七章:文件管理1.文件的概念:文件是命名的、有序的数据集合,它是操作系统中最基本的数据组织方式。

2.文件系统的组织结构:层次式文件系统、索引式文件系统和线性文件系统等。

3.文件共享与保护:文件锁机制、权限控制和访问控制列表等。

第八章:I/O系统1.I/O系统的组成部分:I/O设备、I/O控制器和设备驱动程序等。

2.I/O操作的方式:程序控制I/O和中断驱动I/O。

操作系统概念第七版课后答案

操作系统概念第七版课后答案

操作系统概念第七版课后答案
1. 什么是操作系统?
操作系统是一种软件,它是一个控制和管理计算机硬件和软
件资源的系统软件,它提供了一个接口,使用户可以更容易地使
用计算机系统。

它提供了一个抽象层,使用户可以更容易地使用
计算机系统,而不必关心底层的硬件细节。

操作系统还提供了一
系列服务,如文件管理、设备管理、内存管理、进程管理、网络
管理等,以及一些其他的功能,如安全性、可靠性、可移植性等。

2. 操作系统的功能有哪些?
操作系统的功能主要包括:
(1)文件管理:操作系统提供文件管理功能,用户可以创建、删除、移动、复制、搜索和更改文件。

(2)设备管理:操作系统提供设备管理功能,用户可以控制
和管理计算机系统中的各种外部设备,如打印机、磁盘驱动器、
显示器等。

(3)内存管理:操作系统提供内存管理功能,用户可以控制
和管理计算机系统中的内存,以便更有效地利用内存资源。

(4)进程管理:操作系统提供进程管理功能,用户可以控制
和管理计算机系统中的各种进程,以便更有效地利用处理器资源。

(5)网络管理:操作系统提供网络管理功能,用户可以控制
和管理计算机系统中的网络,以便更有效地利用网络资源。

(6)安全性:操作系统提供安全性功能,用户可以控制和管
理计算机系统中的安全性,以便更有效地保护系统资源。

(7)可靠性:操作系统提供可靠性功能,用户可以控制和管
理计算机系统中的可靠性,以便更有效地保证系统的可靠性。

(8)可移植性:操作系统提供可移植性功能,用户可以控制
和管理计算机系统中的可移植性,以便更有效地实现系统的可移
植性。

操作系统概念第七版1-3章习题答案(中文版)

操作系统概念第七版1-3章习题答案(中文版)

1.1在多道程序和分时环境中,多个用户同时共享一个系统,这种情况导致多种安全问题。

a. 列出此类的问题b.在一个分时机器中,能否确保像在专用机器上一样的安全度?并解释之。

Answer:a.窃取或者复制某用户的程序或数据;没有合理的预算来使用资源(CPU,内存,磁盘空间,外围设备)b.应该不行,因为人类设计的任何保护机制都会不可避免的被另外的人所破译,而且很自信的认为程序本身的实现是正确的是一件困难的事。

1.2资源的利用问题在各种各样的操作系统中出现。

试例举在下列的环境中哪种资源必须被严格的管理。

(a)大型电脑或迷你电脑系统(b)与服务器相联的工作站(c)手持电脑Answer:(a)大型电脑或迷你电脑系统:内存和CPU资源,外存,网络带宽(b)与服务器相联的工作站:内存和CPU资源(c)手持电脑:功率消耗,内存资源1.3在什么情况下一个用户使用一个分时系统比使用一台个人计算机或单用户工作站更好?Answer:当另外使用分时系统的用户较少时,任务十分巨大,硬件速度很快,分时系统有意义。

充分利用该系统可以对用户的问题产生影响。

比起个人电脑,问题可以被更快的解决。

还有一种可能发生的情况是在同一时间有许多另外的用户在同一时间使用资源。

当作业足够小,且能在个人计算机上合理的运行时,以及当个人计算机的性能能够充分的运行程序来达到用户的满意时,个人计算机是最好的,。

1.4在下面举出的三个功能中,哪个功能在下列两种环境下,(a)手持装置(b)实时系统需要操作系统的支持?(a)批处理程序(b)虚拟存储器(c)分时Answer:对于实时系统来说,操作系统需要以一种公平的方式支持虚拟存储器和分时系统。

对于手持系统,操作系统需要提供虚拟存储器,但是不需要提供分时系统。

批处理程序在两种环境中都是非必需的。

1.5描述对称多处理(SMP)和非对称多处理之间的区别。

多处理系统的三个优点和一个缺点?Answer:SMP意味着所以处理器都对等,而且I/O可以在任何处理器上运行。

操作系统概念第七版习题答案(中文版)完整版之欧阳歌谷创编

操作系统概念第七版习题答案(中文版)完整版之欧阳歌谷创编

1.1 在多道程序和分时环境中,多个用户同时共享一个系统,这种情况导致多种安全问题。

a. 列出此类的问题b.在一个分时机器中,能否确保像在专用机器上欧阳歌谷(2021.02.01)一样的安全度?并解释之。

Answer:a.窃取或者复制某用户的程序或数据;没有合理的预算来使用资源(CPU,内存,磁盘空间,外围设备)b.应该不行,因为人类设计的任何保护机制都会不可避免的被另外的人所破译,而且很自信的认为程序本身的实现是正确的是一件困难的事。

1.2 资源的利用问题在各种各样的操作系统中出现。

试例举在下列的环境中哪种资源必须被严格的管理。

(a)大型电脑或迷你电脑系统(b)与服务器相联的工作站(c)手持电脑Answer: (a)大型电脑或迷你电脑系统:内存和 CPU 资源,外存,网络带宽(b)与服务器相联的工作站:内存和 CPU 资源(c)手持电脑:功率消耗,内存资源1.3 在什么情况下一个用户使用一个分时系统比使用一台个人计算机或单用户工作站更好?Answer:当另外使用分时系统的用户较少时,任务十分巨大,硬件速度很快,分时系统有意义。

充分利用该系统可以对用户的问题产生影响。

比起个人电脑,问题可以被更快的解决。

还有一种可能发生的情况是在同一时间有许多另外的用户在同一时间使用资源。

当作业足够小,且能在个人计算机上合理的运行时,以及当个人计算机的性能能够充分的运行程序来达到用户的满意时,个人计算机是最好的,。

1.4 在下面举出的三个功能中,哪个功能在下列两种环境下,(a)手持装置(b)实时系统需要操作系统的支持?(a)批处理程序(b)虚拟存储器(c)分时Answer:对于实时系统来说,操作系统需要以一种公平的方式支持虚拟存储器和分时系统。

对于手持系统,操作系统需要提供虚拟存储器,但是不需要提供分时系统。

批处理程序在两种环境中都是非必需的。

1.5 描述对称多处理(SMP)和非对称多处理之间的区别。

多处理系统的三个优点和一个缺点?Answer:SMP意味着所以处理器都对等,而且I/O 可以在任何处理器上运行。

操作系统概念第七版习题答案(中文版)完整版之欧阳文创编

操作系统概念第七版习题答案(中文版)完整版之欧阳文创编

1.1 在多道程序和分时环境中,多个用户同时共享一个系统,这种情况导致多种安全问题。

a. 列出此类的问题 b.在一个分时机器中,能否确保像在专用机器上一样的安全度?并解释之。

Answer:a.窃取或者复制某用户的程序或数据;没有合理的预算来使用资源(CPU,内存,磁盘空间,外围设备)b.应该不行,因为人类设计的任何保护机制都会不可避免的被另外的人所破译,而且很自信的认为程序本身的实现是正确的是一件困难的事。

1.2 资源的利用问题在各种各样的操作系统中出现。

试例举在下列的环境中哪种资源必须被严格的管理。

(a)大型电脑或迷你电脑系统(b)与服务器相联的工作站(c)手持电脑Answer: (a)大型电脑或迷你电脑系统:内存和 CPU 资源,外存,网络带宽(b)与服务器相联的工作站:内存和 CPU 资源(c)手持电脑:功率消耗,内存资源1.3 在什么情况下一个用户使用一个分时系统比使用一台个人计算机或单用户工作站更好?Answer:当另外使用分时系统的用户较少时,任务十分巨大,硬件速度很快,分时系统有意义。

充分利用该系统可以对用户的问题产生影响。

比起个人电脑,问题可以被更快的解决。

还有一种可能发生的情况是在同一时间有许多另外的用户在同一时间使用资源。

当作业足够小,且能在个人计算机上合理的运行时,以及当个人计算机的性能能够充分的运行程序来达到用户的满意时,个人计算机是最好的,。

1.4 在下面举出的三个功能中,哪个功能在下列两种环境下,(a)手持装置(b)实时系统需要操作系统的支持?(a)批处理程序(b)虚拟存储器(c)分时Answer:对于实时系统来说,操作系统需要以一种公平的方式支持虚拟存储器和分时系统。

对于手持系统,操作系统需要提供虚拟存储器,但是不需要提供分时系统。

批处理程序在两种环境中都是非必需的。

1.5 描述对称多处理(SMP)和非对称多处理之间的区别。

多处理系统的三个优点和一个缺点?Answer:SMP意味着所以处理器都对等,而且 I/O 可以在任何处理器上运行。

操作系统概念课后习题答案

操作系统概念课后习题答案

操作系统概念课后习题答案操作系统概念课后习题答案第一章:引论⒈操作系统的功能和目标是什么?答:操作系统的功能包括了进程管理、内存管理、文件系统管理、设备管理等。

操作系统的目标是提高计算机系统的资源利用率,提供简单易用的用户界面,保证计算机系统的安全和稳定性。

⒉什么是并发性?并行性?有什么区别?答:并发性是指计算机系统中存在多个独立的任务同时执行的能力。

并行性是指系统中同时执行多个任务的能力。

并行性强调多个任务的同时进行,而并发性强调任务的独立性。

⒊什么是中断?有什么作用?答:中断是指计算机执行过程中出现的一种特殊事件,用于打断正在执行的程序,转而执行中断处理程序。

中断的作用是能够及时响应输入/输出设备的请求以及处理发生的异常情况。

⒋什么是多道程序设计?答:多道程序设计是指将多个程序加载到内存中,并按照一定的调度算法来分时共享处理器和其他资源。

⒌什么是虚拟内存?答:虚拟内存是计算机系统通过借助硬盘空间来扩展内存空间的一种技术。

它将部分物理内存空间映射到磁盘上,使得程序可以访问比实际物理内存更大的地质空间。

第二章:进程管理⒈什么是进程?什么是线程?答:进程是指在操作系统中运行的程序的实例,它包括了程序代码、数据和执行状态等。

线程是进程中的一个执行单元,一个进程可以包含多个线程,它们共享进程的资源。

⒉进程的状态有哪些?请描述每个状态的含义。

答:进程的状态包括了就绪状态、运行状态、阻塞状态。

就绪状态表示进程已经具备运行的条件,等待分配处理器资源。

运行状态表示进程正在执行。

阻塞状态表示进程由于某种原因暂时无法继续执行。

⒊进程调度算法有哪些?请简要描述每个算法的特点。

答:常见的进程调度算法有先来先服务(FCFS)、短作业优先(SJF)、优先级调度、时间片轮转等。

FCFS按照进程的到达顺序进行调度,适用于长作业。

SJF按照进程的执行时间进行调度,适用于短作业。

优先级调度根据进程的优先级进行调度。

时间片轮转将处理器时间分成若干个时间片,每个进程获得一个时间片。

操作系统概念(中文版)第七版课后习题答案word1——12章

操作系统概念(中文版)第七版课后习题答案word1——12章

1.1在多道程序和分时环境中,多个用户同时共享一个系统,这种情况导致多种安全问题。

a. 列出此类的问题b.在一个分时机器中,能否确保像在专用机器上一样的安全度?并解释之。

Answer:a.窃取或者复制某用户的程序或数据;没有合理的预算来使用资源(CPU,内存,磁盘空间,外围设备)b.应该不行,因为人类设计的任何保护机制都会不可避免的被另外的人所破译,而且很自信的认为程序本身的实现是正确的是一件困难的事。

1.2资源的利用问题在各种各样的操作系统中出现。

试例举在下列的环境中哪种资源必须被严格的管理。

(a)大型电脑或迷你电脑系统(b)与服务器相联的工作站(c)手持电脑Answer:(a)大型电脑或迷你电脑系统:内存和CPU资源,外存,网络带宽(b)与服务器相联的工作站:内存和CPU资源(c)手持电脑:功率消耗,内存资源1.3在什么情况下一个用户使用一个分时系统比使用一台个人计算机或单用户工作站更好?Answer:当另外使用分时系统的用户较少时,任务十分巨大,硬件速度很快,分时系统有意义。

充分利用该系统可以对用户的问题产生影响。

比起个人电脑,问题可以被更快的解决。

还有一种可能发生的情况是在同一时间有许多另外的用户在同一时间使用资源。

当作业足够小,且能在个人计算机上合理的运行时,以及当个人计算机的性能能够充分的运行程序来达到用户的满意时,个人计算机是最好的,。

1.4在下面举出的三个功能中,哪个功能在下列两种环境下,(a)手持装置(b)实时系统需要操作系统的支持?(a)批处理程序(b)虚拟存储器(c)分时Answer:对于实时系统来说,操作系统需要以一种公平的方式支持虚拟存储器和分时系统。

对于手持系统,操作系统需要提供虚拟存储器,但是不需要提供分时系统。

批处理程序在两种环境中都是非必需的。

1.5描述对称多处理(SMP)和非对称多处理之间的区别。

多处理系统的三个优点和一个缺点?Answer:SMP意味着所以处理器都对等,而且I/O可以在任何处理器上运行。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1.1在多道程序和分时环境中,多个用户同时共享一个系统,这种情况导致多种安全问题。

a. 列出此类的问题b.在一个分时机器中,能否确保像在专用机器上一样的安全度?并解释之。

Answer:a.窃取或者复制某用户的程序或数据;没有合理的预算来使用资源(CPU,内存,磁盘空间,外围设备)b.应该不行,因为人类设计的任何保护机制都会不可避免的被另外的人所破译,而且很自信的认为程序本身的实现是正确的是一件困难的事。

1.2资源的利用问题在各种各样的操作系统中出现。

试例举在下列的环境中哪种资源必须被严格的管理。

(a)大型电脑或迷你电脑系统(b)与服务器相联的工作站(c)手持电脑Answer:(a)大型电脑或迷你电脑系统:内存和CPU资源,外存,网络带宽(b)与服务器相联的工作站:内存和CPU资源(c)手持电脑:功率消耗,内存资源1.3在什么情况下一个用户使用一个分时系统比使用一台个人计算机或单用户工作站更好?Answer:当另外使用分时系统的用户较少时,任务十分巨大,硬件速度很快,分时系统有意义。

充分利用该系统可以对用户的问题产生影响。

比起个人电脑,问题可以被更快的解决。

还有一种可能发生的情况是在同一时间有许多另外的用户在同一时间使用资源。

当作业足够小,且能在个人计算机上合理的运行时,以及当个人计算机的性能能够充分的运行程序来达到用户的满意时,个人计算机是最好的,。

1.4在下面举出的三个功能中,哪个功能在下列两种环境下,(a)手持装置(b)实时系统需要操作系统的支持?(a)批处理程序(b)虚拟存储器(c)分时Answer:对于实时系统来说,操作系统需要以一种公平的方式支持虚拟存储器和分时系统。

对于手持系统,操作系统需要提供虚拟存储器,但是不需要提供分时系统。

批处理程序在两种环境中都是非必需的。

1.5描述对称多处理(SMP)和非对称多处理之间的区别。

多处理系统的三个优点和一个缺点?Answer:SMP意味着所以处理器都对等,而且I/O可以在任何处理器上运行。

非对称多处理有一个主处理器控制系统,与剩下的处理器是随从关系。

主处理器为从处理器安排工作,而且I/O也只在主处理器上运行。

多处理器系统能比单处理器系统节省资金,这是因为他们能共享外设,大容量存储和电源供给。

它们可以更快速的运行程序和增加可靠性。

多处理器系统能比单处理器系统在软、硬件上也更复杂(增加计算量、规模经济、增加可靠性)1.6集群系统与多道程序系统的区别是什么?两台机器属于一个集群来协作提供一个高可靠性的服务器的要求是什么?Answer:集群系统是由多个计算机耦合成单一系统并分布于整个集群来完成计算任务。

另一方面,多道程序系统可以被看做是一个有多个CPU组成的单一的物理实体。

集群系统的耦合度比多道程序系统的要低。

集群系统通过消息进行通信,而多道程序系统是通过共享的存储空间。

为了两台处理器提供较高的可靠性服务,两台机器上的状态必须被复制,并且要持续的更新。

当一台处理器出现故障时,另一台处理器能够接管故障处理的功能。

1.7试区分分布式系统(distribute system)的客户机-服务器(client-server)模型与对等系统(peer-to-peer)模型Answer:客户机-服务器(client-server)模型可以由客户机和服务器的角色被区分。

在这种模型下,客户机向服务器发出请求,然后服务器满足这种请求。

对等系统(peer-to-peer)模型没有这种严格的区分角色,。

实际上,在系统中的所有结点被看做是对等的,而且这些结点既可以是客户机也可以是服务器,或者两这都是。

也许一个结点从另一个对等结点上请求一个服务,或者,这个结点满足在系统中的另一个结点的请求。

比如,一个系统中的结点共享烹饪方法。

在客户机-服务器(client-server)模型下,所有方法都被存储在服务器上。

如果一个客户机想要获得烹饪方法,它必须向那台服务器发出请求。

在对等系统(peer-to-peer)模型下,一个结点可以向另外的结点请求指定的烹饪方法。

存储了这种烹饪方法的那个结点(或几个结点)可以把烹饪的方法提供给发出请求的结点。

注意每个对等结点既可以扮演客户机(发出请求),也可以扮演服务器(提供请求)。

1.8如果一个由两个结点组成的集群系统正在运行一个数据库,试描述集群软件可以用哪两种方法管理存取磁盘的数据,并说明每种方法的优点和缺点。

Answer:两种方法:非对称集群系统(asymmetric clustering)和并行集群系统(parallel clustering).对于非对称集群系统,一个主机运行这个数据库,而其它主机只是监测这个数据库。

如果服务器出现故障,进行监测的主机就会转变成运行这个数据库的主机。

这是提供适当的冗余。

然而,它没有利用具有潜在处理能力的主机。

对于并行集群系统,数据库可以在两个并行的主机上运行。

在并行集群系统上实现的困难是提供一些分布式锁机制给共享磁盘上的文件。

1.9网络计算机是怎样不同与传统的个人计算机的?试取出一些使用网络计算机的好处的方案。

Answer:网络计算机是基于一台核心的计算机作为其服务器。

同时,它也具有一个最小化的操作系统来管理这些资源。

另一方面,个人计算机必须在不依赖于核心计算机的基础上,能够独立提供所有被请求的功能。

在行政花费太高以及共享导致更高效的使用资源的情景下是精确的,在这些环境中网络计算机是理想的。

1.10中断(interupt)的目的是什么?陷阱(trap)与中断的区别是什么?陷阱可以被用户程序(user program)有意地的产生吗?如果可以,那目的是什么?Answer:中断是一种在系统内硬件产生的流量变化。

中断操作装置是用来处理中断请求;然后返回控制中断的上下文和指令。

陷阱是软件产生的中断。

中断可以被用来标志I/O的完成,从而排除设备投票站(device polling)的需要。

陷阱可以被用来调用操作系统的程序或者捕捉到算术错误。

1.11内存存储是被用于高速的I/O设备,其目的是为了避免增加CPU的过度运行。

(a)设备的CPU接口是怎样与转换器(transfer)协作的?(b)当内存操作完全时,CPU是怎么知道的?(c)当DMA控制器正在转换数据时,CPU是被允许运行其它程序的。

这种进程与用户程序的运行冲突吗?如果冲突的话,试描述可能引起哪种冲突?Answer:CPU可以通过写数据到可以被设备独立存储的寄存器中来启动DMA操作。

当设备接收到来自CPU的命令时,启动响应的操作。

当设备完成此操作时,就中断CPU来说明操作已经完成。

设备和CPU都可以被内存同时访问。

内存控制器对这两个实体以公平的方式给内存总线提供存取。

CPU可能不能同时以很快的速度配给给内存操作,因为它必须去竞争设备而使得自己存取到内存总线中去。

1.12一些计算机系统没有在硬件中提供个人模式(privileged mode)。

对于这种计算机系统来说,可能构成安全的操作系统吗?对可能和不可能两种情况分别给出理由。

Answer:一种类型处理器的操作系统需要在任何时候都被控制(或监测模式)。

有两种方法可以完成这个操作:a.所有用户程序的软件翻译(像一些BASIC,Java,LISP systems)。

在软件中,软件解释程序能够提供硬件所不能提供的。

b.要求所有程序都用高级语言编写,以便于所以目标代码都被编译出来。

编译器将会产生硬件忽略的防护性检查(in-line或功能调用)。

1.13给出缓存(caches)十分有用的两个理由。

他们解决了什么问题?他们引起了什么问题?如果缓存可以被做成装备想要缓存的容量(例如,缓存像磁盘那么大),为什么不把它做的那么大,其限制的原因是什么?Answer:当两个或者更多的部件需要交换数据,以及组成部件以不同的速度完成转换时,缓存是十分有用的。

缓存通过在个组成部件之间提供一个中间速度的缓冲区来解决转换问题。

如果速度较快的设备在缓存中发现它所要的数据,它就不需要再等待速度较慢的设备了。

缓存中的数据必须与组成部件中的要一致。

如果一个组成部件中的数据值改变了,缓存中的这个数据也必须更新。

在多进程系统中,当有不止一个进程可能进入同一个数据时,这就成了一个显著的问题。

一个组成部件将会被一个同等大小的组成部件所消除,但是只有当;(a)缓存和组成部件有相同状态存储能力(也就是,当断电的时候,组成部件还能保存它的数据,缓存也一样能保存它的数据),(b)缓存是可以负担的起的,因为速度更快的存储器意味着更高的价格。

1.14试举例说明在下列的进程环境中,快速缓冲贮存区的数据保持连贯性的问题是怎样表明的?(a)单道程序系统(Single-processor systems)(b)多道程序系统(Mulitiprocessor systems)(c)分布式系统(Distribute systems)Answer:在单道程序系统(Single-processor systems)中,当一个进程发布更新给快速缓冲贮存区的数据时,内存需要被更新。

这些更新一种快速的或缓慢的方式执行。

在多道程序系统(Mulitiprocessor systems)中,不同的进程或许在它的本地存储上存储相同的内存位置。

当更新发生时,其它存储的位置需要使其无效或更新。

在分布式系统(Distribute systems)中,快速存储区数据的协调不是问题,然而,当客户机存储文件数据时,协调问题就会被提及。

1.15试描述一个机器装置为了阻止一个程序避免修改与其它程序有联系的内存而执行内存保护。

Answer:处理器可以追踪哪个位置是与每个进程相联系的以及限制进入一个程序的范围的外面位置。

信息与一个程序的内存范围有关,它可以通过使用库,限制寄存器和对每个进入内存的信息执行检查来维持其本身。

1.16哪种网络结构最适合下列环境:(a)一个寝室楼层(b)一个大学校园(c)一个州(d)一个国家。

Answer:(a)一个寝室楼层:A LAN(b)一个大学校园: A LAN,possibly a WAN for a very large campuses.(c)一个州:A WAN(d)一个国家: A WAN1.17列出下列操作系统的基本特点:a.批处理b.交互式c.分时d.实时e.网络f.并行式g.分布式h.集群式i.手持式Answer: a.批处理:具有相似需求的作业被成批的集合起来,并把它们作为一个整体通过一个操作员或自动作业程序装置运行通过计算机。

通过缓冲区,线下操作,后台和多道程序,运用尝试保持CPU和I/O一直繁忙,从而使得性能被提高。

批处理系统对于运行那些需要较少互动的大型作业十分适用。

它们可以被更迟地提交或获得。

b.交互式:这种系统由许多短期交易构成,并且下一个交易的结果是无法预知的。

相关文档
最新文档