View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Sp00 Final Exam Review: Virtual Machines

See Final Exam Review - Sp2000

a)
Why VMs are better than native code:


b)
HotSpot and Squeak VM Similarities:

HotSpot and Squeak VM Differences:

c)
guessing here, but floating point math?

anyone remember what mark said about frames/contexts and stacks in class? something like, contexts are in stacks, but for java, the stacks are in the contexts? or vice versa???



Java: contexts are in stack
Squeak: stack in each context
 Java is faster than Squeak. popping off stack requires much less time than context switching

c) if i remember correctly, mark was talking about boxing and unboxing being the hardest part of primitives. meaning, moving between the native types and objects is a challenge. but i could be completely off :)


no.. that sounds right. i didn't think it was floating point math. your answer does look correct, and i remember mark discussing this in class
Sheetal's not off. The issue that Stephen's grappling with is where the stack is that the bytecodes handle: Inside the contexts (the method execution objects) or global. Stephen's (a) and (b) lists are good, but there are more possible items in each. Mark Guzdial



a) Portability, garbage collection, security, better for OO. Also the programs run on the VM and not on top of something else (ie, this is good for small devices without an OS).
b) The big difference that we came up with is the difference in garbage collection. Java has a 3 generational, and Squeak has a 2 generational AND a mark/sweep. Also, Squeak has JIT compilation.

I think JAVA's VM also has a M-S GC algorithm as well as the generational scaveging. Not 100% sure, though -Stephen Belknap

Susi Rathmann, jeremy, Matt Flagg


Links to this Page