a2sp06solutions - CS 414 Assignment 2 Solutions Include...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 414 Assignment 2 Solutions February 10, 2006 Include your netid on every page of the submitted file (there were a couple of submissions without their netids, we did not penalize them this time but we will in future). 1. Suppose that you are writing an operating system for a standard PC and wanted to build in some logic for determining whether or not the OS was actually running in a virtual machine monitor as opposed to running on the raw hardware. Here are some ideas for how you could do that. Indicate for each one whether or not it would work, and give a short reason. (If the idea includes a completely wrong assertion, explain what is wrong about it). (a) The O/S could include some sort of compute-intensive program. By testing on the same platform, the O/S should have a pretty good idea of how long this takes to run on a raw CPU and can compare with the timing it actually sees. If the O/S is running in a virtual machine, this will slow things down so much so that it will be obvi- ous. Solution Would not work. The VMM only has to intercept privi- leged instructions, a compute intensive program will have only a few privileged instructions and hence it essentially runs on the raw hard- ware. Comments Would not work if the OS was determining time locally. The only way it can determine time elapsed is by accessing the hard- ware clock which the VMM can intercept. The situation changes if the OS can get time from external servers (through the network). (b) Same idea as in (1) but with a focus on the speed at which system
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This homework help was uploaded on 09/26/2007 for the course COM S 414 taught by Professor Birman during the Spring '06 term at Cornell.

Page1 / 4

a2sp06solutions - CS 414 Assignment 2 Solutions Include...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online