This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: ECOS - MIPS


"K. Sinan YILDIRIM" <sinany@beko.com.tr> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]