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

Brant Callaway

Co Web Assigment 3


(Part A) What are the advantages and disadvantages to using garbage collection? (Part B) Explain how reference counting works. Include an example. (Part C) Explain how mark and sweep works. Include an example. (Part D) What problems of garbage collection do generational scavenging and “stop and copy” address? How do they address them?

Garbage collection allows the programmer to focus on programming rather than having to deal with memory allocation. Also, it frees up memory that is no longer in use so it can be put to other uses by the object memory. One pitfall of garbage collection is that it can cause memory fragmentation.

Reference counting is a way to determine whether or not an object is still being used by the program. The problem with reference counting is that it doesn't delete anything that is still referred to by something else in memory. However, this means that two (or more) things can point to each in memory and never be deleted by the garbage collector even if they are no longer being used by the program.

Mark and sweep starts at the root of the program and works it way throughout the entire program, marking all the objects that are referenced by the program. At the end of this, the garbage collection "sweeps" away everything else. It is more effective than reference counting.

Generational scavenging uses the principle that objects that have been in memory longer are less likely to be deleted. Therefore, it marks every object with how long its been in the program and checks the ones that haven't been around more frequently durinig mark and sweep. This is for the efficiency of garbage collection. Stop and copy addresses the problems of memory fragmentation. It stops the program and tries to better allocate memory.

Questionnaires are a common technique for evaluating human-computer interaction. If you were designing a questionaire, what are three things that you need to watch out for to ensure the validity of your findings. Why are each of these a problem? How do you avoid them or keep their influence to a minimum?

Prestige bias - users will act like they know how to use the system when they really don't when you're watching.
Embarrassing questions - don't ask users questions that insult their intelligence or pry into their private lives.
Leading questions - don't ask questions that point the user to the right or a particular answer



Co Web Assignment 2








Co Web Assignment 1


fib: n
(n < 0) ifTrue: [self error: 'n is not valid'].
(n = 0) ifTrue: [^1].
(n = 1) ifTrue: [^1].
(n > 1) ifTrue: [^(fib: (n - 2) + fib: (n - 1))].




A class is the a description of the basic characteristics of an object, a bluprint for an object, if you will.

An instance is a particular object from the class blueprint. There can be multiple instances of the same class.

Instance variables can be different for different instances of a class, but a class variable exists for all instances of the class. In the same way, instance methods only affect one instance while class methods do not have to refer to a single instance.








Uploaded Image: 3.jpg

Link to this Page