Linux-Development-Sys Digest #674, Volume #7 Sat, 11 Mar 00 22:13:14 EST
Contents:
Re: kernel in C++ (Kaz Kylheku)
Re: kernel in C++ (Kaz Kylheku)
Re: kernel in C++ (Kaz Kylheku)
Re: kernel in C++ ("Frank V. Castellucci")
Is this config really stable in lastest 2.3.x?
Re: kernel in C++ (Oliver Bandel)
Re: MP3 Players Other Than Rio (Tyler Vallillee)
HTTP Command or Script to find web server version ("Zardoz")
Re: How to re-create a boot disk ("Steve")
scheduling disk requests (badri)
Re: kernel in C++ (Oliver Bandel)
Re: kernel in C++ ("Frank V. Castellucci")
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: kernel in C++
Reply-To: [EMAIL PROTECTED]
Date: Sat, 11 Mar 2000 18:23:30 GMT
On Sat, 11 Mar 2000 08:58:41 -0500, Manish M <[EMAIL PROTECTED]> wrote:
>I dont understand why is this such an issue. Aparently people are looking it
>the wrong way.
>
>You DONT HAVE TO USE Every damn feature of C++ at every damn level.
That is true; but it is nice for every feature of C++ to be *supported* when
you want to use it. If a feature is missing, you don't have a conforming C++
implementation.
>By the way ! at kernel level why would you want to have exception handling
>anyway ? Exception are to be thrown against a higher level code
>(application) by a Low level (OS) back to the Highlevel (application). If a
C++ exceptions are simply another flow control and information passing
mechanism that C++ programmers are accustomed to using, and which appears
in code that they may want to reuse in a given situation.
You are confusing OS/hardware exceptions with C++ exceptions. C++ exceptions
are just another programming construct, that just happens to be useful
for error handling.
Someone may want to use existing code in a given environment. If that
code uses exception handling and the environment doesn't have it, labor
has to be wasted on creating a workaround.
>What is a run time system. You use the ready made features which are just
A run time system is, essentialy, code that is needed in order to complete
compiler generated code. For example, if your processor doesn't do floating
point division, the run time support of a language which does have floating
point division would include a division function. The compiler will generate
calls to this division function in places where it would otherwise emit a
divide instruction, were it available.
>given to you by a library. In C it just a statically liked library, which is
>not much but a set of functions created out of the same basic assembly
>blocks, working under.
It typically is a statically linked library, yes. For example in the case
of gcc, you have libgcc.a. This library also contains support for C++
excpetion handling. But note that libgcc.a is not used in the kernel, which has
its own run time support.
>"static" was actualy a relief to me because I found that I can have
>confined+global functions. It was nice to see that those function are
>bundled togather and not just hanging around. Additionally they could access
>encapsulated data but be available just like C function along with being a
>part of a class, without having to spawn/instantiate an object.
>
>static variable is a nice way to reutilize data, a global variable with
>automatic creation and deletion (can you do that in C ? without using any
>malloc or xyz_alloc).
File scope class objects are a huge pain C++, because the order of construction
is unspecified. This type of allocation for class objects is only suitable for
objects that don't have dependencies to other global objects.
In standard C, there is thankfully no way to write code that is executed prior
to main() being called.
>If you look at the genetics of C++ it is pure C only with on more more layer
>of management that is Classes.
Your understanding of what C++ is is about 20 years out of date (assuming you
are even that old); it was around that time when C++ was still called ``C with
classes''. Modern C++ has features like templates, name spaces, exception
handling, operator overloading and run-time type identification.
>Actually purely speaking even Event programming is NOT A PART OF C++. Thats
>why Microsoft had to write macros calles message maps. And Borland had to
>deviate from specs by making ret_type class::Foo() = xyz;. Which was not
>accepted as an extension to C++ later by ANSI. Basically an external call, &
>direct invoking of a non static member function of a class is against the
>basic idea of objects and encapsulation.
Not really; that is what pointer-to-member does:
void (Class::* pmemb)() = &Class::Function;
Class instance;
// ...
(instance.*pmemb)(); // invokes instance.Function()
Between pointer-to-member and ordinary method invocations, I don't think
there is anything missing.
>Event programing is a characterstic
>of OS not language and C++ had to simply bend itself to adopt.
And your evidence for this is the existence of some atrocious macro hacks in
MFC, and some obscure extension in Borland compilers?
--
#exclude <windows.h>
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: kernel in C++
Reply-To: [EMAIL PROTECTED]
Date: Sat, 11 Mar 2000 18:28:25 GMT
On Sat, 11 Mar 2000 11:16:13 -0500, Manish M <[EMAIL PROTECTED]> wrote:
>I like your argument,
>
>But this thread raises a question whether an OOP (language) is a suitable
>language ?
>
>I think the trend is moving towards OOP.
Actually, programmers have been using OOP techniques for decades, and languages
with OOP support have been around for decades as well.
>When the UNIX was written the OOP wasnt realised.
Correction: when early UNIX was being developed, OOP wasn't realized *in the
programming language*. It was realized in the code. Just like it is realized in
the Linux kernel.
Want to see multiple inheritance? Look no further than PPP: it is both
a-kind-of tty line discipline and a-kind-of network device.
--
#exclude <windows.h>
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: kernel in C++
Reply-To: [EMAIL PROTECTED]
Date: Sat, 11 Mar 2000 18:33:25 GMT
On 11 Mar 2000 16:26:03 +0000, David Wragg <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] (Christopher Browne) writes:
>> Standards-conforming C and C++ programs run within an environment that
>> starts *before* you start main(), and which terminate (if they *do*
>> terminate) *after* main().
>
>Not quite. The C standard defines two kinds of conformaing
>implementation: Hosted and freestanding. A freestanding implementation
>only has a subset of the standard library, and the entry point to the
>program is impementation defined (i.e. no main).
This does not contradict what Chris is saying. He is talking about programs,
you are talking about language implementations implementations. Freestanding
programs that depend on non-standard features (like a different name for the
startup function) are not the conforming programs that Chris is talking about.
--
#exclude <windows.h>
------------------------------
Date: Sat, 11 Mar 2000 13:48:24 -0500
From: "Frank V. Castellucci" <[EMAIL PROTECTED]>
Subject: Re: kernel in C++
Alexander Viro wrote:
>
> In article <[EMAIL PROTECTED]>,
> Frank V. Castellucci <[EMAIL PROTECTED]> wrote:
> >Mark Hahn wrote:
> >>
> >> > A C++ interface, and abstraction of key parts is quite desirable.
> >>
> >> mere syntactic sugar.
> >
> >A typical response.
>
> No, the typical responce to your ilk is different. Here:
>
> *PLONK*
>
> --
> "You're one of those condescending Unix computer users!"
> "Here's a nickel, kid. Get yourself a better computer" - Dilbert.
For that matter, every interface point to the kernel is syntactic sugar.
The OS has to provide SOME metaphor to the caller.
C just makes it easier than assembler. Makes it easier to maintain,
read, add add. The compiler is doing the work with the general exception
of the assembler specific code. This can be said for ANY third
generation language.
Did Linux have to be in C? No it did not. It could have been in pure
assembler. Why is it in C? I don't know the details but I would guess
that:
1. It happened to be the language of choice/study for Linus.
2. There happened to be a large number of people who could contribute as
C was the language they understood most, and who were looking for
someone to get the ball rolling on a alternative to Unix, et. al.
3. It is readable, maintainable, and the compilers back then were
considered mature enough to handle it.
I loaded it about 10 years ago when I was into writing operating
systems. If it had been in C++ then I would have disregarded it and
looked for a assembler or C os to play with.
Times change.
It is the paradigm that C++ and other OO languages present that make it
a interesting proposition.
--
Frank V. Castellucci
------------------------------
From: <[EMAIL PROTECTED]>
Subject: Is this config really stable in lastest 2.3.x?
Date: 11 Mar 2000 20:05:12 GMT
Hi all
I would like to know if LVM is stable enough currently...
maybe also I'll use devfs
The system is an AMD K6-2 uni-processor system with Ultra-Ata 66 (UDMA2)
hard disk with a _non Ultra-Ata 66/UDMA2 capable_ board (Asus P5 A/AB)
wich uses the Aladin 15xx chipset
Any comments/suggestions will be greatly appreciated
please send me a CC: to [EMAIL PROTECTED]
Thanks in advance
Ulisses
PD: the system uses Debian (frozen)
Debian/GNU Linux: a dream come true
=============================================================================
"Computers are useless. They can only give answers." Pablo Picasso
------------------------------
From: Oliver Bandel <[EMAIL PROTECTED]>
Subject: Re: kernel in C++
Date: 11 Mar 2000 20:08:58 +0100
Alexander Viro <[EMAIL PROTECTED]> wrote:
> In article <eksy4.9445$[EMAIL PROTECTED]>,
> Manish M <[EMAIL PROTECTED]> wrote:
>>I dont understand why is this such an issue. Aparently people are looking it
>>the wrong way.
>>You DONT HAVE TO USE Every damn feature of C++ at every damn level.
>>
>>C++ has about 3 levels of programming. All ment for different context. I can
>>have a class, (C++), with a function,(C), with assembly, (C-- :), code
>>inside it.
>>
>>Use C++ features for larger objects where the high level rules are to be
>>defined. Hey guys do you think JAVA is a mistake.
> Java is less bloated, but yes, it _is_ a mistake in many cases. It's definitely
> used _way_ out of its natural domain, mostly because PHBs (who know squat about
Java is no programming language, it's PR only; you can call it spam.
Ciao,
Oliver
P.S.: Interesting comparison of programming in different languages:
http://wwwipd.ira.uka.de/~prechelt/Biblio/jccpprtTR.ps.gz
--
Bill Gatyes is merely a pawn in the U.S. Government's ChessGame.
(Jon Perry in comp.lang.tcl)
------------------------------
From: Tyler Vallillee <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: MP3 Players Other Than Rio
Date: Sat, 11 Mar 2000 21:04:35 GMT
Unfortunately, from what I understand the Lyra needs RCA's special
software to write to it... it does not store plain MP3's but "secure"
MP3's that only the player can decode (remember RCA is a large
record label too).
If you have a 64 MB flash card, either get a digital camera or sell
it. I wanted to use a Lyra too (for the same reason) but had no luck.
This was a couple months ago, so the situation may have changed
FWIW.
Tyler
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Christopher Browne) wrote:
> My agenda is rather oriented towards the question of whether any
> support is known of for the RCA Lyra. It supports CompactFlash cards,
> with rather more potential capacity than the 32MB (expandable to 64MB)
> of most of the players that are available now.
>
> [Further agenda: I accidentally wound up with a 64MB CompactFlash
> card, and wouldn't mind finding it useful for something...]
>
------------------------------
From: "Zardoz" <[EMAIL PROTECTED]>
Crossposted-To:
alt.os.linux.slackware,comp.os.linux.development.apps,comp.os.linux.networking,comp.os.linux.security
Subject: HTTP Command or Script to find web server version
Date: Fri, 10 Mar 2000 16:12:44 -0600
Hi.
Sorry about the cross-post, but I'm in a hurry.
I need an HTTP command or a Perl script or something that will tell me what
web server and version a host is running. The host is most likely a BSD 3.0
or 3.1 box, so it's probably Apache, but I want to make sure.
I've telnetted to port 80, and tried some stuff, but I can't get the web
server ver. I knew a guy who wrote a short perl script that found this out,
but he's with another company. Also port 23 is no help, and they also don't
say on their web page.
If anyone's curious, I'm doing an outside security assessment, and I have
permission to do this and everything. Any help would be very appreciated.
Also, could you please email me so I get it immediately? [EMAIL PROTECTED]
Thanks!
-H
------------------------------
Reply-To: "Steve" <[EMAIL PROTECTED]>
From: "Steve" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux.mandrake,comp.os.linux.misc
Subject: Re: How to re-create a boot disk
Date: Sat, 11 Mar 2000 22:22:54 GMT
I had this problem, I downloaded and install Boot Magic from Power Quest.
It's a graphical boot loader, which is installed and configured from
windows. Worked for me.
Steve
------------------------------
From: badri <[EMAIL PROTECTED]>
Subject: scheduling disk requests
Date: Sat, 11 Mar 2000 17:30:01 -0800
Hi,
Can anyone pls. tell me when and how disk requests are sent to the disk
controller for service ? Is there a time out associated with collection
of disk requests that are being added so that at the end of the time
interval the requests are dispatched ?
I would also like to know how I can create a kernel thread. I have a Q
of disk requests that needs to be read from periodically even as another
function writes to it. The reader has to be a separate thread that
sleeps on the a semaphore when the Q is empty and wakes up (woken by the
writer) as soon as there is something to read.
thanks a lot in advance
regards
badri
------------------------------
From: Oliver Bandel <[EMAIL PROTECTED]>
Subject: Re: kernel in C++
Date: 12 Mar 2000 00:08:50 +0100
Frank V. Castellucci <[EMAIL PROTECTED]> wrote:
> Alexander Viro wrote:
[...]
> 1. It happened to be the language of choice/study for Linus.
And why?
- It's output - the binaries - are small enough (for a small kernel)
and fast enough (a kernel should provide and not not waste ressources).
- It's precise enough for controlling details like memory management
without overhead of a big library (with features, that are'nt really
necessary but result in big and slow binaries).
- It's portable enough (instead of Assembler).
- Developping in C is faster then in Assembler.
- It's well known by a lot of programmers.
- It's (with the right compiler) easy to use assembler from within C
programs, so that performance critical parts can be written in
assembler.
- It's historically proven (UNIX) as a language for writing OS-Kernels.
Summarized it's an ideal language for writing kernels.
Is it really a problem to use higher level-ed languages only in
higher levels/layers?
What's about having different layers?
Why should a (good working and high performant) kernel be
rewritten in a higher level language? There is no need to
do that.
(Why don't you write an OS with Word-Macros?
Because you rather use TeX if you want to
be successful. :-))
Put a layer on top of the (high-performant) kernel, providing
the abstraction you miss (instead of put the higher level
things in the kernel like a fat person pressing into a small jeans.
It looks ugly and the jeans explodes if that person does his first
move...).
Modularity and layers are the flexible concepts/ideas.
The problem most people have with so-called-non-OO-Kernels
is (even if this kernels use a lot of OO-ideas, but aren't
written in their hype-language C++) is, that they have to use
system-near functions instead of libraries (or are they looking
for a good application software instead?).
The OO-Hype-people often says: it's easier to develop with
the inheritance-concept, because of code-reuse.
But why aren't there libraries, providing the missed
functionality?
If there is no need for such libraries, or if there is
no idea, what really is needed for such libraries,
how can such functionality be implemented in a kernel?
If there are no ideas what one want to do, there is no need
to select a(ny) language.
Not the language solves the problems; it's the programmer;
and the programmer only solve the problem, if he has an
idea about what the problem is. And therefore there have
to be problems at all.
But as long as there are no libraries solving the problems
that are (supposed to be) missed in the kernel, even if it
could be solved in such a library (no need for kernel space...),
why should one change the strategy of programming the kernels
in the is-good-proven way?
It's ok to think about maybe optimzing kernels by using
other languages; but I think it's more practical and effective,
to chose or develop a librarie, which provide missed (really missed?)
features.
...or extend the kernel's functionality; extending the functionality
is not the same as using an other programming language (with
more overhead).
The functionality must be implemented by the programmer.
And if you want a small and fast kernel, it's the best way
to use as much as needed, but as less as possible.
If one says: Computers are fast enough; overhead is no problem,
then it's no problem to develop waste-coded software ON TOP
of the kernel, if one want.
But please let the performance-loving people going the other
way.
I remember a sig, where the person said that the flight to the
moon needed the computational power of two C64; but to using
a wellknown text-program it needs the power of an pentium III
with some hundred MHz.....
Is that the way we should go?
There are several studies, which examines productivity of
IT. The result: IT does not enlarge productivity.
Well... enough text written...
Ciao,
Oliver
--
Bill Gatyes is merely a pawn in the U.S. Government's ChessGame.
(Jon Perry in comp.lang.tcl)
------------------------------
Date: Sat, 11 Mar 2000 21:50:02 -0500
From: "Frank V. Castellucci" <[EMAIL PROTECTED]>
Subject: Re: kernel in C++
Oliver Bandel wrote:
>
> Frank V. Castellucci <[EMAIL PROTECTED]> wrote:
> > Alexander Viro wrote:
> [...]
> > 1. It happened to be the language of choice/study for Linus.
>
> And why?
>
> - It's output - the binaries - are small enough (for a small kernel)
> and fast enough (a kernel should provide and not not waste ressources).
>
> - It's precise enough for controlling details like memory management
> without overhead of a big library (with features, that are'nt really
> necessary but result in big and slow binaries).
>
> - It's portable enough (instead of Assembler).
>
> - Developping in C is faster then in Assembler.
>
> - It's well known by a lot of programmers.
>
> - It's (with the right compiler) easy to use assembler from within C
> programs, so that performance critical parts can be written in
> assembler.
>
> - It's historically proven (UNIX) as a language for writing OS-Kernels.
>
> Summarized it's an ideal language for writing kernels.
Which is basically what I stated.
> Is it really a problem to use higher level-ed languages only in
> higher levels/layers?
No.
> What's about having different layers?
All operating systems do, including Linux.
> Why should a (good working and high performant) kernel be
> rewritten in a higher level language? There is no need to
> do that.
If it was all about performance, then the kernel should be written in
assembler. Period.
> Put a layer on top of the (high-performant) kernel, providing
> the abstraction you miss (instead of put the higher level
> things in the kernel like a fat person pressing into a small jeans.
> It looks ugly and the jeans explodes if that person does his first
> move...).
Please provide empirical evidence of this statement. I don't expect you
would be able to because no one has stated an approach. If I were to be
involved with using C++ as the language "above" the hardware layer, I
can assure you it wouldn't be like putting someone too large into
clothes too small. As someone else stated, you wouldn't include STL,
iostream, etc. (and I would go further and say virtual methods would be
minimized or eradicated) at this level.
> Modularity and layers are the flexible concepts/ideas.
All operating systems do, including Linux.
> The problem most people have with so-called-non-OO-Kernels
> is (even if this kernels use a lot of OO-ideas, but aren't
> written in their hype-language C++) is, that they have to use
> system-near functions instead of libraries (or are they looking
> for a good application software instead?).
I have no problem using assembler encapsulated in my classes if that is
what is needed. The question really is "Does it have to be this way?"
The objective answer is no, for the time being the pragmatic answer may
be yes, but not because of the C++ language or constructs.
> The OO-Hype-people often says: it's easier to develop with
> the inheritance-concept, because of code-reuse.
> But why aren't there libraries, providing the missed
> functionality?
Please be specific. I am currently writing a class library for Linux
that abstracts some of the system types and function. It is not clear
what functionality you are referring to.
> If there is no need for such libraries, or if there is
> no idea, what really is needed for such libraries,
> how can such functionality be implemented in a kernel?
> If there are no ideas what one want to do, there is no need
> to select a(ny) language.
> Not the language solves the problems; it's the programmer;
> and the programmer only solve the problem, if he has an
> idea about what the problem is. And therefore there have
> to be problems at all.
>
> But as long as there are no libraries solving the problems
> that are (supposed to be) missed in the kernel, even if it
> could be solved in such a library (no need for kernel space...),
> why should one change the strategy of programming the kernels
> in the is-good-proven way?
I would love to respond to this, but it seems that you are going on some
train of thought based on a potentially erroneous basis. What
functionality are you talking about?
> It's ok to think about maybe optimzing kernels by using
> other languages; but I think it's more practical and effective,
> to chose or develop a librarie, which provide missed (really missed?)
> features.
>
> ...or extend the kernel's functionality; extending the functionality
> is not the same as using an other programming language (with
> more overhead).
> The functionality must be implemented by the programmer.
> And if you want a small and fast kernel, it's the best way
> to use as much as needed, but as less as possible.
There are different programmers right? There is the system programmer,
and the application programmer. Which are you referring to.
> If one says: Computers are fast enough; overhead is no problem,
> then it's no problem to develop waste-coded software ON TOP
> of the kernel, if one want.
> But please let the performance-loving people going the other
> way.
No one is saying that.
> I remember a sig, where the person said that the flight to the
> moon needed the computational power of two C64; but to using
> a wellknown text-program it needs the power of an pentium III
> with some hundred MHz.....
>
> Is that the way we should go?
What way is that?
> There are several studies, which examines productivity of
> IT. The result: IT does not enlarge productivity.
Do you mean information technology?
C++ overhead and bloat are greatly exaggerated. If using templates or
including in one library everything but the kitchen sink means that C++
is bloated, then this is a conceptualization problem.
--
Frank V. Castellucci
http://corelinux.sourceforge.net
OOA/OOD/C++ Standards and Guidelines for Linux
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************