From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31160 invoked by alias); 24 Jun 2005 09:07:19 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 30856 invoked by uid 22791); 24 Jun 2005 09:07:01 -0000 Received: from anchor-post-32.mail.demon.net (HELO anchor-post-32.mail.demon.net) (194.217.242.90) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 24 Jun 2005 09:07:01 +0000 Received: from calivar.demon.co.uk ([83.104.54.243] helo=xl5.calivar.com) by anchor-post-32.mail.demon.net with esmtp (Exim 4.42) id 1Dlk8t-000PlZ-8U; Fri, 24 Jun 2005 09:06:32 +0000 Received: from xl5.calivar.com (localhost [127.0.0.1]) by xl5.calivar.com (Postfix) with ESMTP id B5DC5E0B8; Fri, 24 Jun 2005 10:06:30 +0100 (BST) To: "K. Sinan YILDIRIM" Cc: Grant Edwards , ecos-discuss@ecos.sourceware.org References: <20050622182844.7476.qmail@web88210.mail.re2.yahoo.com> <200506231325.41733.sinany@beko.com.tr> <20050623152839.21EAE49B78@rivatek.dnsalias.net> <200506240912.23039.sinany@beko.com.tr> From: Nick Garnett Original-Sender: nickg@ecoscentric.com Date: Fri, 24 Jun 2005 09:07:00 -0000 In-Reply-To: <200506240912.23039.sinany@beko.com.tr> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [ECOS] Re: ECOS - MIPS X-SW-Source: 2005-06/txt/msg00231.txt.bz2 "K. Sinan YILDIRIM" writes: > > Just examine the books : > > + Real Time Design Patterns > + Patterns for Small Memory Systems > + Pattern Oriented SW Architecture .. > > they are the experiences of embedded SW developers. There are the things that > they know much better... eCos was designed and written by experienced embedded software engineers. We don't need books to tell us how to suck those eggs. > I think Operating systems are the products that must > live longer. If you want your SW to live longer, you must learn new SW > concepts, you must apply them... Long lived software must be based on well understood, tried, tested and trusted techniques. It should not adopt the latest flavour-of-the-month fad just for the sake of appearing modern. > > For example having an HAL layer as an architecture is not a new concept. Unix, > Linux and also Windows have HAL layers. Also HAL layer is a must for embedded > systems. We have never claimed that any of the techniques in eCos are original or novel. Quite the opposite, for the reasons I give above. > eCOS is written in C++ . You may use Bridge or Adapter pattern to > build an HAL layer. The Bridge and Adapter patterns seem to be no more than techniques for separating interface from implementation. They can only be directly applied in object oriented languages and require a rather complex class hierarchy to be created. The HAL for an embedded system must be small and efficient. Embedding it in layers of C++ class hierarchies would defeat the object. Much of the HAL needs to access hardware resources, some of which must be done in assembler, and for efficiency needs to be done inline. Assembly linkage to C++ is hard, and we want the HAL code to be callable from both C++ and C code. If you want to see something similar to the Bridge/Adapter patterns being applied in eCos, see the way in which thread objects and thread queues are constructed from a mixture of interface and implementation classes. It may not match the patterns exactly, but its goal is the same. I expect you will find many examples of software patterns throughout eCos, they are mostly common implementation techniques that any experienced software engineer applies as a matter of course. > ("Program for interfaces, not for the implementation" is > the main concept of modern SW. ) > That is hardly a new concept, it is probably one of the oldest system structuring techniques around. You will find well defined and enforced interfaces throughout eCos. It is the only way for an OS that runs on a wide range of platforms, supports a wide range of devices, and is highly configurable to manage the complexity. > There are many operating systems that are done with C++. Have u ever examined > them ? For example Chorus, L4, Amobea... etc. They have new ideas,they try to > use new SW techniques. Chorus is 20+ years old. So is Amobea. Hardly new. L4 is interesting mainly for the very low level techniques used in the kernel to achieve very fast context switch times. Of course I have examined them, read the papers, downloaded the sources, talked to the authors. In the case of Chorus and Amobea, probably long before you had ever heard of them. Those parts that were useful were noted and used. Most of the more exotic techniques were marvelled over and then firmly set aside. As far as software patterns are concerned, I think you have things the wrong way round. Software Patterns are a descriptive technique used to codify the insights, knowledge and experience of expert programmers. It is not a prescription for building all code. Any pattern needs to be adapted and changed to match the specific situation. As a teaching mechanism I don't doubt that it is useful, but it is just a more formal version of learning by example, which we all went through. For real software design, it doesn't seem to be any kind of substitute for genuine knowledge and experience. -- Nick Garnett eCos Kernel Architect http://www.ecoscentric.com The eCos and RedBoot experts -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss