Improving Interactivity via VT-CFS and Framework-assisted Task Characterization for Linux/Android Smartphones

Similar documents
ITRS 2013 Silicon Platforms + Virtual Platforms = An explosion in SoC design by Gary Smith

ADDITIONAL INSTRUCTIONS FOR ISU SYNCHRONIZED SKATING TECHNICAL CONTROLLERS AND TECHNICAL SPECIALISTS

Longitudinal Road Profile Model Generation Based on Measurement Data Using Mathematical Approach

Research and Development of Economical CNC Software for 2D Lean Friction Stir Welding Machine

A Measurement Framework for National Key Performance Measures

Engineering Analysis of Implementing Pedestrian Scramble Crossing at Traffic Junctions in Singapore

Reduced drift, high accuracy stable carbon isotope ratio measurements using a reference gas with the Picarro 13 CO 2 G2101-i gas analyzer

High Speed 128-bit BCD Adder Architecture Using CLA

Contents TRIGONOMETRIC METHODS PROBABILITY DISTRIBUTIONS

INVESTIGATION 2. What s the Angle?

Bayesian parameter estimation. Nuno Vasconcelos UCSD

Bayesian Learning. CS 5751 Machine Learning. Chapter 6 Bayesian Learning 1

Working Paper: Reversal Patterns

Planning of production and utility systems under unit performance degradation and alternative resource-constrained cleaning policies

The Discussion of this exercise covers the following points: The open-loop Ziegler-Nichols method. The open-loop Ziegler-Nichols method

Decomposition guide Technical report on decomposition

Terminating Head

Evaluating the Effectiveness of Price and Yield Risk Management Products in Reducing. Revenue Risk for Southeastern Crop Producers * Todd D.

Evaluation of a Center Pivot Variable Rate Irrigation System

Listening & Speaking. Grade 1. Supports. instructi GRADE. Develops oral and receptive language. 15- to 20-minute daily activities

Control Method for Low Oxygen Concentration in Reheating Furnace

Open Access Regression Analysis-based Chinese Olympic Games Competitive Sports Strength Evaluation Model Research

The Possibilities of Difference Analysis Utilisation in Profit Rate Assessment

Why? DF = 1_ EF = _ AC

An Indian Journal FULL PAPER ABSTRACT KEYWORDS. Trade Science Inc. The tennis serve technology based on the AHP evaluation of consistency check

Announcements. CS 188: Artificial Intelligence Spring Today. P4: Ghostbusters. Exact Inference in DBNs. Dynamic Bayes Nets (DBNs)

A PROBABILITY BASED APPROACH FOR THE ALLOCATION OF PLAYER DRAFT SELECTIONS IN AUSTRALIAN RULES

Firearm Safety. Links to Topics below XAVIER BECERRA THE SIX BASIC GUN SAFETY RULES. Attorney Genera] The. Six Basic Gun Safety Rules

Your questions answered! Welcome Grads of 2020! Who can I go to if I need help? What are teachers like?

2014 WHEAT PROTEIN RESPONSE TO NITROGEN

For models: 660 EF/EFO

Structural Gate Decomposition for Depth-Optimal Technology Mapping in LUT-based FPGA

bark bark bat bat Multiple Meaning Words: Kindergarten to Grade 2 More Teaching Tools at harsh sound made by a dog

it500 Internet Thermostat

Development of Accident Modification Factors for Rural Frontage Road Segments in Texas

Chapter 5. Triangles and Vectors

AHP-based tennis service technical evaluation consistency test

IGF Research Project N Safer High Heels

Bypass Compensator Cartridge, Size 16

arxiv: v1 [cs.ne] 3 Jul 2017

The impact of foreign players on international football performance

Bicycle wheel and swivel chair

Exploring Impacts of Countdown Timers on Queue Discharge Characteristics of Through Movement at Signalized Intersections

Grade 6. Mathematics. Student Booklet SPRING 2011 RELEASED ASSESSMENT QUESTIONS. Record your answers on the Multiple-Choice Answer Sheet.

OFFSHORE USE OF FLOATING SHEERLEGS

CS 188: Artificial Intelligence Spring Announcements

How Geo-distributed Data Centers Do Demand Response: A Game-Theoretic Approach

English Premier League (EPL) Soccer Matches Prediction using An Adaptive Neuro-Fuzzy Inference System (ANFIS) for

Evolutionary Sets of Safe Ship Trajectories: Evaluation of Individuals

NOTICE TO MARINERS. No 19 of 2016

ERRATA for Guide for the Development of Bicycle Facilities, 4th Edition (GBF-4)

IEEE TRANSACTIONS ON SMART GRID, VOL. 7, NO. 2, MARCH

Applications on openpdc platform at Washington State University

PILOT PROGRAM FOR THE EVALUATION OF NANOFILTRATION MEMBRANES PREPARED BY: WILMINGTON, MA ON UF PERMEATE

Geometrical Description of Signals GEOMETRICAL DESCRIPTION OF SIGNALS. Geometrical/Vectorial Representation. Coder. { } S i SOURCE CODER RECEIVER

International Journal of Engineering and Technology, Vol. 8, No. 5, October Model Systems. Yang Jianjun and Li Wenjin

Chance. PARAMOUNT LDS 1st & 3rd Ward

Minnesota s Wild Turkey Harvest Fall 2016, Spring 2017

United States Patent (19)

Lesson 8: Application Technology

Product Information. Radial gripper PRG 52

DRAFT FOR PUBLIC CONSULTATION INTERCONNECTION AGREEMENT v.2.0 FOR IP KULATA/SIDIROKASTRO DEFINITIONS, BUSINESS RULES, EXCEPTIONAL EVENT

Multiple Meaning Words: Grade 3 to 5 More Teaching Tools at

Chp. 3_4 Trigonometry.notebook. October 01, Warm Up. Pythagorean Triples. Verifying a Pythagorean Triple... Pythagorean Theorem

Risk analysis of natural gas pipeline

Automated External Defibrillators DESIGNED FOR UNEXPECTED HEROES

DETECTION AND REFACTORING OF BAD SMELL

Dorridge & District Residents Association A Walk From Dorridge to Blythe Valley Nature Reserve

How To Demonstrate Guide E24 & E26

Chapter 4 Group of Volunteers

Workfit -SR, Dual Monitor Short Surface

The Pythagorean Theorem and Its Converse Is That Right?

1 Measurement. What you will learn. World s largest cylindrical aquarium. Australian Curriculum Measurement and Geometry Using units of measurement

Aerator Performance in Reducing Phenomenon of Cavitation in Supercritical Flow in Steep Channel Bed

Product Information. Long-stroke gripper PSH 42

Investigating Reinforcement Learning in Multiagent Coalition Formation

Generative Models and Naïve Bayes

In any right-angle triangle the side opposite to the right angle is called the Label the Hypotenuse in each diagram above.

M.H.Ahn, K.J.Lee Korea Advance Institute of Science and Technology 335 Gwahak-ro, Yuseong-gu, Daejeon , Republic of Korea

Syngenta Soybean Insecticide Screening Study Beaumont, TX 2017

Bayesian classification methods

IBIS: ATestbed for the Evolution of Intelligent Broadband Networks toward TINA

CS 2750 Machine Learning. Lecture 4. Density estimation. CS 2750 Machine Learning. Announcements

A Universal Zombie RPG Add-On

Multiple Meaning Words: Kindergarten to Grade 2 More Teaching Tools at

2014 Victorian Shooting Championship

Performance Comparison of Dynamic Voltage Scaling Algorithms for Hard Real-Time Systems

Lateral Earth Pressure on Lagging in Soldier Pile Wall Systems

Impact of Intelligence on Target-Hardening Decisions

Design and Calibration of Submerged Open Channel Flow Measurement Structures: Part 3 - Cutthroat Flumes

Study on Fish Migration through a Stone-Embedded Fish Passage Based on Preference

Coastal Engineering Technical Note

Skills Practice Skills Practice for Lesson 4.1

Trial Rules for Schutzhund (RSVSchH) and Tracking Trials (RSVFH)

Fast Adaptive Coding Unit Depth Range Selection Algorithm for High Efficiency Video Coding

2018 GIRLS DISTRICT-SPECIFIC PLAYER DEVELOPMENT GUIDE

RCBC Newsletter. September Richmond County Baseball Club. Inside this issue: Johnny Ray Memorial Classic. RCBC on You Tube

Product Information. Long-stroke gripper PFH-mini

THERMOFLO FLUID PUMPS& SYSTEMS THERMOFLO FOR HEATING, COOLING AND WATER SUPPLY APPLICATIONS TO BS7074 SEALED SYSTEMS EXPANSION VESSELS PRESSURIZERS

Coalition Formation in a Global Warming Game: How the Design of Protocols Affects the Success of Environmental Treaty-Making

Transcription:

Improvng Interctvty v VT-CFS nd Frmework-sssted Tsk Chrcterzton for Lnux/Androd Smrtphones Sungju Huh 1), Jonghun Yoo 2) 1), 2) nd Seongsoo Hong 1) Deprtment of Intellgent Convergence Systems, Grdute School of Convergence Scence nd Technology 2) School of Electrcl nd Computer Engneerng Seoul Ntonl Unversty Seoul, Republc of Kore {sjhuh, jhyoo, sshong}@redwood.snu.c.kr Abstrct Androd smrtphones re often reported to suffer from sluggsh user nterctons due to poor nterctvty. Ths s becuse the Lnux kernel my ncur perceptbly long response tme to user nterctve tsks. Prtculrly, the completely fr scheduler (CFS) of Lnux cnnot systemtclly fvor user nterctve tsk over bckground tsks snce t fls to effectvely dstngush between them. Even f user nterctve tsk s successfully dentfed, such tsk cn suffer from hgh schedulng ltency due to the non-preemptve nture of CFS. Ths pper presents frmework-sssted tsk chrcterzton nd vrtul runtme-bsed CFS (VT-CFS) to ddress these problems. The former s coopertve mechnsm between the Androd pplcton frmework nd the kernel. It dentfes user nterctve tsk t the frmework level nd then enbles the tsk scheduler to selectvely promote the prorty of the dentfed tsk t the kernel level. VT-CFS s n extenson of the CFS. It llows tsk to be preempted t ny preempton tck so tht the schedulng ltency of user nterctve tsk s bounded by the tck ntervl. We hve mplemented our pproch nto Androd 2.2 runnng wth Lnux kernel 2.6.32. Expermentl results show tht the response tme of user nterctve tsk s reduced by up to 31.4% whle ncurrng only 0.9% more run-tme overhed thn the legcy system. Keywords-nterctvty; responsveness; Androd smrtphones; Lnux; tsk schedulng I. INTRODUCTION Androd s moble softwre pltform tht runs on top of the Lnux kernel nd provdes pplctons wth Jv-bsed run-tme envronments. It hs been the most wdely deployed softwre pltform for smrtphones snce 2010 [1] prtly due to ts openness nd rpd development cycles. Whle mny nnovtve fetures hve been constntly ntroduced nto the recent Androd releses, Androd smrtphones re stll reported to suffer from sluggsh user nterctons due to poor nterctvty [2]. UI-relted complnts on Androd nclude n unresponsve touchscreen nd perceptble lg n the GUI. Mnufcturers re puttng gret del of effort nto chevng hgh degree of nterctvty n ther Androd smrtphone products. The nterctvty cn be quntttvely evluted by the endto-end response tme tken to rect to user s cton. In ths tme ntervl, the kernel servces n nterrupt rsed by n nput devce nd wkes up n pplcton tsk whch eventully delvers response to n output devce. Users ntcpte tht ll such processng s fnshed wthn no perceptble dely. There hve been extensve reserch efforts to quntfy requrements on stsfctory response tme [3]. Despte slght dfferences between ndvduls, typcl user gets stsfed when response tme s less thn 150 ms. Unfortuntely, t s becomng ncresngly dffcult to ensure such quck response due to the ever growng complexty of the Androd frmework. It supports multtskng by whch foreground pplcton runs concurrently wth multple bckground pplctons. In such n envronment, n nterctve tsk of foreground pplcton s often nterfered by dozens of btch tsks of bckground pplctons. For exmple, grbge collecton performed by the Dlvk vrtul mchnes of bckground pplctons s often ponted s the cuse of vsble lgs n the GUI [4]. In Androd, ordnry tsks re scheduled by the completely fr scheduler (CFS) whch s the defult scheduler of the mnlne Lnux kernel. The objectve of CFS s to cheve frness n the dstrbuton of CPU tmes mong tsks. To do so, t gves ech tsk tme slce proportonl to ts weght. At runtme, CFS keeps trck of the currently runnng tsk s vrtul runtme, defned by the tsk s cumultve runtme nversely scled by ts weght. When tsk runs for ts tme slce, CFS preempts t nd dsptches nother tsk wth the smllest vrtul runtme. Ths pproch s prtculrly effectve n server envronment where number of btch tsks owned by dfferent users shre computng resources n fr mnner. However, CFS flls short of expecttons when t comes to schedulng nterctve tsks [5]. The resons for ths re twofolds. Frst, CFS does not dentfy user nterctve tsk to fvor t over bckground tsks. Thus, tme slce gven to user nterctve tsk my not be long enough to complete gven user ntercton. In such cse, the user nterctve tsk s preempted by other runnble tsks whenever t runs out of ts tme slce. Second, CFS often leds to long schedulng ltency even f user nterctve tsk cn be dentfed. CFS forces tsk to run non-preemptvely for ts entre tme slce. Thus, when user nterctve tsk s woken up, t must wt untl ll of the runnble tsks wth smller vrtul runtmes run out of ther tme slces. The schedulng ltency vres dependng on both the number of tsks nd ther weghts.

In ths pper, we propose frmework-sssted tsk chrcterzton nd vrtul runtme-bsed CFS (VT-CFS) to solve the bove problems. Frmework-sssted tsk chrcterzton s coopertve mechnsm between the Androd pplcton frmework nd the kernel. At the frmework level, user nterctve tsk s esly dentfed snce t must nvoke specfc frmework API to ccess I/O devces. Whle servcng gven I/O request, the frmework conveys the tsk dentfer of user nterctve tsk to CFS. At the kernel level, CFS temporrly promotes the prorty of such tsk so tht t gets lrger tme slce thn others. Ths effectvely reduces the preempton ltency of user nterctve tsk snce t cn run longer wthout preempton thn t does under CFS. VT-CFS extends CFS to llow tsk to be preempted t ny predefned tck clled preempton tck. Ths gurntees tht schedulng ltency of user nterctve tsk s bounded by the tck perod. It s constnt vlue smller thn typcl tme slce of tsk n Lnux. We hve mplemented the proposed mechnsms nto Androd 2.2 runnng on the Lnux kernel 2.6.32. We mesured the response tmes of set of user nterctve tsks whch rn wth bckground btch tsks. Expermentl results prove the effectveness of our pproch. The response tme s reduced by up to 31.4% compred to the legcy system. Ths mprovement comes from the fcts tht the modfed frmework cheves 59.7% shorter preempton ltency thn the legcy frmework nd tht VT-CFS yelds 6.07% shorter schedulng ltency for user nterctve tsks thn the CFS. The extr run-tme overhed of our pproch ws only 0.9% of the legcy Androd system. The rest of ths pper s orgnzed s follows. Secton 2 dscusses the bckground nd exstng work for mprovng nterctvty. Secton 3 formultes the problem nd presents the soluton overvew. Sectons 4 nd 5 descrbe the frmeworksssted tsk chrcterzton mechnsm nd VT-CFS, respectvely. Secton 6 reports on the expermentl evluton. We conclude ths pper n Secton 7. II. BACKGROUND AND RELATED WORK In ths secton, we provde bckground nformton on the Androd frmework nd the Lnux kernel s tsk scheduler n the context of nterctvty. We then dscuss relted work on mprovng nterctvty. A. Androd Frmework Androd s softwre pltform for moble devces such s smrtphones nd tblets. It conssts of kernel, Androd runtme, ntve lbrres nd pplcton frmework [6]. Kernel: Androd reles on customzed verson of the Lnux 2.6 kernel. Dfferent from the mnlne Lnux kernel, severl enhncements re ncluded n Androd s kernel to better ddress the needs for moble devces: ggressve power mngement clled wke locks, effcent IPC mechnsm clled bnder, prortzed out of memory kller, nd so on. Androd runtme: Androd provdes n pplcton wth run-tme envronment whch conssts of Dlvk vrtul mchne nstnce nd the stndrd Jv clss lbrres. Androd pplctons re wrtten n the Jv lnguge nd compled nto Dlvk Executble (DEX) byte code. At run-tme, n pplcton s executed on top of n ndependent Dlvk VM nstnce. Ntve lbrres: Androd provdes set of lbrres wrtten n C/C++ for performnce. These nclude the stndrd C lbrry, grphc engne, multmed codec, surfce mnger, nd so on. These functonltes re exposed to pplctons through the pplcton frmework. Applcton frmework: The pplcton frmework conssts of set of system servers through whch n pplcton cn mke use of Androd servces. Exmples of servers re the wndow mnger, content provder nd vew system, to nme few. B. Completely Fr Scheduler CFS s symmetrc multprocessor schedulng lgorthm [7] whch mntns dedcted run-queue for ech core nd mkes schedulng decsons ndependently of ech other. Its prmry gol s to provde fr shre schedulng by gvng ech tsk CPU tme proportonl to ts weght. A tsk s weght s specfed by nce vlue, whch s n nteger rngng [-20, 19]. A smller nce vlue corresponds to hgher weght nd vce vers. Wthn run-queue, CFS successfully cheves the gol by usng the noton of tsk s vrtul runtme. A tsk s vrtul runtme s defned s the tsk s cumultve runtme nversely scled by ts weght. Assume tht tsk τ s ssgned weght W ( τ ). Let ω 0 denote the weght of nce vlue 0 nd let A( τ,) t be the mount of CPU tme tht the tsk τ hs receved n tme durton [ 0,t ). The vrtul runtme of tsk τ t tme t s represented s below. ω0 VR( τ,t) = A( τ,t) (1) W ( τ ) Perfect frness s cheved f vrtul runtmes re the sme mong ll the tsks t ny gven tme. CFS pproxmtes ths by dsptchng the tsk wth the smllest vrtul runtme t ts schedulng decson pont. In order to reduce the run-tme complexty of run-queue mnpulton, CFS uses blnced bnry tree clled red-blck tree n mntnng lst of tsks sorted by ther vrtul runtmes. For gven red-blck tree, the tsk wth the smllest vrtul runtme cn be found t the leftmost node of the tree n O(1) tme. In order to enforce fr shre schedulng t resonble run-tme cost, CFS mkes use of the noton of tme slce. A tme slce s ssocted wth tsk nd defned s tme ntervl for whch the tsk s llowed to run wthout beng preempted. In CFS, the length of tsk s tme slce s proportonl to ts weght. The tme slce of tsk τ s computed by

TS τ W ( τ ) = P W ( τ ) τ j S where S s the set of runnble tsks n the run-queue, W ( τ ) s the weght of τ nd P s the constnt for gven worklod. Let n be the number of tsks n system. P s then defned s below n the ltest verson of Androd [8]. 5ms f n < 5 P = 1ms n otherwse At ech schedulng tck, CFS updtes the vrtul runtme of the currently runnng tsk nd checks f t rn out of ts tme slce. If so, CFS preempts the runnng tsk nd dsptches the tsk stored t the leftmost node n the run-queue. It replenshes the tme slce of the preempted tsk nd puts t bck to the runqueue t the sme tme. If tsk s woken up fter long sleep, t would hve very smll vrtul runtme compred to other tsks. In order to prevent such tsk from monopolzng the CPU untl t ctches up other tsks vrtul runtmes, CFS djusts the vrtul runtme of newly woken-up tsk τ t tme t s below. j (2) (3) VR( τ,) t = VR( τ,) t + mn( VR( τ,)) t (4) j τ j S It ensures tht the vrtul runtme of τ s slghtly lrger thn the mnmum vrtul runtme t the run-queue when t s nserted bck to the run-queue. C. Relted Work There hve been severl reserch efforts to mprove the nterctvty of n Androd system. They cn be dvded nto two ctegores: one performed t the kernel level nd the other t the frmework level. In the lterture, the Lnux kernel developers hve ttempted to mprove the nterctvty of Lnux by refnng tsk schedulng lgorthms. Pror to kernel 2.6.23, Lnux used n O(1) scheduler s ts tsk scheduler [9]. It ddressed nterctvty wth number of heurstcs to determne f tsks re I/O-bound or CPU-bound. Once t chrcterzes tsks, t promotes the prortes of I/O-bound tsks. In generl, the O(1) scheduler generlly shows better nterctvty performnce thn CFS [10, 11]. Unfortuntely, the heurstcs often msclssfy tsk s chrcterstcs. Thus, t my led to strvton nd unfr llocton of CPU resource under certn worklod [12]. Torrey et l. mplemented n MLFQ scheduler nto Lnux 2.6 kernel to enhnce the nterctvty of the O(1) scheduler [13]. Its dfferences from the O(1) scheduler re n the elmnton of the heurstcs for nterctvty nd the use of the opposte reltonshp between tsk s prorty nd tme slce. Ther experments showed tht nterctvty ws mproved. However, t demonstrted poor throughput when t worked wth CPUntensve worklod. Kolvs proposed Brn Fuck Scheduler (BFS) [5] s n lterntve to CFS. The mn gol of BFS s to mprove desktop nterctvty by provdng smpler run-tme lgorthm wthout relyng on ny heurstcs. Unlke CFS, t keeps trck of tsk s vrtul dedlne [14] for fr llocton of CPU resource. It keeps the vrtul dedlne nd remnder of the tme slce of tsk when t becomes blocked so tht t mntns n erler vrtul dedlne when t gets woken up. Ths mproves the nterctvty of the system. Snce the mproved performnce of BFS ws reported by Lnux mgznes [15], t ws dded to the Androd repostory n the Éclr relese. However, t ws lter excluded from the Froyo relese snce such n mprovement ws rrely dstngushed by user experence. Androd lso employs vrous technques for enhncng nterctvty s follows. (1) It mntns bckground nd defult prortes seprtely n order to reduce how much bckground tsks nterrupt tsks whch nterct wth user [16]. To do so, t mkes use of Lnux kernel fclty clled control group. Ths ggregtes ll bckground tsks nto specl schedulng group nd ths group s restrcted to use no more thn 10% of the CPU. As result, bckground tsks do not serously ffect foreground tsk whch ntercts wth user. (2) Androd lso cheves mproved nterctvty v enblng the fst strtup of n pplcton tsk [17]. As descrbed n Secton 2-A, n Androd pplcton tsk runs n ts own Dlvk VM nstnce. However, t notorously tkes long tme to cold-strt VM nstnce. Snce t leds poor responsveness, Androd uses Zygote, pre-ntlzed nd pre-loded tsk whch ncludes the common lbrry clsses tht wll be used by most of pplctons. By spwnng n pplcton tsk from Zygote, n pplcton tsk cn be lunched n short strtup tme. (3) Androd performs renderng work seprtely to reduce tme to drw screen [18]. In Androd, screen s composed of seprte peces of regon clled surfce. Androd drws ech surfce ndependently of ech other so tht only n updted surfce s newly rendered. Ech ndvdul surfce s then composted wth others to the screen by dedcted system server clled surfce flnger. By dong so, totl renderng tme s reduced nd user cn perceve mproved nterctvty. III. PROBLEM FORMULATION AND SOLUTION OVERVIEW In ths secton, we model the trget system, defne our metrc for evlutng the degree of nterctvty nd present the overvew of the proposed soluton pproch. A. System Modelng Our trget system rchtecture s depcted n Fg. 1. Its softwre conssts of the Lnux kernel, the pplcton frmework nd pplctons. Prtculrly, the pplcton frmework contns system servers, ech of whch s mplemented s set of Lnux tsks. Snce system server s responsble for certn dedcted system resource dmnstrton, ech devce s exclusvely ccessed by dedcted system server. The system server types re specfed by the Androd frmework. For exmple, Surfce Flnger s server whch s n chrge of the frme buffer. System servers re mplemented n C/C++ to effcently hndle I/O requests. They run s ordnry Lnux tsks. In contrst, n Androd pplcton s executed on top of n ndependent Dlvk VM nstnce whch n turn runs n n

User spce Kernel spce Tsk 1 Tsk 2 Tsk 3 Tsk m Tsk n App 1 Dlvk VM Bnder drver Applctons App 2 Dlvk VM App 3 Dlvk VM Lnux Kernel Devce ordnry Lnux tsk. Androd pplctons re not llowed to ccess hrdwre devces drectly v ntve system clls. It must use dfferent nterfce provded by dedcted system server. Communcton between n pplcton nd system server s done by specl IPC mechnsm clled bnder. From the perspectve of tsk schedulng, CFS does not dstngush system servers from pplcton tsks except ther weghts. It lloctes CPU tmes to tsks proportonlly to ther weghts. In order to fvor system servers over pplcton tsks, the Androd runtme ssgns system servers wth reltvely hgher weghts. For exmple, the weght of SurfceFlnger s 6100 (nce -8) wheres n pplcton tsk s ssgned weght 1024 (nce 0) by defult [16]. B. Problem Defnton We defne the nterctvty of gven system nd formulte our problem t hnd. We then expln why Androd smrtphones fl to demonstrte dequte nterctvty by nlyzng motvtng exmples. As metrc for evlutng the nterctvty of system, we use the response tme of user nput. It represents the mount of tme spn from user nput to the end of the response to tht nput. It conssts of the executon tme of user nterctve tsk nd ltences cused by the kernel, n nterrupt hndler nd other tsks. Suppose tht user nput trggers pplcton tsk τ whose executon tme for processng the nput s C. Then the response tme of tht user nput s defned s below. RT = C + LI + LS + L (5) P Interrupt hndlng ltency L s the dely from the I generton of hrdwre nterrupt to the completon of the nterrupt hndler. Snce the nterrupt dsptchng mechnsm of Lnux hs been hevly optmzed snce ts 2.5 kernel, the nterrupt hndlng ltency n the current Lnux on modern mchne my well be less thn 100 mcroseconds. Schedulng ltency L s the mount of dely between tsk becomng S runnble nd executng the frst nstructon of the tsk. Preempton ltency L s the ccumulted mount of tme for P whch tsk s dsturbed by other tsks untl completon of ts executon. Clerly, our gol s to reduce L S nd L so s to P decrese the response tme. System servers Surfce Flnger Fgure 1. Trget Androd smrtphone rchtecture Audo Flnger CFS schedule() Input Devce Red Event queue User nterctve tsk Dlvk VM CFS Bnder IPC enqueue_entty() Interrupt hndler Lnux Kernel Interrupt Touch screen User nput Input Devce Dsptcher Pollng Bnder Devce App 1 Other CPU-ntensve tsk App 2 Dlvk VM Surfce Flnger Frme buffer LCD devce Fgure 2. Event delvery pth when the user ntercts wth the system Compose surfces Fg. 2 shows the event delvery pth from user nput to ts response n Androd smrtphones. Suppose tht user touches the touch screen of n Androd smrtphone to drw dot. The touchscreen devce ssues n nterrupt nd the kernel mmedtely stops the currently runnng tsk nd jumps to the entry pont of the nterrupt hndler whch wkes up the InputDevceRed tsk. It receves n ncomng event dt nd stores ts metdt nto the event queue. For the cse of touchng event, the metdt ncludes event occurrence tme, contct coordntes, nd so on. The InputDevceDsptcher tsk tkes out the stored metdt from the event queue nd trnsmts t to user nterctve tsk v bnder IPC. The user nterctve tsk then ttempts to drw dot t the desgnted coordnte but t does not drw the renderng result drectly to the kernel s frme buffer. Rther, t stores the result to dedcted memory re clled surfce. In turn, the updted surfce s trnsmtted to Surfce Flnger through bnder IPC. Surfce Flnger syntheszes ll the surfces n the system nto one mge nd delvers t to the frme buffer. As result of such complex nterctons between the kernel nd the frmework, the user cn fnlly see the dot on the screen. Fg. 3 shows Gntt chrt whch llustrtes sequence of tsk executons for the user ntercton explned n Fg. 2. Note tht the Gntt chrt s vstly smplfed for the ske of presentton. A user touches the screen t tme t 0. At t 1, the nterrupt hndler completes ts executon. Some nternl tsks re then executed to convey the nput event to the user Interrupt hndler InputDevceRed InputDevceDsptcher Bnder User nterctve tsk Surfce Flnger Other CPU-ntensve tsks t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 Fgure 3. Gntt chrt for user ntercton descrbed n Fg. 2 Tme

nterctve tsk from t 2 to t 3. The tsk fnlly runs to hndle the nput event from t to 3 t. In ths prtculr exmple, 8 ltency components L, I L nd S L re equl to t P 1 t 0, t 3 t 1 nd ( t t ) + ( t t ), respectvely. 5 4 7 6 CFS does not dentfy user nterctve tsk to fvor t over other tsks s explned n Secton 2-B. A tme slce gven to tsk s dependent on both the number of runnble tsks nd ther weghts. Becuse every pplcton tsk n Androd s ssgned the sme weght specfed by nce vlue 0, nterctve tsks nd CPU-ntensve tsks re gven the sme mount of tme slces. Often, the llotted tme slce s not long enough to process gven user ntercton. Thus, user nterctve tsk my be preempted by other tsks multple tmes whenever t runs out of ts tme slce before completng the nterctve work. Ths leds to hgh preempton ltency. The exmple below llustrtes ths problem. Exmple 1 Consder n exmple n whch ten CPUntensve tsks wth nce vlue 0 re runnng. Suppose tht user nterctve tsk τ tkes 3 ms to complete nterctve work. Snce ll the tsks hve n dentcl tme slce of 1 ms by (2), τ s preempted when t executes for 1 ms. In order to complete the response, τ s preempted more thn twce nd the totl preempton ltency of τ n ths exmple s 20 ms. Even though user nterctve tsk s dentfed nd then fvored, CFS my lso led to long schedulng ltency due to ts non-preemptve nture. When user ntercts wth n nterctve tsk, CFS wkes up the slept user nterctve tsk nd nserts t nto the run-queue fter djustng ts vrtul runtme by (4). In generl, the user nterctve tsk commonly uses the CPU for smll mount of tme to set up n I/O nd then sleeps wtng the completon of the I/O. Ths nture mkes the nterctve tsk hve reltvely smll vrtul runtme nd be nserted nto the node nerby the leftmost node. Therefore, the nterctve tsk cn be rpdly scheduled s soon s few tsk wth smller vrtul runtmes run out of ther tme slces. However, the problem my occur when such tsks re CPU-ntensve tsks wth hgh prortes. The nterctve tsk should wt n the run-queue untl the tme slces of ll the precedng tsks run out. Note tht tsk s ssgned tme slce proportonl to ts prorty nd CFS llows tsk to be preempted only f t runs out of tme slce. Ths problem s llustrted by the followng exmple. Exmple 2 Consder n exmple n whch nne tsks wth nce vlue 0 (weght 1024) nd one tsk wth nce vlue -12 (weght 14949) re runnng n the foreground. Assume tht they re ll CPU-ntensve tsks. Accordng to (2), the tme slce of the tsk wth nce 0 s 0.42 nd tht of the tsk wth nce -12 s 6.18. Suppose tht user nterctve tsk τ s woken up t tme t nd the tsk wth nce vlue -12 hs the smllest vrtul runtme t tht tme. When τ becomes runnble t tme t, t s ssgned n djusted vrtul runtme by (4) nd contnues to execute untl t runs out ts tme slce. In ths exmple, τ wll suffer from reltvely lrge schedulng ltency longer thn 6 ms. C. Soluton Overvew We hve shown tht CFS my led to long preempton nd schedulng ltences n Androd smrtphones. Two key fctors behnd the ltences re descrbed s bellows. In Androd smrtphone, ll pplcton tsks runnng n the foreground re ssgned the dentcl nce vlue of 0 nd re scheduled by the CFS. In order to quckly respond to user nput, t ordnrly requres longer tme thn tme slce of tsk wth nce vlue 0. Therefore, the executon of user nterctve tsk should be dsturbed by other tsks smultneously runnng n the foreground. The hgher preempton ltency cn be observed s the number of tsks ncreses. CFS s known s one mplementton of proportonl fr-shre schedulng lgorthm whch hs ts roots n weghted fr queung [19]. However, contrry to ntutons, CFS schedules runnble tsks n weghted round robn mnner rther thn n weghted fr queung mnner. Unfortuntely, ths type of schedulng polcy usully shows poor responsveness snce tsk s gven tme slce proportonl to ts weght nd runs n non-preemptve fshon untl runnng out of ts tme slce. In prtculr, the hgher schedulng ltency cn be observed when hgher prorty tsks exst n the run-queue nd ther vrtul runtmes re smller thn tht of user nterctve tsk. In order to solve the problems descrbed bove, we present two nterctvty enhncng mechnsms sutble for Androd smrtphones: (1) frmework-sssted tsk chrcterzton to reduce the preempton ltency nd (2) VT-CFS to reduce the schedulng ltency. Fg. 4 depcts n overvew of the proposed soluton pproches. In order to shorten the preempton ltency, we temporrly promote the prorty of user nterctve tsk. Dfferent from dynmc prorty boostng dopted by the O(1) scheduler, our soluton s sssted by the Androd frmework n clssfyng tsk s chrcterstc rther thn relyng on uncertn heurstcs. In dong so, our modfed frmework detects tsk whch wll get user ntercton event t run-tme. It then nforms the underlyng scheduler of the tsk s dentfer so tht the prorty of the user nterctve tsk becomes temporrly promoted. Compred wth the legcy CFS, the VT-CFS cheves the smller mount of schedulng ltency by reducng the tme ntervl for whch other tsks execute pror to the user nterctve tsk. Ths ntervl s shown s t 2 t 1 n Fg. 3. In the followng two sectons, ech soluton pproch wll be Input Devce Red Schedule the nput-relted Tsks wth the smller schedulng ltency enqueue_entty() Interrupt hndler User nput Input Devce Dsptcher Bnder Inform TID Of nterctve tsk VT-CFS Lnux Kernel User Interctve tsk Bnder IPC App 1 Dlvk VM Other CPU-ntensve tsk App 2 Dlvk VM Concede the prvlege to clssfed tsk v temporrly boostng ts prorty Fgure 4. Overvew of the proposed soluton pproches: VT-CFS nd frmework-sssted tsk chrcterzton

consecutvely presented n detl. IV. FRAMEWORK-ASSISTED TASK CHARACTERIZATION Ths secton presents frmework-sssted user nterctve tsk chrcterzton mechnsm we ddtonlly propose to enhnce the nterctvty of Androd smrtphones. The key de behnd ths mechnsm s to selectvely promote the prorty of user nterctve tsk so tht t cn get lrger tme slce under CFS. Our mechnsm s composed of two components: (1) one for dentfyng user nterctve tsk t the frmework level nd (2) the other for promotng the prorty of the dentfed user nterctve tsk t the kernel level. Our mechnsm s not the frst ttempt to mprove the nterctvty v boostng the prorty of user nterctve tsk. As mentoned n Secton 2, the Lnux O(1) scheduler trcks tsks run-tme nformton such s sleepng tme nd then uses heurstcs to dentfy nterctve tsks. As shown n [12], t hs been proved tht such heurstcs often msclssfy the chrcterstcs of tsks. In fct, t s not esy for kernel lone to dentfy user nterctve tsk snce there re multple tsks runnng n the foreground. We tke dvntge of certn run-tme behvor of the Androd frmework rther thn relyng on heurstcs. It s known tht n the Androd frmework, n event trggered by user ntercton s frst delvered nd hndled by dedcted system server clled InputDevceDsptcher. The event s lter dsptched to n pplcton tsk through bnder IPC. In our pproch, we modfy the system server such tht t cn forwrd the tsk dentfer (TID) of user nterctve tsk to the kernel durng the bnder IPC nvocton. We mke such desgn decson becuse ths ncurs mnml ddtonl overhed snce the system server hs to nterct wth the kernel nywy by nvokng the kernel s bnder drver. Once the Androd frmework dentfes user nterctve tsk, the kernel scheduler promotes ts prorty. When the scheduler executes wkeup routne, t compres TID of the woken-up tsk wth the gven TID. If the two dentfers mtch, the kernel trets the woken-up tsk s user nterctve nd then temporrly promotes ts prorty by cllng the setprorty() functon. The tsk s demoted to ts orgnl prorty when t runs out of ts tme slce or becomes blocked gn. The motvton behnd such prorty boostng s to get user nterctve tsk tme slce lrger thn system-wde constnt C. It represents the verge tme for tsk to complete user request. It vres dependng on the computtonl power of the underlyng hrdwre. We thus let C be tunble prmeter. The system dmnstrtor s responsble for crefully settng C. In our trget system, we observe tht C for usul pplctons s 100 ms on verge. In order to ssgn user nterctve tsk τ tme slce lrger thn C, our mechnsm redjusts the nce vlue of τ. To do so, t frst computes new weght for τ s follows. where S s the set of tsks n the run-queue, denotes the 20 weght of nce vlue -20 nd P s defned by (3). Note tht tsk s nce vlue cn be decresed down to -20 by defnton. Our mechnsm then ssgns τ new nce vlue whose correspondng weght s lrger thn W( τ ). Consder gn the exmple demonstrted n Exmple 1. By our frmework-sssted tsk chrcterzton mechnsm, user nterctve tsk τ s dentfed nd ts prorty s temporrly promoted to ω. In ths prtculr exmple, the 20 tme slce of τ s computed to be 9.86 ms by (2); t s lrger thn the requred executon tme 3 ms of the user nterctve tsk. Thus, tsk τ cn complete ts nterctve work wthout beng preempted. Theoretclly, the tsk does not experence ny preempton ltency. However, n rel-world system, smll mount of preempton ltency stll remns snce some urgent system servers such s the dynmc voltge frequency sclng tsk perodclly run wth hgh prorty. V. VIRTUAL-TIME COMPLETELY FAIR SCHEDULER Ths secton descrbes our VT-CFS lgorthm n detl. As shown n Secton 3, schedulng ltency vres dependng on the number of runnble tsks nd ther weghts under CFS. We desgn VT-CFS such tht t llows tsk to be preempted t every predefned perod. To do so, we modfy the run-tme lgorthm of the CFS so s to schedule tsks n weghted fr queung mnner. VT-CFS mntns the dentcl dt structure s the CFS. It uses red-blck tree s run-queue nd mntns tsk s vrtul runtme n the run-queue to provde fr shre schedulng. Unlke the CFS, VT-CFS llows tsk to be preempted t every predefned tck, nsted of usng the tme slce of tsk for preempton. Ths predefned tck s clled preempton tck. It s n nteger multple of schedulng tck nd constnt regrdless of gven worklod. The length of the preempton tck ntervl s tunble prmeter cpble of controllng trdeoff between nterctvty nd run-tme overhed. The system dmnstrtor s responsble for mkng trdeoff decson. A menngful vlue should be less thn 6 ms snce humn beng s known to perceve ltency lrger thn 5.7 ms [20]. Fg. 5 summrzes the run-tme lgorthm of the VT-CFS wth flowchrt. The VT-CFS updtes the run-tme nformton of current tsk τ t ech schedulng tck. It then checks whether τ hs been executed for more thn one preempton tck perod. If so, t compres the updted vrtul runtme of τ wth the smllest vrtul runtme n the run-queue. Snce tsk wth the smllest vrtul runtme s stored t the leftmost node n red-blck tree, such comprson cn be done n O(1) tme. If the vrtul runtme of τ s stll the smllest, the VT-CFS lets t run for the next schedulng tck perod. Otherwse, t preempts τ nd nserts t bck to the run-queue. In turn, the tsk wth the smllest vrtul runtme s selected for executon. ω W C W( τ ) / P f W ( τ ) < ω j 20 ( τ ) τ j S = (6) ω 20 otherwse

For ech schedulng tck strt Updte the vrtul runtme of the currently runnng tsk TABLE I. Hrdwre HARDWARE AND SOFTWARE COMPONENTS OF THE TARGET SYSTEM CPU Mn memory Dul core ARM Cortex A9 Clock: 1.2GHz 1-GB LP-DDR2 No nr_runnng > 1? The tsk runs for one preempton tck? need_resched = 1? end Yes No No Yes Yes The VR of the tsk s stll the smllest? Enqueue the currently runnng tsk In order to bound the schedulng ltency by preempton tck perod, t s crtcl to mke woken-up tsk be lwys nserted t the second node from the leftmost. To do so, VT- CFS djusts the vrtul runtme of woken-up tsk τ t tme t s below. ω = + (7) 0 VR( τ,) t mn( VR( τ j,)) t T τ j S ω 20 Set need_resched flg Pck the tsk wth the smllest VR Fgure 5. Flowchrt of the run-tme schedulng lgorthm of VT-CFS where T s the schedulng tck perod, ω nd 0 ω denote the 20 weghts of nce vlue 0 nd -20, respectvely. Note tht the VT- CFS mkes schedulng decson t every schedulng tck. Thus, vrtul runtme dfference of ny pr of tsks cnnot be smller thn vrtul runtme ncrement of tsk wth nce vlue -20 runnng for one schedulng tck perod. To llustrte the effectveness of the VT-CFS, we consder the sme exmple s Exmple 2. Assume gn tht user nterctve tsk τ s woken up t tme t nd the tsk wth nce vlue -12 hs the smllest vrtul runtme t tht tme. As defned n (7), the VT-CFS gves n djusted vrtul runtme to τ when t gets wken. It lets the tsk wth nce -12 execute for one preempton tck perod. The VT-CFS then preempts the runnng tsk snce ts vrtul runtme becomes lrger thn tht of τ. As result, the executon of τ s postponed for one preempton tck perod. By defnton, the length of the preempton tck perod s smller thn 6 ms, whch s reltvely smll schedulng ltency compred to the legcy CFS. VI. EXPERIMENTAL EVALUATION In ths secton, we expermentlly evlute the nterctvty provded by the proposed frmework-sssted tsk chrcterzton mechnsm nd VT-CFS. We lso show the run-tme overhed ncurred by our pproch. Yes No Softwre Kernel Lnux kernel verson: 2.6.32 Androd Frmework Fle System Androd 2.2 Froyo YAFFS2 A. Expermentl Setup We hve mplemented our frmework-sssted tsk chrcterzton nd VT-CFS nto Androd 2.2 Froyo runnng wth Lnux 2.6.32. on the NVIDIA Tegr 250 hrmony bord. We modfed nd recompled the Androd frmework so tht InputDevceDsptcher could delver the dentfer of user nterctve tsk to the kernel scheduler. We lso modfed the Lnux kernel wth the new schedulng code mplementng VT-CFS. The detled hrdwre nd softwre components of the trget system re shown n Tble I. Durng our experments, we reled on well-known tools nd benchmrk progrms. In order to evlute the enhnced nterctvty cheved by the frmework-sssted tsk chrcterzton mechnsm, we rn the Androd pntng pplcton [21] wth two CPU-ntensve tsks; nd then we mesured the response tme of the pntng pplcton usng the trce-cmd tool. We rn Interbench [22] n order to evlute the schedulng ltency of VT-CFS. We rn Qudrnt [23] nd Hckbench [24] to evlute the run-tme overhed of frmework-sssted tsk chrcterzton nd VT-CFS, respectvely. B. Expermentl Results 1) Evlutng the nterctvty of frmework-sssted tsk chrcterzton In order to show the nterctvty enhnced by the proposed frmework-sssted tsk chrcterzton mechnsm, we rn the Androd pntng pplcton [21] wth two CPU-ntensve tsks. They smply executed nfnte loops nd were ssgned nce vlue 0. We mesured the response tme of the pntng pplcton by redng the temporl nformton of tsk schedulng wth the trce-cmd tool. We repeted the test ten tmes nd took the verge response tme. We then compred the results wth nd wthout the frmework-sssted tsk chrcterzton. We lso mesured the response tme under the new Androd frmework wth the ntegrted VT-CFS nd frmework-sssted tsk chrcterzton. Fg. 6 plots the verge response tmes of the user nterctve tsk wth nd wthout the mechnsm. The horzontl xs denotes vrous trget system confgurtons nd the vertcl xs does the three types of ltences nd the response tmes explned n Secton 3-B. Clerly, the response tmes re effectvely reduced by doptng our mechnsm. The response tme mesured under the legcy system s 275.9 ms

Tme ( ms ) Fgure 6. Br chrt of verge response tme of the pntng pplcton on the legcy Androd system nd the modfed one wth the dfferent tunble opton nd 50.56% of the response tme s the preempton ltency cused by the other tsks. Note tht C s tunble vlue n the frmework-sssted tsk chrcterzton mechnsm. When we set C equl to 3 nd 10 ms, the response tme ws reduced to 243.37 nd 194.34 ms, respectvely. The verge preempton ltency n these confgurtons s 109.64 nd 56.25 ms, whch s 21.4% nd 59.7% smller thn n the legcy system, respectvely. We lso set C to lrger vlue; however, t does not ffect the nterctvty snce the Lnux kernel does not llow tsk s weght to be promoted lrger thn 88761. The modfed frmework ntegrted wth the VT-CFS provdes slghtly shorter response tme. The cheved response tme s reduced by 12.6% nd 31.4% when we set C to 3 nd 10 ms, respectvely. 2) Evlutng the nterctvty of VT-CFS In order to evlute the schedulng ltency of VT-CFS, we rn the Interbench benchmrk progrm [22]. It runs rel tme prorty tsk tht wkes up nterctve tsks nd mesures schedulng ltency under vrous bckground tsks. The types of smulted nd bckground tsks used n our experments re shown n Tble II. Ech tsk rn s seprte Lnux tsk wth nce vlue 0. Ech smulton hs run for 30 seconds nd repeted ten tmes. We took the verge schedulng ltency vlues under both CFS nd VT-CFS. The results of ths test re shown n Fg. 7. The horzontl xs denotes types of bckground lods whle the vertcl xs does schedulng ltences mesured n mllseconds. Ech br represents the verge schedulng ltency under specfc scheduler nd the number bove br ndctes the mxmlly observed schedulng ltency. In the cse of CFS, reltvely hgh ltency s observed when the nterctve tsk runs wth CPU- or memory-ntensve bckground lods. Ths s becuse even f the benchmrked nterctve tsk s woken up, t must wt untl bckground tsk wth smller vrtul runtme yelds the CPU. Unfortuntely, CPU- or memory-ntensve Ltency ( ms ) 93 15.28 Ltency ( ms ) 5.72 5.04 TABLE II. Smulted nterctve tsks Bckground tsks TYPES OF THE SIMULATED INTERACTIVE TASKS AND BACKGROUND TASKS X Audo Vdeo Gmng Vdeo X Burn Memlod Tsk smultng GUI where wndow s grbbed nd drgged cross the screen nd requrng 0~100% of the CPU Rel-tme prorty tsk runnng t every 50 ms nd requrng 5% of the CPU Rel-tme prorty tsk tryng to receve the CPU 60 tmes per second nd requrng 40% of CPU Tsk usng 100% of the CPU wthout beng blocked The vdeo smulton tsk s bckground lod but runnng n non-reltme prorty The X smulton tsk s bckground lod Four fully CPU-bound tsks Tsks smultng hevy memory nd swp pressure Ltency ( ms ) Type of the bckground tsks () Smulted X 0.16 0.1 0.06 0.34 0.14 0.02 6.74 Type of the bckground tsks (c) Smulted Vdeo 19.82 Ltency ( ms ) 0.08 0.02 1.26 2.68 0.08 0.06 Type of the bckground tsks (b) Smulted Audo Type of the bckground tsks (d) Smulted gmng 94.3 90.68 12.12 7.38 Fgure 7. Br chrt of verge ltency of the nterctve tsks on the legcy CFS nd VT-CFS under vrous bckground tsks

tsk usully yelds the CPU only when ts tme slce s expred or memory trnscton s completed. Note tht the X tsk requres vrble mount of the CPU rngng from 0 to 100%; the Burn tsk demnds 100% of the CPU; nd the Memlod tsk demnds lmost 100% of the CPU. We lso observed huge mount of schedulng ltency of 94.3 ms wth the Gmng nterctve tsk. Ths s becuse the tsk dd not get ts vrtul runtme djusted by (4) snce t never slept. VT-CFS ncurred lower schedulng ltency thn the CFS s shown n Fg. 7. We observed smll, bounded schedulng ltences n most of the benchmrks except Gmng. The mxmum ltency ws 15.28 ms when we set the preempton tck to 3 ms. As seen from the experments, the ltency ws hgher thn the preempton tck n few cses. Ths s becuse rel-tme prorty tsks rn wth the benchmrked tsks for the system servce n the Lnux opertng system. Snce they were scheduled erler thn the benchmrk tsks, the schedulng ltency could be hgher thn the theoretcl vlue. In the Gmng benchmrk, VT-CFS cused the mxmum schedulng ltency of 90.68 ms, whch ws comprble to tht of the CFS. 3) Evlutng the run-tme overhed In order to mesure the run-tme overhed of the proposed pproch, we used two benchmrks. Frst, we rn the Qudrnt benchmrk progrm [23] to evlute the run-tme overhed of the frmework-sssted tsk chrcterzton. It mesures nd scores the performnce of the CPU, memory, I/O nd 3D grphcs processor. We focus only on evlutng the totl score, CPU nd I/O performnce snce memory nd 3D grphcs performnce s hghly hrdwre-dependent. We compred the results from these benchmrks wth the legcy nd the modfed system, respectvely. The run-tme overhed of the frmework-sssted tsk chrcterzton s gven n Tble III. The results show tht the modfed frmework cheves slghtly better performnce thn the legcy frmework. Ths s becuse the promoted prorty of the benchmrk tsk mtgtes the dsturbnce cused by other bckground tsks. We lso mesured the performnce of the modfed frmework ntegrted wth VT-CFS. As shown, the extr run-tme overhed ncurred by our pproch s only 0.91% of the legcy Androd frmework. Second, we rn the Hckbench benchmrk progrm [24] to exmne the run-tme overhed of VT-CFS. It cretes specfed number of prs of tsks wth nce vlue 0 nd lets ech pr send nd receve 100-byte dt v ether ppe or socket. The benchmrk mesures the tme tken for ll prs to send dt bck nd forth. We generted three sets whch conssted of 100, 200 nd 400 tsk prs, respectvely. For ech TABLE III. OVERALL PERFORMANCE OF THE MODIFIED ANDROID FRAMEWORK MEASURED BY QUADRANT BENCHMARK Legcy frmework The modfed frmework The modfed frmework wth VT-CFS CPU 4254.6 4403.1 4217.0 I/O 1006.8 1013.4 1005.6 Totl score 1768.8 1798.9 1752.6 TABLE IV. Model # of prs OVERALL PERFORMANCE OF VT-CFS MEASURED BY HACKBENCH BENCHMARK Legcy CFS VT-CFS (T=5 ms ) 100 200 400 100 200 400 Ppes 4.051 5.390 9.782 4.084 5.450 9.886 Sockets 3.244 6.846 13.99 3.272 6.848 14.06 Totl elpsed tme (s) tsk pr, we computed n ccumulted response tme by repetng the test 1000 tmes. Tble IV gves the result whch demonstrtes tht the VT-CFS cheves nerly dentcl results compred to the CFS. The extr overhed s only 0.99% nd 0.46% on verge when the Hckbench tsks communcte wth ech other v ppes nd sockets, respectvely. VII. CONCLUSION In ths pper, we hve presented two mechnsms for enhncng the nterctvty of n Androd smrtphone. To do so, we hve crefully nlyzed the Androd pplcton frmework nd the tsk scheduler of the Lnux kernel. Bsed on our nlyss, we hve proposed frmework-sssted tsk chrcterzton nd VT-CFS to reduce the preempton nd schedulng ltency of user nterctve tsk. The frmeworksssted tsk chrcterzton mechnsm s coopertve mechnsm between the Androd frmework nd the underlyng kernel. It frst dentfes user nterctve tsk by recevng dentfer nformton from Androd s dedcted system server nd then selectvely promotes prorty of the dentfed tsk to fvor t over other tsks. VT-CFS s n extenson of the CFS whch llows tsk to be preempted t ny preempton tck. It gurntees tht the schedulng ltency of user nterctve tsk s bounded by the tck ntervl. We hve mplemented the frmework-sssted tsk chrcterzton nd VT-CFS nto the Androd frmework nd Lnux kernel, respectvely. Expermentl results ndcte tht our pproches sgnfcntly mprove the nterctvty whle ncurrng the neglgble run-tme overhed. As future reserch, we re currently mgrtng our pproch from Androd verson 2.2 Froyo to verson 4.0 ICS by nlyzng the new event delvery pth whch does not rely on the bnder IPC for hndlng user nput. Also, we re extendng VT-CFS to ncorporte vrtul runtme-bsed tsk mgrton lgorthm [25] whch we hve developed s n lterntve to CFS s lod blncng. We expect tht the combnton of the two cn cheve synergstc effects n terms of mprovng nterctvty s well s frness. ACKNOWLEDGMENT The work reported n ths pper s supported n prt by the Technology Innovton Progrm (No. 10036495) funded by the Mnstry of Knowledge Economy (MKE, Kore), by the Ntonl Reserch Foundton of Kore (NRF) grnt funded by the Koren government (MEST) (No. 2012-0000348), by Advnced Insttutes of Convergence Technology (AICT),

Insttute for Smrt Systems nd by Automton nd Systems Reserch Insttute (ASRI). REFERENCES [1] http://www.cnlys.com/newsroom/google%e2%80%99s-ndrodbecomes-world%e2%80%99s-ledng-smrt-phone-pltform [2] http://techlnd.tme.com/2011/12/07/s-ndrod-doomed-to-lg-more-thnos/ [3] Tol, N., Andersen, D.G., nd Stynrynn, M. "Quntfyng nterctve user experence on thn clents", Computer, 2006, 39, (3), pp. 46-52. [4] http://code.google.com/p/lbgdx-users/wk/forcegrbgecollecton [5] http://ck.kolvs.org/ptches/bfs/sched-bfs.txt [6] http://stes.google.com/ste/o/ntomy--physology-of-n-ndrod [7] http://people.redht.com/mngo/cfs-scheduler/sched-desgn-cfs.txt [8] http://developer.ndrod.com/sdk/ndrod-4.0-hghlghts.html [9] As, J. "Understndng the Lnux 2.6. 8.1 CPU scheduler", Retreved Oct, 2005, 16, pp. 1-38. [10] Wng, S., Chen, Y., Jng, W., L, P., D, T., nd Cu, Y. "Frness nd nterctvty of three CPU schedulers n Lnux". Proc. 15th IEEE Interntonl Conference on Embedded nd Rel-Tme Computng Systems nd Applctons, 2009, pp. 172-177. [11] Wong, C., Tn, I., Kumr, R., Lm, J., nd Fun, W. "Frness nd nterctve performnce of O (1) nd CFS Lnux kernel schedulers". Proc. Interntonl Symposum on Informton Technology, 2008, pp. 1-8. [12] Slh, K., Mne, A., Zedlly, S., nd Alcrz Clero, J.M. "On Lnux strvton of CPU-bound processes n the presence of network I/O", Computers & Electrcl Engneerng, 2011, 37, (6), pp. 1090-1105. [13] Torrey, A., Clemn, J., nd Mller, P. "Comprng nterctve schedulng n Lnux", Softwre- Prctces & Experence, 2007, 34, (4), pp. 347-364. [14] Stoc, I., Abdel-Whb, H., Jeffy, K., Bruh, S.K., Gehrke, J.E., nd Plxton, C.G. "A proportonl shre resource llocton lgorthm for reltme, tme-shred systems". Proc. 17th IEEE Rel-Tme Systems Symposum, 1996, pp. 288-299. [15] http://www.lnux-mgzne.com/onlne/news/con-kolvs-introduces- New-BFS-Scheduler [16] http://developer.ndrod.com/reference/ndrod/os/process.html [17] Bornsten, D. 'Google /o 2008-dlvk vrtul mchne nternls', 2008 [18] https://plus.google.com/105051985738280261832/posts/xaz4cevp6dc [19] L, T., Bumberger, D., nd Hhn, S. "Effcent nd sclble multprocessor fr schedulng usng dstrbuted weghted round-robn", ACM Sgpln Notces, 2009, 44, (4), pp. 65-75. [20] Kelly, D.H. Vsul scence nd engneerng: models nd pplctons. CRC, 1994, edn. 1994 [21] http://pxle.pl/bord/ [22] http://ck.kolvs.org/pps/nterbench/nterbench-0.31/redme.nterctvty [23] http://www.urorsoftworks.com/products/qudrnt [24] http://people.redht.com/mngo/cfs-scheduler/tools/hckbench.c [25] Huh, S., Yoo, J., Km, M., nd Hong, S. "Provdng Fr Shre Schedulng on Multcore Cloud Servers v Vrtul Runtme-bsed Tsk Mgrton Algorthm". Accepted to 32nd Interntonl Conference on Dstrbuted Computng Systems, 2012.