[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Sheflug] Re: A couple non-technical questions.....
Hi Richard (et al.)!
On 07-Sep-02 Richard Ibbotson wrote (in answer to Doug Mckendrick):
> Doug
>
>> And also, why is linux superior to windows? I know
>> the argument that it is faster, secure, and stabler. But
>> why? Cheers
>
> Because it's faster, secure and stable. You shouldn't really ask
> this kind of question on a GNU/Linux list. Someone may not like you
> for doing that. I've seen some very ugly replies to this kind of
> question.
Well, I'm not sure either that you should give this sort of reply!
It's a perfectly good question, especially from someone new to
the scene, and as such well placed on a Linux list! And it
deserves a non-tautological reply.
Anyway, my own explanation of the superiority I perceive
(completely disregarding all issues of a commercial and
proprietary kind and considering only issues of performance)
would be on the following lines.
Linux, and FreeBSD, are modelled on UNIX, which has been around
in usable form since the early 1970s. UNIX was designed in terms
of an original concept of operating system, which has proved its
value and superiority over many other systems since its early
days, and continues to do so. In the following, what is said
about UNIX applies equally to Linux and FreeBSD.
A characteristic of UNIX which has never been properly matched
by any version of Windows (though one could argue about how
close Windows-NT comes to it) is the combination of true
multi-tasking (any number of distinct programs ("processes")
can simultaneously share system resources) and multi-user support
-- any number of users can simultaneously be doing their own thing
(this, of course, is logically simply a kind of multi-tasking).
The core of a UNIX system is the "kernel", which coordinates
and schedules the processes, and manages their access to system
resources.
UNIX introduced the hierearchical filesystem structure.
All data flow is between entities which, logically, are "files"
within the system, each with a "standard input" and a "standard
output" (even the keyboard and the CRT are files, though the KB
can only be read from; the CRT only written to); and a "file" is
simply a stream of bytes. As a result, communication between
system components is unified across the whole system. Most
application programs also each have a standard input and output,
so from this point of view such programs can also be interfaced
to the kernel as files. The kernel coordinates the data flow
between them.
Add to this the UNIX concept of "redirection" -- standard input
can be taken from the output of any "files" (" < filename "),
standard output sent to the input of any "file" (" > filename ")
-- and you have the basic infrastructure for interconnecting
everything on the system: hardware devices for storage and input
and output, and running programs (processes): connecting the output
of one program to the input of another is done by a "pipe"
(" program1 | program2 "). Try the following in turn on your Linux
system (in some directory with a lot of entries):
ls -ls
ls -ls | sort -n
ls -ls | sort -n | less
ls -ls | sort -n | awk '{t += $6 ; print $10 " " $6 " " t}' | less
ls -ls | sort -n | awk '{t += $6 ; print $10 " " $6 " " t}' > cumsizes
The 1st generates a full directory listing with size (in KB) as
the first field.
The 2nd pipes the output of 'ls' to the input of the 'sort' program
("-n" for numerical sorting) so you get them in increasing order
of size in KB.
The 3rd pipes the output of the 2nd to the input of the'less' pager
so you can scan up & down.
The 4th pipes the output of the 2nd to the input of the 'awk'
program, which executes a little "script" which computes "t" as the
cumulative sum of the byte-size of each entry (the 6th field) and
prints the filename (10th field), byte-size (6th) and the cumulative
bytes ("t"), again piping the output of 'awk' to the input of the
pager 'less.
And the 5th does the same as the 4th except that it re-directs the
output of 'awk' to the file "cumsizes" which you then have on record.
[If someone can achieve this on Windows I would be most impressed
to hear of it.]
UNIX also introduced the programmable "shell" -- the basic interface
between user and system, a layer between user and kernel. Amongst
other things, it is what receives the user's typed input at the
"command line", but it can also execute commands in "shell-script"
files. The sophistication of a UNIX shell is amazing, and indeed
you could get useful work done on a UNIX system using nothing but
the shell itself.
However, perhaps the key component of the "UNIX philosophy" is
the principle that any single program should be designed to do
one sort of job, and do that job extremely well. More complicated
tasks can be achieved by shell-scripting and "UNIX plumbing" (the
sort of interconnection between processes illustrated above).
As a result, UNIX comes with a collection of scores of "tools"
-- little programs which do useful jobs, a few of which are
illustrated above. It is possible, for instance, to write a
relational database application using only these tools -- see,
for instance, http://www.linux.it/~carlos/nosql/
A quote (slightly edited) from this is significant:
NoSQL is a fast, portable, relational database management
system without arbitrary limits, (other than memory and
processor speed) that runs under, and interacts with, the
UNIX Operating System. It uses the Operator/Stream DBMS
paradigm described in "Unix Review", March, 1991, page 24,
entitled "The UNIX Shell as a Fourth Generation Language".
There are a number of "operators" that each perform a
unique function on the data. The "stream" is suplied by the
UNIX Input/Output redirection mechanism. Therefore each
operator processes some data and then passes it along to
the next operator via the UNIX pipe function. This is very
efficient as UNIX pipes are implemented in memory. NoSQL
is compliant with the "Relational Model".
At the same time, "monolithic" programs which assemble a vast
variety of tasks into one application (such as word-processing,
spreadsheet, email, web-browsing, database management, ... )
are not only not excluded, but are positively assisted by being
able to call on UNIX tools when needed. Nevertheless, the
growing tendency to package up tasks into Windows-like monoliths
is, in my view, a potential threat to what has made UNIX (and
hence Linux) great (see below): there is a danger that in complying
with "naive user intuition" applications may increasingly isolate
the user from the system's capabilities.
Another feature of the original UNIX which persists -- to the
benefit of us all -- to the present day is the use of plain-text
readable and editable configuration files. As a result, many
internals of UNIX are plainly visible to the user.
This concept, of a running UNIX system as a "community" of
interconnected processes, was implemented in a unified way,
cleanly and efficiently, from the earliest days.
It is worth reading "A Quarter century of UNIX" by Peter H. Salus
(Addison-Wesley, 1994). First and last words:
[p. 1]: "Technically, Unix is a simple, coherent system which
pushes a few good ideas to the limit."
[p. 233]: "The one thing that has to be stated about Unix is
that it wasn't a great advance in computing; if anything it
was a great simplification, it put into the realm of the user
things that were just inconceivable prior to that."
Anyway, in my view the above gives some idea of the basic
reasons why UNIX is a very good system.
When you look at Windows (except NT which has separate origins),
you have to go back to the operating system it rests on, namely
DOS. DOS grew out of CP/M, having borrowed a few ideas from
UNIX (but not the really important ones), and in consequence is
very severely limited in comparison with UNIX. "Windows" is not
an operating system: it is a graphical interface to DOS. The
functionality of what you can achieve with Windows is about the
same as what you could achieve with DOS (compare "Word" on Windows
with "Wordperfect 5.1" on DOS); mainly, the extra you get from
Windows is better visuals. The infrastructure that Windows relies
on is more complicated, obscure and fragile than what UNIX rests
on, and this is a good part of the reason why Windows is "unstable"
compared with UNIX. Reasons why Windows may be relatively insecure
again in part rest on the fact that the protection ("permissions")
of UNIX (which were a direct consequence of its multi-user conception)
are not built in to the operating system.
>From the user's point of view, someone coming to Windows from UNIX
will quickly realise that the pretty visuals and "intuitive"
point-and-click interaction in fact isolate the user from the
system, and restrict choice and therefore limit the user's
capabilities. When you want to get certain things done (if you can
do them at all), there is nothing for it but to open a "DOS prompt"
window and type into a DOS command line. This gives naive users a
false impression of easy use and easy accessibility to the computer's
capabilities; but this is an illusion, and only works at all because
most Windows applications are massive monoliths where the user's
anticipated needs have been incorporated into drop-down menus and
button-bars; but if you can't click on it you won't get to use it.
(WordPerfect took big steps backwards, even in its UNIX/Linux
version, when 5.1 got windowised into 6.0).
As for speed, the UNIX/Linux concept of computing as the processing
of byte-streams and piping them from process to process can be
-- and is -- implemented very efficiently in memory under the
control of the kernel. Since Windows is not based on this concept,
you can expect -- and will find -- that many things can seem
slower and more cumbersome on Windows. However, I'm not an expert
on the technicalities of such issues, so leave any further comment
to others.
Hoping this gives you something to mull over, Doug,
and with best wishes to all,
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding [at] nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 07-Sep-02 Time: 15:22:22
------------------------------ XFMail ------------------------------
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.