Martin McCann writes:

> Please explain this to me - I have had a lot of experience in OS design,
> and would like you, who obviously from you remarks, have extensive OS
> design knowledge, point out to me how a HAL makes an OS inherintly more
> stable than a system that writes its drivers for a particular peice of
> hardware, without pretence it will cope with differetn pieces of
> hardware?

There's no relationship between a HAL and the creation of drivers for
specific pieces of hardware.  Drivers are always created for specific
hardware, but they may or may not be largely written in assembly
language.  Those that are not are obviously using a certain degree of
hardware abstraction.

In general, a HAL limits the amount of assembly-language programming
required in the OS.  Apart from the obvious advantage of improving
portability, this also allows the OS to be built with less need for the
scarce programmers who happen to be expert in assembly-language
programming for a specific platform.  High-level languages aren't
inherently more reliable, but it's easier to find programmers who are
expert in high-level languages than it is to find programmers who are
specialists in specific assembly or machine languages.

A HAL also diminishes performance and increases OS bloat, but today that
is often considered an acceptable trade-off.  Even so, extremely
critical sections of code may still be written or rewritten in
assembler, and of course the HAL itself is in assembler by definition.

Writing the entire OS in assembler is acceptable (and extremely
performant) _if_ you can find expert programmers to write it.

In the old days, UNIX was considered a bit of an oddball because it
effectively used hardware abstraction (by being written mostly in C),
although it was not the first OS to do so.  That made it slow compared
to its contemporaries of similar functionality, too--whereas today it
is fast and efficient compared to most other operating systems that
postdate it.  The hardware abstraction of being written in C was a key
factor in making UNIX one of the most widely used operating systems in
history.

-- 
Anthony


_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to