User Tools

Site Tools


android-mobapps:weekly_accomplishments

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
android-mobapps:weekly_accomplishments [2009/11/20 01:31]
mgriepentrog
android-mobapps:weekly_accomplishments [2009/12/21 01:07] (current)
tylerharter
Line 36: Line 36:
  
 Nov 19: Created service that gathers cpu and memory usage. Found ActivityManager class which lists processes that are currently running, which provides pid, name, importance (foreground/​background),​ and lru (low lru means it has been used more recently). Will use this information when polling procfs. Also noticed that applications running in the background will get killed if free memory approaches a certain threshold. Nov 19: Created service that gathers cpu and memory usage. Found ActivityManager class which lists processes that are currently running, which provides pid, name, importance (foreground/​background),​ and lru (low lru means it has been used more recently). Will use this information when polling procfs. Also noticed that applications running in the background will get killed if free memory approaches a certain threshold.
 +
 +**NOTE:** We did a ton of work after this too, but forgot about the wiki for a while. ​ Here's some of the highlights that we can remember:
 +
 +We wrote an AppGrader program that calculates the CPU-Percent-Seconds and Mem-Page-Seconds based on procfs information. ​ 1 CPU-Percent-Second means that the application did the equivalent of using the CPU at 100% capacity for 1 second (for example, perhaps the application ran for 2 seconds at 50% capacity). ​ Mem-Page-Seconds is similar.
 +
 +We used the information from ActivityManager to create a "​utility function"​ that estimates how much value an application is providing to the user.  Basically, we can't just grade based on CPU-Percent-Seconds because we don't want to give an application a worse grade just because the user used that application more.  Thus, we divide CPU-Percent-Seconds and Mem-Page-Seconds by the amount of service the application provides to the user.  Our utility function estimates the amount of service by looking at how much time the application spent in the foreground (we assume the user is actively using the application during this time). ​ We also wanted to give applications some credit for the time they spend running in the background, but intuitively they shouldn'​t get as much credit as when they are actively being used in the foreground. ​ Thus, our AppGrader gives applications one fourth credit for background time.
 +
 +Just like our previous data collection programs, our new AppGrader posts the data to our database. ​ After creating the appropriate database tables, we put our applications on several phones.
 +
 +During this time, we also attempted to collect network information from the procfs, but were unsuccessful,​ as procfs only records system wide stats. ​ We also attempted to collect data on I/O to the solid state drive, but were unsuccessful as the android kernel was apparently compiled without CONFIG_TASKSTATS flag set, so the io pseudo file is not available to us on Android phones like it is in Linux. ​ We found one UNIX application,​ pidinfo, that get displays per process file I/O information,​ but upon inspecting the tools source code, we learned that pidinfo also relies on the io pseudo file in procfs.
 +
 +We spent a great deal of time trying to recompile the kernel with the CONFIG_TASKSTATS so we could get the I/O info.  We feel like we're close to figuring it out, but the phones hang when we flash them with the new kernel.
 +
 +In an effort to evaluate our grading program, several of us used the same applications for a set period of time and we recorded the grades. ​ Then we used the applications again while running the "​counter program"​ in the background. ​ We found some correlation between the speed at which the counter runs and the grades assigned by our program.
android-mobapps/weekly_accomplishments.1258702297.txt.gz · Last modified: 2009/11/20 01:31 by mgriepentrog