操作系统英文版课后习题答案整理
操作系统设计与实现课后习题答案(英文)

操作系统设计与实现课后习题答案(英⽂)OPERATING SYSTEMS: DESIGN AND IMPLEMENTATIONTHIRD EDITIONPROBLEM SOLUTIONSANDREW S.TANENBAUMVrije UniversiteitAmsterdam,The NetherlandsALBERT S.WOODHULLAmherst,MassachusettsPRENTICE HALLUPPER SADDLE RIVER,NJ07458SOLUTIONS TO CHAPTER1PROBLEMS1.An operating system must provide the users with an extended(i.e.,virtual)machine,and it must manage the I/O devices and other system resources.2.In kernel mode,every machine instruction is allowed,as is access to all theI/O devices.In user mode,many sensitive instructions are prohibited.Operating systems use these two modes to encapsulate user programs.Run-ning user programs in user mode keeps them from doing I/O and prevents them from interfering with each other and with the kernel.3.Multiprogramming is the rapid switching of the CPU between multipleprocesses in memory.It is commonly used to keep the CPU busy while one or more processes are doing I/O.4.Input spooling is the technique of reading in jobs,for example,from cards,onto the disk,so that when the currently executing processes are?nished, there will be work waiting for the CPU.Output spooling consists of?rst copying printable?les to disk before printing them,rather than printing directly as the output is generated.Input spooling on a personal computer is not very likely,but output spooling is.5.The prime reason for multiprogramming is to give the CPU something to dowhile waiting for I/O to complete.If there is no DMA,the CPU is fully occu-pied doing I/O,so there is nothing to be gained(at least in terms of CPU utili-zation)by multiprogramming.No matter how much I/O a program does,the CPU will be100percent busy.This of course assumes the major delay is the wait while data is copied.A CPU could do other work if the I/O were slow for other reasons(arriving on a serial line,for instance).6.Second generation computers did not have the necessary hardware to protectthe operating system from malicious user programs.7.Choices(a),(c),and(d)should be restricted to kernel mode.8.Personal computer systems are always interactive,often with only a singleuser.Mainframe systems nearly always emphasize batch or timesharing with many users.Protection is much more of an issue on mainframe systems,as is ef?cient use of all resources.9.Arguments for closed source are that the company can vet the programmers,establish programming standards,and enforce a development and testing methodology.The main arguments for open source is that many more people look at the code,so there is a form of peer review and the odds of a bug slip-ping in are muchsmaller with so much more inspection.2PROBLEM SOLUTIONS FOR CHAPTER110.The?le will be executed.11.It is often essential to have someone who can do things that are normally for-bidden.For example,a user starts up a job that generates an in?nite amount of output.The user then logs out and goes on a three-week vacation to Lon-don.Sooner or later the disk will?ll up,and the superuser will have to manu-ally kill the process and remove the output?le.Many other such examples exist.12.Any?le can easily be named using its absolute path.Thus getting rid ofworking directories and relative paths would only be a minor inconvenience.The other way around is also possible,but trickier.In principle if the working directoryis,say,/home/ast/projects/research/proj1one could refer to the password?le as../../../../etc/passwd,but it is very clumsy.This would not be a practical way of working.13.The process table is needed to store the state of a process that is currentlysuspended,either ready or blocked.It is not needed in a single process sys-tem because the single process is never suspended.14.Block special?les consist of numbered blocks,each of which can be read orwritten independently of all the other ones.It is possible to seek to any block and start reading or writing.This is not possible with character special?les.15.The read works /doc/d0db25e29b89680203d82542.html er2’s directory entry contains a pointer to thei-node of the?le,and the reference count in the i-node was incremented when user2linked to it.So the reference count will be nonzero and the?le itself will not be removed when user1removes his directory entry for it.Only when all directory entries for a?le have been removed will its i-node and data actually vanish.16.No,they are not so essential.In the absence of pipes,program1could writeits output to a?le and program2could read the?le.While this is less ef?cient than using a pipe between them,and uses unnecessary disk space,in most circumstances it would work adequately.17.The display command and reponse for a stereo or camera is similar to theshell.It is a graphical command interface to the device.18.Windows has a call spawn that creates a new process and starts a speci?cprogram in it.It is effectively a combination of fork and exec.19.If an ordinary user could set the root directory anywhere in the tree,he couldcreate a?le etc/passwd in his home directory,and then make that the root directory.He could then execute some command,such as su or login that reads the password?le,and trick the system into using his password?le, instead of the real one.PROBLEM SOLUTIONS FOR CHAPTER13 20.The getpid,getuid,getgid,and getpgrp,calls just extract a word from the pro-cess table and return it.They will execute very quickly.They are all equally fast.21.The system calls can collectively use500million instructions/sec.If eachcall takes1000instructions,up to500,000system calls/sec are possible while consuming only half the CPU.22.No,unlink removes any?le,whether it be for a regular?le or a special?le.23.When a user program writes on a?le,the data does not really go to the disk.It goes to the buffer cache.The update program issues SYNC calls every30 seconds to force the dirty blocks in the cache onto the disk,in order to limit the potential damage that a system crash could cause.24.No.What is the point of asking for a signal after a certain number of secondsif you are going to tell the system not to deliver it to you?25.Yes it can,especially if the system is a message passing system.26.When a user program executes a kernel-mode instruction or does somethingelse that is not allowed in user mode,the machine must trap to report the attempt.The early Pentiums often ignored such instructions.This made them impossible to fully virtualize and run an arbitrary unmodi?ed operating sys-tem in user mode. SOLUTIONS TO CHAPTER2PROBLEMS1.It is central because there is so much parallel or pseudoparallel activity—multiple user processes and I/O devices running at once.The multiprogram-ming model allows this activity to be described and modeled better.2.The states are running,blocked and ready.The running state means the pro-cess has the CPU and is executing.The blocked state means that the process cannot run because it is waiting for an external event to occur,such as a mes-sage or completion of I/O.The ready state means that the process wants to run and is just waiting until the CPU is available.3.You could have a register containing a pointer to the current process tableentry.When I/O completed,the CPU would store the current machine state in the current process table entry.Then it would go to the interrupt vector for the interrupting device and fetch a pointer to another process table entry(the service procedure).This process would then be started up.4.Generally,high level languages do not allow one the kind of access to CPUhardware that is required.For instance,an interrupt handler may be required to enable and disable the interrupt servicing a particular device,or to4PROBLEM SOLUTIONS FOR CHAPTER2manipulate data within a process’stack area.Also,interrupt service routines must execute as rapidly as possible.5.The?gure looks like this6.It would be dif?cult,if not impossible,to keep the?le system consistent usingthe model in part(a)of the?gure.Suppose that a client process sends a request to server process1to update a?le.This process updates the cache entry in its memory.Shortly thereafter,another client process sends a request to server2to read that?le.Unfortunately,if the?le is also cached there, server2,in its innocence,will return obsolete data.If the?rst process writes the? le through to the disk after caching it,and server2checks the disk on every read to see if its cached copy is up-to-date,the system can be made to work,but it is precisely all these disk accesses that the caching system is try-ing to avoid.7.A process is a grouping of resources:an address space,open?les,signalhandlers,and one or more threads.A thread is just an execution unit.8.Each thread calls procedures on its own,so it must have its own stack for thelocal variables,return addresses,and so on.9.A race condition is a situation in which two(or more)process are about toperform some action.Depending on the exact timing,one or other goes?rst.If one of the processes goes?rst,everything works,but if another one goes ?rst,a fatal error occurs.10.One person calls up a travel agent to?nd about price and availability.Thenhe calls the other person for approval.When he calls back,the seats are gone.11.A possible shell script might be:if[!–f numbers];echo0>numbers;?count=0while(test$count!=200)docount=‘expr$count+1‘PROBLEM SOLUTIONS FOR CHAPTER25n=‘tail–1numbers‘expr$n+1>>numbersdoneRun the script twice simultaneously,by starting it once in the background (using&)and again in the foreground.Then examine the?le numbers.It will probably start out looking like an orderly list of numbers,but at some point it will lose its orderliness,due to the race condition created by running two copies of the script.The race can be avoided by having each copy of the script test for and set a lock on the?le before entering the critical area,and unlocking it upon leaving the critical area.This can be done like this: if ln numbers numbers.lockthenn=‘tail–1numbers‘expr$n+1>>numbersrm numbers.lockThis version will just skip a turn when the?le is inaccessible,variant solu-tions could put the process to sleep,do busy waiting,or count only loops in which the operation is successful.12.Yes,at least in MINIX3.Since LINK is a system call,it will activate serverand task level processes,which,because of the multi-level scheduling of MINIX3,will receive priority over user processes.So one would expect that from the point of view of a user process,linking would be equivalent to an atomic act,and another user process could not interfere.Also,even if another user process gets a chance to run before the LINK call is complete,perhaps because the disk task blocks looking for the inode and directory,the servers and tasks complete what they are doing before accepting more work.So, even if two processes try to make a LINK call at the same time,whichever one causes a software interrupt?rst should have its LINK call completed?rst.13.Yes,it still works,but it still is busy waiting,of course.14.Yes it can.The memory word is used as a?ag,with0meaning that no one isusing the critical variables and1meaning that someone is using them.Put a 1in the register,and swap the memory word and the register.If the register contains a0after the swap,access has been granted.If it contains a1,access has been denied.When a process is done,it stores a0in the?ag in memory.15.To do a semaphore operation,the operating system?rst disables interrupts.Then it reads the value of the semaphore.If it is doing a DOWN and the semaphore is equal to zero,it puts the calling process on a list of blocked processes associated with the semaphore.If it is doing an UP,it must check6PROBLEM SOLUTIONS FOR CHAPTER2to see if any processes are blocked on the semaphore.If one or more processes are blocked,one of then is removed from the list of blocked processes and made runnable.When all these operations have been com-pleted,interrupts can be enabled again.16.Associated with each counting semaphore are two binary semaphores,M,used for mutual exclusion,and B,used for blocking.Also associated with each counting semaphore is a counter that holds the number of UP s minus the number of DOWN s,and a list of processes blocked on that semaphore.To implement DOWN,a process?rst gains exclusive access to the semaphores, counter,and list by doing a DOWN on M.It then decrements the counter.If it is zero or more,it just does an UP on M and exits.If M is negative,the pro-cess is put on the list of blocked processes.Then an UP is done on M and a DOWN is done on B to block the process.To implement UP,?rst M is DOWN ed to get mutual exclusion,and then the counter is incremented.If it is more than zero,no one was blocked,so all that needs to be done is to UP M.If,however,the counter is now negative or zero,some process must be removed from the list.Finally,an UP is done on B and M in that order.17.With round robin scheduling it works.Sooner or later L will run,and eventu-ally it will leave its critical region.The point is,with priority scheduling,L never gets to run at all;with round robin,it gets a normal time slice periodi-cally,so it has the chance to leave its critical region.18.It is very expensive to implement.Each time any variable that appears in apredicate on which some process is waiting changes,the run-time system must re-evaluate the predicate to see if the process can be unblocked.With the Hoare and Brinch Hansen monitors,processes can only be awakened on a SIGNAL primitive. 19.The employees communicate by passing messages:orders,food,and bags inthis case.In MINIX terms,the four processes are connected by pipes.20.It does not lead to race conditions(nothing is ever lost),but it is effectivelybusy waiting.21.If a philosopher blocks,neighbors can later see that he is hungry by checkinghis state,in test,so he can be awakened when the forks are available.22.The change would mean that after a philosopher stopped eating,neither of hisneighbors could be chosen next.With only two other philosophers,both of them neighbors,the system woulddeadlock.With100philosophers,all that would happen would be a slight loss of parallelism.23.Variation1:readers have priority.No writer may start when a reader isactive.When a new reader appears,it may start immediately unless a writer is currently active.When a writer?nishes,if readers are waiting,they are allPROBLEM SOLUTIONS FOR CHAPTER 27started,regardless of the presence of waiting writers.Variation 2:Writers have priority.No reader may start when a writer is waiting.When the last active process ?nishes,a writer is started,if there is one,otherwise,all the readers (if any)are started.Variation 3:symmetric version.When a reader is active,new readers may start immediately.When a writer ?nishes,a new writer has priority,if one is waiting.In other words,once we have started reading,we keep reading until there are no readers left.Similarly,once we have started writing,all pending writers are allowed to run.24.It will need nT sec.25.If a process occurs multiple times in the list,it will get multiple quanta percycle.This approach could be used to give more important processes a larger share of the CPU.26.The CPU ef?ciency is the useful CPU time divided by the total CPU time.When Q ≥T ,the basic cycle is for the process to run for T and undergo a pro-cess switch for S .Thus (a)and (b)have an ef? ciency of T /(S +T ).When the quantum is shorter than T ,each run of T will require T /Q process switches,wasting a time ST /Q .The ef?ciency here is thenT +ST /QT which reduces to Q /(Q +S ),which is the answer to (c).For (d),we just sub-stitute Q for S and ?nd that the ef?ciency is50percent.Finally,for (e),as Q →0the ef?ciency goes to 0.27.Shortest job ?rst is the way to minimize average response time.0<x ≤3:x="" ,3,5,6,9.<="" p="" bdsfid="201">。
《unix操作系统设计》英文版习题答案4

S.15Unix Internals (April/May-2012, Set-4) JNTU-AnantapurB.T ech. III-Year II-Sem.( JNTU-Anantapur)Code No.: 9A05602/R09B.Tech. III Year II Semester Regular ExaminationsApril/May - 2012UNIX INTERNALS( Computer Science and Engineering )Time: 3 HoursMax. Marks: 70Answer any FIVE Questions All Questions carry equal marks- - -1.(a)Draw and explain the block diagram for the system kernel. (Unit-I, Topic No. 1.5.1)(b)Describe in detail about the sleep and wakeup procedures. (Unit-V, Topic No. 5.6)2.(a)With the help of a neat sketch, explain the buffer header. (Unit-II, Topic No. 2.1)(b)Describe an algorithm that asks for and receives any fee buffer from the buffer pool. (Unit-II, Topic No. 2.2)3.Explain the mechanism of assigning an inode to a new file. (Unit-III, Topic No. 3.6)4.(a)Explain the open system call with its syntax, algorithm and data structure. (Unit-IV, Topic No. 4.1)(b)Write and explain the algorithm for creating a file. (Unit-IV, Topic No. 4.4)5.Discuss in detail about the following,(a)Allocating a region(b)Attaching a region to a process (c)Changing the size of a region (d)Freeing a region. (Unit-V, Topic No. 5.5)6.(a)Explain the role of fork in creation of a new process. (Unit-VI, Topic No. 6.1)(b)Distinguish between exit and wit system calls. (Unit-VI, Topic No. 6.3)7.(a)Explain the various system calls for time. (Unit-VII, Topic No. 7.2)(b)Explain how to control the process priorities with suitable examples. (Unit-VII, Topic No. 7.1)8.(a)Draw and explain the architecture for driver entry points. (Unit-VIII, Topic No. 8.1)(b)Present an algorithm for closing a device.(Unit-VIII, Topic No. 8.1)S.16Spectrum ALL-IN-ONE Journal for Engineering Students, 2013B.T ech. III-Year II-Sem.( JNTU-Anantapur)Answer :April/May-12, Set-4, Q1(a)For answer refer Unit-I, Q10.(b)Describe in detail about the sleep and wakeup procedures.Answer :April/May-12, Set-4, Q1(b)For answer refer Unit-V , Q17.Q2.(a)With the help of a neat sketch, explain the buffer header.Answer :April/May-12, Set-4, Q2(a)For answer refer Unit-II, Q1.(b)Describe an algorithm that asks for and receives any free buffer from the buffer pool.Answer :April/May-12, Set-4, Q2(b)Input: File system numberBlock numberOutput : Locked buffer which can now be used for block.Step 1 : Do the following till the buffer is not found.Step 2 : If the block is in hash queue goto step (3) else go to step (9).Step 3 : If the buffer is busy goto step (4) else goto step (6).Step 4 : Goto sleep and wait for the event buffer becomes free.Step 5 : Goto step (1).Step 6 : Mark the buffer busy.Step 7 : Remove buffer from free list.Step 8 : Return the buffer.Step 9 : If there are no buffers on free list then goto step(10) else goto step (12).Step 10 : Goto sleep and wait for event any buffer becomes free.Step 11 : Goto step (1).Step 12 : Remove buffer from free list.Step 13 : If buffer is marked for delayed write then goto step (14) else goto step (16).Step 14 : Perform asynchronous write buffer to disk.Step 15 : Goto step (1).Step 16 : Remove buffer from old hash queue.Step 17 : Put buffer onto new hash queue.Step 18 : Return buffer.Q3.Explain the mechanism of assigning an inode to a new file.Answer :April/May-12, Set-4, Q3For answer refer Unit-III, Q12.Q4.(a)Explain the open system call with its syntax, algorithm and data structure.Answer :April/May-12, Set-4, Q4(a)Open system callFor answer refer Unit-IV , Q1(a), Topic: Open( )S.17Unix Internals (April/May-2012, Set-4) JNTU-AnantapurB.T ech. III-Year II-Sem.( JNTU-Anantapur)AlgorithmInput : file nametype of openfile permissions for creation type of open.Output : file descriptorStep 1 : Convert the filename to inode using algorithm nameiStep 2 : If the file not exist or do not have access permission then goto step (3) else goto step (4)Step 3 : Return errorStep 4 : Allocate file table entry for inode, initialize count, offsetStep 5 : Allocate user file abscriptor entry and set pointer to file table entry.Step 6 : If type of open specifies truncate file then goto step (7) else goto step (8)Step 7 : Free all file blocks using algorithm free Step 8 : Unlock inodeStep 9 : Return user file descriptor.DatastructureConsider the following code,filedes 1 = open(“/etc/passwd”, O_RDONLY);filedes 2 = open(“local”, O_RDWR);filedes 3 =open(“/etc/password”, O_WRONLY);When a process executes the above code then file names “/etc/passwd”, is opened for two times. One time in read-only mode and second time in-write-only mode. In addition to this, a file named “local” is opened in read-write mode.The data structures after open system call is shown in figure below.0User file1234567Descriptor tableCount 1 ReadCount 1 Rd-WrtCount 1 WriteCount 2Count 1Inode tableFile tableFigure : Data Structure After Open System CallThe above figure illustrates the relationship between the inode table, file table and user file descriptor data structures.When a process calls “Open” system call then a file descriptor is returned to it and the entry in the user file descriptor table points to a unique entry in the kernel file table even though the file “/etc/passwd” is opened for two times. The file table entries of all instances of an open file point to one entry in-core inode table. The file “/etc/passwd” can read or write by the process in only through file descriptor 2 and 6.S.18Spectrum ALL-IN-ONE Journal for Engineering Students, 2013(b)Write and explain the algorithm for creating a file.Answer :April/May-12, Set-4, Q4(b) Input : File name and permission settingsOutput : File descriptorStep 1 : Obtain inode for file name using algorithm nameiStep 2 : If file already exists then goto step(3) else goto step (6)Step 3 : If permission is not accessed then goto step(4) else goto step(6)Step 4 : Release inode using algorithm inputStep 5 : Return errorStep 6 : Assign free inode from file system using algorithm illocStep 7 : Create new directory entry in parent directory and in new file name and newly assigned inode number.Step 8 : Allocate file table entry for inode and unitialize countStep 9 : If file exits at the time of creation then goto step(10) else goto step(11)Step 10 : Free all file blocks using algorithm freeStep 11 : Unlock inodeStep 12 : Return user file descriptor.Q5.Discuss in detail about the following,(a)Allocating a region(b)Attaching a region to a process(c)Changing the size of a region(d)Freeing a region.Answer :April/May-12, Set-4, Q5 (a)Allocating a RegionFor answer refer Unit-V, Q13, Topic: Allocating a Region(b)Attaching a Region to a ProcessFor answer refer Unit-V, Q14, Topic: Allocating a Region to a Process, Example and Example for attaching a region to a process.(c)Changing the Size of a RegionFor answer refer Unit-V, Q15.(d)Freeing a RegionFor answer refer Unit-V, Q13, Topic: Freeing a RegionQ6.(a)Explain the role of fork in creation of a new process.Answer :April/May-12, Set-4, Q6(a) For answer refer Unit-VI, Q2.(b)Distinguish between exit and wit system calls.Answer :April/May-12, Set-4, Q6(b) exit( ) system callFor answer refer Unit-VI, Q11.wait( ) system callFor answer refer Unit-VI, Q12.B.T ech. III-Year II-Sem.( JNTU-Anantapur)S.19Unix Internals (April/May-2012, Set-4) JNTU-AnantapurB.T ech. III-Year II-Sem.( JNTU-Anantapur)Q7.(a)Explain the various system calls for time.Answer :April/May-12, Set-4, Q7(a)For answer refer Unit-VII, Q6.(b)Explain how to control the process priorities with suitable examples.Answer :April/May-12, Set-4, Q7(b)For answer refer Unit-VII, Q1.Q8.(a)Draw and explain the architecture for driver entry points.Answer :April/May-12, Set-4, Q8(a)The following figure illustrates the architecture for driver entry points,File SubsystemDriverOpen Close DriverBuffer cacheOpen Close Read Write ioctlOpen Close Read Write ioctlCharacter device switch tableDevice Interrupt handlermountunmountRead WriteOpen CloseBlock device switch tableDevice Interrupt handlercallsStrategyInterrupt vector Interrupt vectorDevice Interrupts Figure : Architecture for Driver Entry PointsFor remaining answer refer Unit-VIII, Q2.(b)Present an algorithm for closing a device.Answer :April/May-12, Set-4, Q8(b)For answer refer Unit-VIII, Q5, Topic: Algorithm to Close Advice.。
Linux操作系统课后习题答案及复习要点

Linux操作系统课后习题答案及复习要点- 一 -Linux 操作系统填空部分1. Linux是在GRL版权协议下发行的遵循POSIX 标准的操作系统内核.2. Linux内核的作者是linus torvalds .3. Linux 可以通过光盘,硬盘和网络等多种介质进行安装.4. Red Hat Linux提供的引导程序有GRUB 和LILO .5. X Window 是一套基于服务器/客户端架构的视窗系统,于1984 年在麻省理工学院(MIT) 计算机科学研究室开发.6. X Window 由服务器,客户端和通信协议三部分组成.7. Linux 下的文件可以分为5 种不同的类型,分别普通文件,目录文件,链接文件,设备文件和管道文件.8. 通常,root的主目录为/root .9. root 的UID 通常为0 .10. RPM 软件包管理器可以完成查询,安装,卸载,升级,验证,以及源码分发等多项任务,及大地方便了Linux 的使用.11. RPM 软件包文件名中一般包括名称,版本号,发行号和硬件平台等信息.12. vi 有3 种基本工作模式:文本输入,命令行和末行.13. 如果未进行指定输出文件名,gcc编译出来的程序后缀是一个名为a.out 的可执行文件.14. 通常在操作系统中,进程至少要有三种基本状态,分别为运行,就绪和封锁.15. 在Linux 系统中,进程的执行模式划分为用户和内核.选择1. 下面不是KDE 组件的程序是B .A. KonquerorB. NautilusC. KOfficeD. KDevelop2. 下面不是Linux 桌面的有D .A. KDEB. GNOMEC. XFCED. Bash3. 用于存放系统配置文件的目录是A .A. /ectB. /homeC. /varD. /root4. 通常,Linux 下的可执行程序位于下列哪些目录? FA. /binB. /homeC. /sbinD. /usr/libE. /varF. /usr/bin5. Linux 下重命名文件可用如下哪个命令? CA. renB. lsC. mvD. copy6. Linux 下移除目录可用如下哪些命令? CA. mvB. delC. rmE. rmdirF. mkdir7. 下列命令中,无法对文件进行压缩的是BCFHI .- 二 -A. tarB. lessC. mvD. bzip2E. gzipF. lsG. zipH. locateI. cat(将当前用户主目录打包成tar.gz 格式备份,并将该文件权限设为666.在当前目录下创建backup 目录,并将上题中的tar.gz 文件解压缩到该目录.)8. 上题中,要显示含权限信息的backup 目录内容可用下面哪个命令? CA. ls./backupB. ls-A./backupC. ls-la./backupD. ls-r./backup9. 下面哪些文件和用户组账号有关? BA. /ect/passwordB. /ect/g shadowC. /ect/shadowD. /ect/gpasswd10. 删除用户使用的命令是B .B. uesrdelC. usrdelD. delete user11. 默认情况下,root 用户属于以下哪个用户组? DA. userB. adminC. rootD. system12. 查询RPM软件包的命令为AD .A. rpm –qB. rpm –sC. rpm –ID. rpm --query13. 下面能查看磁盘空间使用率的有C .A. mountB. umountC. dfD. fdisk –l14. 可以将分区格式化为vfat 的命令有C .A. mkfs.vfatB. mkvfatfsC. mkfs –t vfatD. mkfs.ext215. 下面Linux 程序中哪一个是调试器? CA. viB. gccC. gdbD. make16. 制定周期性执行的计划任务需要使用下面的哪些命令? BA. atB. cronC. cronjobD. batch17. 下面那组快捷键可以迅速终止前台运行的进程? DA. Ctrl+AB. Ctrl+CC. Ctrl+QD. Ctrl+Z18. 下面哪些是合法的变量名? ABDHA. KittyB. bOOkC. Hello WorldD. Olympic gameE. 2catF. %goodsG. ifH. game19. 下面哪种是正确的赋值方法? AA. a=abcB. a =abcC. a= abcD. a=”abc”简答1.比较文件的异同可以使用哪些命令?答:比较文件的异同可以使用comm和diff.2. 普通用户如何修改密码?P89-5答:普通用户只能用不带参数的passwd命令修改自己的口令.1.在终端下输入passwd2.输入新密码3.再次输入密码- 三 -3.如何为新增用户指定用户主目录?答:useradd -c username –d /home/Jone4.什么是软件包的依赖关系?答:要求只有安装特定的软件包之后才能正常安装该软件包.5.简述对磁盘进行配额管理的意义和方法.答:(1)意义:保护系统有效利用磁盘空间;(2)方法:按用户进行限制和对用户组进行限制,包括硬限制和软限制.6.简述ps 命令和top 命令的区别.答:ps命令和top命令的区别是top命令是一个动态显示过程,可以通过用户按键来不断刷新当前状态;如果在前台执行,top命令将独占前台,直到用户终止top命令为止.7.简述kill 和killall 的区别.P158-7答:使用kill命令可以终止一个已经阻塞的进程,或者一个陷入死循环的进程;而killall 命令会终止所有的进程.8.编写一个Shell 脚本,计算100 以内不是5 整数倍的数字的和.(编程题)#!/bin/bashi=1sum=0while [$i -le 100];doif [$[$i%5] -ne 0];then sum=$[$sum+$i]fii=$i+1doneecho $sum解:#!/bin/bashdeclare -i sum=0declare -i b=5for i in `seq 1 100`doB=$(expr $i%$b )if [ $B -ne 0 ]thensum=$[$sum+$i]fidoneecho $sum其他:1.DNS 系统依赖一种层次化的域名空间分布式数据结构,可分为如下3 部分:(1)域名或资源记录:指定结构化的域名空间和相应的数据.(2)域名服务器:它是一个服务器端程序,包括域名空间树结构的部分信息.(3)解析器:它是客户端用户向域名服务器提交解析请求的程序.2.vsfpd用户配置:匿名用户、本地用户、虚拟用户.3.用于比较整数的关系运算符有:-lt(小于)、-le(小于或等于)、-gt(大于)、-ge(大于或等于)、-eq(等于)、-ne(不等于).4.启动进程:定时执行—at命令、空闲时执行—batch命令、周期性执行—cron和crontab 命令.5.进程的定义:程序是存储在磁盘上包含可执行机器指令和数据的静态实体,而进程是在操作系统中执行的特定任务的动态实体.Linux 操作系统包括3个不同类型的进程:交互进程、批处理进程、守护进程.6.shell 编程的美元符号代表什么意思?答:表示变量替换,即用其后指定的变量的值来代替变量.7.在控制台里使用帮助—man 命令:man […..]name….(例:man 5 inittab)8.在控制台里使用帮助—info命令及其他:Info cmd name.除了上述两种方式外还可以使用help 命令名来实现帮助.9.显示文件内容命令及其含义:显示文件内容命令—cat,more,less,head,tail;文件内容查看命令—grep,egrep,fgrep;文件查找命令—find,locate;文本处理命令—sort,uniq;文件内容统计命令—wc;文件比较命令—comm.,diff;文件复制、移动和删除—cm,mv,rm(可重命名);文件链接命令—ln;目录的创建与删除命令—mkdir,rmdir;改变工作目录、显示路劲以及显示目录内容命令—cd,pwd,ls.10.文本修改命令(单个与多个)及不同的命令删除的是什么:(单个)nx 删除光标所在位置开始向右的n个字符;nX删除光标前面那个字符开始向左的n个字符,(多个)ndd删除当前行及其后n-1行的内容;D 都是删除从光标所在处开始到行尾的内容;d0 删除从光标钱一个字符开始到行首的内容;ndw删除n个指定的单词.11.磁盘挂载分区与卸载分区命令:要使用磁盘分区,就需要挂载该分区,mount –type device dir;要移除磁盘,则需要卸载该分区,umount [device |dir] .12.添加删除用户:添加用户useradd option username;删除用户userdel option username.13.两个目录ROOT 和BOOT,哪个是用户的主目录:boot是存放系统内核映像及其它与启动有关的文件,root 是root用户的目录,root是用户的主目录.14.用户的账号文件和用户组的账号文件的区别:用户账号文件—passwd;用户组的账号文件—group和gshadow.15.使用命令行方式管理用户和组的各种命令:使用useradd 命令添加用户useradd option username;使用usermod命令修改用户信息usermod option username;使用userdel命令删除用户userdel option username;使用groupadd命令创建用户组groupadd option groupname;使用groupmod命令修改用户组属性groupmod option groupname;使用groupdel命令删除用户组groupdel option groupname.。
操作系统习题(英文版)

操作系统习题(英文版)Chapter 1 – Computer Systems OverviewTrue / False Questions:1. T / F – The operating system acts as an interface between the computerhardware and the human user.2. T / F –One of the processor’s main functions is to exchange data withmemory.3. T / F –User-visible registers are typically accessible to systemprograms but are not typically available to application programs.4. T / F – Data registers are general purpose in nature, but may berestricted to specific tasks such as performing floating-point operations.5. T / F –The Program Status Word contains status information in the formof condition codes, which are bits typically set by the programmer as aresult of program operation.6. T / F – The processing required for a single instruction ona typicalcomputer system is called the Execute Cycle.7. T / F – A fetched instruction is normally loaded into the InstructionRegister (IR).8. T / F –An interrupt is a mechanism used by systemmodules to signalthe processor that normal processing should be temporarily suspended.9. T / F – To accommodate interrupts, an extra fetch cycle is added to theinstruction cycle.10. T / F –The minimum information that must be saved before theprocessor transfers control to the interrupt handler routine is theprogram status word (PSW) and the location of the current instruction.11. T / F – One approach to dealing with multiple interrupts is to disable allinterrupts while an interrupt is being processed.12. T / F – Multiprogramming allows the processor to make use of idle timecaused by long-wait interrupt handling.13. T / F – In a two-level memory hierarchy, the Hit Ratio is defined as thefraction of all memory accesses found in the slower memory.14. T / F – Cache memory exploits the principle of locality by providing asmall, fast memory between the processor and main memory.15. T / F – In cache memory design, block size refers to the unit of dataexchanged between cache and main memory16. T / F – The primary problem with programmed I/O is that the processormust wait for the I/O module to become ready and mustrepeatedlyinterrogate the status of the I/O module while waiting.Multiple Choice Questions:1. The general role of an operating system is to:a. Act as an interface between various computersb. Provide a set of services to system usersc. Manage files for application programsd. None of the above2. The four main structural elements of a computer system are:a. Processor, Registers, I/O Modules & Main Memoryb. Processor, Registers, Main Memory & System Busc. Processor, Main Memory, I/O Modules & System Busd. None of the above3. The two basic types of processor registers are:a. User-visible and Control/Status registersb. Control and Status registersc. User-visible and user-invisible registersd. None of the above4. Address registers may contain:a. Memory addresses of datab. Memory addresses of instructionsc. Partial memory addressesd. All of the above5. A Control/Status register that contains the address of the nextinstruction to be fetched is called the:a. Instruction Register (IR)b. Program Counter (PC)c. Program Status Word (PSW)d. All of the above6. The two basic steps used by the processor in instruction processingare:a. Fetch and Instruction cyclesb. Instruction and Execute cyclesc. Fetch and Execute cyclesd. None of the above7. A fetched instruction is normally loaded into the:a. Instruction Register (IR)b. Program Counter (PC)c. Accumulator (AC)d. None of the above8. A common class of interrupts is:a. Programb. Timerc. I/Od. All of the above9. When an external device becomes ready to be serviced by theprocessor, the device sends this type of signal to the processor:a. Interrupt signalb. Halt signalc. Handler signald. None of the above10. Information that must be saved prior to the processor transferringcontrol to the interrupt handler routine includes:a. Processor Status Word (PSW)b. Processor Status Word (PSW) & Location of next instructionc. Processor Status Word (PSW) & Contents of processor registersd. None of the above11. One accepted method of dealing with multiple interrupts is to:a. Define priorities for the interruptsb. Disable all interrupts except those of highest priorityc. Service them in round-robin fashiond. None of the above12. In a uniprocessor system, multiprogramming increases processorefficiency by:a. Increasing processor speedb. Taking advantage of time wasted by long wait interrupt handlingc. Eliminating all idle processor cyclesd. All of the above13. As one proceeds down the memory hierarchy (i.e., from inboardmemory to offline storage), the following condition(s) apply:a. Increasing cost per bitb. Decreasing capacityc. Increasing access timed. All of the above14. Small, fast memory located between the processor and main memoryis called:a. WORM memoryb. Cache memoryc. CD-RW memoryd. None of the above15. When a new block of data is written into cache memory, the followingdetermines which cache location the block will occupy:a. Block sizeb. Cache sizec. Write policyd. None of the above16. Direct Memory Access (DMA) operations require the followinginformation from the processor:a. Address of I/O deviceb. Starting memory location to read from or write toc. Number of words to be read or writtend. All of the aboveQuestions1.1,1.4,1.7,1.8Problems1.1,1.3,1.4,1.5,1.7Chapter 2 – Operating System OverviewTrue / False Questions:1. T / F –An operating system controls the execution of applications andacts as an interface between applications and the computer hardware.2. T / F – The operating system maintains information that can be used forbilling purposes on multi-user systems.3. T / F – The operating system typically runs in parallel with applicationpro grams, on it’s own special O/S processor.4. T / F –One of the driving forces in operating system evolution isadvancement in the underlying hardware technology.5. T / F – In the first computers, users interacted directly with thehardware and operating systems did not exist.6. T / F – In a batch-processing system, the phrase “control is passed to ajob” means that the processor is now fetching and executinginstructions in a user program.7. T / F –Uniprogramming typically provides better utilization of systemresources than multiprogramming.8. T / F –In a time sharing system, a user’s program is preempted atregular intervals, but due to relatively slow human reaction time thisoccurrence is usually transparent to the user.9. T / F –A process can be defined as a unit of activity characterized by asingle sequential thread of execution, a current state, and an associated set of system resources.10. T / F – A virtual memory address typically consists of a page numberand an offset within the page.11. T / F – Implementing priority levels is a common strategyforshort-term scheduling, which involves assigning each process in thequeue to the processor according to its level of importance.12. T / F – Complex operating systems today typically consist of a fewthousand lines of instructions.13. T / F – A monolithic kernel architecture assigns only a few essentialfunctions to the kernel, including address spaces, interprocesscommunication and basic scheduling.14. T / F –The hardware abstraction layer (HAL) maps between generichardware commands/responses and those unique to a specificplatform.Multiple Choice Questions:17. A primary objective of an operating system is:a. Convenienceb. Efficiencyc. Ability to evolved. All of the above18. The operating system provides many types of services to end-users,programmers and system designers, including:a. Built-in user applicationsb. Error detection and responsec. Relational database capabilities with the internal file systemd. All of the above19. The operating system is unusual i n it’s role as a control mechanism, inthat:a. It runs on a special processor, completely separated from therest of the systemb. It frequently relinquishes control of the system processor andmust depend on the processor to regain control of the systemc. It never relinquishes control of the system processord. None of the above20. Operating systems must evolve over time because:a. Hardware must be replaced when it failsb. Users will only purchase software that has a current copyrightdatec. New hardware is designed and implemented in the computersystemd. All of the above21. A major problem with early serial processing systems was:a. Setup timeb. Lack of input devicesc. Inability to get hardcopy outputd. All of the above22. An example of a hardware feature that is desirable in abatch-processing system is:a. Privileged instructionsb. A completely accessible memory areac. Large clock cyclesd. None of the above23. A computer hardware feature that is vital to the effective operation of amultiprogramming operating system is:a. Very large memoryb. Multiple processorsc. I/O interrupts and DMAd. All of the above24. The principle objective of a time sharing, multiprogramming system isto:a. Maximize response timeb. Maximize processor usec. Provide exclusive access to hardwared. None of the above25. Which of the following major line of computer system developmentcreated problems in timing and synchronization that contributed to the development of the concept of the process?a. Multiprogramming batch operation systemsb. Time sharing systemsc. Real time transaction systemsd. All of the above26. The paging system in a memory management system provides fordynamic mapping between a virtual address used in a program and:a. A virtual address in main memoryb. A real address in main memoryc. A real address in a programd. None of the above27. Relative to information protection and security in computer systems,access control typically refers to:a. Proving that security mechanisms perform according tospecificationb. The flow of data within the systemc. Regulating user and process access to various aspects of thesystemd. None of the above28. A common problem with full-featured operating systems, due to theirsize and difficulty of the tasks they address, is:a. Chronically late in deliveryb. Latent bugs that show up in the fieldc. Sub-par performanced. All of the above29. A technique in which a process, executing an application, is dividedinto threads that can run concurrently is called:a. Multithreadingb. Multiprocessingc. Symmetric multiprocessing (SMP)d. None of the aboveQUESTIONS2.1,2.3,2.4,2.7,2.10PROBLEMS2.1,2.2,2.3,2.4。
计算机专业英语课后题答案汇总

课后题答案.doc第六章Dbcbbaacbd jachgidefb7Ababdadcdb iefjabgdch8Aacacacddc gajidbhcfe9Cbadcdbbbd gbaihecjdf第10章Aadbacdcbd ghfabcjdei计算机专业英语+单词+部分习题计算机专业英语(2008影印版)高等教育出版社共10页KEY TERMS第一单元application software应用软件basic application基本应用软件communication device通信设备compact disc (CD)光盘computer competency计算机能力Connectivity连通性Data数据database file数据库文件desktop computer台式计算机device driver磁盘驱动程序digital versatile disc(DVD)数字多用途光盘digital video disc(DVD)数字多用途光盘document file文档文件end user终端用户floppy disk软盘handheld computer手持计算机hard disk硬盘Hardware硬件High definition高清Information信息information system信息系统information technology信息技术input device输入设备Internet因特网Keyboard键盘mainframe computer大型机Memory内存Microcomputer微型机Microprocessor微处理器midrange computer中型机Minicomputer小型计算机Modem调制解调器Monitor监视器Mouse鼠标Network网络notebook computer笔记本电脑operating system操作系统optical disk光盘output device输出设备palm computer掌上电脑Peoplepersonal digital assistant(PDA)个人数字助理presentation file演示文稿primary storage主存Printer打印机Procedure规程Program程序random access memory随机存储器secondary storage device辅存Software软件specialized application专门应用软件Supercomputer巨型机system software系统软件system unit系统单元tablet PC平板电脑Utility实用程序wireless revolution无线革命worksheet file工作表第三单元analytical graph分析图application software应用软件Autocontent Wizard内容提示向导basic applications基础应用软件bulleted list项目符号列表business suite商业套装软件Button按键Cell单元格character effect字效Chart图表Column列Computer trainer计算机培训员Contextual tab上下文标签Database数据库database management system (DBMS)数据库管理系统database manager数据库管理员Design template设计模板dialog box对话框Document文件Editing编辑Field字段find and replace查找和替换Font字体font size字号Form窗体Format格式Formula公式Function函数Galleries图库grammar checker语法检查器graphical user interface (GUI)图形用户界面home software家庭软件home suite家庭套装软件Icons图标integrated package集成组件Label标签master slide母板Menu菜单menu bar菜单栏numbered list编号列表numeric entry数值型输入personal software个人软件personal suite个人套装软件Pointer指针presentation graphic图形演示文稿productivity suite生产力套装软件Query查询Range范围Recalculation重算Record记录relational database关系型数据Report报表Ribbons功能区、格式栏Row行Sheet工作表Slide幻灯片software suite软件套装Sort排序specialized applications专用应用程序specialized suite专用套装软件speech recognition语音识别spelling checker拼写检查器spreadsheet电子表格system software系统软件Table表格text entry文本输入Thesaurus[θis?:r?s]分类词汇集Toolbar工具栏user interface用户界面utility suite实用套装软件what-if analysis变化分析Window窗口word processor文字处理软件word wrap字回行workbook file工作簿Worksheet工作表第四单元Animation动画artificial intelligence (AI)人工智能artificial reality虚拟现实audio editing software音频编辑软件bitmap image位图Blog博客Buttons按键clip art剪辑图Desktop publisher桌面发布desktop publishing program桌面印刷系统软件drawing program绘图程序expert systems专家系统Flash动画fuzzy logic模糊逻辑graphical map框图graphics suite集成图HTML editors HTML编辑器illustration program绘图程序Image editors图像编辑器image gallery图库immersive experience沉浸式体验industrial robots工业机器人Interactivity交互性knowledge bases知识库knowledge-based system知识库系统Link链接mobile robot移动式遥控装置Morphing渐变Multimedia多媒体multimedia authoring programs多媒体编辑程序page layout program页面布局程序perception systems robot感知系统机器人Photo editors图像编辑器Pixel[piks?l]像素raster image光栅图像Robot机器人Robotics机器人学stock photographs照片库story boards故事版Vector[vekt?]矢量vector illustration矢量图vector image矢量图象video editing software视频编辑软件virtual environments虚拟环境virtual reality虚拟现实virtual reality modeling language (VRML)虚拟现实建模语言virtual reality wall虚拟现实墙VR虚拟现实Web authoring网络编程Web authoring program网络编辑程序Web log网络日志Web page editor网页编辑器Add Printer Wizard添加打印机向导Antivirus program反病毒程序Backup备份backup program备份程序Booting启动、引导cold boot冷启动computer support specialist计算机支持专家Dashboard widgets仪表盘Desktop桌面desktop operating system桌面操作系统device driver磁盘驱动程序diagnostic program诊断程序dialog box对话框Disk Cleanup磁盘清理Disk Defragmenter磁盘碎片整理器Driver驱动器embedded operating systems嵌入式操作系统File文件file compression program文件压缩程序Folder文件夹Fragmented碎片化graphical user interface (GUI)图形用户界面Help帮助Icon图标language translator语言编译器leopard[lep?d]雪豹操作系统LinuxMac OS Mac操作系统Mac OS XMenu菜单Multitasking多任务处理network operating systems(NOS)网络操作系统network server网络服务器One Button Checkup一键修复operating system操作系统Platform平台Pointer指针Sectors[sekt?]扇区software environment软件环境Spotlight聚光灯stand-alone operating system独立操作系统system software系统软件Tiger老虎操作系统troubleshooting program故障检修程序Uninstall program卸载程序UNIXuser interface用户界面Utility实用程序utility suite实用套装软件Virus[vai?r?s]病毒warm boot热启动Window视窗Windows视窗操作系统Windows Update Windows更新Windows VistaWindows XP第六单元AC adapter 交流适配器Accelerated graphics port(AGP):图形加速端口Arithmetic-logic unit(ALU):算术逻辑单元Arithmetic operation:算术运算ASCII美国标准信息交换码Binary coding schemes:二进制编码制Bit:位Bus:总线Bus line:总线Byte:字节Cable:电缆Cache memory:高速缓存carrier package 封装物Central processing unit (CPU):中央处理器Chip:芯片Clock speed时钟速度Complementary metal-oxide semiconductor:互补金属氧化物半导体Computer technician计算机工程师Control unit:控制单元Coprocessor协处理器Desktop system unit:桌面系统单元Digital数字的Dual-core chips双核芯片EBCDIC:扩展二进制编码的十进制交换码Expansion bus扩展总线Expansion card扩展卡Expansion slot扩展槽FireWire port:火线接口Flash memory闪存Graphics card图形适配卡Graphics coprocessor图形协处理器Handheld computer system unit 手持计算机系统单元Industry standard architecture(ISA)工业标准结构Infrared Data Association(IrDA)红外线传输模组Integrated circuit:集成电路Laptop computer膝式计算机Logical operation逻辑运算Microprocessor:微处理器Motherboard:主板Musical instrument digital interface(MIDI)乐器数字接口Network adapter card网络适配卡Network interface card(NIC)网络接口卡Notebook system unit:笔记本Parallel ports:并行端口Parallel processing并行处理Pc card: :个人计算机插卡PCI Express(PCIe)Peripheral component interconnect (PCI):外围部件互联Personal digital assistant (PDA) 个人数字助理Plug and play:即插即用Port:端口Power supply unit 供电设备Processor:处理器RAM cache: RAM高速缓存Random-access memory (RAM):随机存储器Read-only memory (ROM):只读存储器RFID tag射频识别标签Semiconductor:半导体serial ATA(SATA)串行A TA接口规范Serial ports:串行端口Silicon chip:硅芯片Slot:插槽Smart card:智能卡sound card声卡System board:系统板System cabinet:主机System clock:系统时钟System unit:系统单元tablet PC平板式电脑tablet PC system unit平板式电脑系统单元TV tuner card:电视调频卡Unicode:统一字符编码标准Universal serial bus (USB):通用串行总线Universal serial bus (USB) port:通用串行总线端口Virtual memory:虚拟存储器Word:字第七单元active-matrix monitor有源矩阵显示器bar code条形码bar code reader条形码阅读器cathode ray tube monitor (CRT)阴极射线管显示器Clarity清晰度combination key组合键cordless mouse无线鼠标data projector数据投影仪digital camera数码照相机Digital media player数字媒体播放器Digital music player数码音乐播放器digital video camera数码影像摄录机dot pitch点距dot-matrix printer针式打印机dots-per-inch (dpi)点每英寸dual-scan monitor双向扫描显示器dumb terminal哑终端e-book电子图书阅读器ergonomic keyboard人体工程学键盘Fax machine传真机flat-panel monitor平面显示器Flatbed scanner平板扫描仪flexible keyboard可变形键盘handwriting recognition software手写识别软件Headphones耳机high-definition television (HDTV)高清电视ink-jet printer喷墨打印机intelligent terminal智能终端Internet telephone网络电话Internet telephony网络电话IP Telephony IP电话Joystick游戏杆Keyboard键盘laser printer激光打印机light pen光笔Liquid crystal display(LCD)液晶显示器Magnetic card reader磁卡阅读器magnetic-ink character recognition (MICR)磁性墨水字符识别mechanical mouse机械鼠标Monitor显示器Mouse鼠标mouse pointer鼠标指针multifunction device (MFD)多功能设备network terminal网络终端numeric keypad数字小键盘optical-character recognition (OCR)光学字符识别optical-mark recognition (OMR)光学标记识别optical mouse光电鼠标Optical scanner光电扫描仪passive-matrix monitor无源矩阵显示器PDA keyboard PDA键盘personal laser printer个人激光打印机photo printer照片打印机picture elements 有效像素Pixel像素Pixel pitch像素间距platform scanner平版式扫描仪Plotter绘图仪pointing stick触控点portable printer便携式打印机portable scanner便携式扫描仪Printer打印机Radio frequency card reader射频卡阅读器Radio frequency identification(RFID)射频识别refresh rate刷新率Resolution分辨率roller ball滚动球shared laser printer共享激光打印机Speakers扬声器Stylus[stail?s]输入笔Technical writer技术文档编写员telephony[tilef?ni]电话Terminal终端thermal printer[θ?:m?l]热敏打印机thin client瘦客户端thin film transistor monitor (TFT)薄膜晶体管显示器toggle key[t?ɡl]切换键touch pad触控板touch screen触摸屏Trackball轨迹球traditional keyboard传统键盘Universal Product Code (UPC)同一产品编码voice-over IP (VoIP)网络电话voice recognition system语音识别系统wand reader棒式阅读器WebCam摄像头wheel button滚动键wireless keyboard无线键盘wireless mouse无线鼠标第八单元access speed存取速度Blu-Ray(BD)蓝光Capacity容量CD (compact disc)光盘CD-R (CD-recordable)可录式CDCD-ROM (compact disc-read only memory)光盘库CD-RW (compact disc rewritable)可重写CDCylinder[silind?]柱面Density密度direct access直接存取disk caching磁盘缓存DVD(digital versatile disc or digital video disc)DVD player DVD播放器DVD- R (DVD recordable)可录式DVDDVD +R (DVD recordable)可录式DVDDVD-RAM(DVD random-access memory)DVD随机存取器DVD-ROM(DVD random-read-only memory)DVD只读存储器DVD-ROM jukeboxDVD-RW (DVD rewritable)可重写DVDEnterprise storage system企业存储系统erasable optical disk可擦光盘file compression文件压缩file decompression文件解压缩File server文件服务器flash memory card闪存卡floppy disk软盘Floppy disk cartridge软盘盒floppy disk drive (FDD)软磁盘驱动器hard disk硬盘hard-disk cartridge硬盘盒hard-disk pack硬盘组HD DVD(high-definition DVD)高清DVDhead crash磁头碰撞Hi def(high definition)高清high capacity disk高容量磁盘internal hard disk内置硬盘Internet hard drive网络硬盘驱动器Label标签Land平地magnetic tape磁带magnetic tape reel磁带盒magnetic tape streamer磁带条Media多媒体optical disk光盘optical disk drive光盘驱动器Organizational Internet storage组织性网络存储PC Card hard disk PC卡硬盘Pit坑primary storage主存RAID system磁碟阵列系统Redundant array of inexpensive disks(RAID)廉价磁盘冗余阵列secondary storage辅存Sector扇区sequential access顺序存取Shutter滑盖Software engineer软件工程师solid-state storage固态存储器storage devices存储装置tape cartridge盒式带Track轨道USB drive USB驱动器write-protection notch写入保护缺口第九单元3G cellular networkanalog signal 模拟信号asymmetric digital subscriber line(ADSL)非对称数字用户线路Backbone中枢Bandwidth带宽base station基址bits per second位/秒Bluetooth 蓝牙Broadband宽带broadcast radio无线广播Bus总线bus network总线网络cable modem电缆调制解调器cellular service无线服务Client 客户client/server network system客户/服务网络系统coaxial cable同轴电缆communication channel 信道communication system 通信系统computer network计算机网络Connectivity连通性Demodulation 解调dial-up service拨号服务digital signal数字信号digital subscriber line (DSL)数字用户线路distributed data processing分布式数据处理系统distributed processing分布处理domain name server (DNS)域名服务Ethernet以太网external modem外置调制解调器Extranet外联网fiber-optic cable 光纤电缆Firewall防火墙global positioning system (GPS)全球卫星定位系统hierarchical network树型网络home network家庭网络host computer主机Hub集线器Infrared红外线internal modem 内置式调制解调器Intranet内联网IP address (Internet Protocol address)IP地址local area network (LAN)局域网low bandwidth低频带宽medium band 中频波段metropolitan area network (MAN) 城域网Microwave微波Modem调制解调器Modulation调制network administrator网络管理员network architecture网络体系结构network gateway 网关network hub 网络集线器network interface card (NIC)网络接口卡network operating system (NOS)网络操作系统Node 节点Packet 数据包PC card modem PC卡调制解调器peer-to-peer network system 对等网络系统Polling 轮流检测Protocol协议proxy server代理服务器ring network环型网络Satellite卫星satellite/air connection service卫星互连服务Server服务器star network 星型网络Strategy策略T1, T2, T3, T4 linestelephone line电话线terminal network 终端网络time-sharing system并发式系统Topology拓扑结构transfer rate传输率TCP/IP (transmission control protocol/Internet protocol)传输控制协议/因特网协议voiceband声音带宽wide area network (W AN)广域网Wi-FI (wireless fidelity)无限保真wireless LAN (WLAN)无线局域网wireless modem无线调制解调器wireless receiver无线接收器课后习题答案:Ch1: Ch6:bbabd,dacdd; eichafgbdj. dbcbb,aacbd; jachgidefb.Ch3: Ch7:dcbdd,abccb; jachbdiegf. Ababd,adcdb; iefjabgdch.Ch4: Ch8:aaaba,bcbab; igdecfhbja. dacac,acddc; gajidbhcfe.Ch5: Ch9:cdcaa,cbbac; gdfbghaeic. abadc,dbbbd; gbaidecjhf.中英文对照的ERP专业词汇介绍:B2C、B2B、ASP、APS、BOM、C/S、CAD、CAM、CPC、EDI、GUI、ISO、MIS、PM、SCM、SQL、TQM、line item、planned capacity、rated capacity、virtual warehouse……1 ABM Activity-based Management 基于作业活动管理2 AO Application Outsourcing 应用程序外包3 APICS American Production and Inventory Control Society,Inc 美国生产与库存管理协会4 APICS Applied Manufacturing Education Series 实用制造管理系列培训教材5 APO Advanced Planning and Optimization 先进计划及优化技术6 APS Advanced Planning and Scheduling 高级计划与排程技术7 ASP Application Service/Software Provider 应用服务/软件供应商8 ATO Assemble To Order 定货组装9 ATP Available To Promise 可供销售量(可签约量)10 B2B Business to Business 企业对企业(电子商务)11 B2C Business to Consumer 企业对消费者(电子商务)12 B2G Business to Government 企业对政府(电子商务)13 B2R Business to Retailer 企业对经销商(电子商务)14 BIS Business Intelligence System 商业智能系统15 BOM Bill Of Materials 物料清单16 BOR Bill Of Resource 资源清单17 BPR Business Process Reengineering 业务/企业流程重组18 BPM Business Process Management 业务/企业流程管理19 BPS Business Process Standard 业务/企业流程标准20 C/S Client/Server(C/S)\Browser/Server(B/S) 客户机/服务器\浏览器/服务器21 CAD Computer-Aided Design 计算机辅助设计22 CAID Computer-Aided Industrial Design 计算机辅助工艺设计23 CAM Computer-Aided Manufacturing 计算机辅助制造24 CAPP Computer-Aided Process Planning 计算机辅助工艺设计25 CASE Computer-Aided Software Engineering 计算机辅助软件工程26 CC Collaborative Commerce 协同商务27 CIMS Computer Integrated Manufacturing System 计算机集成制造系统28 CMM Capability Maturity Model 能力成熟度模型29 COMMS Customer Oriented Manufacturing Management System 面向客户制造管理系统30 CORBA Common Object Request Broker Architecture 通用对象请求代理结构31 CPC Collaborative Product Commerce 协同产品商务32 CPIM Certified Production and Inventory Management 生产与库存管理认证资格33 CPM Critical Path Method 关键线路法34 CRM Customer Relationship Management 客户关系管理35 CRP capacity requirements planning 能力需求计划36 CTI Computer Telephony Integration 电脑电话集成(呼叫中心)37 CTP Capable to Promise 可承诺的能力38 DCOM Distributed Component Object Model 分布式组件对象模型39 DCS Distributed Control System 分布式控制系统40 DMRP Distributed MRP 分布式MRP41 DRP Distribution Resource Planning 分销资源计划42 DSS Decision Support System 决策支持系统43 DTF Demand Time Fence 需求时界44 DTP Delivery to Promise 可承诺的交货时间45 EAI Enterprise Application Integration 企业应用集成46 EAM Enterprise Assets Management 企业资源管理47 ECM Enterprise Commerce Management 企业商务管理48 ECO Engineering Change Order 工程变更订单49 EDI Electronic Data Interchange 电子数据交换50 EDP Electronic Data Processing 电子数据处理51 EEA Extended Enterprise Applications 扩展企业应用系统52 EIP Enterprise Information Portal 企业信息门户53 EIS Executive Information System 高层领导信息系统54 EOI Economic Order Interval 经济定货周期55 EOQ Economic Order Quantity 经济订货批量(经济批量法)56 EPA Enterprise Proficiency Analysis 企业绩效分析57 ERP Enterprise Resource Planning 企业资源计划58 ERM Enterprise Resource Management 企业资源管理59 ETO Engineer To Order 专项设计,按订单设计60 FAS Final Assembly Schedule 最终装配计划61 FCS Finite Capacity Scheduling 有限能力计划62 FMS Flexible Manufacturing System 柔性制造系统63 FOQ Fixed Order Quantity 固定定货批量法64 GL General Ledger 总账65 GUI Graphical User Interface 图形用户界面66 HRM Human Resource Management 人力资源管理67 HRP Human Resource Planning 人力资源计划68 IE Industry Engineering/Internet Exploration 工业工程/浏览器69 ISO International Standard Organization 国际标准化组织70 ISP Internet Service Provider 互联网服务提供商71 ISPE International Society for Productivity Enhancement 国际生产力促进会72 IT/GT Information/Group Technology 信息/成组技术73 JIT Just In Time 准时制造/准时制生产74 KPA Key Process Areas 关键过程域75 KPI Key Performance Indicators 关键业绩指标76 LP Lean Production 精益生产77 MES Manufacturing Executive System 制造执行系统78 MIS Management Information System 管理信息系统79 MPS Master Production Schedule 主生产计划80 MRP Material Requirements Planning 物料需求计划81 MRPII Manufacturing Resource Planning 制造资源计划82 MTO Make To Order 定货(订货)生产83 MTS Make To Stock 现货(备货)生产84 OA Office Automation 办公自动化85 OEM Original Equipment Manufacturing 原始设备制造商86 OPT Optimized Production Technology 最优生产技术87 OPT Optimized Production Timetable 最优生产时刻表88 PADIS Production And Decision Information System 生产和决策管理信息系统89 PDM Product Data Management 产品数据管理90 PERT Program Evaluation Research Technology 计划评审技术91 PLM Production Lifecycle Management 产品生命周期管理92 PM Project Management 项目管理93 POQ Period Order Quantity 周期定量法94 PRM Partner Relationship Management 合作伙伴关系管理95 PTF Planned Time Fence 计划时界96 PTX Private Trade Exchange 自用交易网站97 RCCP Rough-Cut Capacity Planning 粗能力计划98 RDBM Relational Data Base Management 关系数据库管理99 RPM Rapid Prototype Manufacturing 快速原形制造100 RRP Resource Requirements Planning 资源需求计划101 SCM Supply Chain Management 供应链管理102 SCP Supply Chain Partnership 供应链合作伙伴关系103 SFA Sales Force Automation 销售自动化104 SMED Single-Minute Exchange Of Dies 快速换模法105 SOP Sales And Operation Planning 销售与运作规划106 SQL Structure Query Language 结构化查询语言107 TCO Total Cost Ownership 总体运营成本108 TEI Total Enterprise Integration 全面企业集成109 TOC Theory Of Constraints/Constraints managemant 约束理论/约束管理110 TPM Total Productive Maintenance 全员生产力维护111 TQC Total Quality Control 全面质量控制112 TQM Total Quality Management 全面质量管理113 WBS Work Breakdown System 工作分解系统114 XML eXtensible Markup Language 可扩展标记语言115 ABC Classification(Activity Based Classification) ABC分类法116 ABC costing 作业成本法117 ABC inventory control ABC 库存控制118 abnormal demand 反常需求119 acquisition cost ,ordering cost 定货费120 action message 行为/活动(措施)信息121 action report flag 活动报告标志122 activity cost pool 作业成本集123 activity-based costing(ABC) 作业基准成本法/业务成本法124 actual capacity 实际能力125 adjust on hand 调整现有库存量126 advanced manufacturing technology 先进制造技术127 advanced pricing 高级定价系统128 AM Agile Manufacturing 敏捷制造129 alternative routing 替代工序(工艺路线)130 Anticipated Delay Report 拖期预报131 anticipation inventory 预期储备132 apportionment code 分摊码133 assembly parts list 装配零件表134 automated storage/retrieval system 自动仓储/检索系统135 Automatic Rescheduling 计划自动重排136 available inventory 可达到库存137 available material 可用物料138 available stock 达到库存139 available work 可利用工时140 average inventory 平均库存141 back order 欠交(脱期)订单142 back scheduling 倒排(序)计划/倒序排产?143 base currency 本位币144 batch number 批号145 batch process 批流程146 batch production 批量生产147 benchmarking 标杆瞄准(管理)148 bill of labor 工时清单149 bill of lading 提货单150 branch warehouse 分库151 bucketless system 无时段系统152 business framework 业务框架153 business plan 经营规划154 capacity level 能力利用水平155 capacity load 能力负荷156 capacity management 能力管理157 carrying cost 保管费158 carrying cost rate 保管费率159 cellular manufacturing 单元式制造160 change route 修改工序161 change structure 修改产品结构162 check point 检查点163 closed loop MRP 闭环MRP164 Common Route Code(ID) 通用工序标识165 component-based development 组件(构件)开发技术166 concurrent engineering 并行(同步)工程167 conference room pilot 会议室模拟168 configuration code 配置代码169 continuous improvement 进取不懈170 continuous process 连续流程171 cost driver 作业成本发生因素172 cost driver rate 作业成本发生因素单位费用173 cost of stockout 短缺损失174 cost roll-up 成本滚动计算法175 crew size 班组规模176 critical part 急需零件177 critical ratio 紧迫系数178 critical work center 关键工作中心179 CLT Cumulative Lead Time 累计提前期180 current run hour 现有运转工时181 current run quantity 现有运转数量182 customer care 客户关怀183 customer deliver lead time 客户交货提前期184 customer loyalty 客户忠诚度185 customer order number 客户订单号186 customer satisfaction 客户满意度187 customer status 客户状况188 cycle counting 周期盘点189 DM Data Mining 数据挖掘190 Data Warehouse 数据仓库191 days offset 偏置天数192 dead load 空负荷193 demand cycle 需求周期194 demand forecasting 需求预测195 demand management 需求管理196 Deming circle 戴明环197 demonstrated capacity 实际能力198 discrete manufacturing 离散型生产199 dispatch to 调度200 DRP Distribution Requirements Planning 分销需求计划201 drop shipment 直运202 dunning letter 催款信203 ECO workbench ECO工作台204 employee enrolled 在册员工205 employee tax id 员工税号206 end item 最终产品207 engineering change mode flag 工程变更方式标志208 engineering change notice 工程变更通知209 equipment distribution 设备分配210 equipment management 设备管理211 exception control 例外控制212 excess material analysis 呆滞物料分析213 expedite code 急送代码214 external integration 外部集成215 fabrication order 加工订单216 factory order 工厂订单217 fast path method 快速路径法218 fill backorder 补足欠交219 final assembly lead time 总装提前期220 final goods 成品221 finite forward scheduling 有限顺排计划222 finite loading 有限排负荷223 firm planned order 确认的计划订单224 firm planned time fence 确认计划需求时界225 FPR Fixed Period Requirements 定期用量法226 fixed quantity 固定数量法227 fixed time 固定时间法228 floor stock 作业现场库存229 flow shop 流水车间230 focus forecasting 调焦预测231 forward scheduling 顺排计划232 freeze code 冻结码233 freeze space 冷冻区234 frozen order 冻结订单235 gross requirements 毛需求236 hedge inventory 囤积库存237 in process inventory 在制品库存238 in stock 在库239 incrementing 增值240 indirect cost 间接成本241 indirect labor 间接人工242 infinite loading 无限排负荷243 input/output control 投入/产出控制244 inspection ID 检验标识245 integrity 完整性246 inter companies 公司内部间247 interplant demands 厂际需求量248 inventory carry rate 库存周转率249 inventory cycle time 库存周期250 inventory issue 库存发放251 inventory location type 仓库库位类型252 inventory scrap 库存报废量253 inventory transfers 库存转移254 inventory turns/turnover 库存(资金)周转次数255 invoice address 发票地址256 invoice amount gross 发票金额257 invoice schedule 发票清单258 issue cycle 发放周期259 issue order 发送订单260 issue parts 发放零件261 issue policy 发放策略262 item availability 项目可供量263 item description 项目说明264 item number 项目编号265 item record 项目记录266 item remark 项目备注267 item status 项目状态268 job shop 加工车间269 job step 作业步骤270 kit item 配套件项目271 labor hour 人工工时272 late days 延迟天数273 lead time 提前期274 lead time level 提前期水平275 lead time offset days 提前期偏置(补偿)天数276 least slack per operation 最小单个工序平均时差277 line item 单项产品278 live pilot 应用模拟279 load leveling 负荷量280 load report 负荷报告281 location code 仓位代码282 location remarks 仓位备注283 location status 仓位状况284 lot for lot 按需定货(因需定量法/缺补法)285 lot ID 批量标识286 lot number 批量编号287 lot number traceability 批号跟踪288 lot size 批量289 lot size inventory 批量库存290 lot sizing 批量规划291 low level code 低层(位)码292 machine capacity 机器能力293 machine hours 机时294 machine loading 机器加载295 maintenance ,repair,and operating supplies 维护修理操作物料296 make or buy decision 外购或自制决策297 management by exception 例外管理法298 manufacturing cycle time 制造周期时间299 manufacturing lead time 制造提前期300 manufacturing standards 制造标准301 master scheduler 主生产计划员302 material 物料303 material available 物料可用量304 material cost 物料成本305 material issues and receipts 物料发放和接收306 material management 物料管理307 material manager 物料经理308 material master,item master 物料主文件309 material review board 物料核定机构310 measure of velocity 生产速率水平311 memory-based processing speed 基于存储的处理速度312 minimum balance 最小库存余量313 Modern Materials Handling 现代物料搬运314 month to date 月累计315 move time , transit time 传递时间316 MSP book flag MPS登录标志317 multi-currency 多币制318 multi-facility 多场所319 multi-level 多级320 multi-plant management 多工厂管理321 multiple location 多重仓位322 net change 净改变法323 net change MRP 净改变式MRP324 net requirements 净需求325 new location 新仓位326 new parent 新组件327 new warehouse 新仓库328 next code 后续编码329 next number 后续编号330 No action report 不活动报告331 non-nettable 不可动用量332 on demand 急需的333 on-hand balance 现有库存量334 on hold 挂起335 on time 准时336 open amount 未清金额337 open order 未结订单/开放订单338 order activity rules 订单活动规则339 order address 订单地址340 order entry 订单输入341 order point 定货点342 order point system 定货点法343 order policy 定货策略344 order promising 定货承诺345 order remarks 定货备注346 ordered by 定货者347 overflow location 超量库位348 overhead apportionment/allocation 间接费分配349 overhead rate,burden factor,absorption rate 间接费率350 owner's equity 所有者权益351 parent item 母件352 part bills 零件清单353 part lot 零件批次354 part number 零件编号355 people involvement 全员参治356 performance measurement 业绩评价357 physical inventory 实际库存358 picking 领料/提货359 planned capacity 计划能力360 planned order 计划订单361 planned order receipts 计划产出量362 planned order releases 计划投入量363 planning horizon 计划期/计划展望期364 point of use 使用点365 Policy and procedure 工作准则与工作规程366 price adjustments 价格调整367 price invoice 发票价格368 price level 物价水平369 price purchase order 采购订单价格370 priority planning 优先计划371 processing manufacturing 流程制造372 product control 产品控制373 product family 产品系列374 product mix 产品搭配组合375 production activity control 生产作业控制376 production cycle 生产周期377 production line 产品线378 production rate 产品率379 production tree 产品结构树380 PAB Projected Available Balance 预计可用库存(量) 381 purchase order tracking 采购订单跟踪382 quantity allocation 已分配量383 quantity at location 仓位数量384 quantity backorder 欠交数量385 quantity completion 完成数量386 quantity demand 需求量387 quantity gross 毛需求量388 quantity in 进货数量389 quantity on hand 现有数量390 quantity scrapped 废品数量391 quantity shipped 发货数量392 queue time 排队时间393 rated capacity 额定能力394 receipt document 收款单据395 reference number 参考号396 regenerated MRP 重生成式MRP397 released order 下达订单398 reorder point 再订购点399 repetitive manufacturing 重复式生产(制造)400 replacement parts 替换零件401 required capacity 需求能力402 requisition orders 请购单403 rescheduling assumption 重排假设404 resupply order 补库单405 rework bill 返工单406 roll up 上滚407 rough cut resource planning 粗资源计划408 rounding amount 舍入金额409 run time 加工(运行)时间410 safety lead time 安全提前期411 safety stock 安全库存412 safety time 保险期413 sales order 销售订单414 scheduled receipts 计划接收量(预计入库量/预期到货量) 415 seasonal stock 季节储备416 send part 发送零件417 service and support 服务和支持418 service parts 维修件419 set up time 准备时间420 ship address 发运地址421 ship contact 发运单联系人422 ship order 发货单423 shop calendar 工厂日历(车间日历)424 shop floor control 车间作业管理(控制)425 shop order , work order 车间订单426 shrink factor 损耗因子(系数)427 single level where used 单层物料反查表428 standard cost system 标准成本体系429 standard hours 标准工时430 standard product cost 标准产品成本431 standard set up hour 标准机器设置工时432 standard unit run hour 标准单位运转工时433 standard wage rate 标准工资率434 status code 状态代码435 stores control 库存控制436 suggested work order 建议工作单437 supply chain 供应链438 synchronous manufacturing 同步制造/同期生产439 time bucket 时段(时间段)。
操作系统课后习题总结(清华大学出版社)

习题二参考答案4、答:在生产者—消费者问题中,Producer进程中P(empty)和P(mutex)互换先后次序。
先执行P(mutex),假设成功,生产者进程获得对缓冲区的访问权,但如果此时缓冲池已满,没有空缓冲区可供其使用,后续的P(empty)原语没有通过,Producer阻塞在信号量empty 上,而此时mutex已被改为0,没有恢复成初值1。
切换到消费者进程后,Consumer进程执行P(full)成功,但其执行P(mutex)时由于Producer正在访问缓冲区,所以不成功,阻塞在信号量mutex上。
生产者进程和消费者进程两者均无法继续执行,相互等待对方释放资源,会产生死锁。
在生产者和消费者进程中,V操作的次序无关紧要,不会出现死锁现象。
5、答:6、答:设信号量sp用于控制对盘子的互斥操作,信号量sg1用于计数,表示盘子中的苹果数目,信号量sg2用于计数,表示盘子中的桔子数目。
Semaphore sp=1,sg1=0,sg2=0dad(){while(1){ prepare an apple;p(sp);put an apple on the plate;v(sg2);}}mom(){while(1){prepare an orange;p(sp);put an orange on the plate;v(sg1);}}son(){while(1){p(sg1);take an orange from the plate;v(sg);eat the orange;}}daughter(){while(1){p(sg2);take an apple from the plate;v(sg);eat the apple;}}7、答:为了使写者优先,在原来的读优先算法基础上增加一个初值为1的信号量S,使得当至少有一个写者准备访问共享对象时,它可使后续的读者进程等待写完成;初值为0的整型变量writecount,用来对写者进行计数;初值为1的互斥信号量wmutex,用来实现多个写者对writecount的互斥访问。
操作系统-精髓与设计原理 WILLIAM STALLINGS 课后答案
www.khd课a后答w案.网com
-2-
www.khd课后a答w案.网com
TABLE OF CONTENTS Chapter 1 Computer System Overview...............................................................4 Chapter 2 Operating System Overview...............................................................7 Chapter 3 Process Description and Control........................................................8 Chapter 5 Concurrency: Mutual Exclusion and Synchronization .................10 Chapter 6 Concurrency: Deadlock and Starvation ..........................................17 Chapter 7 Memory Management .......................................................................20 Chapter 8 Virtual Memory ..................................................................................22 Chapter 9 Uniprocessor Scheduling...................................................................28 Chapter 11 I/O Management and Disk Scheduling ........................................32 Chapter 12 File Management ..............................................................................34
计算机操作系统课后习题答案 第四版
计算机操作系统课后习题答案第四版1. Describe the concept of a process and its typical attributes.A process is an entity that represents the execution of a program on a computer system. It consists of the program code, data, and execution context. The typical attributes of a process include a unique process identifier (PID), a program counter that keeps track of the next instruction to be executed, a stack that holds temporary data, a heap for dynamically allocated memory, and a set of resources such as open files and I/O devices.2. Explain the difference between process control block (PCB) and thread control block (TCB).A process control block (PCB) is a data structure used by the operating system to manage a process. It contains information about the process, such as its current state, scheduling information, memory allocation, and I/O status. On the other hand, a thread control block (TCB) is a data structure used to manage a thread within a process. It contains information specific to the thread, such as its program counter, stack pointer, and register values. Multiple threads can exist within a single process, sharing the same resources.3. Discuss the advantages and disadvantages of using threads instead of processes.One advantage of using threads instead of processes is that they are more lightweight in terms of resource consumption. Since threads share the same memory space, inter-thread communication is faster and uses less memory compared to inter-process communication. Threads also enable betterutilization of multi-core processors, as multiple threads can run in parallel on different cores.However, there are also disadvantages to using threads. The main disadvantage is that threads within the same process can interfere with each other if not properly synchronized. This can lead to issues such as race conditions, deadlocks, and data corruption. Additionally, debugging and testing multi-threaded applications can be more complex and time-consuming compared to single-threaded applications.4. Explain the concepts of mutual exclusion, deadlock, and starvation in the context of operating systems.Mutual exclusion refers to the concept of ensuring that only one process or thread can access a shared resource at a time. This is typically achieved using synchronization mechanisms such as locks or semaphores. Mutual exclusion is important to prevent data corruption or inconsistent results due to concurrent access.Deadlock occurs when two or more processes are waiting indefinitely for each other to release resources, resulting in a situation where none of the processes can proceed. It can happen when processes acquire resources in a different order or when they fail to release resources properly. Deadlocks can lead to system failures and require careful resource allocation and scheduling algorithms to avoid.Starvation refers to a situation where a process is unable to acquire the necessary resources to progress, despite its requests. It can occur when resource allocation policies favor certain processes over others, leading to along waiting time for some processes. Starvation can negatively impact the performance and fairness of the system.5. Discuss the purpose and functionality of memory management units (MMUs) in operating systems.Memory management units (MMUs) are hardware components responsible for translating virtual memory addresses used by processes into physical memory addresses. They provide address translation and memory protection mechanisms. MMUs use page tables or translation lookaside buffers (TLBs) to map virtual addresses to physical addresses, allowing processes to utilize more memory than physically available.MMUs also enforce memory protection by assigning memory access permissions to different regions of the process's address space. This prevents processes from accessing memory that they should not be able to, ensuring data integrity and security. Additionally, MMUs help optimize memory access by caching frequently used memory pages in the TLB, reducing the number of costly memory accesses.Overall, MMUs play a crucial role in memory management, allowing processes to have their own virtual address spaces and ensuring efficient and secure memory access.(Note: The above answers are just sample content for the given topic. Please modify and expand them according to your needs, as the word limit has been exceeded.)。
操作系统课后习题答案
《操作系统(英文版)》第1-6章学习笔记本笔记只为学习者提供有限帮助,并不一定覆盖所有的重点。
课程的重点请参考课堂讲义。
第一章1.1一个计算机系统的基本硬件单元有处理器、主存、I/O模块和系统总线。
1.2处理器寄存器可分为2类,一类是用户可见的寄存器,程序员在程序中可以使用这些寄存器;另一类是控制和状态寄存器,一般被处理器和操作系统使用,用来控制处理器的操作和程序的运行。
用户可见的寄存器包括数据寄存器和地址寄存器,后者如栈指针(SP)等。
控制和状态寄存器包括程序计数器(PC)和指令寄存器(IR)等。
1.3一个指令周期包括2个阶段:指令的读取和指令的执行。
指令的读取就是从PC寄存器的值所指的内存中读取指令,将它放入IR寄存器,同时将PC的值加1(就是下个周期要读取的指令的地址)。
指令的执行就是执行这一条指令,可能是数据在处理器和内存、I/O之间的传输,或者数据的处理等。
1.4为什么要有中断?中断的主要目的是为了提高处理器的利用率。
处理器的速度远大于I/O的速度,当一个进程进行一个I/O操作时,我们不希望进程一直等待I/O操作的完成而白白浪费处理器的时间。
所以就让进程做其它的事,或者让处理器运行其它的进程;等I/O操作(I/O 操作的大部分内容可以由I/O模块独立完成,而不需要处理器的参与)完成了,再用中断的方式通知进程。
这是I/O中断的由来。
当然系统中还有其它的中断,比如时钟中断。
在多任务系统中,为了让多个进程看起来并行地运行,我们将处理器的时间分成一小段一小段(比如50ms),每一个进程运行时都给它一小段的时间,时间到了,就算它还没运行完,也要把处理器让给其它的进程,这样每个进程看起来都在往前走。
“时间到了”这个事件就是一个时钟中断。
当中断发生时,当前正在运行的进程就要暂停,它的当前的状态就要先保存起来(象PC之类的数值),处理器将执行中断处理程序(ISR)中的指令。
处理器执行完了ISR中的指令,就恢复被暂停的那个进程的状态,并且继续运行这个进程。
《计算机英语(第4版)》课后练习参考答案
Unit Two/Section AI.Fill in the blanks with the information given in the text:1.input; output; storage2.Basic Input/Output System3.flatbed; hand-held4.LCD-based5.dot-matrix; inkjet6.disk; memory7.volatile8.serial; parallelII.Translate the following terms or phrases from English into Chinese and vice versa:1.function key功能键,操作键,函数键2.voice recognition module 语音识别模块3.touch-sensitive region 触敏区4.address bus 地址总线5.flatbed scanner 平板扫描仪6.dot-matrix printer点阵打印机(针式打印机)7.parallel connection 并行连接8.cathode ray tube 阴极射线管9.video game 电子游戏10.audio signal 音频信号11.操作系统operating system12.液晶显示(器) LCD (liquid crystal display)13.喷墨打印机inkjet printer14.数据总线data bus15.串行连接serial connection16.易失性存储器volatile memory17.激光打印机laser printer18.磁盘驱动器disk drive19.基本输入 / 输出系统BIOS (Basic Inpul/Output System)changes if necessary:An access control mechanism mediates between a user (or a process executing on behalf of a user) and system resources、such as applications, operating systems, firewalls, routers, files, and databases. The system must first authenticate(验证)a user seeking access. Typically the authemiccition function determines whether the user is permitted to access the system at all. Then the access control function determines if the specific requested access by this user is permitted. A security administrator maintains an authorization(授权)d-sbase that specifies what type of access to which resources is allowed for this user. The access control function consults this database to detemine whether to grant access. An auditing function monitors and keeps a record of user accesses to system resources.In practice, a number of com—cmetus may cooperatively share the access control function. All mii,戏systems have at least a rudimentary(基本的),and in many cases a quite robust. access control component. Add-on security packages can add to the witi*access control capabilities of the OS. Particular applications or utilities,such as a database management system, also incorporate access control functions. External devices, such as firewalls, can also provide access control services.IV. Translate the following passage from English into Chinese:入侵者攻击从温和的到严重的形形色色。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1.1What are the three main purposes of an operating system?(1) Interface between the hardware and user;(2) manage the resource of hardware and software;(3) abstraction of resource;1.2 List the four steps that are necessary to run a program on a completely dedicated machine. Preprocessing > Processing > Linking > Executing.1.6 Define the essential properties of the following types of operating systems:a. Batchb. Interactivec. Time sharingd. Real timee. Networkf. Distributed1.7 We have stressed the need for an operating system to make efficient use of the computing hardware. When is it appropriate for the operating system to forsake this principle and to“waste” resources? Why is such a system not really wasteful?2.2 How does the distinction between monitor mode and user mode function as a rudimentary form of protection (security) system?2.3 What are the differences between a trap and an interrupt? What is the use of each function?2.5 Which of the following instructions should be privileged?a. Set value of timer.b. Read the clock.c. Clear memory.d. Turn off interrupts.e. Switch from user to monitor mode.3OS Exercise BookClass No. Name2.8 Protecting the operating system is crucial to ensuring that the computer system operates correctly. Provision of this protection is the reason behind dual-mode operation, memory protection, and the timer. To allow maximum flexibility, however, we would also like to place minimal constraints on the user.The following is a list of operations that are normally protected. What is the minimal set of instructions that must be protected?a. Change to user mode.b. Change to monitor mode.c. Read from monitor memory.d. Write into monitor memory.e. Fetch an instruction from monitor memory.f. Turn on timer interrupt.g. Turn off timer interrupt.3.6 List five services provided by an operating system. Explain how each provides convenience to the users. Explain also in which cases it would be impossible for user-level programs to provide these services.3.7 What is the purpose of system calls?3.10 What is the purpose of system programs?4.1 MS-DOS provided no means of concurrent processing. Discuss three major complications that concurrent processing adds to an operating system.5OS Exercise BookClass No. Name4.6 The correct producer–consumer algorithm in Section 4.4 allows only n-1 buffers to be full at any one time. Modify the algorithm to allow all buffers to be utilized fully.5.1 Provide two programming examples of multithreading giving improve performance overa single-threaded solution.5.3 What are two differences between user-level threads and kernel-level threads? Under what circumstances is one type better than the other?6.3 Consider the following set of processes, with the length of the CPU-burst time given inmilliseconds:Process Burst Time PriorityP1 10 3P2 1 1P3 2 3P4 1 4P5 5 2The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.a. Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF, a nonpreemptive priority (a smaller priority number implies a higher priority), and RR (quantum = 1) scheduling.b. What is the turnaround time of each process for each of the scheduling algorithms in part a?c. What is the waiting time of each process for each of the scheduling algorithms in part a?d. Which of the schedules in part a results in the minimal average waiting time (over all processes)?Answer:6.4 Suppose that the following processes arrive for execution at the times indicated. Each process will run the listed amount of time. In answering the questions, use nonpreemptive scheduling and base all decisions on the information you have at the time the decision7OS Exercise BookClass No. Namemust be made.a. What is the average turnaround time for these processes with the FCFS scheduling algorithm?b. What is the average turnaround time for these processes with the SJF scheduling algorithm?c. The SJF algorithm is supposed to improve performance, but notice that we chose to run process P1 at time 0 because we did not know that two shorter processes would arrive soon. Compute what the average turnaround time will be if the CPU is leftidle for the first 1 unit and then SJF scheduling is used. Remember that processes P1 and P2 are waiting during this idle time, so their waiting time may increase. This algorithm could be known as future-knowledge scheduling.6.10 Explain the differences in the degree to which the following scheduling algorithms discriminate in favor of short processes:a. FCFSb. RRc. Multilevel feedback queues7.7 Show that, if the wait and signal operations are not executed atomically,then mutual exclusion may be violated.7.8 The Sleeping-Barber Problem. A barbershop consists of a waiting room with n chairs and the barber room containing the barber chair. If there are no customers to be served,the barber goes to sleep. If a customer enters the barbershop and all chairs are occupied, then the customer leaves the shop.If the barber is busy but chairs are available, then the customer sits in one of the free chairs. If the barber is asleep, the customer wakes up the barber. Write a program to coordinate the barber and the customers.8.2 Is it possible to have a deadlock involving only one single process? Explain your answer.8.4 Consider the traffic deadlock depicted in Figure 8.11.a. Show that the four necessary conditions for deadlock indeed hold in this example.b. State a simple rule that will avoid deadlocks in this system.8.13 Consider the following snapshot of a system:Allocation Max AvailableA B C D A B C D A B C DP0 0 0 1 2 0 0 1 2 1 5 2 0P1 1 0 0 0 1 7 5 0P2 1 3 5 4 2 3 5 6P3 0 6 3 2 0 6 5 2P4 0 0 1 4 0 6 5 6Answer the following questions using th e banker’s algorithm:a. What is the content of the matrix Need?b. Is the system in a safe state?c. If a request from process P1 arrives for (0,4,2,0), can the request be granted immediately?9.5 Given memory partitions of 100K, 500K, 200K, 300K, and 600K (in order), how would each of the First-fit, Best-fit, and Worst-fit algorithms place processes of 212K, 417K, 112K, and 426K (in order)? Which algorithm makes the most efficient use of memory?9OS Exercise BookClass No. Name9.8 Consider a logical address space of eight pages of 1024 words each, mapped onto a physicalmemory of 32 frames.a. How many bits are there in the logical address?b. How many bits are there in the physical address?9.16 Consider the following segment table:Segment Base Length0219 60012300 14290 10031327 58041952 96What are the physical addresses for the following logical addresses?a. 0,430b. 1,10c. 2,500d. 3,400e. 4,11210.2 Assume that you have a page reference string for a process with m frames (initially all empty). The page reference string has length p with n distinct page numbers occur in it. For any page-replacement algorithms,a. What is a lower bound on the number of page faults?b. What is an upper bound on the number of page faults?10.11 Consider the following page reference string:1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.How many page faults would occur for the following replacement algorithms, assuming one, two, three, four, five, six, or seven frames? Remember all frames are initially empty, so your first unique pages will all cost one fault each.LRU replacementFIFO replacementOptimal replacement11OS Exercise BookClass No. Name11.7 Explain the purpose of the open and close operations.11.9 Give an example of an application in which data in a file should be accessed in the following order:a. Sequentiallyb. Randomly11.12 Consider a system that supports 5000 users. Suppose that you want to allow 4990 of these users to be able to access one file.a. How would you specify this protection scheme in UNIX?b. Could you suggest another protection scheme that can be used more effectively for this purpose than the scheme provided by UNIX?12.1 Consider a file currently consisting of 100 blocks. Assume that the file control block (andthe index block, in the case of indexed allocation) is already in memory. Calculate how many disk I/O operations are required for contiguous, linked, and indexed (single-level) allocation strategies, if, for one block, the following conditions hold. In the contiguousallocation case, assume that there is no room to grow in the beginning, but there is room to grow in the end. Assume that the block information to be added is stored in memory.a. The block is added at the beginning.b. The block is added in the middle.c. The block is added at the end.d. The block is removed from the beginning.e. The block is removed from the middle.f. The block is removed from the end.13.2 Consider the following I/O scenarios on a single-user PC.a. A mouse used with a graphical user interfaceb. A tape drive on a multitasking operating system (assume no device preallocation is available)c. A disk drive containing user filesd. A graphics card with direct bus connection, accessible through memory-mappedI/OFor each of these I/O scenarios, would you design the operating system to use buffering, spooling, caching, or a combination? Would you use polled I/O, or interrupt-driven I/O? Give reasons for your choices.13OS Exercise BookClass No. Name14.2 Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending requests, in FIFO order, is86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests, for each of the following diskschedulingalgorithms?a. FCFSb. SSTFc. SCANd. LOOKe. C-SCAN1.1 1.62.3 2.53.7 6.3 6。