cs140.final.fall.2005.pdf
-
Upload
quang-cao-trang-nhat -
Category
Documents
-
view
212 -
download
0
Transcript of cs140.final.fall.2005.pdf
![Page 1: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/1.jpg)
CS140 Operating Systems and Systems Programming Final Exam
December 12, 2005
Name: (please print)______________________________ In recognition of and in the spirit of the Stanford University Honor Code, I certify that I will neither give nor receive unpermitted aid on this exam. Signature:_______________________________________
This examination is closed notes and closed book. You may not collaborate in
any manner on this exam. You have 180 minutes (3 hours) to complete the exam. Before starting, please check to make sure that you have all 15 pages.
1 12 2 13 3 14 4 5 6 7 8 9 10 11 Total
Name:_______________
![Page 2: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/2.jpg)
CS140 Final Fall 2005 Name____________________
Page 2 of 15f
(1) (12 points) – Answer the following two questions about message digests.
(a) Someone gives you a file along with an encrypted message digest of the file. The message digest has been encrypted with your public key. What use, if any, would there be for including such an encrypted message digest? If not useful, would there be any harm in it?
(b) Someone gives you a file along with a message digest computed on the
contents of the file concatenated with his or her private key. In other words, the message digest function was run on data that included the contents of the file appended to the private key. What use, if any, would there be for including such a message digest? If not useful, would there be any harm in it?
![Page 3: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/3.jpg)
CS140 Final Fall 2005 Name____________________
Page 3 of 15f
(2) (12 points) – Answer the following two security questions. (a) Describe the relationship between complexity and security. (b) What benefit could someone get from publishing the details of how their security system works?
![Page 4: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/4.jpg)
CS140 Final Fall 2005 Name____________________
Page 4 of 15f
(3) (12 points) For each of the following attacks lists below, describe if a good public key cryptosystem would help solve the problem. If it does, say how. If it doesn’t explain why. (a) Abuse of privileges (c) Listener (eavesdropper) attack. (d) Spoiler (denied of service) attack.
![Page 5: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/5.jpg)
CS140 Final Fall 2005 Name____________________
Page 5 of 15f
(4) (14 points) Your Pintos partner asks you to add a capability-based protection system to your Pintos file system. Describe how you would go about doing this. Be sure to include data structure and algorithm additions and changes as well as any interface changes you will need.
![Page 6: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/6.jpg)
CS140 Final Fall 2005 Name____________________
Page 6 of 15f
(5) (8 points) We use a set of techniques to synthesize reliability over unreliable network links when implementing protocols like TCP/IP. Explain why these techniques do not solve the distributed consensus problem (i.e. two army problem).
![Page 7: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/7.jpg)
CS140 Final Fall 2005 Name____________________
Page 7 of 15f
(6) (10 points) Explain why the Internet kept working even after a successful denial of service (i.e. spoiler) attack against the root domain name service (DNS) servers.
![Page 8: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/8.jpg)
CS140 Final Fall 2005 Name____________________
Page 8 of 15f
(7) (18 points) Answer the following three networking questions.
(a) What does the reverse address resolution protocol (RARP) do on an Ethernet network?
(b) Explain the mechanism an Ethernet uses so a single machine cannot monopolize the network when other machines need to use it.
(c) Describe the major features of the Internet protocol design that made it
highly portable.
![Page 9: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/9.jpg)
CS140 Final Fall 2005 Name____________________
Page 9 of 15f
(8) (12 points) – Answer the following two file system questions.
(a) Describe the techniques used by the BSD Fast File System (FFS) to improve the performance of small files.
(b) Explain why the BSD Fast File System might spread a large file over the
entire disk even though the file system is not run near capacity.
![Page 10: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/10.jpg)
CS140 Final Fall 2005 Name____________________
Page 10 of 15f
(9) (12 points) What would be the implications of setting the log size of a write-ahead logging file system to a very small size (say just a few blocks). Consider both reliability and performance issues.
![Page 11: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/11.jpg)
CS140 Final Fall 2005 Name____________________
Page 11 of 15f
(10) (14 points) RAID (a) For RAID4 storage devices the lecture notes say a single block write might take 2 reads and 2 writes. Explain why this is the case. (b) Does RAID5 suffer this same problem? Justify your answer.
![Page 12: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/12.jpg)
CS140 Final Fall 2005 Name____________________
Page 12 of 15f
(11) (12 points) What is an idempotent operation and why are they useful when dealing with a system with failures. Include an example of an idempotent operation in your answer.
![Page 13: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/13.jpg)
CS140 Final Fall 2005 Name____________________
Page 13 of 15f
(12) (18 points) Describe what you would need to do to make your Pintos file system support keyed file access. Be explicit about the data structures and algorithms you will need to add. Also, describe what additional arguments you would need to add to system calls, etc.
![Page 14: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/14.jpg)
CS140 Final Fall 2005 Name____________________
Page 14 of 15f
(13) (12 points) Metadata is used to describe the file system data associated with each file. The size of metadata usually scales with the size of the file. Describe a file index mechanism that does not scale with the size of the file.
![Page 15: cs140.final.fall.2005.pdf](https://reader035.fdocuments.net/reader035/viewer/2022081908/563dbbab550346aa9aaf37f1/html5/thumbnails/15.jpg)
CS140 Final Fall 2005 Name____________________
Page 15 of 15f
(14) (12 points) Explain how caching can improve both latency and bandwidth of a system. Give an example.