ANDROID RUNTIMES ENVIRONMENT

ANDROID RUNTIMES ENVIRONMENT

A new runtime was introduced with Android 4.4 i.e. KitKat, which should eventually replace the Dalvik runtime. ART (Android Runtime) and Dalvik as the runtime executes the Dalvik Executable format and Dex bytecode specification. In other words, when an app is run on android, it goes through a runtime. Previously, Android’s runtime was Dalvik. While it performed well, it was still a bottleneck as it only ran the code at the moment it needed to, with a JIT compiler (Just-in-time). AOT (Ahead-of-time) compilation paradigm is followed by ART to process application instructions before they are even required. In the next section, the background of compilation on various architectures is described. In next section, ART is introduced with its new features. In next section, ART has been tested against traditional Dalvik runtime. Then before the conclusion, ARM big.LITTLE architecture is described with some results.The first gen translators to convert assembly code to machine code were Assemblers. Since the translation was without any intermediate step, assemblers were fast. Then came the generation of compilers, which translates the high level code into assembly codes, then use assemblers to translate that assembly code into machine code. However the execution of the program was almost as fast as assembly code, the compiler was slower than assemblers for obvious reasons. C compiler is from this generation. In this approach, the problem was the code not being cross platform. The next generation was interpreters which translates the code while executing it. It reads a line and converts it into a binary command and executes it, then jump to the next line. The execution was slow, since the translation happens at runtime.mproved garbage collection:Garbage collection (GC) can also determines an app’s performance to an extent. Bad garbage collection may result in choppy display and poor user interface responsiveness etc. ART improves the garbage collection in ways like One Garbage Collection pause instead of two, Parallelized processing during remaining GC pause. ART makes concurrent garbage collections timelier. Collector are provided lower pause time to clean up of recently allocated and short-lived objects.(iii)Development and debugging improvements:Features like Support for sampling profiler etc. are offered by ART to improve app development and debugging.(iv)Improved diagnostic detail in exceptions and crash reports:ART provides deeper context and details when runtime exceptions occur. Classes like java.lang.ClassCastException, java.lang.ClassNotFoundException, and java.lang. NullPointerException are provided with expanded exception details in ART CodeShoppy

 ANDROID RUNTIMES ENVIRONMENT

r finding an efficient runtime between the two, the lower demands on the hardware has been considered while doing the normal activities unlike the traditional methods of performance testing. Below is a list of three scenarios where a runtime should prove itself more efficient than the other: (i)Shorter Wakelocks: When a device sit idle, it wakes up often to perform the background tasks and consuming more power. An efficient runtime should complete the background executions quickly and get the device back to sleep again.(ii)Lower CPU Clock Cycles:An efficient runtime will allow the processor to do a particular job at the lower clock speeds. As a result, the beneficiaries like animations, scrolling and app switching will have very low lags or no lag at all.(iii)Better Use of Hardware:For a deeper optimization, lower demands also have to be considered. An efficient use of cores available on the devices make a runtime efficient. For example, if ARM’s big.LITTLE architecture is targeted, it will help in less power consumption and higher performance. In this architecture, high performance cores are paired with lower power cores where former is used for intense processing and the latter is used for simple tasks. A. Testing Setup A moto G (1st generation) device was used for running the benchmark testing which runs android on 4.4.2 (KitKat version). Wi-Fi and cellular networks were switched on during the testing, Bluetooth remained off the whole time. No apps were allowed to update during the testing. However there were 3rd party apps installed and running. This was to match it with real-world scenario. Benchmark testing app used was AnTuTu. Here are the results of the testing

The results of above Benchmark testing concludes that there’s still plenty of optimization left to be done for both the runtimes. At the moment, ART can provide slightly better battery life and performance than Dalvik. By the results of the tests, it is clear that we won’t see massive gains. Moreover, while a lots of apps on android have been optimized to work with ART, some of the apps don’t work at all. ART has to be switched with Dalvik for using them on KitKat. In conclusion to the power efficiency segment, with the current device usage pattern where the device sits idle for most of the time, big.LITTLE architecture should help the average battery life. The chip makers may choose to enable all the 8 cores at once, but this has its own trade-offs. In near future, this model is most likely to be avoided for end-user applications, but may be used in Enterprise applications. The Absolute “8-core” will be the central marketing message of coming future when it comes to mobile processors.

https://codeshoppy.com/android-app-ideas-for-students-college-project.html