Midterm Exam #2 December 4, 2013 CS162 Operating Systems

Similar documents
Midterm #2 Exam April 26, 2006 CS162 Operating Systems

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

Midterm Exam #2 April 29, 2003 CS162 Operating Systems

Midterm Exam #2 April 20, 2016 CS162 Operating Systems

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

Problem Max Points Score Total 100

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

Final Exam Solutions May 17, 2013 CS162 Operating Systems

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

Final Exam Solutions May 11, 2012 CS162 Operating Systems

Midterm II December 3 rd, 2007 CS162: Operating Systems and Systems Programming

Second Midterm Exam March 21, 2017 CS162 Operating Systems

Midterm Exam March 3, 1999 CS162 Operating Systems

IMPORTANT: Circle the last two letters of your class account:

Third Midterm Exam April 24, 2017 CS162 Operating Systems

Midterm Exam March 13, 2013 CS162 Operating Systems

Midterm Exam #2 Solutions October 25, 2016 CS162 Operating Systems

Midterm Exam October 15, 2012 CS162 Operating Systems

Midterm Exam #1 September 28, 2016 CS162 Operating Systems

Third Midterm Exam April 24, 2017 CS162 Operating Systems

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 21: Network Protocols (and 2 Phase Commit)

Midterm Exam Solutions and Grading Guidelines March 3, 1999 CS162 Operating Systems

University of California College of Engineering Computer Science Division- EECS. Midterm Exam March 13, 2003 CS162 Operating Systems

First Midterm Exam September 28, 2017 CS162 Operating Systems

Student Name: University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science

Third Midterm Exam November 29, 2017 CS162 Operating Systems

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences

CPS 310 first midterm exam, 2/26/2014

Midterm Exam #1 February 28, 2018 CS162 Operating Systems

Final Exam April 14, 2007 COSC 3407: Operating Systems

Midterm Exam March 7, 2001 CS162 Operating Systems

Midterm Exam #2 April 16, 2008 CS162 Operating Systems

IMPORTANT: Circle the last two letters of your class account:

Midterm I October 11 th, 2006 CS162: Operating Systems and Systems Programming

First Midterm Exam Solutions October 1, 2018 CS162 Operating Systems

CS454/654 Midterm Exam Fall 2004

Midterm I October 12 th, 2005 CS162: Operating Systems and Systems Programming

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

Midterm II SOLUTIONS December 5 th, 2005 CS162: Operating Systems and Systems Programming

Page 1. Review: Storage Performance" SSD Firmware Challenges" SSD Issues" CS162 Operating Systems and Systems Programming Lecture 14

Midterm Exam #1 September 29, 1999 CS162 Operating Systems

Midterm I October 18 th, 2010 CS162: Operating Systems and Systems Programming

Midterm I February 28 th, 2019 CS162: Operating Systems and Systems Programming

A Previous Final Examination

Distributed Systems Fall 2009 Final

Computer Security Fall 2006 Joseph/Tygar Midterm 3

15-440/15-640: Homework 1 Due: September 23, :59pm

Midterm Exam Solutions March 7, 2001 CS162 Operating Systems

CSCI 466 Midterm Networks Fall 2013

EE122 - Midterm 1 Examination EECS-UC Berkeley October 2000

CS 537: Introduction to Operating Systems Fall 2015: Midterm Exam #4 Tuesday, December 15 th 11:00 12:15. Advanced Topics: Distributed File Systems

Final Exam for ECE374 05/03/12 Solution!!

Operating Systems Design Exam 3 Review: Spring Paul Krzyzanowski

Computer Networks. 19 December This exam consists of 6 questions with subquestions. Every subquestion counts for 10 points.

CPSC 441 COMPUTER NETWORKS MIDTERM EXAM

6.097 Operating System Engineering: Fall Quiz II THIS IS AN OPEN BOOK, OPEN NOTES QUIZ.

Stanford University Computer Science Department CS 140 Final Exam Dawson Engler Winter 1999

Midterm Exam #1 Solutions February 28, 2018 CS162 Operating Systems

University of California, Berkeley. CS 186 Introduction to Databases, Spring 2014, Prof. Dan Olteanu MIDTERM

CSCI 1680 Computer Networks Fonseca. Exam - Midterm. Due: 11:50am, 15 Mar Closed Book. Maximum points: 100

NAME: STUDENT ID: MIDTERM 235 POINTS. Closed book, closed notes 70 minutes

EXAM 1 SOLUTIONS. Midterm Exam. ECE 741 Advanced Computer Architecture, Spring Instructor: Onur Mutlu

First Midterm Exam September 28, 2017 CS162 Operating Systems

Part ONE

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Computer Systems Engineering: Spring Quiz I

Fall 2005 Joseph/Tygar/Vazirani/Wagner Final

Midterm I October 15 th, 2008 CS162: Operating Systems and Systems Programming

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

Page 1. Goals for Today" What is a Database " Key Concept: Structured Data" CS162 Operating Systems and Systems Programming Lecture 13.

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

Your Name: Your student ID number:

Midterm I March 11 th, 2015 CS162: Operating Systems and Systems Programming

3/3/2014! Anthony D. Joseph!!CS162! UCB Spring 2014!

CSE 451 Midterm Exam May 13 th, 2009

CMPE150 Midterm Solutions

Final Exam Preparation Questions

CPS 110 Final Exam. Spring 2011

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

CS162, Spring/1992 Midterm #2 Professor Thomas Anderson

Databases - Transactions II. (GF Royle, N Spadaccini ) Databases - Transactions II 1 / 22

CS140 Operating Systems and Systems Programming Final Exam

CS 161 Computer Security

CS 421: Computer Networks SPRING MIDTERM I April 7, minutes

-Device. -Physical or virtual thing that does something -Software + hardware to operate a device (Controller runs port, Bus, device)

Stanford University Computer Science Department CS 140 Midterm Exam Dawson Engler Winter 1999

Prerequisite Quiz January 23, 2007 CS252 Computer Architecture and Engineering

14-740: Fundamentals of Computer and Telecommunication Networks

Database Management System Prof. D. Janakiram Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.

Department of EECS - University of California at Berkeley EECS122 - Introduction to Communication Networks - Spring 2005 Final: 5/20/2005

Computer Networks - Midterm

Introduction TRANSACTIONS & CONCURRENCY CONTROL. Transactions. Concurrency

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

CS164 Final Exam Winter 2013

ITEC 350: Introduction To Computer Networking Midterm Exam #2 Key. Fall 2008

Sirindhorn International Institute of Technology Thammasat University

Read and fill in this page now. Your lab section day and time: Name of the person sitting to your left: Name of the person sitting to your right:

CS162 Operating Systems and Systems Programming Lecture 14 File Systems (Part 2)"

Solutions to Final Examination

CS162 Operating Systems and Systems Programming Lecture 21. Networking. Page 1

Spring 2013 CS 122C & CS 222 Midterm Exam (and Comprehensive Exam, Part I) (Max. Points: 100)

Transcription:

University of California, Berkeley College of Engineering Computer Science Division EECS Fall 2013 Anthony D. Joseph and John Canny Midterm Exam #2 December 4, 2013 CS162 Operating Systems Your Name: SID AND 162 Login: TA Name: Discussion Section Time: General Information: This is a closed book and one 2-sided handwritten note examination. You have 80 minutes to answer as many questions as possible. The number in parentheses at the beginning of each question indicates the number of points for that question. You should read all of the questions before starting the exam, as some of the questions are substantially more time consuming. Write all of your answers directly on this paper. Make your answers as concise as possible. If there is something in a question that you believe is open to interpretation, then please ask us about it! Good Luck!! QUESTION POINTS ASSIGNED POINTS OBTAINED 1 8 2 21 3 23 4 32 5 16 TOTAL 100 Page 1/14

1. (8 points total) True/False and Why? CIRCLE YOUR ANSWER. i) A Remote Procedure Call (RPC) can be used to call a procedure in another process on the same machine. TRUE Why? FALSE ii) Doubling the block size in the UNIX 4.2 BSD file system will exactly double the maximum file size. TRUE Why? FALSE iii) With the NFS distributed file system, it is possible for one client to write a value into a file that is not seen by another client when reading that file immediately afterwards. TRUE Why? FALSE iv) In a replicated Key-Value storage system, Iterative PUTs achieve lower throughput than recursive PUTs on a loaded system. TRUE Why? FALSE Page 2/14

2. (21 points total) Security. a. (5 points) Are digital signatures on digital documents more or less secure than ink signatures on printed documents? Give a brief (4-5 sentence) justification for your answer. b. (8 points total) X.509 Certificates. i) (5 points) The recipient of an X.509 certificate can authenticate the sender of the certificate without contacting a third party (e.g., a certificate authority) at the time of authentication. How does this work? Page 3/14

ii) (3 points) Discuss a vulnerability in the use of X.509 certificates as described in part (i). c. (8 points) SYN Cookies. i) (3 points) What type of attack do SYN cookies protect against? Be specific in your answer. ii) (5 ponts) Explain how SYN cookies are used? Page 4/14

3. (23 points total) Transactions. a. (16 points) Consider the following bank transfer process for moving funds from account A to account B: Read balance from source account: Read Source Account Decrement source account balance Write new balance of source account: Write Source Account Read balance from destination account: Read Destination Account Increment destination account balance Write new balance of destination account: Write Destination Account Suppose John and Alice share the same accounts and they each use different ATMs at the same time. John transfers $100 from Checking to Savings; while Alice transfers $200 from Savings to Checking note that one transfer goes from Checking to Savings, while the other is reversed. Suppose that John and Alice s transfers happen simultaneously, and there is more than $200 in the account. i) List a serializable schedule for the transactions, which is not simply already a serial schedule ii) For each of the following three potential situations, state whether such a situation can exists, and if it can, give an example. Otherwise, explain why it cannot exist. (1) Situation #1: A non-serializable schedule for the transactions Page 5/14

(2) Situation #2: A serializable schedule using Two-Phase Locking, which is not simply already a serial schedule (3) Situation #3: A schedule where Two-Phase Locking causes deadlock Page 6/14

b. (7 points total) Consider the following schedule of four transactions: T1: R(B) R(A) W(A) W(D) T2: W(B) T3: W(A) T4: W(C) W(A) i) (4 points) Draw the dependency graph for this schedule. ii) (3 points) Is this schedule serializable? If so, give a possible serial schedule. Otherwise, explain why not. Page 7/14

4. (32 points) Filesystems. a. (8 points) Consider a file system that has 2,048 byte blocks and 32-bit disk block pointers to those blocks. Each file header has 12 direct pointers, one singlyindirect pointer, one doubly-indirect pointer, and one triply-indirect pointer. i) (4 points) How large of a disk can this filesystem support? You may leave your answer in symbolic form. ii) (4 points) What is the maximum file size? You may leave your answer in symbolic form. Page 8/14

b. (6 points) Rather than writing updated files to disk immediately when they are closed, many UNIX systems use a delayed write-behind policy in which dirty disk blocks are flushed to disk once every 30 seconds. List two advantages and one disadvantage of such a approach. Advantage 1: Advantage 2: Disadvantage: c. (4 points) Briefly (in 2-3 sentences) explain the differences between a hard link and a soft link. Page 9/14

d. (6 points) List the set of disk blocks that must be read into memory in order to read the file /home/cs162/midterm2.txt in its entirety from a UNIX BSD 4.2 file system (10 direct pointers, a singly-indirect pointer, a doubly-indirect pointer, and a triply-indirect pointer). Assume the file is 15,234 bytes long and that disk blocks are 1024 bytes long. Assume that the directories in question all fit into a single disk block each. Note that this is not always true in reality. Page 10/14

e. (4 points) On a single UNIX machine, if some program B reads a block of a file after it has been updated by another program A, the copy of the file block B reads will include A s updates. In NFS (as described in lecture) this behavior is not guaranteed. Assuming that there are no failures, why doesn t NFS necessarily provide such update semantics when programs A and B are run on different machines? What semantics does it provide instead? f. (4 points) The Andrew File System (AFS) solves the above problem in part (e) by using state information it maintains at the server. What state is kept? How is the state used to solve the problem? Page 11/14

5. (16 points) Networking. a. (4 points) Consider a TCP network connection with packet size 1000 bytes, and current receiver advertised window size of 100 packets, over a cross-country link with one-way latency (for a 0-byte packet) of 50 milliseconds in each direction, and a link bandwidth of 100 Mbit/second. You may assume that no packets are lost for this particular problem, and that the times to assemble, unpack and process packets at each end of the connection are negligible. How long does it take TCP to transmit 1 million bytes across the link? That is, how much time elapses from when the first byte is sent by the sender to when the sender knows that the receiver has received the last byte? b. (4 points) Assume that the receiver can process incoming data with zero latency, what is the optimal window size that the receiver should advertise? Page 12/14

c. (4 points) Polling a device for the completion of an operation is typically a bad idea because, as with busy-waiting, while polling, the CPU is not doing useful work. However, this is not always true. Describe a situation where polling might be a better choice than using interrupts. d. (4 points) Explain the difference between an IP address and a MAC address, and why we cannot use only MAC addresses or IP addresses alone. Page 13/14

This page intentionally left blank as scratch paper Do not write answers on this page Page 14/14