




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Exam; Professor: Knight; Class: Dependability; Subject: Computer Science; University: University of Virginia; Term: Spring 2008;
Typology: Exams
1 / 8
This page cannot be seen from the preview
Don't miss anything!





. This is a closed book, closed notes examination. . Write your answers on the examination paper in ink or legible pencil. . If your answer cannot be read or understood , or if your answer is vague or confused, it will be marked wrong. . In any question, make any assumptions that you need to but document your assumptions. . The number in parentheses after each question is the number of points allocated to that ques- tion.
NAME ( Print Legibly. All Capitals ):
PLEDGE ( Write Out In Full And Sign ):
Final Examination - Three Hours
Page score
(a) What is the most significant hazard associated with the disk that a laptop faces? (5)
(b) For that hazard, draw the top three levels of the associated (hypothetical) fault tree. (10)
(c) List the nodes in your fault tree that would not be present with a disk-drive replacement based on compact-flash technology. (5)
(d) Suppose the current laptop disk was replaced with a mirrored disk (two drives operating in parallel with identical data). Using the fault tree from (b), estimate how effective mirror- ing the disk would be at increasing the MTTF of the disk system. (10)
Page score
(a) Write a formal specification for this controller in Z (correct syntax not essential). (20)
(b) Although this specification is quite simple, it is realistic. If you had this specification and an implementation in C, how would you go about testing the implementation? Pay atten- tion to the real-time elements of the problem and the other basic testing issues that make testing difficult. (10)
Page score
(a) Concisely but fully explain the basic software system architecture of a safety kernel. (5)
(b) The safety policy you decide to enforce with the kernel is that all heaters must be off if any temperature sensor reads above 200 degrees. State this formally. (5)
(c) As a set of bullets, list the issues that you see in implementing a safety kernel to enforce this policy. (10)
(d) You are concerned about the possibility that one or more heaters could fail “on” and your computer would not be able to turn them off. You decide to connect an audible alarm to the system to warn building residents if any temperature reaches 205. Modify the formal specification from (b) to add this alarm capability. (10)
Page score
Page score
procedure divide (in x, y: integer; out z: integer) is begin z := 0; while x > y loop x := x - y; z := z + 1; end loop; end divide;
(a) State the precondition as SPARK Ada annotation(s). (5)
(b) State the postcondition as SPARK Ada annotation(s). (5)
(c) State the loop invariant as SPARK Ada annotations. (10)
(d) What are the two types of analysis that can be performed on properly annotated SPARK Ada programs? (5)
(e) The SPARK Ada annotation that documents data dependency (#defines) is supplying information much of which could be determined by a compiler. Why is this not left to a compiler (or similar tool)? (5)