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
Comments Locked

77 Comments

View All Comments

  • name99 - Friday, April 15, 2011 - link

    "I am starting to doubt the iSupply numbers you quoted."

    And I am starting to doubt that your contrary opinions are of much value.

    "Their memory prices are also highly suspect, clinging to $2/GB for what are still really small drives compared where higher performing SSDs already are."

    (a) The price here is for STORAGE, not memory as you call it.

    (b) The issue is that Apple wants flash that is low power, not high performance. This probably means that want flash that works at low voltage.
    This is not trivial --- as evidenced by the fact that pretty much EVERY SSD vendor is incapable of shipping a drive that can write reliably at USB power levels.

    If the market for low power flash is different from the market for high performance (and high peak power) flash, then comparing prices as you are doing makes no sense.
  • MonkeyPaw - Wednesday, April 13, 2011 - link

    That is kinda sad. I find the tablet market a bit of a mystery still. The hardware is either loaded and expensive, or cheaply made junk. The software is still in limbo. I wanted to try a tablet without much risk, so I ended upgetting a Nook Color and a microSD card and went through the mod community. If all fails, its still a good dreaded, but its actually been a lot of fun trying all the mods. Can't wait to see a good build of HC for it, as the prerelease build isn't too bad already. A prefect tablet? No, but the specs are decent, the screen is great, and the cost was very acceptable. :)
  • MonkeyPaw - Wednesday, April 13, 2011 - link

    LoL. Dreaded = e reader. Nice spell check android! :D
  • eliotw - Wednesday, April 13, 2011 - link

    They are clearly prioritizing the corporate market that is their bread and butter. I'd never buy this for myself but the "too big to fail" bank I work for could deploy these quickly with the bridge features. That wouldn't be possible with iOS or Android. This isolation capability is impressive but I it still seems like they are releasing it with too many things missing.
  • Spivonious - Thursday, April 14, 2011 - link

    For business users yes, but I think most home users (aka non-techies) use web mail and wouldn't be too bothered.
  • PeteH - Thursday, April 14, 2011 - link

    The problem is that RIMM appears to be primarily targeting business users. Maybe their thinking is that business users will have their Blackberry on them anyway, making an application unnecessary, but it seems like a big oversight to me.
  • galuple - Thursday, April 14, 2011 - link

    It's a corporate security thing. Corporate types very serious about security. No email client means that if one of these gets lost, it doesn't have sensitive documents on it since it's all on the blackberry.
  • Kiddo2050 - Thursday, April 14, 2011 - link

    I could care less. This is aimed at Blackberry users as of now, and I am one. With Blackberry Bridge this is a none issue.

    Sorry, but I just can't go for Apple and it's closed app eco system (the AOL of today). I've had numerous apple products (everything except the ipad in fact) and I just got so sick of plugging everything into iTunes. Just tired of that company ripping me off left right and center. Here's the "New" Macbook Pro, yes it's already out of date in terms of specs but you don't care because it's Apple. Sure my Blackberry phone is not cutting edge but the point is no one at RIM pretends it is. The iPad2 was rolled out as the hotest new tablet and they didn't say anything about the RAM which was sub par - "just don't tell our consumers they won't know." No thanks Steve, iPad2 and Apple = FAIL start caring about your customers instead of screwing them every chance you get.
  • zephyros - Thursday, April 21, 2011 - link

    it's true but so wat? apple came out without cut and paste before...why is everyone so surprised? it's how they fix the issue and how fast that matters. at least they know about it and came out mentioning it instead of letting customers find out themselves
  • Ethaniel - Wednesday, April 13, 2011 - link

    ... great job, Anand.

Log in

Don't have an account? Sign up now