A Technical Survey of Android Scheduling Techniques
Abstract— As all of us know well that today is the age of multiprocessing and multiprogramming with the advancement of fast growing computing devices. While for a CPU to handle a single processes at a time needs no CPU scheduling but at the same time if CPU is dealing with multi processes then definitely it requires CPU scheduling. Processes use cycles of CPU of and on. Sometimes CPU wait for I/O. CPU speed is much faster than memory speed, so a data access from memory causes a CPU delay. Same is the case with simple systems which runs a single process at a time. When CPU is waiting for I/O completion of one process, this delay drop the CPU cycles. Scheduling helps one process to access CPU in the mean while a second process is in process of completing its I/O. This way helps in almost full use of CPU and save CPU cycle to lost. To keep system fair and efficient is most important and it will help us assigning priorities to processes.
Keywords— Include at least 5 keywords or phrases
Introduction
The operating system is a program that runs the computer. Operating system is a set of programs that manage all the resources of the computer and provides an interface to the users so that they use computer. It is very important for every computer system. It co-ordinates and manage the computer hardware and computer software. Operating system is the part of system software. Application programs also need operating system for work.
A mobile operating system is software which is used to run different applications and programs on the smart phones, tablet PCs and other devices. A mobile operating system starts working when device is switched on; a screen appears with different icons which provide access to the different application. Mobile operating system makes possible wireless connectivity as well as cellular connectivity. Bada, BlackBerry OS,Android OS, MeeGo OS, iPhone OS/iOS, Palm OS and Windows Mobile are popular mobile operating systems.
A) CPU Scheduling: CPU scheduling is a process which holds the process due to the unavailability of resource during another process execution. CPU scheduling makes the system efficient and fast. I/O Burst Cycle: In this cycle, between two states the process rotates.CPU Burst:. It is a state CPU used to perform calculations. I/O Burst: To transfer data, the process wait in an I/O Brust.
B) CPU Scheduler: When a process is completing its I/O and CPU remain idle during this process then CPU scheduler pick the next process from to allocate CPU
C) Dispatcher : The processes which is selected by a scheduler is assigned by dispatcher. Dispatcher also used to performs context switching. It must be fast.
D) Goals of Scheduling : Different algorithms are used for scheduling that gives result according to the specific situation. May be an algorithms is suitable for a job but not suitable for other class of job. Different goals are in mind when we are selecting scheduling algorithm.
- To all process, a fair share of cpu is allocate so that no process suffer from scheduling.
- To keep cpu utilization maximum, I/O devices and CPU must remain busy all the time.
- To keep minimum response time and turnaround time.
- Throughput time must be increases.
E) Scheduling Algorithms : The major scheduling algorithms are following:
- First Come First Serve (FCFS):
- The job that comes first, execute first in First Come First Serve Scheduling Algorithm.
- It is easy to implement and easy to understand.
- In First Come First Serve Scheduling Algorithm, due to average high wait time, the CPU performance is low.
Shortest Job First (SJF)
There is another way for scheduling job is first execute the job that will take least amount of time for completion. With this algorithm the average waiting time reduced by doing shortest job first. The shortest job first algorithm chose the shortest job in terms of job burst size and after that the next lowest fastest selected for processing. Shortest Job First can be pre-emptive when a new process interrupts to current process and have less burst time than the current process.
Round Robin Scheduling
Round Robin Algorithm is pre-emptive. In Round Robin scheduling assigned a small amount of time to every process in which it executes. Small unit of time which is assigned to schedule job is called the time quantum or time slice. The job for processing allocated to the CPU on time quantum basis. If a process is incomplete in allocated time, it senton last position in ready queue. In Round Robin Scheduling short quantum causes many context switches and reduced the CPU efficiency. If the quantum is longer its result will be same as First Come First Serve Algorithm and it causes poor performance.
Priority Scheduling
In Priority Scheduling method, each process has associated priority and the scheduler chooses highest priority job to get the access of CPU. The jobs that have equal priorities are processed on FCFS or RR basis. The priority is integer number, the smallest integer has highest priority in some systems and in some systems higher number had highest priority.
Multilevel Queue Scheduling
In multi-level queue scheduling, the ready queue is divided in different sub-queues and every queue has a permanent process. Ready queue can be divided on the following basis:
- Memory Size
- Process priority
- Process type
Multilevel Feedback-Queue Scheduling
In Multilevel Feedback-Queue, job move between different queues and implemented aging in this way. It is defined by the following parameters:
- Number of queues
- Scheduling algorithm for each queue
- Method used to determine when to upgrade a process
- Method used to determine when to demote a process
- Method to determine the queue a process will enter when that process needs service.
Types of Scheduling in Android
Nornal Scheduling
Android is Linux based and for determining scheduling policies, the Linux kernel’s scheduling mechanisms is used. With the combination of static and dynamic priorities, Linux operating system used time sliced scheduling policy. In android based, processes initialized from very to very high priority 19 to 20.
Real Time Scheduling
There are two real time scheduling policies in Linux kernel such as SCHED_FIFO and SCHED_RR. SCHED_FIFO is the main real time policy. It works on First-in, First-out scheduling algorithm. With no time slices, a SCHED_FIFO task continuously runs until it yield the process, block or it is preempted by a higher-priority real-time task.
Binder
The Binder was initially created under the name OpenBinder by Be Inc and later Palm Inc under the initiative of Dianne Hackborn. Its documentation claims OpenBinder as “… a framework level segment engineering, intended to give a wealthier abnormal state reflection on top of customary cutting edge working framework administrations.”
JVM thread and process scheduling
Two types of processes are running in android system, native processes and processes that run a Java Virtual Machine(JVM) and these are multithreaded. Android threads are known as native pthreads. Two ways to change the priority handling are:
- Calling Thread.setPriority
- Calling android.os.Process.setThreadPriority
Thread Scheduling
The part of the operating system thread scheduler is used for deciding which threads in the system should run for how long and when. Nice Values and Cgroups are 2 main factors that are used by Android thread scheduler.
Nice Values:
In Android, nice values are used for measuring priority of threads. High priority gives to lower nice values threads and low priority given to high nice values thread. So, lower nice value threads use CPU for more time and higher nice values use CPU for less time.
C. Groups (Control Groups)
Control groups are used in Linux OS for foreground and background scheduling. In background cgroups threads can use only 1 percent of CPU. The foreground jobs are completed without delay when CPU is working to serve other threads, less usage of CPU help in this way. The threads that are not running and using CPU are moved automatically into cgroups. Threads of lower priority are automatically moved to cgroups in android. In this way foreground threads run efficiently without stopping.
CFS Scheduling:
The default scheduler was CFS and it also has other scheduling algorithms.The principle thought behind the CFS is to look after parity (decency) in giving processor time to errands. This implies procedures ought to be given a considerable lot of the processor. At the point when the ideal opportunity for assignments is out of parity (implying that one or more undertakings are not given a decent measure of time with respect to others), then those out-of-equalization errands ought to be offered time to execute.
Fair Scheduling:
Fair Scheduling is a strategy for doling out resources to tasks with the end goal that all tasks get, by and large, an equivalent offer of assets after some time. At the point when there is a solitary task running, that task utilizes the whole cluster. At the point when different tasks are submitted, undertakings openings that free up are allotted to the new jobs, so that every task gets generally the same measure of CPU time.
The fair scheduler sorts out tasks into pools, and partitions resources decently between these pools. Of course, there is a different pool for every user, so that every user gets an equivalent offer of the cluster. It is additionally conceivable to set an tasks pool in view of the client’s Unix cluster or any job conf property. Inside every pool, occupations can be booked utilizing either fair sharing or first-in-first-out (FIFO) planning.
Related work (review Literatures)
(Saha 2008)stated that Android is a product stack for cell phones that incorporates a working framework, middleware and key applications. The greater part of you may as of now know about Android, its abilities and different perspectives. The different parts of Android are outlined as a stack, with the “Applications” framing the top layer of the stack, while the Linux bit shapes the most reduced layer. The Android ships are with an arrangement of center applications including an email customer, SMS program, timetable, maps, program, contacts, and different elements. All applications are composed utilizing the Java programming dialect. Thus, it is in this layer you will fit in your next enormous versatile application. Android depends on Linux adaptation 2.6 for center framework administrations, for example, security, memory administration, process administration, system stack and driver model. The bit additionally goes about as a deliberation layer between the equipment and whatever is left of the product stack.[21]
(Tanenbaum 2009)stated that Symbian OS is a working framework that keeps running on versatile “PDA” stages from a few unique producers. Advanced cells are so named on the grounds that they run completely included working frameworks and use the components of desktop PCs.
Symbian OS is planned with the goal that it can be the premise of a wide variety of advanced mobile phones from a few distinct makers. It was deliberately planned particularly to keep running on advanced mobile phone stages: universally useful PCs with restricted CPU, memory and capacity limit, concentrated on correspondence.
(Vallina-Rodriguez, Hui et al. 2010)said that regardless of the advances in battery advances, cell telephones still experience the ill effects of extreme vitality restrictions. Advanced handsets are rich gadgets that can bolster multitasking on account of their high preparing power and give an extensive variety of assets, for example, sensors and system interfaces with various vitality requests. There have been numerous endeavors to portray those vitality requests; both to spare and to allot vitality to the applications on the handset. Be that as it may, there is still small comprehension on how the interdependencies between assets (interdependencies brought on by the applications and clients’ conduct) influence the battery life. In this paper, we show the need of considering each one of those progression so as to describe the vitality requests of the framework precisely. These outcomes demonstrate that basic algorithmic and rule based planning methods are not the most suitable method for dealing with the assets since their use can be influenced by logical elements, making important to discover altered arrangements that consider every client’s conduct and handset highlights.
(Alliance 2010)explained that Android was developed starting from the earliest stage empower designers to make convincing portable applications that take full preferred standpoint of every one of the handset brings to the table. It was worked to be really open. For instance, an application can endless supply of the telephone’s center usefulness, for example, makes calls, sending instant messages, or utilizing the camera, permitting designers to make wealthier and more durable encounters for clients. Android is based on the open Linux Kernel. Besides, it uses a custom virtual machine that was intended to upgrade memory and hardware resources in a versatile situation. Android is open source; it can be generously stretched out to consolidate new front line advancements as they rise. The stage will keep on evolving as the engineer group cooperates to manufacture creative portable applications.[2]
(Maia, Nogueira et al. 2010)said that At first look, Android might be seen as a potential focus for constant situations and, in that capacity, there are various industry focuses on that would profit by a design with such abilities. Mulling over this, this paper exhibited the assessment of the Android stage to be utilized as a constant framework. By concentrating on the center parts of the framework it was conceivable to uncover the impediments and after that, to present four conceivable headings that might be taken after to add continuous conduct to the framework.
Android was worked to fill the portable business needs and that reality affects the way that the engineering may be utilized. In any case, with some exertion, as demonstrated by the exhibited approaches, it is conceivable to have the coveted real time conduct on any Android gadget. This conduct may suit particular applications or segments by giving them the capacity of exploiting transient insurances, and in this way, to act in a more unsurprising way.[15]
(Nauman, Khan et al. 2010)said that Android is the primary mass-delivered buyer market open source versatile stage that permits engineers to effectively make applications and clients to promptly introduce them. Be that as it may, giving clients the capacity to introduce outsider applications postures genuine security concerns. While the current security system in Android permits a cellular telephone client to see which assets an application requires, she must choose the option to permit access to all the asked for authorizations in the event that she wishes to utilize the applications. There is no chance to get of conceding a few consents and denying others. In addition, there is no chance to get of limiting the use of assets taking into account runtime requirements, for example, the area of the gadget or the quantity of times an asset has been already utilized. Apex is an arrangement authorization structure for Android that permits a client to specifically give consents to applications and additionally force imperatives on the utilization of assets. We additionally portray a developed bundle installer that permits the client to set these requirements through a simple to-use interface. Our implementation structure is executed through an insignificant change to the current Android code base and is in reverse good with the present security instrument.
(Butler 2011)explained that the cell telephone scene changed a year ago with the presentation of advanced mobile phones running Android, a cell telephone stage advertised by Google. Android telephones are the main sound risk to the iPhone market: the principal cell phone rivalry that is focusing on the same business sector as iPhone. Not just googled train in on the same purchasers as iPhone, they intended to win the hearts and psyches of portable application engineers, as well. Based upon piece of the pie and number of applications accessible, Android is a win.
(Nimodia and Deshmukh 2012)said that Android is a product stack for cell phones that incorporates a working framework, middleware and key applications. Android is an open source cell phone stage in light of the Linux working framework. It has application Framework, improved representation, incorporated web program, social database, media bolster, LibWebCore web program, wide assortment of network and a great deal more applications. Android depends on Linux rendition 2.6 for center framework administrations, for example, security, memory administration, process administration, system stack, and driver model. Design of Android comprise of Applications Linux piece, libraries, application structure, Android Runtime. All applications are composed utilizing the Java programming dialect. Android cellular telephone stage will be more secure than Apple’s iPhone or whatever other gadget over the long haul.
Analysis
After complete comparison of different mobile scheduling techniques, it is noted that fair scheduling technique is the best technique in Android scheduling. CPU utilization rate is higher in the Fair scheduling techniques and higher CPU utilization means CPU is working all the time.
Now a days, many scheduling algorithms are used in mobile operating system. But to find a best scheduling algorithm is a complicated task.
Fair scheduling is best scheduling algorithm for android scheduling techniques. Its CPU utilization is maximum and its response time is fast from other scheduling algorithms.
Conclusions
The final result graph in which all results and figures for individual’s techniques are summarized to conclude the results. Here we can see the graphical representations the fair scheduling has dominated all other techniques with greater values. Fair scheduling has 91% cpu utilization which is higher that all others techniques, we higher the cpu utilization means that your cpu is working all the time and processing in an efficient way. The second most nearly is CFS scheduling in which the cpu utilization is 81% and this is much lower that fair scheduling. The third most nearly is real time scheduling in which the cpu utilization is 80% and this is also much lower that fair scheduling. And the remaining scheduling techniques have same cpu utilization is 79% and this is also much lower that fair scheduling. The Throughput of Fair scheduling is 3.6 that is greater than all other scheduling techniques. The Throughput of Normal scheduling and Real-time scheduling is 3.4 that is lower than Fair scheduling. The Throughput of Binder scheduling is 3.1 and of Thread scheduling is 3 that are lower than Fair scheduling. The Turnaround time (foreground and background) of fair scheduling is 0.64 that is lower than other techniques. The Turnaround time of CFS scheduling is 0.75 that is lower than fair scheduling. The Turnaround time of Normal scheduling is 0.9 that is much greater than fair scheduling. The Turnaround time of Real-time scheduling is 1.01 that is greater than Fair scheduling techniques. The Binder turnaround time is 1.09 that is much greater than fair scheduling. The response time of (foreground and background) fair scheduling is 0.64 that is much lower than other techniques. The Response time of CFS is 0.77 that is nearer to fair scheduling. The response time of Thread scheduling is 1 that is greater to fair scheduling. The response time of Binder technique is 1.09 that is much greater than fair scheduling technique. The response time of real time scheduling is 1.01 that is greater to fair scheduling. The response time of Normal scheduling is 0.92 that is also greater than fair scheduling.
References
[1] Alliance, O. H. (2012). “Android (operating system).” Android (operating system)-Unabridged Guide: 52.
[2] Alliance, O. H. (2010). “Android Overview.[Online] http://www. openhandsetalliance. com/android_overview. html.” Accessed at August.
[3] Andrus, J. and J. Nieh (2012). Teaching operating systems using android. Proceedings of the 43rd ACM technical symposium on Computer Science Education, ACM.
[4] Bagal, N. S. and N. Kale “Android open-source operating System for mobile devices.”
[5] Baraka, K., et al. (2013). Low cost arduino/android-based energy-efficient home automation system with smart task scheduling. Computational Intelligence, Communication Systems and Networks (CICSyN), 2013 Fifth International Conference on, IEEE.
[6] Blackham, B., et al. (2011). Protected hard real-time: The next frontier. Proceedings of the Second Asia-Pacific Workshop on Systems, ACM.
[7] Butler, M. (2011). “Android: Changing the mobile landscape.” IEEE Pervasive Computing10(1): 4-7.
[8] Caspi, P., et al. (2005). “Guidelines for a graduate curriculum on embedded software and systems.” ACM Transactions on Embedded Computing Systems (TECS)4(3): 587-611.
[9] Developers, A. (2011). What is android, Android Developers, http://developer.android. com/guide/basics/what-is-android. html, accessed May.
[10] Hall, S. P. and E. Anderson (2009). “Operating systems for mobile computing.” Journal of Computing Sciences in Colleges25(2): 64-71.
[11] Hao, S., et al. (2012). Estimating Android applications’ CPU energy usage via bytecode profiling. Proceedings of the First International Workshop on Green and Sustainable Software, IEEE Press.
[12] Kayande, D. and U. Shrawankar (2013). “Priority based pre-emptive task scheduling for android operating system.” arXiv preprint arXiv:1304.7889.
[13] Kohout, P., et al. (2003). Hardware support for real-time operating systems. Proceedings of the 1st IEEE/ACM/IFIP international conference on Hardware/software codesign and system synthesis, ACM.
[14] Lange, M., et al. (2011). L4Android: a generic operating system framework for secure smartphones. Proceedings of the 1st ACM workshop on Security and privacy in smartphones and mobile devices, ACM.
[15] Maia, C., et al. (2010). Evaluating android os for embedded real-time systems. 6th International Workshop on Operating Systems Platforms for Embedded Real-Time Applications.
[16] Muppala, J. K. (2005). “Experience with an embedded systems software course.” ACM SIGBED Review2(4): 29-33.
[17] Naik, K. (2010). A survey of software based energy saving methodologies for handheld wireless communication devices, Department of Electrical and Computer Engineering, University of Waterloo.
[18] Nauman, M., et al. (2010). Apex: extending android permission model and enforcement with user-defined runtime constraints. Proceedings of the 5th ACM Symposium on Information, Computer and Communications Security, ACM.
[19] Nimodia, C. and H. Deshmukh (2012). “Android operating system.” Software Engineering3(1): 10.
[20] Njunjic, I. (2012). “Development Techniques for Android Platform Mobile Device Application.”
[21] Saha, A. (2008). “A developer’s first look at android.” Linux For You,(January): 48-50.
[22] Stanimirovic, I., et al. (2009). “Heuristic Algorithm for Single Resource Constrained Project scheduling Problem based on the dynamic programming.” Yugoslav Journal of Operations Research ISSN: 0354-0243 EISSN: 2334-604319(2).
[23] Stallings, W. and G. K. Paul (1998). Operating systems: internals and design principles, prentice hall Upper Saddle River, NJ.
[24] Tanenbaum, A. (2009). “Modern operating systems.”
[25] Vallina-Rodriguez, N., et al. (2010). Exhausting battery statistics: understanding the energy demands on mobile handsets. Proceedings of the second ACM SIGCOMM workshop on Networking, systems, and applications on mobile handhelds, ACM.
[26] Yang, B., et al. (2001). “Resource-constrained project scheduling: Past work and new directions.” Department of Industrial and Systems Engineering, University of Florida, Tech. Rep.
[27] Yao, D., et al. (2013). Energy efficient task scheduling in mobile cloud computing. IFIP International Conference on Network and Parallel Computing, Springer.
[28] Zhu, Y. and V. J. Reddi (2013). High-performance and energy-efficient mobile web browsing on big/little systems. High Performance Computer Architecture (HPCA2013), 2013 IEEE 19th International Symposium on, IEEE.