CS140 Operating Systems and Systems Programming Final Exam

Similar documents
CS140 Operating Systems and Systems Programming Final Exam

CS140 Operating Systems and Systems Programming Final Exam

CS140 Operating Systems and Systems Programming Final Exam

CS140 Operating Systems and Systems Programming Final Exam

CS140 Operating Systems and Systems Programming Midterm Exam

CS140 Operating Systems and Systems Programming Midterm Exam

CS140 Operating Systems and Systems Programming Midterm Exam

Operating Systems. Operating Systems Professor Sina Meraji U of T

(a) Which of these two conditions (high or low) is considered more serious? Justify your answer.

CS140 Operating Systems and Systems Programming

CS 537 Fall 2017 Review Session

CS140 Operating Systems Final December 12, 2007 OPEN BOOK, OPEN NOTES

Crash Consistency: FSCK and Journaling. Dongkun Shin, SKKU

CS 140: Operating Systems and Systems Programming Midterm Exam

Lecture 21: Reliable, High Performance Storage. CSC 469H1F Fall 2006 Angela Demke Brown

Stanford University Computer Science Department CS 240 Quiz 2 with Answers Spring May 24, total

CS Final Exam. Stanford University Computer Science Department. June 5, 2012 !!!!! SKIP 15 POINTS WORTH OF QUESTIONS.!!!!!

CSE 153 Design of Operating Systems

b. How many bits are there in the physical address?

CS 318 Principles of Operating Systems

Chapter 11: File System Implementation. Objectives

CS140 Operating Systems and Systems Programming

Advanced file systems: LFS and Soft Updates. Ken Birman (based on slides by Ben Atkin)

CS 155 Final Exam. CS 155: Spring 2005 June 2005

Qualifying exam: operating systems, 1/6/2014

File Systems: Consistency Issues

Implementation should be efficient. Provide an abstraction to the user. Abstraction should be useful. Ownership and permissions.

File Systems Ch 4. 1 CS 422 T W Bennet Mississippi College

Midterm #2 Exam April 26, 2006 CS162 Operating Systems

Administrative Details. CS 140 Final Review Session. Pre-Midterm. Plan For Today. Disks + I/O. Pre-Midterm, cont.

CS 155 Final Exam. CS 155: Spring 2004 June 2004

CSE 120 PRACTICE FINAL EXAM, WINTER 2013

19 File Structure, Disk Scheduling

Midterm Exam #2 Solutions April 20, 2016 CS162 Operating Systems

Stanford University Computer Science Department CS 240 Sample Quiz 2 Questions Winter February 25, 2005

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

Midterm II December 4 th, 2006 CS162: Operating Systems and Systems Programming

File systems CS 241. May 2, University of Illinois

Stanford University Computer Science Department CS 240 Sample Quiz 2 Answers Winter February 25, 2005

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University

CS3600 SYSTEMS AND NETWORKS

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University

Midterm #2 Exam Solutions April 26, 2006 CS162 Operating Systems

CLASSIC FILE SYSTEMS: FFS AND LFS

CSC369 Lecture 9. Larry Zhang, November 16, 2015

Operating Systems. Lecture File system implementation. Master of Computer Science PUF - Hồ Chí Minh 2016/2017

File Systems. Chapter 11, 13 OSPP

EECE.4810/EECE.5730: Operating Systems Spring 2017

Design of Operating System

SMD149 - Operating Systems - File systems

Final Exam April 14, 2007 COSC 3407: Operating Systems

Operating Systems. Week 13 Recitation: Exam 3 Preview Review of Exam 3, Spring Paul Krzyzanowski. Rutgers University.

CS 416: Operating Systems Design April 22, 2015

CS 318 Principles of Operating Systems

1993 Paper 3 Question 6

What is a file system

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

Computer Systems Laboratory Sungkyunkwan University

CS6401- Operating System QUESTION BANK UNIT-IV

CSE 451: Operating Systems Winter Module 17 Journaling File Systems

Chapter 12 File-System Implementation

File System Internals. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

File System Internals. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

CS5460: Operating Systems Lecture 20: File System Reliability

Midterm Exam #3 Solutions November 30, 2016 CS162 Operating Systems

Operating Systems. File Systems. Thomas Ropars.

Operating System Concepts Ch. 11: File System Implementation

CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

Midterm Exam #2 April 20, 2016 CS162 Operating Systems

This exam paper contains 8 questions (12 pages) Total 100 points. Please put your official name and NOT your assumed name. First Name: Last Name:

Linux Filesystems Ext2, Ext3. Nafisa Kazi

Disc Allocation and Disc Arm Scheduling?

Name: Instructions. Problem 1 : Short answer. [63 points] CMU Storage Systems 12 Oct 2006 Fall 2006 Exam 1

File Systems. CS170 Fall 2018

CS 318 Principles of Operating Systems

Da-Wei Chang CSIE.NCKU. Professor Hao-Ren Ke, National Chiao Tung University Professor Hsung-Pin Chang, National Chung Hsing University

CS244a: An Introduction to Computer Networks

CPSC 310: Database Systems / CSPC 603: Database Systems and Applications Exam 2 November 16, 2005

Page 1. Recap: File System Goals" Recap: Linked Allocation"

CS 245 Midterm Exam Solution Winter 2015

Chapter 11: Implementing File Systems

Persistent Storage - Datastructures and Algorithms

Journaling. CS 161: Lecture 14 4/4/17

Lecture 18 File Systems and their Management and Optimization

CS 550 Operating Systems Spring File System

Advanced File Systems. CS 140 Feb. 25, 2015 Ali Jose Mashtizadeh

W4118 Operating Systems. Instructor: Junfeng Yang

Presented by: Alvaro Llanos E

Design Choices 2 / 29

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 18: Naming, Directories, and File Caching

22 File Structure, Disk Scheduling

Chapter 1: Introduction. Operating System Concepts 8th Edition,

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 18: Naming, Directories, and File Caching

Logging File Systems

November 9 th, 2015 Prof. John Kubiatowicz

SYED AMMAL ENGINEERING COLLEGE CS6401- OPERATING SYSTEM

FFS: The Fast File System -and- The Magical World of SSDs

File System Implementations

Filesystem. Disclaimer: some slides are adopted from book authors slides with permission

File System Consistency. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Transcription:

CS140 Operating Systems and Systems Programming Final Exam December 10, 2004 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 19 pages. 1 12 2 13 3 14 4 15 5 16 6 17 7 18 8 9 10 11 Total Name:

(1) (12 points) Assume you are given a disk that is possessed. On occasion the disk has random, non-deterministic errors that might: a) Return a different block than was requested by the software (e.g. you read block 0 but the disk returns the contents of block 1). b) Return the correct block but one or two bits in the block flipped. (e.g. you read block 0 and it returns the contents of block 0 with the 39 th bit toggled). The large majority of the time it returns the correct contents for the requested block. Describe how you as a file system designer would extend a Unix-like file system to handle such a misbehaving disk. Page 2 of 19f

(2) (8 points) Given the file system from question (1), how could you handle the case in which you determined that the errors were being introduced by a malicious attacker that was trying to confuse your file system. Under this threat model the attacker can return any data for a request but must return the correct contents most of the time. Page 3 of 19f

(3) (8 points) Would an operating system built with non-blocking or wait-free synchronization work correctly if run inside a virtual machine on a virtual machine monitor supporting multiple virtual machines at the same time? Justify your answer. Page 4 of 19f

(4) (12 points) Describe what would happen if an operating system running in a virtual machine decided to page out a process page and that particular page had already been paged out by the virtual machine monitor. Page 5 of 19f

(5) (10 points) Assume you have two machines (A and B) sending datagram packets between one another using Internet Protocol (IP) over an internetwork. You notice from statistics being kept on the machines that machine A sent X packets to B and B received X packets from A. Machine B reports to have sent Y packets to A yet A reports to have received 4*Y packets from B. Explain how this is possible. Page 6 of 19f

(6) (8 points) Your project partner builds a file system that with each file stores a list of a randomly generated 256-bit integers. In order to open a file you need to specify one of the integers in the open system call. Would this be considered an access control list or capability-based system? Justify you answer. Page 7 of 19f

(7) (6 points) Explain how a buffer overrun attack works? Page 8 of 19f

(8) (8 points) Recently OS researchers have proposed intelligent disks. These disks look like standard disks to the operating system yet are smart enough to parse the file system data structures on the storage to do things such as determining what blocks belong to what files and which blocks on the disk are free. Such intelligent disks could back themselves up without bothering the operating system. What attributes of modern file system make this difficult when the file system is in use by applications? Describe specific problems. Page 9 of 19f

(9) (12 points) Assume you built a write-ahead logging file system on a system with two disks. One disk is used for the log and the other for the file system data. (a) Describe what the file system must do before the space on the log can be reclaimed. (b) Describe a situation/workload that would generated more write traffic to the log disk and than to the data disk. (c) Describe a situation/workload that would generate more read traffic to the log disk that the data disk. Page 10 of 19f

(10) (12 points) A recent piece of OS research has shown a way for an operating system to accurately predict the file access patterns of an application. It can predict if the file is (a) read sequentially once and not access again (b) read sequentially in a looping pattern (b) read in neither of the above patterns Describe how you would use this information to guide your file system buffer cache replacement policy. Describe the replacement algorithm you would suggestion for each pattern. Page 11 of 19f

(11) (9 points) Explain how a RAID4 system would recover from a failure of one of the data disks. Page 12 of 19f

(12) (8 points) The BSD Unix system added the fsync() system call that an application can use to make sure a file resides on disk. In other words, once the fsync() call returns changes made to the file will be safely on disk even if the system crashes. What is the minimum information that must be written to disk for fsync() to function correctly? Page 13 of 19f

(13) (12 points) Fsck is the Unix file system crash recovery program. For each of the following fsck error messages, what do you believe fsck has seen in the crashed file system to generate the error message: (A) File s inode link count is 1 should be 2. (B) Free bitmap entry for block 3323 is 0, should be 1 (allocated). (C) Cylinder group 4 - free block count is incorrect. Page 14 of 19f

(14) (8 point) What are the advantages and disadvantages of a shortest seek time first (SSTF) disk scheduling algorithm when compared to an elevator algorithm Page 15 of 19f

(15) (6 point) Would a file system that used synchronous writes of all metadata blocks see more or less benefit from a disk scheduling algorithm than one that didn t use synchronous writes of metadata? Page 16 of 19f

(16) (8 point) If someone gave you the source code of a file system and asked if it used index files or extent-based allocation, what would you look for in the code to answer this question? Page 17 of 19f

(17) (9 points) Describe a denial of service attack that you could perform using the virtual memory subsystem of a modern operating system. Page 18 of 19f

(18) (9 points) Explain why public key cryptosystems, where keys can be freely published, are frequently deployed using trusted servers that give out keys just like are used for shared key cryptosystems where keys must be kept secret. Page 19 of 19f