Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Mar 2005 07:10:07 +0200
From:      Anthony Atkielski <atkielski.anthony@wanadoo.fr>
To:        freebsd-questions@freebsd.org
Subject:   Re: Anthony's drive issues.Re: ssh password delay
Message-ID:  <665515038.20050330071007@wanadoo.fr>
In-Reply-To: <1112144624.661.38.camel@orker.orbweavers.co.uk>
References:  <42480F8B.1060405@makeworld.com> <LOBBIFDAGNMAMLGJJCKNEEPAFAAA.tedm@toybox.placo.com> <42496060.1060404@makeworld.com><42496992.7020800@makeworld.com> <42498D19.60209@makeworld.com>  <813611053.20050329205032@wanadoo.fr> <f437208e618414fda808bef45da84392@chrononomicon.com> <785092730.20050329231636@wanadoo.fr> <1112144624.661.38.camel@orker.orbweavers.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?665515038.20050330071007>