Transient customization of mobile computing infrastructure

Kimberley is a system that simplifies transient use of fixed hardware infrastructure by a mobile device. It uses virtual machine (VM) technology to resolve the tension between standardizing infrastructure for ease of deployment and maintenance, and customizing that infrastructure to meet the specific needs of a user. Kimberley decomposes the state of a customized VM into a widely-available base VM and a much smaller private VM overlay. The base is downloaded by the infrastructure in advance. Only the small overlay needs to be delivered from the mobile device, or under its control from a public web site. This strategy keeps startup delay low. It may also conserve energy on the mobile device by reducing the volume of wireless transmission. We have built a prototype of Kimberley, and our experiments confirm the feasibility of this approach.


INTRODUCTION
Usability often suffers when a mobile device is optimized for size, weight and energy efficiency.On a hand-held device with a small screen, tiny keyboard and limited compute power, it is a challenge to go beyond a limited repertoire of applications.A possible solution to this problem is to leverage fixed infrastructure to augment the capabilities of a mobile device, using techniques such as dynamically composable computing [11] or cyber foraging [1,4,2].For this approach to work, the infrastructure must be provisioned with exactly the right software needed by the user.This is unlikely to be the case everywhere, especially at global scale.There is an inherent tension between standardizing infrastructure for ease of deployment and maintenance, and customizing that infrastructure to meet specific user needs.This paper describes Kimberley, a system for rapid software provisioning of fixed infrastructure for transient use by a mobile device.Kimberley decomposes customized virtual machine (VM) state into a widely-available base VM and a much smaller, possibly proprietary, private VM overlay.These two components are delivered to the site being provisioned in very different ways.The base VM is downloaded by the infrastructure in advance from a publicly accessible web site.to a server in the infrastructure just before use, either directly from the mobile device or under its control from a public web site.In the latter case, encryption-based mechanisms can be used to ensure the integrity and privacy of the private VM overlay.Once obtained, the overlay may be optionally cached for future reuse.The server applies the overlay to the base to create and execute a launch VM.
When the user departs, this VM is terminated and its state is discarded.In some cases, a small part of the VM state may be returned to the mobile device; this is referred to as the VM residue.Figure 1 shows a typical Kimberley timeline.
We anticipate that a relatively small number of base VMs (perhaps a dozen or so releases of Linux and Windows configurations) will be popular worldwide in mobile computing infrastructure at any given time.Hence, the chances will be high that a mobile device will find a compatible base for its overlays even far from home.The chances of success can be increased by generating multiple overlays, one for each of a number of base VMs.The collection of popular base VMs can be mirrored worldwide, and a subset can be proactively downloaded by each infrastructure site.

USAGE EXAMPLES
The two hypothetical examples below illustrate the kinds of usage scenarios we envision for Kimberley.
Scenario 1: Dr. Jones is at a restaurant with his family.He is contacted during dinner by his senior resident, who is having dif-ficulty interpreting a pathology slide.Although Dr. Jones could download and view a low-resolution version of the pathology slide on his smart phone, it would be a fruitless exercise because of the tiny screen.Fortunately, the restaurant has a large display with an Internet-connected computer near the entrance.It is sometimes used by customers who are waiting for tables; at other times it displays advertising.Using Kimberley, Dr. Jones is able to temporarily install a whole-slide image viewer, download the 100MB pathology slide from a secure web site, and view the slide at full resolution on the large display.He chooses to view privacy-sensitive information about the patient on his smart phone rather than the large display.He quickly sees the source of the resident's difficulty, helps him resolve the issue over the phone, and then returns to dinner with his family.
Scenario 2: While Professor Smith is waiting to board her flight, she receives email asking her to review some budget changes for her proposal.The attached spreadsheet shows a bottom line that is too high.After a few frustrating minutes of trying to manipulate the complex spreadsheet on her small mobile device, Professor Smith looks around the gate area and finds an unused computer with a large display.She rapidly customizes this machine using Kimberley, and then works on the spreadsheet.She finishes just before the final boarding call, and retrieves the modified spreadsheet on to her mobile device.On board, Professor Smith barely has time to compose a reply, attach the modified spreadsheet, and send the message before the aircraft door is closed.
Other possible mobile computing scenarios in which Kimberley may prove useful include: • viewing a map, possibly with personal annotations.
• impromptu presentations and demonstrations.
• spontaneous collaboration, as in choosing a restaurant.
The need for crisp user interaction in these scenarios deprecates the use of a thin client strategy.Network latency is of particular concern when the interactive application runs on a server that has to be reached across a WAN.Kimberley enables VM-based execution of an application on hardware close to the user, hence reducing network latency and improving the quality of user interaction.Although WAN bandwidth is relevant in determining VM overlay transmission time (and hence startup delay) in Kimberley, it is typically much easier to control and improve than WAN latency.To completely avoid WAN issues, the VM overlay can be delivered directly from the mobile device over a LAN.

Creating VM overlays
The VMs used in Kimberley are configured using VirtualBox [15] on a Linux host.
VirtualBox is an open source virtual machine monitor that can be hosted on a variety of operating systems, including Linux.We provide an overlay creation tool called kimberlize that is invoked as follows: kimberlize <baseVM> <install-script> <resume-script> baseVM is a VM in which a minimally-configured guest OS has been installed.There are no constraints on the choice of guest OS, except that it must be compatible with install-script and resume-script.The tool first launches baseVM, and then executes install-script in the guest OS.The result is a VM that has been configured for use by the mobile device.Next, the tool executes resume-script in the guest OS.This launches the desired application, and brings it to a state that is ready for user interaction.
The VM is now suspended.It can be resumed rapidly at runtime without the delays of guest reboot or application launch.There are no constraints on install-script and resume-script except for the obvious caveat that they should not halt or crash the guest.
Once the launch VM has been created, kimberlize uses the xdelta binary differencing tool to obtain the difference between the launch and post-install memory images.In principle, xdelta could also be used to obtain the difference in disk images.However, this is not necessary since VirtualBox already maintains a compact differencing disk.The VM overlay consists of this differencing disk plus the xdelta-generated memory difference.
The VM overlay is then compressed using the Lempel-Ziv-Markov algorithm [14], which is optimized for fast decompression at the price of relatively slow compression.This is the appropriate tradeoff for Kimberley because decompression takes place in the critical path of execution at runtime and contributes to user-perceived delay.Further, compression is only done once but decompression occurs each time a mobile device uses infrastructure.
The final step of kimberlize is to encrypt the compressed VM overlay using AES-128 private-key encryption.An optional argument to kimberlize can be used to specify the private key; otherwise kimberlize generates a random key from /dev/urandom.

Binding to infrastructure
Figure 2 shows the key runtime components of Kimberley.The controller of the transient binding between mobile device and infrastructure server is a user-level process called Kimberley Control Manager (KCM).An instance of KCM runs on the device ("device KCM") and on the infrastructure server ("server KCM").The KCM abstracts service discovery and network management from the rest of Kimberley.Over time, we envision Kimberley supporting many different types of wireless and wired networks.While wireless connections are more natural and seamless to the user, there may be situations where the freedom from RF congestion of a dedicated wired link may be preferable for crisp user interaction.The current implementation supports 802.11 (wireless) and USB (wired) connectivity; we expect to add Bluetooth and Ethernet in the future.
Note that the mobile device may have a direct connection to the Internet, in addition to the server connection shown in Figure 2.
KCM supports the browsing and publishing of services over the D-Bus interprocess communication mechanism [13].The use of D-Bus simplifies the implementation of extensibility in service discovery by allowing KCM method calls to be defined in XML files.
We currently support the Avahi service discovery mechanism [12], and plan to support the Bluetooth Service Discovery Protocol (SDP) in the future.It should also be possible to extend Kimberley to use other service discovery mechanisms.
The first step in the binding sequence is the establishment of a secure TCP connection using SSL between a device KCM and a server KCM.This secure tunnel is then used by the rest of the binding sequence, which typically involves user authentication and optional billing interaction.Kimberley supports the Simple Authentication and Security Layer (SASL) framework, which provides an extensible interface for integrating diverse authentication mechanisms.After successful authentication, a dekimberlize command is executed on the server.This reverses the effects of the original kimberlize command: it fetches the VM overlay from the mobile device or a Web site, decrypts and decompresses it, and applies the overlay to the base VM.The suspended VM is then launched.
The last step in the binding process is enabling user interaction via VNC [6].With this setup, all user interactions occur at the mobile device and its screen mirrors a scaled image of the large display on the server.This style of interaction allows the user to remain untethered and to be at some distance from the large server display.However, the ease of interaction is limited by the dimensions of the mobile device.Kimberley also supports interaction through a full-sized keyboard, mouse and other devices attached to the server, as in Scenario 2. This approach may be preferred when the usage context requires more extensive interaction.

Sharing user data
Some usage contexts require data to be shared between the mobile device and infrastructure server.In Scenario 2, for example, the mobile device could be running Windows CE while the launch VM may run Windows XP.Although versions of the Excel spreadsheet application run in both environments, they are not identical: the mobile version is optimized for interaction in a small device.However, both versions share the same spreadsheet file format.Kimberley needs a mechanism to share such files between device and infrastructure.A file system such as Coda [8] would be an obvious choice.However, this adds to the list of infrastructure dependencies for Kimberley, possibly restricting its deployment.
Our solution emulates a large FAT32 floppy disk using a part of the device's flash memory storage.Its default size is 20MB, but it can be configured to any size within the storage capacity of the mobile device.When the mobile device is being used in isolation, this virtual floppy disk is accessible as a mounted file system.When binding to an infrastructure server, Kimberley unmounts this virtual floppy disk, transfers its contents to the server, and then mounts it in the launch VM.When unbinding, Kimberley unmounts the vir-

PROTOTYPE PERFORMANCE
Our evaluation addresses three questions relative to the use of an infrastructure site that has no cached overlay state: • How big are typical VM overlays?
• What is the typical startup delay?
• How fast can a user depart?
To answer these questions, we examined six open-source Linux applications.These are listed below, along with their better-known Windows counterparts: • AbiWord: a word processor (Microsoft Word) • GIMP: an image processor (Adobe Photoshop) • Gnumeric: a spreadsheet program (Microsoft Excel) • Kpresenter: a slide tool (Microsoft PowerPoint) • PathFind: a digital pathology tool for whole-slide images based on the OpenDiamond R platform [9] and suggestive of Scenario 1. • SnapFind: a tool for examining digital photographs and searching for other similar photographs.It is also based on the OpenDiamond R platform.
As a limiting case to explore the intrinsic overhead of Kimberley, we also considered a hypothetical Null application by invoking kimberlize with empty install-script and resume-script parameters.

Overlay Size
Table 1 presents data relevant to the first question.The table shows that the compressed overlay size for these seven applications ranges from 5.9 MB for the Null case to 196.6 MB for PathFind.The uncompressed sizes indicate a typical compression factor of about three.We initially expected overlay creation to be a completely deterministic process, and were therefore surprised to see small variations in overlay sizes for the same application in different experimental runs.We conjecture that this is an artifact of VirtualBox's  differencing disk implementation.Based on more detailed experiments (not described here), we conjecture that VirtualBox asynchronously preallocates real disk space for its virtual disk.The effect is modest, amounting to just a few percent of total overlay size.The last column gives the size of the installation package for an application.This size is loosely correlated with the application's compressed and uncompressed overlay sizes.
Table 2 shows the time taken by kimberlize to create overlays.Recall that kimberlize sacrifices compression speed for fast decompression at runtime.This accounts for the relatively long times shown in Table 2, ranging from just over a minute for Null to nearly 11 minutes for Gnumeric.

Startup Delay
To answer the second question ("What is the typical startup delay?"), we measured the time it takes from a user's initial action to use infrastructure to the point at which he starts interacting with the application.This includes the time taken to transmit the VM overlay and virtual floppy disk, to apply the VM overlay, and to launch the VM.
Our experiments used the same set of seven applications and the VM configuration discussed in Section 4.1.The hardware used in these experiments is the same as that described at the beginning of Section 3. Since network bandwidth is a critical factor that af- The time to compress the virtual floppy disk is also significant.Improving this quantity is complicated by energy considerations for mobile devices.The total startup delay at 100 Mbps is quite acceptable, ranging from under a minute for SnapFind to just over a minute and a half for GIMP.
At 10 Mbps, VM overlay transfer time dominates.It accounts for roughly three-fourths of the total startup delay for most applications in Figure 3(b).Decompressing the VM overlay and applying it account for roughly one-fourth of the total time in those cases.The total startup delay ranges from roughly 3 to 5 minutes in most cases, which is at the outer limit of acceptability for transient use of infrastructure.This can be improved by using techniques such as data staging [3] to proactively transfer an overlay close to an anticipated usage site.In that case, the startup delay experienced would be closer to the 100 Mbps case.A cached overlay would, of course, also greatly improve startup delay.

Teardown Delay
Before a user can depart from a site, three steps must occur: the VM must be powered down; the server must generate the VM residue; and the residue must be transferred to the mobile device.Our measurements (not shown here, to save space) indicate that all of these steps combined require less than one second for all the applications studied.Post-departure cleanup of state at the server and on the mobile device take a few additional seconds.

RELATED WORK
There has been much recent work on building mobile computing systems that take advantage of infrastructure.Closest in spirit to Kimberley is the Internet Suspend/Resume R system (ISR) [5,7], that also uses VM technology.Kimberley differs from ISR in three important ways.First, it decomposes VM state into a base and an overlay.Even on infrastructure with a cold cache, only the relatively small overlay has to be delivered at runtime.This represents a different approach from ISR to solving the problem of migrating VM state that can be large.Second, VM state in Kimberley is discarded after execution, with only a very small VM residue being saved.Third, by delivering the VM overlay directly from the mobile device rather than a server, Kimberley can be used in situations where Internet connectivity is poor or non-existent.In that case, the base VM would have to be acquired by infrastructure through means such as manual dissemination on CD-ROM.
Further afield, Want et al [11] focus on the problem of dynamically composing hardware components to yield a computing device with desired capabilities.Balan et al [2] focus on the problem of creating mobile computing applications that can use cyber foraging.Goyal and Carter [4] discuss secure cyber foraging using services provided by VMs in the infrastructure; their work assumes that the VMs have been pre-configured for the desired services.Outside mobile computing, a recent commercial product vizioncore vPackager uses VM differencing to support a community of collaborative software developers [10].

CONCLUSION
Kimberley applies VM technology to the problem of provisioning infrastructure for use by mobile computing devices.A good solution to this problem needs to respect the resource limitations of mobile devices while also keeping the configuration complexity of infrastructure low.Kimberley accomplishes the first goal by avoiding VM execution on the mobile device (hence reducing CPU and memory demand) and by using indirection to deliver VM overlays to the infrastructure from third-party sites (hence reducing wireless bandwidth demand and energy use on the mobile device).The second goal is accomplished through the use of VM technology.Rather than infrastructure having to be configured for many different applications, it only has to be configured to support Kimberley.The rest of the configuration happens dynamically, through VM overlays.This simplification lowers a key barrier to the widespread deployment of mobile computing infrastructure.

Figure 3 :
Figure 3: Startup Delay in Seconds The private VM overlay is delivered MobiVirt'08: The First Workshop on Virtualization in Mobile Computing, June 17, 2008, Breckenridge, CO c 2008 ACM 978-1-60558-328-0/08/0006...$5.00 The Kimberley prototype uses a Nokia N810 Internet tablet with a 400MHz TI OMAP processor, 128 MB of DDR RAM and 256 MB flash memory, 2 GB flash internal storage, an attached 8 GB mi-croSD card, and a 4-inch touch-sensitive color display.It supports 802.11b/g and Bluetooth networking, and is equipped with GPS and ambient light sensors.Its software is based on the Maemo 4.0 Linux distribution.The infrastructure machine in our prototype is a Dell Precision 380 desktop with a 3.6 GHz Pentium 4 proces- sor, 4 GB RAM, an 80 GB disk, and a 20-inch 1600x1200 LCD monitor.It runs Ubuntu 7.10, which is based on the Linux 2.6.22-14kernel.This machine has a 100 Mb/s Ethernet connection to the Internet; it also has 802.11b/g wireless network access via a USB-connected network interface.We describe three aspects of our implementation below.

Table 1 :
VM Overlay and Install Package Sizes tual floppy disk, computes the state change since it was mounted, and transmits this difference to the mobile device.The state difference is effectively the "VM residue" shown in Figure1.At the device, Kimberley applies the difference and then mounts the virtual floppy disk.Although simple, this solution works well for the usage scenarios that we envision for Kimberley.It is idiot-resistant since the virtual floppy disk is never accessible simultaneously on both the mobile device and the VM.

Table 2 :
Creation Time for VM Overlays fects overlay transmission time, we explored performance at two different bandwidths.The first bandwidth of 100 Mbps is typical of what one might expect within an enterprise.The second bandwidth of 10 Mbps is suggestive of well-connected public infrastructure.For example, in Scenarios 1 and 2, this might be the bandwidth available from the restaurant or airport gate to the overlay server.Note that bandwidth to the overlay server is independent of the wireless connnection between mobile device and infrastructure over which control interactions and transfer of the virtual floppy disk take place.Figure3presents our results for two bandwidths: 100 Mbps and 10 Mbps.Five runs of each experiment were performed.At 100 Mbps, the transfer time for VM overlays only accounts for one-fifth or less of the total startup delay for most applications.Decompressing and applying the VM overlay are the dominant contributors to delay, accounting for roughly half of the total startup delay in most cases.