ImageVerifierCode 换一换
格式:DOCX , 页数:8 ,大小:43.69KB ,
资源ID:6855572      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/6855572.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(斯坦福大学操作系统期末考试题英文.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

斯坦福大学操作系统期末考试题英文.docx

1、斯坦福大学操作系统期末考试题英文FINAL EXAM INTRODUCTION TO OPERATING SYSTEMS CSE421May 2, 2003 (Spring 2003)NAME : _STUDENT NUMBER : _-_ INSTRUCTIONSThis is a closed book but you are allowed two sheets of information to refer to. You have 180 minutes to complete 10 questions. Please write neatly and clearly. To rec

2、eive partial credit, you must show all work for your answers. You should have 11 pages in this exam book, some of which are blank to allow room for your answers.QuestionGrade1 _/202_/203_/104_/145_/206 _/167_/108_/109_/1010_/10Total_/140Raw Score : _/ 140 = _/ 1001) 20 Points DeadlockConsider the fo

3、llowing snapshot of a system (P=Process, R=Resource) :AvailableRARBRCRD8597Maximum DemandRARBRCRDP03214P10252P25105P31530P43033Current AllocationRARBRCRDP01011P10121P24003P31210P41030Answer the following questions using bankers algorithm:a) Calculate the Needs matrix:NeedsRARBRCRDP0P1P2P3P4b) Is the

4、 system in a safe state? If so, show a safe order in which the processes can run.c) Can a request of one instance of RA by Process P0 be granted safely according to Bankers algorithm?2) 20 points Logical and Physical Address SpacesThe Kiwi memory architecture design team has a dilemma. The team is c

5、onsidering several different memory configuration variations for an upcoming machine design. Consider the following designs (All memory accesses are in terms of bytes, and all are using paging techniques):CharacteristicDesign 1Design 2Design 3Physical Memory Address Width8 bit16 bit32 bitLogical Add

6、ress Width12 bit20 bit24 bitPage/Frame size in bytes16 bytes32 bytes64 bytesPage Table TypeSingleSingleDouble a) 6 points For each design, list the maximum number of pages each process can access in logical address space.b) 6 points For each design, list the maximum number of frames in physical memo

7、ry.c) 6 points For design 3, if the outermost page table holds 32 entries, how many bits are needed in the logical address to represent the outer page table? How many bits are used for representing the offset within a page? How many bits are needed in the logical address in order to represent the in

8、ner page table?3) 4+4+2= 10 points Page Replacement Given the following reference string:0 2 1 3 0 1 4 0 1 2 3 4 showa) Page faults occur during the processing of the reference scheme?b) The hit ratio is for each of the following policies in a pure demand paging system?c) What do you observe when yo

9、u move from Scheme 1 to Scheme 2? Explain.Scheme 1: FIFO with three pages of main memoryScheme 2: FIFO with four pages of main memory4) 6+4+4= 14 points Address TranslationConsider a system where the virtual memory page size is 2K (2048 bytes), and main memory consists of 4 page frames. Now consider

10、 a process which requires 8 pages of storage. At some point during its execution, the page table is as shown below:Virtual pageValid Physical page0No1No2Yes13No4Yes35No6Yes07Yes21. List the virtual address ranges for each virtual page.2. List the virtual address ranges that will result in a page fau

11、lt.3. Give the main memory (physical) addresses for each of the following virtual addresses (all numbers decimal): (i) 8500, (ii) 14000, (iii) 5000, (iv) 2100.Policy : _5) 20 points File System ImplementationSuppose a file system is constructed using blocks of 8 words each. In this system, a word ha

12、s a length of 4 bytes. The disk pack used to hold the file system consists of 32 blocks. The initial block (block 0) contains a directory entry. The directory entry contains the filename of a single file in this file system, and a pointer to the first I-node in block 1. The I-node structure is as fo

13、llows (word, value): 0Permission word1File Size2Direct block3Direct block4Direct block5Direct block6Single-indirect7Double-indirectThe file contains 16 words of data: the first direct index points at block 31, and the second direct index points at block 29. Blocks 4,7,10,and 15 are marked bad. Assum

14、e that free blocks are allocated in logical order starting with block 0 and that write operations modify the file system 1 block at a time. What will the state of the system look like after 100 additional words are appended to the file (draw a block diagram showing the structure of the I-node and th

15、e blocks that are allocated)6) 16 points Disk SchedulingDisk requests come into the disk driver for cylinders 10, 22, 20, 2, 40, 6, and 38, in that order. Assume that the disk has 100 cylinders.A seek takes 6msec per cylinder moved. Compute the average seek time for the request sequence given above

16、for 1. First-come, First-served2. Shortest Seek Time First (SSTF)3. LOOK (with the disk-arm initially moving towards higher number cylinders from lower number cylinders)4. C-SCANIn all the cases, the arm is initially at cylinder 20. 7) 10 points Security: Public Key EncryptionConsider the public key

17、 encryption defined by the RSA (Rivest, Shamir, Adelman) scheme. Assume that the two starting primes are p and q are 3 and 7 respectively and determine the (nontrivial) private key and public key pairs according to the RSA scheme.8) 10 Points Networking: TCP/IPThe following flowchart shows the clien

18、t and server portions of a TCP communication session. Fill in the empty bubbles/boxes with the appropriate socket system call names. CLIENT SERVER9) 10 points Enduring Principles in System Design1. When a system gets complex in design what is a common solution to manage the complexity? Give an examp

19、le.2. When you experience incompatibilities between system modules, how will you solve this problem? Give an example.3. What is a common data structure used to manage (the slots for) n resources? Give an example.4. The data items such as inodes and files are typically located in external memory that

20、 is sluggish relative to the local main memory. How are the effective access times of these structures minimized?5. When a table maintaining a list of pointers grows unmanageably large how will you solve this problem so that (i) search times of the table is reasonable and (ii) only the region of int

21、erest in the table need to be in the memory?10) 10 points Nachos Operating Systems1. List the two main operations (methods) that have the potential for resulting in a page fault.2. Where is the address that caused the page fault stored?3. You incremented the PC after every system call you implemented? Why not for page fault system call?4. What is the purpose of Exec, Join and Exit system calls?5. Explain the above with an example.6. How would you control the access to a shared resource by multiple threads?

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1