1、操作系统英文版课后习题答案整理word文档良心出品l.lWhat are the three main purpo ses of an op erat ing system? In terface betwee n the hardware and user;(2)man age the resource of hardware and software;(3)abstracti on of resource;Answer:To provide an environment kr a computer user tocat特 the 艺t?parattz resources of the co
2、mpuler as nteded to strive the prtjblem given* The allocation ptocess should be as fair and efficient as possible.Asa ctntroJ p agram it serves two major functions: (1) sup ervision of the execution of user programs to p re vent errors and improper use of the computer, and (2) management of the p er
3、at it) JI and control of /O devices.1.2List the four steps that are necessary to run a program on a completely dedicated machine. Prep rocess ing Process ing Linking Executi ng.Answer乩 Reserve machine time*b.Manually load program into memory.c.Load starting address and begin execution.d.Monitor and
4、control execution of program fnim ctnsoie.1.6Define the esse ntial prop erties of the follow ing types of op erat ing systems:a.Batchb.In teractivec.Time shari ngd.Real timee.Networkf.DistributedAnswera”b.c.Batch. Jobs with similar needs are batched together and run through the computer as a grcup b
5、y an operator or automatic job stquencer.咆jrformHrk:电 is increased by atteiTipting to keep CPU and I/O devices busv 試 all times through off-lineoperation, Kptx?ling, and multiprogramming* Batch is good for executing large jobs that netxl interaction; it can be siubmilted and picked up laterInteracti
6、ve. Thk in J of many short transactiorifd where the results ofthe next transaction may be unpredictable. Response rirne needs to be short (seconds since the user submils and wiih For the result.Time sharing. This systems u&es 匚n scheduling and mLiltiprt)gramming toprtividt* economical interactive of
7、 a system. The CP匚 占w 让 chem rap idly fnnn one user to another Instead of having a job defined by spooled card images each program redsits next control card from the terminal, and output is normally printed immediately to the screen.d.Real time. Often usvd in a dedicated application, tliis system re
8、ads information fram sensors and must respond within a fixed amount of time to ensure correct performance-Network.Distributed .This system distributes computation arntmg set?ral physical prtxzesKors, The prtcesstrs do not share memory or a cltKk. Instead, each prixessor has its twn kxzal memory. The
9、y communicate with each other through various communicatitm lines, such as a high-speed bus or telephone line.Wehave stressed the n eed for an op erat ing system to make efficie nt use of the comp ut ing1.7hardware. When is it approp riate for the op erat ing system to forsake this principle and to
10、waste resources? Why is such a system not really wasteful?Answer Single*user systems shtiuId maximize use of the systenn for the user. A GUI might “waste CPU cyniu)r mode, the operating system is assured of ctntrolling the entire system at all times.2.3What are the differe nces betwee n a tra p and
11、an in terru pt? What is the use of each fun cti on?Answer An interrupt is a ha rd w a re-genera ted change-of-flow within the system. An interrupt handler is summoned to deal with the ccks. Protections must also be checked to assure prtiper file access. User prtgrams could neither ensure adherence t
12、ct protection methexJs nor be trusted to allocate only free blocks and deallocate blocks on file deletion.Communications. Message passing between systems requires messages be turned into packets of information, sent to the network contnUlei; transmitted across a communications medium, and reassemble
13、d by the destination system. Packet ordering and data correction must take place. Again, user programs might not coordinate access to the network device, or they might reeviT packets destined for other processes. Error detection. Error detection occurs at both the hardware and sofirware levels. At t
14、he hardware le-el, all data transfers must be inspected to ensure that data have not been c(rrupted in transit AU data on media must bi checked to be sure they have not changed since they were written to the media. At the software level, media must be checked for data consistency; for instance, do t
15、he number of alltcated and unallocated blocks of storage match the total number on the device. There, errors are frequently prexzess-independent (for instance, the corruption of data on a disk), so there must be a global program (ttiE op erating system) that handles all type 吕 of errors. Also, by ha
16、ving errors processed by the operating system, processes need not contain code to catch and correct all thE errors possible on a systEm.3.7What is the purpose of system calls?Answer System ualls(j1Uw user-lewl lii request ices uf tl咤 uperdting sv;-tem.3.10 What is the purpose of system programs?jVns
17、wcr: Evstem programs can be thought of bundlcz uf useful systctu oils. Tbevprovide basic functicrahty to users and so users de not need to write their own programs to sol、忙 common problems.4.1MS-DOS pr ovided no means of con curre nt pr ocess ing. Discuss three major comp licati ons that con curre n
18、t p rocess ing adds to an op erat ing system.Answer:A method of time sharing must be implemented to allow each of several processes to have access to the systeni. This method inxoJvcs the prompt ion of processes that do not voluntarily giA-e up the CPU (by using a system cal, for instance) urces.4.6
19、full at any one time. Modify the algorithm to allow all buffers to be utilized fully.Answer No answer.5.1P rovide two p rogram ming exa mp les of multithread ing givi ng imp rove p erforma nee overa sin gle-threaded soluti on.Answer (1) A server that services each request in a sep a rate thread. (2)
20、 A paral* lelized application such as matrix multi plication where different p arts of the matrix may be worked on in parallel. (3) An interactive GUI program such as a dibugger where a thread is used to monitor user input, another thread represents the running flppHcation, and a third thread monitors performance.5.3What are two differences between user-level threads and kernel-level threads? Underwhat circumsta nces is one type better tha n the other?r Answer Context switching between user tlireads is quite similar tG switching between kernel threads, although it is
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1