Dynamix: Dynamic Mobile Device Integration for Efficient Cross
Total Page:16
File Type:pdf, Size:1020Kb
DynaMix: Dynamic Mobile Device Integration for Efficient Cross-device Resource Sharing Dongju Chae, POSTECH; Joonsung Kim and Gwangmu Lee, Seoul National University; Hanjun Kim, POSTECH; Kyung-Ah Chang and Hyogun Lee, Samsung Electronics; Jangwoo Kim, Seoul National University https://www.usenix.org/conference/atc18/presentation/chae This paper is included in the Proceedings of the 2018 USENIX Annual Technical Conference (USENIX ATC ’18). July 11–13, 2018 • Boston, MA, USA ISBN 978-1-939133-02-1 Open access to the Proceedings of the 2018 USENIX Annual Technical Conference is sponsored by USENIX. DynaMix: Dynamic Mobile Device Integration for Efficient Cross-device Resource Sharing Dongju Chae¶ Joonsung Kim† Gwangmu Lee† Hanjun Kim¶ Kyung-Ah Chang∗ Hyogun Lee∗ Jangwoo Kim† ¶POSTECH †Seoul National University ∗Samsung Electronics Abstract user can take pictures from various angles by using mul- tiple remote cameras. In a similar sense, a number of In the era of the Internet of Things, users desire more recent studies [33,37,38] develop and demonstrate multi- valuable services by simultaneously utilizing various re- device services utilizing resources of multiple devices. sources available in remote devices. As a result, cross- However, the existing cross-device resource sharing device resource sharing, a capability to utilize the re- schemes suffer from several challenges. First, using net- sources of a remote device, becomes a desirable feature work libraries explicitly imposes significant program- to enable interesting multi-device services. However, the ming burden on developers [2, 3, 6] as they should fol- existing resource sharing mechanisms either have limited low a server-client model that involves careful task distri- resource coverage, involve complex programming efforts bution between server and client processes. Distributed for utilizing multiple devices, or more importantly, incur programming platform [54] may reduce the program- huge inter-device network traffic. ming burden; however, they still impose the burden of We propose DynaMix, a novel framework that realizes efficiently partitioning an application. Second, code of- efficient cross-device resource sharing. First, DynaMix floading [19, 21, 28] and remote I/O [11] can enable maximizes resource coverage by dynamically integrating cross-device resource sharing without the programming computation and I/O resources of remote devices with burden. Unfortunately, neither of them supports all com- distributed shared memory and I/O request forwarding. putation (e.g., CPU, memory) and I/O sharing at the Second, DynaMix obviates the need for multi-device same time, which limits their applicability. More impor- programming by providing the resource sharing capabil- tantly, the existing schemes do not optimize the place- ity at the low level. Third, DynaMix minimizes inter- ment of tasks and hence suffer when running on slow device network traffic by adaptively redistributing tasks wireless networks. between devices based on their dynamic resource usage. Motivated by the limitations of the existing mech- By doing so, DynaMix achieves efficient resource shar- anisms, we need a new cross-device resource sharing ing along with dynamic plug-and-play and reconfigura- mechanism achieving all of the following design goals. bility. Our example implementation on top of Android First, it should fully integrate the diverse resources of and Tizen devices shows that DynaMix enables efficient different devices including CPU, memory, and I/O re- cross-device resource sharing in multi-device services. sources. Second, it should achieve good programmabil- ity by not exposing any cross-device resource sharing de- 1 Introduction tails to the application layer. Third, it should dynamically In the era of the Internet of Things, a user can access an redistribute tasks between devices to minimize the nega- increasing number of heterogeneous devices (e.g., smart- tive performance impacts of slow wireless networks. phones, wearable devices, smart TVs) equipped with di- In this paper, we propose DynaMix, a novel frame- verse, and possibly different, hardware resources (e.g., work to enable Dynamic Mobile device integration CPU, memory, camera, screen). As a result, such an for efficient cross-device resource sharing. First, Dy- environment poses the need for multi-device services naMix fully integrates diverse resources using Dis- which simultaneously utilize the diverse resources of the tributed Shared Memory (DSM) and I/O request for- heterogeneous devices. For instance, when watching warding; DSM integrates CPU and memory, and I/O re- movies or viewing PDF files, a user can use a large TV quest forwarding integrates I/O resources. Second, as screen rather than a smaller smartphone screen. Also, a DSM and I/O request forwarding enable low-level re- USENIX Association 2018 USENIX Annual Technical Conference 71 source sharing below the application level, DynaMix ) 300 352ms Smartphone ms Heavy 200 does not demand applications to be aware of multiple Storage Screen Traffic 42ms (24 FPS) devices, achieving good programmability. Third, Dy- TV 100 Big Net. latency per frame ( 0 naMix dynamically redistributes tasks between devices Screen in a way that minimizes inter-device communication by Loader Decoder Video quality monitoring per-device resource usage and inter-device (a) An example setup (b) Network latency network usage. In addition, DynaMix supports seamless plug-and-play of remote devices by monitoring their con- Figure 1: An example setup to play a video on a remote nectivity and by taking checkpoints of an application’s screen and network latency to send a single frame states. to the target device, which then accesses the requested For evaluation, we implement DynaMix on various resources on behalf of the requesting device. The re- Android and Tizen devices (e.g., Google Nexus, Sam- quest forwarding schemes can forward the I/O requests sung Smart TV). We also introduce three multi-device in different layers (e.g., kernel, platform, user). For ex- services to demonstrate the effectiveness of DynaMix: ample, Rio [11] forwards I/O requests at the kernel level home theater, smart surveillance, and photo classifica- to a remote device which then performs the delivered tion. The experimental results clearly show that Dy- I/O requests. M+ [43] provides cross-device functional- naMix enables efficient cross-device resource sharing by ity sharing at the platform level by forwarding IPC mes- fully integrating diverse resources and by dynamically sages. Both schemes enable the transparent access to re- redistributing tasks between devices. For instance, Dy- mote I/O resources. On the other hand, user-level [2,3,6] naMix achieves the target performance goal of home the- request forwarding schemes make programmers explic- ater (i.e., 24 FPS when playing HD movies), whereas itly handle the remote I/O requests. the existing mechanisms suffer from severe performance However, the applicability of the existing request for- degradation (e.g., only 8.2 FPS with request forwarding). warding schemes is limited as follows. First, they sup- In summary, our contributions are as follows: port only I/O resources for resource sharing1. Next, they • Novel Platform. We propose DynaMix, a novel require carefully-designed abstraction layers to support framework to fully integrate remote resources for single-device applications. Furthermore, they can suf- efficient cross-device resource sharing. fer from severe network overheads unless they access • High Applicability. DynaMix can easily be de- resources in an optimized task distribution. Figure 1a ployed to existing devices, and its low-level re- shows an example kernel-level request forwarding setup source sharing enables easy programmability. configured to use a remote screen to play a video. Since • High Performance. DynaMix minimizes the inter- the local device forwards the decoded frame to the re- device communication overheads by dynamically mote screen, it can suffer from the severe communication redistributing tasks between devices. overhead as the video quality increases. Figure 1b shows • High Reliability. DynaMix supports seamless that only the lowest resolution quality can barely meet plug-and-play of remote devices, improving the re- the 24 frames per second (FPS) performance goal. Ac- liability of multi-device services. tually, moving Decoder task from the smartphone to the TV would greatly reduce the network overheads as only 2 Background and Motivation the small traffic between Loader and Decoder is ex- posed. From this example, we can see why the resource- In the IoT environment, cross-device resource sharing is aware task redistribution is important. a promising solution to satisfy various service demands Code Offloading and Distributed Computation. The of users who can access an increasing number of het- code offloading [19, 21] and distributed computa- erogenous devices. The users can select favorable re- tion [28] schemes utilize remote computation resources sources in different devices, so that they enjoy the same (e.g., CPU, memory) by offloading performance-critical application in different ways depending on their resource code regions to more powerful devices. They can not configurations. only improve the performance but also save the power consumption of the requesting device by using a faster 2.1 Limitations of Existing Schemes CPU or exploiting the increased parallelism with more To enable multi-device services, researchers have pro- cores. In addition, COMET