Comp150CPA: Clouds and Power-Aware Computing
Classroom Quiz 1 Review
Spring 2010
group member 1: ____________________________ login: ______________
group member 2: ____________________________ login: ______________
group member 3: ____________________________ login: ______________
group member 4: ____________________________ login: ______________
group member 5: ____________________________ login: ______________
Quizzes will (of course, given our format) closely follow lectures and
in-class
exercises. Problems will be similar to those on the exercises. My
quizzes -- by definition -- concentrate on "what things mean" and not
on broader impacts; you will not see a so-called "advanced"
question on the quiz! I will be emphasizing the following issues:
- Basics of clouds
- Kinds of clouds
- Strong and eventual consistency.
- Strong and weak concurrency.
- Google AppEngine
- Inside a client and a server.
- Asynchronous interaction.
- Constraints of AppEngine programming.
- JDO and distributed persistence.
- Cloud architecture
- SLAs and SLOs
- Scalability and elasticity.
- Virtualization and deployment.
- The timing diagram of a service request.
- Relationship between timing and load.
Remember that while this is a group experience, on the quiz, you will
be alone. No books, notes, or electronic devices are allowed.
Here are some sample questions of the kind I am planning:
- Consider the program in hw01 and suppose you run it (or something
equivalent) in an unknown cloud. What experiment can you do to tell for
yourself whether a cloud environment has strong or eventual consistency?
What would change about hw01's behavior in each case?
Answer:
You would have to do many tests in which you made nearly concurrent
value setting followed by reading. If the store is eventually consistent,
some of the reads would have stale data. Otherwise the store is strongly
consistent.
- Suppose that in Google AppEngine your synchronous interface for a
service is:
public interface PersistentThingService extends RemoteService {
Foo doSomething(Bar s);
}
Please fill in the blanks so that the following represents its asynchronous
interface:
public interface PersistentThingServiceAsync {
____void____ doSomething(____Bar____ t, AsyncCallback<____Foo____> callback);
}
- Considering Hw01, if you multiply the number of servers running your
service by three, what aspects of performance change, and by about how much?
Answer:
The key is that the throughput changes, i.e., three times as many
concurrent requests are possible to service in the same time, while the
average time for request processing -- while it might decrease some --
is not divided by three!
- Why can't the high watermark for a service be set at the SLA limit?
Answer:
This would allow an SLA violation to occur with no ability to stop it.
- Compute the load average for the following schedule:
thread 1 |
computing |
ready |
-------- |
computing |
--------- |
thread 2 |
ready |
computing |
-------- |
computing |
computing |
thread 3 |
-------- |
-------- |
-------- |
ready |
computing |
Answer:
There are 9 ready or computing slices in 5 tiem periods so the load
average is 9/5.
- Based upon the above schedule, how many cores must the CPU have?
Answer:
There must be two cores; two threads are listed as computing at the same time.
- While the schedule above has a well-defined load average, it cannot
happen in practice. Why?
Answer: There is one instance in which a "ready" period
is followed by a "waiting" period ("--------"). This cannot happen.
- What is bad about allowing services to store local data
in a server instance?
Answer:
In flowless switching, you may get a different server for a subsequent call, so that storing local data does not guarantee that it will be used later.
- Suppose you create a persistence-capable object e and then call
pm.makePersistent(e). What is the difference in behavior of the
object before and after the makePersistent call? Do you handle the
object differently when modifying it?
Answer:
There is no difference in how the object is manipulated, but after the makePersistent call, changes to the object are immediately forwarded to the cloud
for storage.
- Please fill in the blanks to complete the sentence: The difference between an SLA and an SLO is that the SLA specifies ____penalties and/or incentives___ while the SLO just specifies desires.