CS350 Study Guide - Midterm Guide: University Of Waterloo, Linearizability, Pseudocode

58 views16 pages
8 Oct 2014
Course
Professor

Document Summary

Student #: __ __ __ __ __ __ __ __ Make sure you answer it at the end: relax! Question 1 [10 marks] (a) [3 marks] )n os/(cid:883)(cid:888)(cid:883) there is a struct thread to represent a thread context and a struct trapframe to represent a trap frame. Describe something that is contained in both structures, and then for each of the structures describe something that it contains that the other does not. Briefly explain why each of the (cid:885) things you describe appears where it does. (b) [2 marks] on the m)ps + os/(cid:883)(cid:888)(cid:883) system, explain why a++ is not considered an atomic operation, yet v(s) is. Question 2 [15 marks] (a) [4 marks] there are three different ways a thread can transition from user mode to kernel mode. Write a small user program for os/(cid:883)(cid:888)(cid:883) that ensures that all three would occur during its execution and identify how each would occur.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents