1. app_Developer's Avatar
    Yes, adding more flash RAM theoretically increases the tiny trickle it needs, but if there isn't enough RAM, there's a lot of hanging, and swapping, and superfluous system activity that could be avoided.
    These devices don't swap, which is why apps just disappear (without any warning) as @jonty12 just said.
    07-10-12 07:36 PM
  2. Thunderbuck's Avatar
    These devices don't swap, which is why apps just disappear (without any warning) as @jonty12 just said.
    Even if the OS doesn't swap, one can assume it's still more active with memory management if it's scrambling for free memory to allocate.

    And the sudden closures? Agreed, not the most graceful. Gotta admit, I draw a blank on that... no clue if that's on the OS dev team's radar.
    07-10-12 07:41 PM
  3. app_Developer's Avatar
    Even if the OS doesn't swap, one can assume it's still more active with memory management if it's scrambling for free memory to allocate.
    You mean by dropping read only pages? We limited that in mach, for the same reason these devices don't swap. I would hope the QNX team has figured that out by now.

    And the sudden closures? Agreed, not the most graceful. Gotta admit, I draw a blank on that... no clue if that's on the OS dev team's radar.
    I asked this question at the BB10 jam and was told "yeah, we recognize that as an issue and will consider options to manage that better in the future with your feedback". As developers we don't even get a warning when our apps are killed. (There is a workaround that works on the alpha, but I hope they will close that in the final because it would be trivially easy for a third party developer to crash a user's whole phone!)

    This is a consequence of ignoring what the Palm and Newton team figured out so many years ago. I still can't believe the RIM team didn't talk to those guys.

    No swap is THE reason nobody else is naive/foolish enough to do desktop/server style multitasking on a mobile device.
    Last edited by app_Developer; 07-10-12 at 07:55 PM.
    07-10-12 07:53 PM
  4. kittencounter's Avatar
    More RAM is good and since the applications getting bigger, it's not avoidable. I think before thinking to give ppl more RAM they should think how to make the platform manage memory more efficient. Many developers are very careless with memory management. They allocate too much memory or have memory leaks in their apps and other applications get kicked out. Even if this is not the case...all applications usually have to pause while the system try to free memory and it takes longer if more memory is allocated. For low latency apps long pauses are also not acceptable.
    07-10-12 08:32 PM
  5. BBPandy's Avatar
    The US/Canadian Galaxy 3 has 2GB RAM. However 1GM of that is dedicated to the GUI just to make it run smoothly. So that leaves 1GB for everything else to use.


    Any sources to this info? If so, then that's pretty interesting.

    But I think RIM said they're gonna stick with 1GB like what the dev alpha has.

    RIM is making an optimized OS. 1GB would be sufficient. Androids always had better specs.

    I'd be completely satisfied if they were close to the top. Processor, GPU, battery, etc. But if RAM, if the OS can run with no problems for long periods of time. Then that's fine.
    Dafuq? Do you even have a document stating so? That is, indeed, the first time i have ever heard about an android phone dedicating 1GB solely to the GUI. Nobody in the xda forums has stated that as far as i have read in the s3 forums. Every OS will use more RAM the more its given, just caching files and apps, which is the purpose of RAM. The international version of the S3 has 1GB and it runs smoooth with that, even the S2 has 1GB and it also runs smooth. I dont see how the S3 US spec needs 1GB just for the GUI when none do...
    My source is Android Central. They were talking about it on a recent podcast. Who their sources were I don't know. However I trust them not to make a claim like that without having having something to back it up with.
    Neely2005 likes this.
    07-10-12 09:11 PM
  6. mithrazor's Avatar
    My source is Android Central. They were talking about it on a recent podcast. Who their sources were I don't know. However I trust them not to make a claim like that without having having something to back it up with.
    I can vouch for that too. Even though I asked for sources. lol. I remember seeing a picture of the OS using 1GB of RAM.
    07-10-12 11:27 PM
  7. Tre Lawrence's Avatar
    You mean by dropping read only pages? We limited that in mach, for the same reason these devices don't swap. I would hope the QNX team has figured that out by now.



    I asked this question at the BB10 jam and was told "yeah, we recognize that as an issue and will consider options to manage that better in the future with your feedback". As developers we don't even get a warning when our apps are killed. (There is a workaround that works on the alpha, but I hope they will close that in the final because it would be trivially easy for a third party developer to crash a user's whole phone!)

    This is a consequence of ignoring what the Palm and Newton team figured out so many years ago. I still can't believe the RIM team didn't talk to those guys.

    No swap is THE reason nobody else is naive/foolish enough to do desktop/server style multitasking on a mobile device.
    Forgive the minor hijack, but can you expound on this a little more.

    I take it Palm stumbled on this issue way back when? What are the short term benefits of the type of multitasking present in the PB?
    07-10-12 11:32 PM
  8. BBPandy's Avatar
    I'm currious about the workaround that can crash the phone...I thought that was the advantage of the QNX Kernal. It's hard to crash the entire thing.
    07-11-12 02:54 PM
  9. app_Developer's Avatar
    I'm currious about the workaround that can crash the phone...I thought that was the advantage of the QNX Kernal. It's hard to crash the entire thing.
    I've sent an example app that does this to developer relations so they can fix it. You don't have to crash the kernel to render a device inoperable, you just need to starve it of resources. I think people have a tendency to really exaggerate where Neutrino really is at this point relative to Linux and Mach. There is a lot they still need to work on when you consider that car navigation systems and nuclear reactors and routers don't run myriad third party apps. The risks are completely different here. Nobody (yet) downloads apps written by arbitrary incompetent or rogue developers onto their car radio.
    Last edited by app_Developer; 07-11-12 at 04:25 PM.
    07-11-12 04:11 PM
  10. app_Developer's Avatar
    Forgive the minor hijack, but can you expound on this a little more.

    I take it Palm stumbled on this issue way back when? What are the short term benefits of the type of multitasking present in the PB?
    I don't see any short term benefits of the scheme they chose (which is really no scheme at all, they just punted the whole decision). Except of course the short term marketing bounce from offering "real multitasking", which really means desktop style multitasking.

    That approach doesn't scale well with third party apps. On Android, and WebOS, and WP7, and WP8, and iOS there are mechanisms for apps to "skinny down" when they need to, or for the OS/frameworks to skinny them down when needed. This is much, much better than just the all or nothing approach of "Now you are fully running", "now you're just gone".

    Yes, this means "compromising" multitasking. The Microsoft engineers on WP7 didn't compromise multitasking on the phone because they don't know how to make a multitasking OS. They "compromised" multitasking in WP7 and WP8 because they actually understand that the intelligent choice is a happy medium between conflicting priorities. There is a user experience that you want, and then there are constraints that are unique to these mobile devices. Just pretending these don't exist and treating it like it's a desktop with a swap file and all of that is exactly what the Newton/Palm team did early, and then quickly corrected.

    (Of course the Android and iOS teams also understood exactly this same issue and came up with their own solutions to this. Remember *all* these teams started with kernels that are perfectly capable of what RIM is calling "true multitasking".)

    When RIM marketing latched onto "real [aka desktop] multitasking", I wonder how many engineers raised their hands to say "uh, actually, we can't swap on these devices. You know that, right?"

    The answer I got at the Jam session where I pressed an engineer on this, was that they may be reconsidering this for a future release. I think the sooner they do this, the better. The engineer at least acknowledged that they understand the issue. So that's a good sign.

    Throwing more RAM at the problem is only a short term fix until users download more and more apps that do more and more cool things.
    Last edited by app_Developer; 07-11-12 at 04:30 PM.
    Tre Lawrence likes this.
    07-11-12 04:20 PM
  11. Steve Rizla's Avatar
    How much are you willing to pay for 2GB of RAM?

    The memory chips used for the RAM is more expensive than the memory chips being used for the system storage. (If i'm not mistaken. I haven't opened my PB or Alpha to confirm this.)
    If this is the case, you are basically chosing between more RAM and less storage, OR less RAM and more storage if you want to keep the whole device at the same price point.

    If I could put in a custom order for a BB10 phone, it would have 2GB of RAM and 128GB of storage, so that I could backup ALL of the important files that are on my desktop PC.
    07-11-12 04:33 PM
  12. Plazmic Flame's Avatar
    If it kills the battery life I don't want it.
    07-11-12 05:28 PM
  13. VerryBestr's Avatar
    How much are you willing to pay for 2GB of RAM? ...
    I believe the price of RAM is negligible in these devices. There are three aspects to consider: price, power consumption, and physical footprint.

    UBM TechInsights did not even mention RAM in its price estimation for the PlayBook:
    | http://www.ubmtechinsights.com/uploa...ison_chart.JPG
    The cost of flash memory, on the other hand, is important. In the above chart, the 64GB flash chip is the most expensive component in the 64GB PlayBook, even more expensive than the display.

    In the following cost breakdown of various iPad models (also from UBM TechInsights), the RAM price is listed (the "SDRAM" line) and it's below $10 for each of the iPads. By comparison, the 16GB flash chip ("NAND") was pegged at $16 in March, and had dropped by only $2 during the previous year.
    | http://www.ubmtechinsights.com/uploa...Comparison.jpg

    The physical footprint on the circuit board can be reduced by stacking the memory chip on the processor chip. This technique, called PoP (Package on Package), was used in the Sony Xperia Play (2GB of RAM), the iPad 2, and the PlayBook:
    | Sony Xperia Play Teardown & Product Analysis - Inside the Sony Ericsson Xperia Play

    Scanning the headlines indicates considerable progress in reducing the power draw of RAM for mobile devices while increasing capacity. For example, this press release describes a new 1Gbit RAM chip from Samsung. Four of these chips can be stacked in a single module giving 2GBytes of storage, which draws no more power then the older 1GB chips.
    | news SAMSUNG

    Phones are now in production with 2GB of RAM (LG OPtimus LTE2 and some Samsung Galaxy S III models). I suspect 2GB will become standard for high-end Android phones next year, with 4GB appearing in a year or two.

    Unless there is some real production problem, I would hope that the BB10 phones would have 2GB of RAM. It looks like an inexpensive way to add a high-end spec, and it would facilitate later system upgrades.
    07-11-12 07:10 PM
  14. VerryBestr's Avatar
    Even if the OS doesn't swap, one can assume it's still more active with memory management if it's scrambling for free memory to allocate.
    You mean by dropping read only pages? We limited that in mach, for the same reason these devices don't swap. I would hope the QNX team has figured that out by now.
    Given the way that memory constraints are being relaxed, is some kind of paged memory system really such a poor a choice today?

    The system would ideally be optimized for mobile devices swapping to flash memory. Writing to flash memory is much much more expensive in terms of power draw than reading flash. An ideal swap/page system would minimize swapping/paging out to flash. The system would try to identify which parts of RAM memory have not been modified since having been read from flash. Freeing memory would concentrate on the dormant/unneeded parts of this unmodified RAM -- these dormant/unneeded parts could be simply written over without being paged/swapped out to flash, and read in again later if/when needed. Priority would be given to maintaining modified data in RAM.

    What did you mean by "dropping read only pages" and limiting that in mach?

    Google found me this complaint (but I haven't read the 53 pages of the discussion!):
    | https://discussions.apple.com/thread...t=699&tstart=0
    I have read those documents [Apple Developer docs Page Lists in the Kernel & Paging Out Process] a hundred times. The general idea like in any VM system is to make RAM pages available to processes that require it when the free memory is low. One thing the documentation doesn't explain is why OS X doesn't prioritize the assignment to free memory of the unmodified pages, delaying/avoiding the writing to the backing store (thus saving disk writing operations that are expensive).

    I have no idea if RIM's swap algorithm does anything along these lines.
    07-11-12 07:38 PM
  15. app_Developer's Avatar
    The system would ideally be optimized for mobile devices swapping to flash memory. Writing to flash memory is much much more expensive in terms of power draw than reading flash. An ideal swap/page system would minimize swapping/paging out to flash. The system would try to identify which parts of RAM memory have not been modified since having been read from flash. Freeing memory would concentrate on the dormant/unneeded parts of this unmodified RAM -- these dormant/unneeded parts could be simply written over without being paged/swapped out to flash, and read in again later if/when needed. Priority would be given to maintaining modified data in RAM.
    So, yeah, that's at a high level how any OS does this (except that the priority is not as simple as you say here). But the issue here is that the flash used in these devices is not rated for that type of load over time. It's not just speed that is the issue (although that is an issue), it is longevity. You can't just chew up a user's phone in 3-4 months, they get unhappy about that.

    I was told at the Jam that BB10 will not swap, just like other mobile OS'es don't swap. Maybe that was incorrect, but then in that case they would presumably use a more robust flash design which means their cost would be quite a bit more than what Nokia, Apple and Samsung are paying. BTW, Android doesn't swap either, even though the Linux kernel is obviously capable of it and has an excellent implementation of it in fact (probably the best in the business). The Android team took exactly the same engineering decision there that everyone else did.

    Does BB7 swap? (I have no idea).

    By dropping read only pages, I mean re-using that space since you don't have to write those pages back out to do so. You can't get too aggressive about that because then just the process of switching apps or servicing background notifications and that sort of thing can become extremely slow. This is why we made those tradeoffs on the mach team and Apple has continued to measure and balance that even up to now in their versions. You can't just blindly prioritize dirty pages, and always choose to keep those in memory over read only pages, because in reality you end up with poor performance that way.
    Last edited by app_Developer; 07-11-12 at 08:02 PM.
    07-11-12 07:52 PM
  16. VerryBestr's Avatar
    ... But the issue here is that the flash used in these devices is not rated for that type of load over time. It's not just speed that is the issue (although that is an issue), it is longevity. You can't just chew up a user's phone in 3-4 months, they get unhappy about that.
    I wonder how different are the mobile flash write-cycle ratings from SSD flash ratings. I'm putting flash into my two Macs (laptop and old PPC machine) specifically for the swap. I worried a bit about SSD lifetime until I read calculations like this:
    | SSD Myths and Legends - "write endurance" article in StorageSearch.com
    -> We assume perfect wear leveling which means we need to fill the disk 2 million times to get to the write endurance limit.
    -> 2 million (write endurance) x 64G (capacity) divided by 80M bytes / sec gives the endurance limited life in seconds.
    -> That's a meaningless number - which needs to be divided by seconds in an hour, hours in a day etc etc to give...
    -> The end result is 51 years!


    A mobile device may have less than 64GB, and it may not implement good wear leveling, but it is not writing at 80 MB/s all day long either.

    That is a bit off-topic, but I'm wondering why mobile devices are so different from SSDs.
    07-11-12 08:21 PM
  17. app_Developer's Avatar
    That is a bit off-topic, but I'm wondering why mobile devices are so different from SSDs.
    SSDs are expensive devices (compared to cell phones) that use a much more robust design. Totally different class.

    yeah, sure RIM could put little 16GB SSDs into every BB10 phone, but how many phones can RIM sell if BB10 phones are more expensive than the iPhone or the SG3? How many Playbooks would they sell if Playbooks were more expensive than iPad?
    07-11-12 08:25 PM
  18. VerryBestr's Avatar
    app_Developer, thank you for your posts here. You bring a lot of experience and expertise to the discussions.
    mithrazor and app_Developer like this.
    07-11-12 08:35 PM
  19. app_Developer's Avatar
    app_Developer, thank you for your posts here. You bring a lot of experience and expertise to the discussions.
    Well, thank you. As I've said many times, I really am interested in how RIM does and what opportunities lie there for all of us if they do well with this. I hope they realize where they stand in comparison to WP8 and JB and iOS6 and they make all the right decisions to make BB10 truly on par (at least) with those OSes.
    Neely2005 likes this.
    07-11-12 08:43 PM
  20. Tre Lawrence's Avatar
    Ditto. Just learned a lot. I appreciate it.
    07-11-12 08:48 PM
  21. itmccb's Avatar
    Definitely needs it. Sure, you can have tons of apps open, but when one of the apps spike in memory usage, everything else disappears. If they don't implement something akin to iOS/Android/WP multitasking, hopefully they'll at least keep the thumbnail there (and maybe grey it out so you know it needs to reload) so you can still get back to the app quickly.
    app_Developer and Neely2005 like this.
    07-11-12 09:51 PM
  22. app_Developer's Avatar
    If they don't implement something akin to iOS/Android/WP multitasking, hopefully they'll at least keep the thumbnail there (and maybe grey it out so you know it needs to reload) so you can still get back to the app quickly.
    That's a great idea, and super easy to implement. At a minimum, RIM should do this.
    07-11-12 09:54 PM
  23. mithrazor's Avatar
    I hope Neutrino 8 works well with the "mobile computer platform" they're trying to go with.
    07-11-12 11:02 PM
  24. mithrazor's Avatar
    Well what perfect timing of this blogpost. There was an update to Neutrino 6.5 to Service Pack 1.

    7/11/2012
    New service pack brings new features, higher performance to QNX Neutrino OS 6.5
    If you use the QNX Neutrino OS 6.5 for your embedded projects, you owe it to yourself to check out the brand new service pack released by QNX Software Systems.

    Service Pack 1 offers a number of enhancements, including:

    Optimized memory management for higher performance (improvements are particularly noticeable with the newer ARM Cortex-A8 and A9 processors)

    Updated networking stack (io-pkt) for better stability and higher performance

    Updates to security protocols, including ALTQ support for packet filtering and IKEv2 for setting up security associations

    Improvements to file systems for greater robustness and efficiency

    Updates to the USB stack, including better stack performance and stability, as well as support for the new USB classes CDC-ECM, CDC-ACM, and CDC-NCM

    36-bit paddr support for the Freescale u-boot bootloader found in newer processors such as the P4080


    To download Service Pack 1, or to learn more about it, visit the downloads section of the QNX website.
    On Q: New service pack brings new features, higher performance to QNX Neutrino OS 6.5
    Neely2005 likes this.
    07-12-12 02:28 PM
  25. Neely2005's Avatar
    With BB10, IMHO RIM needs to move from this business of OSes being backward incompatible, this also means older devices should creak less under newer OSes.
    So they have to future proof the hardware to a reasonable point. There probably is no credible need for 2G of RAM right now but few are moving onto it so it needs to be considered for a high end device.
    Older devices tend to stay longer in retail channels anyway and tend to harm the brand when they stay on older OSes. Apple says iOS6 will be available for the 3GS (which is due to be four generations old in a few months time) and no doubt that contributes to the high customer satisfaction rating Apple has enjoyed for so long.
    It is an additional safety net against having to write down inventory anyway and eliminates the need to make dumbed down hardware at the new OS level for the low end market as these can then fill that gap.
    I agree more RAM may be a case of eventual margins but RIM has to think long and hard about this.
    Yes but Not all of the features of iOS6 will work on older phones.

    mithrazor likes this.
    07-13-12 12:36 PM
50 12
LINK TO POST COPIED TO CLIPBOARD