• Tidak ada hasil yang ditemukan

Context-aware Background Application Scheduling in Interactive Mobile Systems

N/A
N/A
Protected

Academic year: 2023

Membagikan "Context-aware Background Application Scheduling in Interactive Mobile Systems"

Copied!
55
0
0

Teks penuh

Our trace-driven simulations with 96 user traces demonstrate that CAS's context-aware design enables it to outperform existing process scheduling algorithms. 9 The CCDF and associated log-normal fits of off (left) and on (right) periods of one randomly selected user. We list the application names of the ordered series in the graph and the numbers (-%) indicate the launch probabilities.

Introduction

Daily network usage of the Facebook app and its corresponding state is either foreground or background. Popular memory killing algorithms often implemented with LMK pure applications in the order of either LRU (least recently used) or process priority [10]. We also reveal detailed context dependence in the reintroduction probabilities, which conveys more personal control ideas over existing studies [15] - [19] .

Fig.  1.  Daily  network  usage  of  the  Facebook  app  and  its  corresponding  state  either  being  in  the  foreground or background
Fig. 1. Daily network usage of the Facebook app and its corresponding state either being in the foreground or background

Related Work

Another algorithm, HUSH, increases an application's blanking interval if it has not been used in the foreground using exponential backoff (that is, the interval is multiplied by a given scale factor σ). Once a foreground application is used, the interval is reset to an initial value.

Preliminary

With LMK, the foreground process goes into the background when the user switches to another foreground application or turns off the screen. LMK kills background applications in descending order of importance when available memory falls below several levels of preset memory thresholds. This is certainly done without regard to when the terminated application will be restarted.

LMK therefore results in a higher probability of a cold launch, even though it keeps some applications in the background and involves a lot of energy waste.

Fig. 3. The process states defined in Android [28] (left) and our simplified three states (right)
Fig. 3. The process states defined in Android [28] (left) and our simplified three states (right)

Measurement Study

Data Collection

Key Observations from the Measurements

We find that the number of running (foreground+background) processes per user is 5.2 on average and the number of unique processes ever used per user, is 55.1 on average, excluding system and user interactive processes. For the visualization, we choose one user at random and show the times of the application's launches for two consecutive weeks in Fig. 9, we fit off/on period distributions of a randomly chosen user to show that the distributions are heavy.

Commonly Used Applications: In Table 2, we summarize the twelve most popular applications across all participants from the perspective of launch probabilities, average runtimes, and top 1 to top 3 probabilities. The top-n probability of an application is defined as the probability that the application is the nth most used application by a user. The CDF of the launch probability of m most used applications (left) and Zipf distribution fitted to the average launch probability (right).

We find that the launch probability follows Zipf's law8 with exponent s = 1.4, and that the aggregate launch probability of a user's 10 most used applications averages more than 80%. Therefore, users tend to use a small subset of applications most of the time, and there is little gain in startup latency and associated user experience when infrequently used applications are kept in the background. The log shows that the available memory averages 488 MB, which is only 22.8% of the physical memory (90% of users have less than 31.6% of the total available memory).

We also observe context dependencies such as the duration of previous intervals (Tk-1off, Tk-1on).

Fig. 6. The percentage of states (importance) in recorded logs (top) and the number of running processes  at a moment and the number of unique processes (bottom)
Fig. 6. The percentage of states (importance) in recorded logs (top) and the number of running processes at a moment and the number of unique processes (bottom)

System Architecture

For example, the time of day can be roughly classified into two labels, active and inactive hours, which can show two different probability distributions of off and on periods depending on the nature of human life cycles. For example, when sorting “time of day” into k contiguous time blocks, we can set up the following clustering problem that minimizes the residual sum of squared errors from the clustering.9 We solve this problem with the k-means algorithm [37] . 9 We similarly formulate and solve this problem for other contexts, such as prior blackout and blackout periods.

We find that most users only need two contiguous time blocks (i.e., k = 2) to describe their temporal activities and experience very little benefit from further separation. 17, we display the residual sum of squares of users for off and on periods in the test set (i.e. the second week of the trace), where the contexts (time of a day, previous off and on periods, last application used) are trained from the first week of the trace. The residual sum of squares is reduced on average by 29.8% and 40.3% for the off and on periods, respectively.

We also find that the entropy10 of the next launch app, Xk, is also significantly reduced, which is omitted for brevity. Precomputation and control phases: Based on this analysis, the background application controller computes sets of background applications for possible combinations of contexts in both disabled and connected periods in the precomputation phase. Therefore, we exclude the conditional information C in the rest of the paper, i.e. Tk = Tk|C and Xk = Xk|C, for simplicity.

This pre-calculation takes place occasionally (for example once a week) to adapt to the change in the usage behavior of the application.

Fig.  16.  A  sample  off-period  classification  by  “active”  (8am  -  11pm)  and  “’inactive”  (11pm  -  8am)  hours obtained from the first week trace (top) of one user
Fig. 16. A sample off-period classification by “active” (8am - 11pm) and “’inactive” (11pm - 8am) hours obtained from the first week trace (top) of one user

Algorithm Design

  • System Model
  • Problem Formulation
  • Scheduling Algorithm Design
  • Bisection Method for an Energy or Disutility Constrained Optimization

For simplicity, we model that the energy consumption for preloading and unloading is small in the long run and that the transition delay is much shorter than one time slot. During the on period, the disutility is multiplied by the probability that the user will switch to another application without going through the off period (i.e., ℙ[T off = 0]). In the rest of the derivation, we focus on the P-off problem, since P-on can be treated equally by letting Bon(t) ⊆ Ωk.

Proof: From the definition of submodularity, it is straightforward to see that the sum of a submodular function and an additive function is submodular, by subtracting the additive function in the inequality. Since the cardinality constraint can be generalized to rational weights and g(S) = f(Ω \ S) is also submodular15 such that the upper bound can be transformed into a lower bound, our problem is also NP-hard. Our scheduling algorithm also incurs small control costs from Proposition 6.2, as we will show that the obtained policy is a monotonically rational policy.

It is easy to see that the policy obtained from our scheduling algorithm is a monotonic rational policy. 18 Note that a mixed policy (which uses deterministic policies with some probabilities) can make the energy consumption continuous, so that the solution exists within this interval according to the intermediate value theorem. We assume that the time slots are sufficiently short that the error can be smaller than the given tolerance.

Note that the iteration algorithm can be easily generalized to consider both off and on periods by considering the time-averaged energy consumption.

Trace-driven Simulation

Setup

Key Results

With this in mind, our experimental traces show that the power consumption of background applications is 48.5% of the total battery capacity under LMK. The average cold boot probability with LMK is measured at 43% with an average memory usage of 212MB from controlled background applications.21. CAS achieves a similar cold start probability with only 0.7 background applications (14% LMK) for  = 6e+4 in Fig.

Staleness: We define application staleness as the average time elapsed since the last background or foreground activity of an application as in [2]. Unlike other algorithms, CAS preloads background applications and reduces average lag by 33% and 41% over LMK for  = 6e+4 and 3e+5, respectively. However, CAS predicts the moment an app is used next so that the average latency becomes much shorter than other algorithms across all apps, including social and.

On Facebook, LMK has a higher probability of small aging (e.g. less than 1000 seconds) than CAS, but the average aging of CAS is still smaller than that of LMK. Note that the application controller sleeps during the time the set of background applications remains the same, and wakes up only when the control action is needed to make changes. In CAS, the average frequencies of wake-up alarms and preload actions are less than once every 2 minutes for the selected parameters.

The average device battery life is extended in CAS from 12.2 hours observed under LMK to 16.3 hours, with the same utility (i.e. expected boot latency).

Fig. 18. Comparison of scheduling algorithms. The error bars indicate 25th and 75th percentiles
Fig. 18. Comparison of scheduling algorithms. The error bars indicate 25th and 75th percentiles

Android Implementation

We summarize the results of CAS ( =6e+4) and LMK and the usage patterns of the two randomly selected users in Table 6. One of these users was found to be a light user and the other a mild to heavy user. We find that the energy savings with CAS from LMK are 43% and 30% for each user, as the number of running background applications is significantly reduced.

The average power during screen on periods is also reduced as CAS downloads background applications both in screen off and on periods. The experimental results confirm that energy savings through CAS can indeed be significant in practice. Experimental results of CAS and LMK over 1-day traces of two users on Galaxy Note2.

Table 6. Experimental results of CAS and LMK over 1-day traces of two users on Galaxy Note2
Table 6. Experimental results of CAS and LMK over 1-day traces of two users on Galaxy Note2

Discussions and Caveats

Concluding Remarks

Shroff, "Context-Aware Application Control in Mobile Systems: What Will Users Do and Not Do Next?" in Proc. Zhang, “Where is the energy spent in my app?: fine-grained energy accounting on smartphones with eprof,” in Proc. Rice, “Characterization and modeling of the impact of wireless signal strength on smartphone battery drain,” in Proc.

Suh, "A new android memory management policy focused on a user's periodic habits," in Ubiquitous Computing Application and Wireless Sensor, 2015, p. in Proc. Bauer, “Falling asleep with angry birds, facebook, and flash: a large-scale study of mobile app use,” in Proc.

Gatica-Perez, “Smartphone use in nature: a large-scale analysis of applications and context,” in Proc. Marlin, “Practical prediction and prefetching for faster application access on mobile phones,” in Proc. Liu, “Earlybird: Mobile social network feed prefetching via content preference mining and usage pattern analysis,” in Proc.

Cha, "AppScope: Android smartphone application power measurement framework using kernel activity monitoring." in Proc.

Gambar

Fig. 2. Measured power consumption of a popular game application for foreground and background  states in a Galaxy Note 2 smartphone
Fig.  1.  Daily  network  usage  of  the  Facebook  app  and  its  corresponding  state  either  being  in  the  foreground or background
Fig. 4. Our simplified states and transitions between a pair of states.
Fig. 3. The process states defined in Android [28] (left) and our simplified three states (right)
+7

Referensi

Dokumen terkait

FK Universitas Tarumanegara Jakarta, http://journal.fkm.ui.ac.id/kesmas/article/view/347/346 diakses tanggal 8 desember 2018 Moyad, A.M., 2004, Fad Diets and Obesity - Part I: