Is the monolithic structure the best for a smart phone?

The Neo FreeRunner smart phone

clip_image002The Neo FreeRunner is a touch screen smart phone, which operating system is based on Linux. The phone is intended to be used by software developers familiar with Linux as the general consumer, but in time as development progress, this audience should broaden to all phone consumers. Software developers have taken the Neo FreeRunner to their heart because of the total freedom they have to use it, and to design software for it. In time the broader consumer will appreciate the high quality product, the performance of the phone, and the wide range of free software packages expected to emerge in time. This will allow users, to make the maximum use of the hardware by tailoring it to fit their needs.

Is it usable?

At present time the Neo FreeRunner is fully functional. It is used by many as a day-to-day phone. There are many phones with fully functional GPS, and there is good software (Locations, TangoGPS, Navit (for use in cars) and many more) to use, especially with OpenStreetMap. With the current shipping, the battery life is only a little over one day, and it has an alarm clock, media player, internet browser, game console, email reader and contacts manager: all in different version, which can be downloaded and installed (all open source and free). The new version called GTA07 is available.

How much does it cost?

The Neo FreeRunner is sold through many channels (this includes www.openmoko.com) and the official price has been set to ca. €290 , but the price may vary slightly from country to country.

Hardware specification of the Neo FreeRunner GTA02

clip_image002[9]

  • Display- Topply o2.8, 480 x 640 pixels, VGA, 200 NIT minimum, resistance type touch
  • User Interface Navigation- Touch screen on LCD, 2 control “buttons”, 1 Power button, 1 Aux for 911 emergency call
  • Built-in 802.11b/g Radio (Atheros chipset AR6001 Flash version)
  • Built-in Bluetooth 2.0 + EDR (CSR and support PCM audio , BC4 firmware version)
  • Built-in 2D/3D graphics acceleration chip (S-Media 3362)
  • 2 built-in Tri-Axis sensors (ST accelerometer LIS302DL)
  • Built-in GPS Radio – -130 dBm with internal antenna, -157 dBm tracking on chipset specification, TTFF under 40 seconds with -130 dBm signal strength, and tracking (u-Blox)
  • Antenna – Specialized antenna for best in hand hold GPS, GPRS and Wi-Fi/Bluetooth performance are required, -105dBm on receiving, Tx 30dbm+2 on GSM
  • External Antennae – MMCX GPS connector
  • GPRS Radio –GSM/GPRS radio. A Pre-PTCRB certified module will be preferred
  • Linux – Linux kernel 2.6.24 or later Openmoko kernel
  • USB - Client and Host-mode switchable (to be used for software downloading), provide host 5V power

The dicussion with back ground

Linux kernel 2.6 (Monolithic kernel)

The Linux kernel is developed by Linus Torvalds, but maintained by thousands of individuals. It is a monolithic operating systems structure, which is constructed in a layer fashion. The system is constantly enhanced to make it fit the needs of the marked (in embedded systems, PC systems and servers). It is enhanced so that it often changes its structure. System functions like the process and memory management, the process and thread scheduling, drivers and I/O is implemented in kernel space - where I/O communication are provided by modules, which can be inserted/removed in runtime – they are all built against the kernel. Now when the all that functionality is built against the kernel, this also means that if the kernel changes, so does the set of modules. To add or change features provided by the hardware, all the “layers” above the changed one also has to be changed, this is of course a worst case scenario, but it still if the concept change too much in the kernel, things such as modules ( I/O communication and parts of drivers) needs more than just a recompilation, it needs a complete code modification. The Linux 2.6 kernel does support soft real-time performance. This is done through a configuration of the kernel, to make the kernel fully preemptable, this is done with a new configuration option for the kernel, that changes the behavior of the kernel by allowing processes to be preempted high priority work is available to be done (if the standard 2.6 kernel is used, then when a userspace process makes a system call, a high priority process have to wait until the call is complete before getting access to the CPU).

The Microkernel

The idea of the Microkernel appeared in the late 1980’s, and the concept was to move as much as possible out of the kernel space (and into the processors first-level cache) and in to user space, meaning to reduce the kernel to basic process communication and I/O control and let the other system services live in user space in the form of normal processes also called daemons. There exist daemons for handling memory management, one for process management, one for managing drivers, and so on. Because the daemons do not run in kernel space, a context switches are needed to allow user processes access to the kernel (to run in kernel mode). In the memory management of the microkernel (L4) every process consists of three primitives. A process maps its memory pages to another process if its wants to share these pages. When a process gives the pages to another process, it can no longer access them, and they are under the control of the other process, as long as the first process does not flush the pages. This means that if a process flushes its shared memory pages, it retrieves the control back on those pages. The system now works as follows, the microkernel reserves all memory at startup, to one process called a base process (which live in user space, all processes do), and if another process needs memory, it can directly ask the base process for memory, which saves the trip down through the kernel. Because of the way processes are built in the microkernel (with the three primitives: grant, map and flush), a process can only grant, map or flush memory pages, memory protection still exists and the overhead of context switches is reduced.

What is the ultimate operating system for the Neo FreeRunner?

I believe that the Microkernel structure is the best way to make the mobile phone stable. When looking at the kernel structure of the microkernel, there are several smart phones on the marked based on the microkernel structure, purely based on the stability of the kernel, and because the further development on the kernel has a higher degree of maintainability. If one were to add a new features to a monolithic system (e.g. a new memory management routine), it means recompilation of the whole kernel, often including the whole driver infrastructure. If you have a new memory management routine and want to implement it into a monolithic architecture, modification of other parts of the system could be needed. In case of a microkernel the services are isolated from each other through the message system (Microkernel’s uses message queues build in as FIFO queue). It is enough to re-implement the new memory manager. The processes which formerly used the other manager, do not notice the change. Microkernel’s also show their flexibility in removing features. That way a microkernel can be the base of real-time appliances in single chip systems. On the other hand microkernel’s itself must be highly optimized for the processor they are intended to run on. To try to sum up the monolithic structure, it suffers from the fact that it includes all of the basic services inside kernel space, which makes the kernel lack on extensibility and maintainability, on the sheer size of the kernel growing big, and the fact that bug fixing or the adding of new features mean a complete re-compilation of the kernel which is time and memory consuming. The fact that microkernel has – for a long time been used – in mobile phones should also give an indication of the stability of the kernel. Toshiba W47T is one of many that run on a microkernel, and there are many different microkernel structured operating systems out there for mobile/smart phones, and there are all in use in different phones. One exiting system is the Cosmos microkernel developed by a former developer from Microsoft, and the operating system is .NET based, and open source.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: AllanJP
Posted on: 8/23/2010 at 5:46 AM
Categories: Embedded | OS
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Tech ED – Windows 7 embedded

image I had the pleasure of attending the DEMO MANIA session on Windows Embedded Standard 2011, also called “Quebec” or plain Windows 7 Embedded.

Due to the fact that it was a DEMO session, the amount information given were minimal and the visual presentation was in focus.

The embedded team has come up with a treat for all of us technical guys. They have prepared Windows 7 for embedded devices, and in such a way that when you boot up for the first time, a menu appears to let you chose which Device drivers you need for the system (the ones it did not find it self). After this, the system let’s you pick and chose your desired configuration, meaning that you now have a chance to deselect IE, or just the parts of IE you don’t want… And off course not only IE, but every little piece of Windows 7 you select and deselect as of your likings (That is WOW!). In Short it is a full Windows 7 with all features, (silverlight etc.) where you deselect features to make it fit your device and wishes.

I got a hold of an early preview version of Windows Standard 2011 and when I got home, I immediately started to install the version onto my Asus Eee 901 just to see the how it worked! And you can really optimize a laptop with this kind of version :-)

But…. It was brought to my attention that it was illegal to install Windows Embedded Standard on a Notebook, and therefore I have now erased it, and cannot show any pictures of my progress with the adventure (I will not even explain about it).

Windows 7 Embedded Standard 2011 as OS for Windows Mobile?

But with all of this power at your hands, and the statements from Microsoft that the future of their mobile phones will run on at least 1GHz processors…. Hmmm wouldn’t be weird if Microsoft didn’t use this as a new operating system (OS) for Their Mobile products too?? Let me answer that! Yes it would.. With this product at their hands, Microsoft is finallly able to have – One Operating System For All platforms – A vision they had for years, and a vision Mr. Steve Balmer talked about on his last visit in Denmark.

And here is the more technical information:

Processor Architecture
Support for multiple processor architectures
· x86
· x64

Tools
Improved developer experiences:
· Wizard experience with Image Build Wizard (IBW)
· Advanced experience with Image Configuration Editor (ICE)

Componentization
The right level of granularity to build special-purpose devices
· Hundreds of feature packages based on latest innovations for Windows 7
· Embedded enabling features such as Enhanced Write Filter, File Based Write Filter, Registry Filter, Hibernate Once Resume Many, and Custom Shell to fulfill embedded-specific requirements
· Large number of driver sets for compatibility with growing set of device hardware and peripherals

Application Compatibility
Applications and drivers for Windows 7 can work on Windows Embedded Standard 2011 without difficult, expensive, and time-consuming porting effort

Enterprise Connectivity and Manageability
Support for Active Directory, Domain Join, Group Policies, Network Access Protection, and IPv6 to enable connectivity and manageability with Windows Server, System Center Configuration Manager, System Center Operations Manager, and Windows Server Update Services

User Experiences
Rich, interactive user experiences with Windows Aero and Windows Touch and Gesture. A stable framework Windows Presentation Foundation for building new and innovative experiences.

Video resources

image http://channel9.msdn.com/posts/Charles/Windows-Embedded-Past-Present-and-Future/

Websites

image http://windowsembedded.com

imagehttp://msdn.microsoft.com/en-us/windowsembedded/ce/default.aspx

imagehttp://msdn.microsoft.com/en-us/windowsembedded/standard/default.aspx

Blogs

image Olivier Bloch - http://blogs.msdn.com/obloch/

imagehttp://blogs.msdn.com/mikehall

imagehttp://blogs.msdn.com/jcoyne

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: AllanJP
Posted on: 12/5/2009 at 4:24 PM
Tags: , , ,
Categories: Embedded | OS | Tech ED | Windows 7
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Attending Tech ED Berlin 2009

TechED

“All my bags are packed, I’m ready to go……”

I’m am very exited to get to Tech ED Berlin 2009 (which is now sold out!). I’ve been trying to wrap my head around what track and sessions I should attend, because there are MANY! to chose from. As a person I believe it’s importent to focus on the fact that this is a unique opportunity to evolve your knowledge. Therefore I have chosen to expand my choice of sessions to not just include areas of immediate focus, but to also include areas of common interest.

I spend a few hours on the track & sessions page, figuring out pros and cons on sessions that unfortunately collided on day and hours. But I think I hit an amazing agenda for the entire week:

TechEd Europe Keynote - Welcome to the New Efficiency
Enabling Rich Business Clients with Windows Presentation Foundation
Top 10 Design Mistakes Made By Web Developers and How to Avoid Them
Windows 7 Demo Mania
Embedding Windows 7 into Devices
Tips and Tricks for Building High Performance Web Applications and Sites
Pumping Iron: Dynamic Languages on the Microsoft .NET Framework
F# for Parallel and Asynchronous Programming
Microsoft Visual Studio Team System 2010 Team Foundation Server: Become Productive in 30 Minutes
Unit Testing Best Practices
The Windows API Code Pack: How Managed Code Developers Can Easily Access Exciting New Windows Vista and Windows 7 Features
Windows 7 and Windows Server 2008 R2 Kernel Changes (*PDC at TechEd)
Windows 7: The Power Management Workout!
Building High Performance Parallel Software
Windows Embedded: "Demos Only"
Parallel Computing for Managed Developers
Achieve new levels of desktop optimization with Intel Core™ 2 processors with vPro™ technology and Windows* 7
Case of the Unexplained... Windows Troubleshooting with Mark Russinovich

The one session that I look really forward to is Windows 7 and Windows Server 2008 R2 Kernel Changes!! I’ve been following the discussion on the internet, and following the videos from Channel 9 on Windows 7.

The official note on the session leaves me with the impression that this is going to be really good:

“This session goes beneath the hood of Windows 7 and Windows Server 2008 R2 to describe and demonstrate the key changes in the kernel. Topics include: scalability improvements such as removal of the global scheduler lock, support for more than 64 logical processors, and user mode scheduling, virtual service accounts, core parking and timer coalescing for power efficiency, trigger-started services, core architecture changes to modularize Windows ("Minwin") and more.”

And the embedded part with demo’s are also something to be looking forward to:

“This demo-packed session presents all sorts of devices, tools, and technologies used in today's and tomorrow's embedded projects. If you want to learn how Windows Embedded can be used to build stunning devices or if you are just a geek, you can't miss this session.”

And yes, I’m a geek!

I’m really looking forward to this mix of Desktop, embedded, web technology and architechture sessions. And not forgetting all the demo presentations that makes this Tech ED a must-see event.

Appart from all of these sessions, I will be on the lookout for the expo areas, where I will get a chance to have a look at what all other developers are doing right now.

I’m also loking forward to meeting all the other Microsoft Student Partners from all over the world. And this will ofcourse introduce them to my network, and me to theirs.

If you find the subjects listet above interesting, then I will attempt to blog on every single one of them, and hopefully provide you with awesome pictures from the whole event. If you find subjects of interests missing in my list, I will suggest that you have a look at some of the other Microsoft Student Partner blogs. We are well represented at the Tech ED event, and maybe they will attend more convenient subjects. You can find links to there blogs on the left column.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: AllanJP
Posted on: 10/31/2009 at 5:14 PM
Tags:
Categories: C# | Embedded | F# | FMOD | IronPython | OS | Programming | Tech ED | Velkommen | Windows 7
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

FenixOS: a research operating system

It's been a while since I've been updating my blogwith posts, and for that I'm truely sorry! The reason is my involvement in aresearch project where we are trying to design a new operating system for thefuture!

The common operating systems of today are based ontechnology developed many years ago when topics as scalability, security andpower consumption was not a major concern in computing, like it is today.

This is the primary motivation for developing a newoperating system from the bottom with the aforementioned issues.taken intoaccount from the start.This leads to the FenixOS which is a research operatingsystem, which is aimed at the hardware specifications of computers today – thatbe Desktop, Laptop, Notebooks, and Embedded devices (Smartphones etc.)-  But even more at fact that computer systems ofthe future will contain even more CPU's than currently computers. This fact andthe fact that current operating systems all have a creation date ranging fromthe 70's through the 90's where uni-core systems where common, has made it duetime to refactor  the architecture ofoperating systems. FenixOS supports an arbitrary number of CPU's and focuses onstability, security and the need for less power usage. It is based onmicrokernel architecture to enhance stability issues, and enforces securitythrough access control lists - among others. A complete rewrite of theunderlying system structure is made in C++, to clean up the disorderlystructure seen in many current operating systems. Although everything is newand cleaned up, FenixOS is still set to be compatible with current applicationsrunning on current operating systems, this meaning that applications that runon Linux, MacOS and Windows is aimed to be able to run on FenixOS. FenixOS doesdistinct itself  from Linux by eg. Havingseparate notions of threads and processes.

 

 

How this will be achieved is still on the researchstage, but initial ideas are on the drawing board. The easiest approach toobtaining compatibility with the Unix variations of operating systems, is toport the EGLIBC library to the FenixOS platform, while off course stillupholding the POSIX’s standard. EGLIBC (embedded GLIBC) is a variant of the GNU C Library (GLIBC). GLIBCis the C library used by most Linux kernel based operating systems.

We had to start off there-designing of the operating system structure, by considering which systemcalls are necessary for an operating system to compile itself. In this phase wehad to – in order to maintain compatibility with current operating systems –examine how current systems conduct their system calls, and thoroughly considerthe impact on security, stability and power consumption. We examined Linux,MacOS, Solaris, FreeBSD, Windows, and Singularity,paying especially attention to the thoughts and design of the researchoperating system Singularity, to see how these ideas would be suitable inFenixOS, without breaking the POSIX standard and the compatibility with otheroperating systems. The one major problem of looking at the Singularity researchproject is that Singularity uses managed code language to enforce securitybetween processes (among others) called SIPS. FenixOS is implemented in C++programming language, and therefore cannot utilize the security of managedcode.  We have reasoned that thefollowing system calls would be necessary for a basic new operating system:  

 

For self compiling:

Fork(), Execve(), Exit(), CreateThread(),ExitThread(), Wait(), Futex(),

 

For  file operations:

Open(), Close(), Read(), Write(),Stat(), Seek(), Link(), Unlink(), Ioctl(),

 

Message passing:

Send(), Receive(),

 

Memory management:

Malloc(), Free()

 

I will not be going through allthe systemcalls here, as this is just an introduction, but I can give a glanceof what we did with wait() systemcall.

By looking through source codeson the GLIBC we found that there are different versions of the wait() systemcall, all with different functionality, and by further examining thedocumentation on the different libraries, GLIBC, EGLIBC and such, we found thatthey all could be combined into one single system call, without breakingcompatibility with existing operating systems. This is done by keeping theexisting functions – wait(), waitpid(), wait3(), waitid() and wait4(), buthaving all of the aforementioned functions calling our newly created do_waitid().

 

It appears that over time newwait() calls with new features has been invented and added to the differentUNIX like operating systems (Linux, BSD, Mac OS, etc.) but not all of the oldwait() calls has been removed. The most powerful of the wait system calls arecalled waitid(), this system call takes a total of four parameters and withthose it can replace the old system calls wait() and waitpid(). If we add afifth parameter, the waitid() system call can also replace wait3() and wait4().In our EGLIBC code we call this system call with five arguments do_waitid(). Becauseof this we decided to just implement one wait system call in the FenixOS kernelwhich will just be called wait() and act similar to the described waitid()call. It will then be up to the C library to map the four other system calls tothis one existing in the kernel. The system call interface looks as follows:

 

pid_twaitid(idtype_t idtype, id_t id,              siginfo_t* infop, int options, struct              rusage*usage)

 

The first argument idtype can hold 3 different values whichindicates how the second argument idshould be interpreted. If idtypeholds the value P_PID then it meanswait for the child process with the process id that matches the second argumentid. If the value is P_PGID then it means wait for any childprocess which has a process group id that matches id. Finally if idtype is P_ALL then id is ignored and there will be waited for any child process. Thethird argument is a pointer to a structure which holds information about howthe child process stopped execution. With the fourth argument options it is possible to tell when thesystem call should return. It could return when the child exits of course butalso if the child changes from one state to another, for example if the childis blocked or when it wakes up. The last argument usage is the one added to support wait3() and wait4() system callswhich are the only ones using this type of argument. The structure holdsinformation about which resources the child held and which therefore should beavailable. The trickiest part of mapping the four system calls to waitid() isthat only waitid() is using the aforementioned structure siginfo which holds information about how the child terminated. Theother four system calls uses a pointer to an integer to get information abouthow the child process terminated. EGLIBC has some build in macros that userapplications can use for interpreting this status code. So the EGLIBC code hasto translate from the siginfostructure to the status code. Luckily EGLIBC also has some build in macros forcreating these status codes which simplifies the translation part a bit (Can befound in libc/bits/waitstatus.h). Another thing we had to be aware ofwhen mapping the system calls was that not all options in the options argument could be used for allsystem calls. Therefore we added error checking for this in the EGLIBC code andreturned error code EINVAL (Error:Illegal argument) before the kernel would be bothered with the system call. As wementioned earlier we have created two different waitid() system calls in theEGLIBC code. One takes the five arguments mentioned in this section and doesthe actual call down the the FenixOS kernel. This function is calleddo_waitid(). The other is called waitid() and takes the four argumentsoriginally intended for waitid() and maps those to do_waitid() (Leaving usage with value NULL).The latter is meant for user applications wishing to call waitid(). Thefirst should only be used by the EGLIBC code for mapping the other systemcalls. By creating this mapping between the wait system calls in the EGLIBCcode we cut down the number of wait system calls in the kernel to one. Butstill we are able to support already existing applications which may make useof the older wait system calls.

This off course just give a smallinsight in to a very big subject, where we to this date haven’t been able totest our system yet. As stated earlier, it’s a research system, and the designis a subject to change…. J

 

Currently rated 3.0 by 2 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: AllanJP
Posted on: 7/13/2009 at 6:44 AM
Tags:
Categories: OS
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed