Slashdot Mirror


Ask Slashdot: Getting Apps To Use Phones' Full Power?

First time accepted submitter MurukeshM writes "I have a 16 GB Nexus 4. I rarely manage to push the RAM usage above 1 GB (not counting cached processes). Yet I find it increasingly annoying when apps do stuff to save on RAM usage, such as having a browser reload a tab if I havent used it for a long time, instead of keeping it in memory or have an ebook reader load from storage instead of keeping the entire eBook in RAM. I know there are plenty of phones with far less memory, but when most of the RAM is unutilized, with more and more phones and tablets having 1GB+ RAM, isn't it time that apps check on available RAM and use optimizations accordingly? And it isn't only about RAM. Android by default only downloads one thing at a time, whether it be an app from Play Store or a file from a site. When connected to WiFi or 3G/LTE, there's no reason why multiple simultaneous downloads shouldn't be used. How do Slashdot readers with high-end phones get the most out of their device? Are there custom ROMs which act more sensibly?"

6 of 184 comments (clear)

  1. That phone has 2GB of RAM by Anonymous Coward · · Score: 5, Informative

    The 16GB Nexus 4 doesn't have 16GB of RAM. It has 2GB. Your post reads like you think it has 16GB of RAM.

    1. Re:That phone has 2GB of RAM by jeffmeden · · Score: 4, Interesting

      Also, my Nexus 7 certainly seems to download multiple files at once.

      This. Certain apps (like the play store) download one at a time because they are trying to be nice on your phone (since the time saved from multiple downloads is negligible anyway, unless you have a really good 4G signal). How much time do you spend waiting on play store app downloads anyway? The OS at large has no such restriction, you can download things from the play store while you are downloading things from a web page, or things from a Torrent, or whatever; it is all up to the app. I have run a Torrent client with 32 connections across 5 file downloads and Android had no problem with it (it did make video playback skip occasionally). I agree that phones are generally more powerful than the software expects at this point, but the way the question was worded, this is a problem looking for a solution.

      How about this: How can I get my phone/tablet to do compute work (folding @home, whatever) when it's plugged in and fully charged (like, most of the night)? These devices have multiple GB of ram, 2 to 4 CPU cores, and 4 to 8 GPU cores, why not put them to work if they are on-charger and full of juice (when the charger's role is done)?

  2. The problem with ram by Anonymous Coward · · Score: 4, Insightful

    The problem with ram is that you can't do that. Unfortunately traditional apps live in a world where memory can't be "taken back". By taken back I mean that precisely as you request, an app could have a minimum requirement of 10MB, but maybe it could cache stuff for 1GB. However, there is no easy way to the OS to tell the app politely "hey, may you please give back as much memory as you can because something else needs it?". The problem is two fold for mobile apps: they may be "thawed", so they are not really executing to save CPU, so they can only be asked if they are currently running. And second, the memory another app is asking, is it because it requires that memory to work, or it also wants to create a big cache of discardable stuff? You see, malloc et all don't have an option to say "I want this much memory but I don't really need it, so don't purge other processes form memory if there is none available".

    The end result is OSes have to deal with killing apps to free memory because they end up over allocating memory. And especially if you consider all of the above to be for well behaved apps, you can surely understand apps could DOS your OS if they could get away with hogging available memory for themselves...

  3. Re:Ferrari by Chrisq · · Score: 5, Funny

    Dear Slashdot:

    I bought this Ferrari and I live in a suburban part of the US. I can't drive it over 70mph on the highways and I'm constantly in stop and go traffic in the city. It's so frustrating!

    Can anyone of you tell me how to get the most out of my car?

    Sure, Dress in a flashy suit then drive slowly (20mph or less) past a hangout of hot babes. Then go in and ask "anyone fancy a ride?".

  4. Force stopping 'Running Apps' from 'Switch Apps' by SternisheFan · · Score: 5, Informative
    A little OffTopic about Android's 'switch apps' feature (on ICS and higher) from a recent Slashdot discussion.

    I've learned that swiping the app offscreen to the left doesn't 'force stop' it, it just removes the icon from the 'running apps' list.

    Doing a 'long press' on the apps icon brings up a sub-menu of 2 options, "remove from list" and "app info". Tapping on the 'app info' shortcut brings you to the 'app info screen', from there the app can be 'force stopped'.

    I'm posting this here in the hopes that it'll clear up any confusion caused by that previous discussion. :-)

  5. Re:Read up on ARM by TheRaven64 · · Score: 4, Informative

    This is a platform that was not designed to have a scheduler carving up resources

    Uh, what? The ARM architecture was designed for Acorn's line of 32-bit desktop computers, which shipped with a multitasking OS from the start. Now, it wasn't preemptively multitasking, but the only difference between cooperative multitasking and preemptive from a hardware perspective is that you need (relatively) cheap timer interrupts to enable preemptive multitasking, and ARM has always had this.

    The cost of context switching boils down to a small number of things:

    • The cost of delivering the timer interrupt (interrupts on ARM are cheap and have a small number of aliased registers to play with so the code in the interrupt handler can be simple)
    • The size of the register set that needs to be saved (ARM is 15 32-bit GPRs, which can be saved and loaded in a single multi-cycle instruction, only x86 has a smaller register set)
    • The cost of TLB flushes and refills required during the switch (ARM has a tagged TLB, so you only need to invalidate any TLB entries when you recycle an ASID)

    In summary, the orifice that you are talking out of is not your mouth.

    --
    I am TheRaven on Soylent News