QNX: The PlayBook OS

A year and a half ago RIM jumped on the opportunity to purchase an OS vendor called QNX (pronounced Que-NIX, like UNIX with a Q in front). RIM saw a growing gap between its BlackBerry OS and what Apple/Google were working on and realized it needed something new to effectively keep up with the joneses. The age old debate between build vs. buy kicked in to high gear and RIM took the route with less internal risk: acquire QNX.

QNX's Neutrino 6.5 OS is the basis of the BlackBerry Tablet OS running on the PlayBook. QNX features a very small (by modern standards) microkernel of around 100K lines of code. By comparison the modern day Linux kernel is around 14M lines of code. QNX argues that by limiting the scope of the kernel it can ensure greater stability and less vulnerability to bugs in the code. QNX is functionally a modern OS, however everything beyond the base kernel is supplied in the form of separate, self contained services. Even drivers are excluded from the microkernel.

QNX is, as a result, a very modular operating system. Additional features are added simply by bundling extra services, however for specific markets you don't incur any complexity or security penalty as unneeded services are simply turned off.

Because it's so modular, QNX has no issues being used in everything from the PlayBook to high end Cisco routers. Obviously the requirements of a tablet are very different from a router, so RIM actually implemented an updated version of QNX 6.5 into the PlayBook with some tablet specific features. The QNX team worked on improving media playback and GPU performance in QNX, features that will eventually make their way into QNX 6.6.

Another benefit of the modularity of QNX is that each service runs effectively sandboxed. A crash within a single service won't bring down the whole OS. Restarting a single crashed service can be done quickly. A small kernel should also be able to boot quicker, however the PlayBook itself has a longer boot time than Honeycomb because the entire OS image is validated using a crytographic hash on boot up. As a result of this image validation, the PlayBook will always boot into a known secure environment. Should the image validation fail, the PlayBook will typically install a previous known-good copy of the kernel stored on a separate partition.

Communication between services/processes happens via a structured messaging system. This is of course one of the benefits of a microkernel OS: inter process communication is usually quite good, because it has to be.

In QNX every task or thread has a priority. While a handful of priorities are reserved for system level events (to prevent an app from taking priority over refreshing the screen for example), everything else is defined by the caller. QNX argues that unlike in monolithic non-realtime OSes, task/thread priorities are nearly always respected here. Inevitably you'll have a number of tasks that have the same priority, and there the scheduler will just round robin between them. The one guarantee QNX offers is that any task with a higher priority will execute in accordance with that priority. This is ultimately what makes QNX a realtime OS.

Large monolithic OSes often give you the same promises, however QNX argues that they don't always hold true to them. There's always some system process that's interrupting things or a runaway task that prevents your screen from updating as quickly as you need it to. These days with hefty multi-core CPU architectures, hiding scheduling latency due to a system process interrupting something else isn't too difficult. On tablets/smartphones it's more of a problem given limited CPU resources, but ultimately it'll diminish there as well. There is arguably a power efficiency benefit here but at a high level that's a difficult thing to measure.

The QNX OS itself has been ported to everything from x86 to PowerPC. Although the PlayBook uses an ARM based OMAP 4430 today, it looks like RIM is pretty open to moving to other microarchitectures should the need arise.

File System

On the PlayBook RIM implements the latest version of the QNX file system. The setup supports 64-bit LBAs (effectively no limit on single file size given current NAND capacities) and 1K file names.

File system performance is difficult to measure at this point given that we're dealing with pretty low performance NAND as well in devices like the PlayBook.

A Functional Bezel TI's OMAP 4430
POST A COMMENT

78 Comments

View All Comments

  • Ethaniel - Wednesday, April 13, 2011 - link

    ... great job, Anand. Reply
  • tipoo - Wednesday, April 13, 2011 - link

    Did you have anything running in the background there? Gizmodo and Engadget both got within 10% of the iPad 2's score, the one here seems to be much slower.

    Anyways, as usual this is easily one of the best reviews.
    Reply
  • Anand Lal Shimpi - Wednesday, April 13, 2011 - link

    This may be a sunspider 0.9 vs. 0.91 issue, RIM said the same thing but 0.9 for some reason gives us the scores you see on the PlayBook vs. the competition (just re-ran again to be sure).

    I'm still waiting for a response from RIM as to why the relative performance comparison is much worse under 0.9. We've stuck with 0.9 to maintain backwards compatibility with our older smartphone numbers but if need be I'll switch over to 0.91 for tablets.

    I'm running 0.91 numbers now, let's see what I come up with.

    Thanks for reading and your kind words :)

    Take care,
    Anand
    Reply
  • Anand Lal Shimpi - Thursday, April 14, 2011 - link

    This is definitely a 0.9.1 vs. 0.9.0 issue. I'm not sure what is causing the PlayBook to choke on 0.9.0. I will update the article with 0.9.1 numbers as well.

    Take care,
    Anand
    Reply
  • 8steve8 - Wednesday, April 13, 2011 - link

    very high black levels on the screen is disappointing. (samoled/samoled+ is amazing)

    Also the bezel looks like its a huge percentage of the surface area, which is ugly.

    7" seems to be the worst size, too big for pockets, too small for ideal consumption of entertainment or web.

    The Base OS seems decent, although without email or calendar, we will have to give this another look in august.

    That said, I still find tablets a niche device that few situations actually call for. Usually I find myself wanting a physical keyboard, or at least more screen space while typing. Also if you have to constantly hold it up, or buy a stand, why not use little laptops laptops, the screens don't need a stand : )

    I find it a good device for a coffee table or any profession where you are standing/not at a table. Otherwise I'll stick to smartphone/laptop or desktop.
    Reply
  • Solandri - Thursday, April 14, 2011 - link

    The contrast ratio is the same as the iPad 2, so the high black levels is an artifact of the high white levels. In other words, if you turned down the brightness to match the max brightness of the iPad 2, the black levels should be the same as on the iPad 2.

    Along the same lines, I'm wondering what was the brightness setting during the battery tests. Usually reviewers do something like set brightness to half during the battery tests. But that seems a bit unfair since the Playbook's screen is so much brighter than the competition's. Wouldn't a more fair comparison be to set its brightness output to be the same number of nits as the iPad 2 in its battery test? In effect, think of the screen as the same as the iPad 2, but with the option to really crank up the brightness if you're outdoors in sunlight.
    Reply
  • Anand Lal Shimpi - Thursday, April 14, 2011 - link

    So our old method was to set everything to 50%, but lately I've been doing brightness matching right around ~150 nits on these tablets.

    Take care,
    Anand
    Reply
  • HilbertSpace - Wednesday, April 13, 2011 - link

    Conclusion page:

    "I'm glad to see RIM experimenting with form factors. After using the Galaxy Tab 8.9 at CTIA I felt that may be the perfect balance between portability and functionality. The 7-inch PlayBook "

    - something got mixed up there.
    Reply
  • Aikouka - Wednesday, April 13, 2011 - link

    I wonder if the browser would be better if you had the option to hide the menu/address bar? Reply
  • Anand Lal Shimpi - Thursday, April 14, 2011 - link

    You actually do have the option to hide the menu/address bar, it's in the upper right corner of the browser. That does improve things but it also makes it less convenient to navigate to the next website.

    Take care,
    Anand
    Reply

Log in

Don't have an account? Sign up now