[25% OT] C library integral part of OS/kernel???

  • Thread starter Romeo Colacitti
  • Start date
E

Eric Sosman

Dan said:
[I wrote; attribution lost]
Well, that's not always true. A fairly common counter-
example is the inline expansion of some "simple" Standard
library functions like sqrt() or memcpy(). An implementation
that performs such inlining may generate an executable with
as many "copies" of sqrt() as there are calls to it -- and
perhaps yet another, to be called via a function pointer!

A possibility I have *explicitly* mentioned myself in the text you
have not included.

Ah, the perils of speed reading! My apologies.
 
M

Malloy

There two aspects to original question: dependencies and using C
runtime functions for OS kernel implementation.

I would say if you can layer OS components and RTL appropriately, you
are fine. That is for example one may have (lets say) spinlocks
dependant only on atomic functions from RTL, and later it's okay to use
spinlocks in (lets say) vsnprintf() set of functions which are part of
another RTL component. As long as dependencies are clear (in this
example it is not good to use vsnprinf() functions to debug spinlocks
component itself). It is totally possible to have an OS using just
minimal set of RTL components, or it is also possible to build more
complex system (but having well-defined architecture).

I would split the second question from the dependancy one: related to
C-language as a language which is used to implement OS'es Romeo
metioned. In my opinion second question has obvious answer: those OS'es
are implemented in C and therefore it is natural to use C runtime
functions (like sprintf) for the particular OS implementation. I would
imagine that Oberon OS (right?) uses Pascal standard output library for
output and this is totally fine.
 
M

Maxim S. Shatskih

interact with any OS resources. Or you could say that the BIOS is an
integral componant of Every OS.

BIOS a) requires the obsolete CPU mode which does not support VM and is limited
in memory addressing b) is not multitask-enabled.

That's why nearly no OSes uses BIOS for now (except for boot). From what I
know, NT uses only video BIOS, and only some drivers, and only for monitor
power management (the videocard driver calls VideoPortInt10 when it sees the
suspend/resume request for a monitor device).
 
M

Maxim S. Shatskih

Well, that's not always true. A fairly common counter-
example is the inline expansion of some "simple" Standard
library functions like sqrt() or memcpy().

MS's compiler has "intrinsic functions" which are inlined assembly
auto-generated by the compiler. memcpy() is one of them. You can switch this
off by #pragma or command-line flag.

I hope GCC also has this.
 
M

Minti

Dan said:
Nope. When an executable gets built, it contains at most one copy of
any given standard library function. With dynamic linking, it contains
no copy at all.


As long as applications don't contain the kernel code, I can't see how
the existence of two implementations of standard library functions
(one for kernel usage, one for hosted applications usage) is going to
affect the size of any application executable code.

OTOH, it is not uncommon for compilers to inline certain standard
library function calls. This does increase the executable size, but
it also accelerates the program execution.

Would the lord allow me to nitpick on the last sentence?


--
Imanpreet Singh Arora
 
M

Mark McIntyre

Are you replying to me?

Is this a quote from Taxi Driver?


(perhaps you ought to remember that
a) usenet is not a chat room, anyone can post and
b) keeping some context in is useful)
 
M

Minti

No this is not a quote from taxi driver, and whatever else you might be
thinking. BTW do you know any Operating Systems which have "C"
compilers as integral components of *any* Operating System.
 
M

Mark McIntyre

No this is not a quote from taxi driver,

It was very close tho: "you lookin' at me?"
and whatever else you might be thinking.

I was thinking that your post was utterly without context, adn your habit of
top-posting and putting a standard sig separator means its very hard to /reply/
to your posts with context. Please stop top-posting.
BTW do you know any Operating Systems which have "C"
compilers as integral components of *any* Operating System.

Yes.
 
M

Minti

Mark said:
It was very close tho: "you lookin' at me?"


I was thinking that your post was utterly without context, adn your habit of
top-posting and putting a standard sig separator means its very hard to /reply/
to your posts with context. Please stop top-posting.

Do you have anything else(better) to say? I have *never* and I repeat
*never* top-posted *except* and I repeat *except* to people who reply
either to me or to others. Seems like Joona Palaste has a better sense
of humour here.



Saying *just* yes is as good as saying no. FWIW, the question was just
meant as a remark to you that even though this aint no IRC, one must
choose the person-to-reply with a bit of thought.
 
O

Old Wolf

Minti said:
Mark said:
Minti said:
[top-posting]
Please stop top-posting.

Do you have anything else(better) to say? I have *never* and I repeat
*never* top-posted *except* and I repeat *except* to people who reply
either to me or to others.

Every message on Usenet is a reply to you or others !
(except for the start of a thread, which can't be a top-post).

How about you change your dogma to "I never top-post except
when it's appropriate". Your top-posting in this thread
was inappropriate.
 
M

Mark McIntyre

I have *never* and I repeat *never* top-posted

good. I stand corrected.
*except* and I repeat *except* to people who reply
either to me or to others.

So you only top post when replying? Eh?
Seems like Joona Palaste has a better sense
of humour here.

funnily enough, I thought my original comment to your inexplicable one-liner was
quite witty. YMMV, HAND etc
Saying *just* yes is as good as saying no.

Do tell.
FWIW, the question was just
meant as a remark to you that even though this aint no IRC, one must
choose the person-to-reply with a bit of thought.

as was my reply.
 
M

Minti

Old said:
Minti said:
Mark said:
[top-posting]

Please stop top-posting.

Do you have anything else(better) to say? I have *never* and I repeat
*never* top-posted *except* and I repeat *except* to people who reply
either to me or to others.

Every message on Usenet is a reply to you or others !
(except for the start of a thread, which can't be a top-post).

Oooooooops. Is there a bathroom nearby?

How about you change your dogma to "I never top-post except
when it's appropriate". Your top-posting in this thread
was inappropriate.


Why are we even talking about this? Go through the entire thread again,
read each post at least 153 times. "DhollingsWorth2", first topposted
me, not to mention that the reply looked ( a bit ) irrelevent[%%].
Compare, what I had said and what "DhollingsWorth2" said. If you find
them relevant, good "You are smartass and I am an asshole". If that is
what you and Mark wanted to hear.
 
K

Keith Thompson

Minti said:
Old said:
How about you change your dogma to "I never top-post except
when it's appropriate". Your top-posting in this thread
was inappropriate.


Why are we even talking about this? Go through the entire thread again,
read each post at least 153 times. "DhollingsWorth2", first topposted
me, not to mention that the reply looked ( a bit ) irrelevent[%%].
Compare, what I had said and what "DhollingsWorth2" said. If you find
them relevant, good "You are smartass and I am an asshole". If that is
what you and Mark wanted to hear.

What on Earth are you talking about? This isn't about DhollingsWorth2
(who has been criticized here at length for various things). It's
about you top-posting and then making excuses for it.

I'm glad to see that you're not top-posting now. If you want to drop
this, then drop it.
 
M

Minti

Keith said:
Minti said:
Old said:
How about you change your dogma to "I never top-post except
when it's appropriate". Your top-posting in this thread
was inappropriate.


Why are we even talking about this? Go through the entire thread again,
read each post at least 153 times. "DhollingsWorth2", first topposted
me, not to mention that the reply looked ( a bit ) irrelevent[%%].
Compare, what I had said and what "DhollingsWorth2" said. If you find
them relevant, good "You are smartass and I am an asshole". If that is
what you and Mark wanted to hear.

What on Earth are you talking about? This isn't about DhollingsWorth2
(who has been criticized here at length for various things). It's
about you top-posting and then making excuses for it.

I'm glad to see that you're not top-posting now. If you want to drop
this, then drop it.

Keith, I earnestly apologise, but I think _nobody_ has understood
"What-the-Hell" I am trying to SAY.

In simple words.

"If somebody top-posts ME, I will without thought, without
consideration, without shame, top-post him back."


If anybody considers it to be an excuse, so be it. I consider it to be
a way of life.
 
C

CBFalconer

Minti said:
.... snip ...

In simple words.

"If somebody top-posts ME, I will without thought, without
consideration, without shame, top-post him back."

If anybody considers it to be an excuse, so be it. I consider it
to be a way of life.

This is not e-mail. If you wish to reply to an individual you can
do so with e-mail, top-post as you wish, and not annoy anybody
else.

Usenet is a public place, and articles are for all. Top-posting is
rude and foolish. If you do it automatically you are simply being
rude to the great majority. Get in the habit of correcting
top-posting, and you may start to contribute something. If you are
not willing to do this, don't bother with a reply in the newsgroup.
 
K

Keith Thompson

Minti said:
Keith Thompson wrote: [...]
What on Earth are you talking about? This isn't about
DhollingsWorth2 (who has been criticized here at length for various
things). It's about you top-posting and then making excuses for
it.

I'm glad to see that you're not top-posting now. If you want to drop
this, then drop it.

Keith, I earnestly apologise, but I think _nobody_ has understood
"What-the-Hell" I am trying to SAY.

In simple words.

"If somebody top-posts ME, I will without thought, without
consideration, without shame, top-post him back."


If anybody considers it to be an excuse, so be it. I consider it to be
a way of life.

Ok, now I understand what you're trying to say. It's wrong, but I
understand it.

Nobody can "top-post you", and you cannot "top-post him back".

This is a newsgroup, not e-mail. Everything you write here will be
read by many people, not just by the person who wrote the article to
which you happen to be posting a followup. Top-posting is not
acceptable here under any circumstances.

By top-posting, you are being rude to all of us; whether the previous
poster top-posted is not at all relevant. Both of you will be flamed,
and we couldn't care less who started it.

When we post a followup to a top-posted article, we usually correct
the top-posting by rearranging the quoted text (and ask the poster not
to top-post). If you don't want to take the time to do that, just
don't post a followup (or snip the nested quotations if doing so
leaves enough context). If you want to have a private conversation,
with your text formatted any way you like, use e-mail. If you want to
post to this newsgroup, please follow the conventions we use here.

Once again, top-posting in comp.lang.c is *never* acceptable,
regardless of what anyone else has done, regardless of whom or what
you're replying to.

(I don't mean to imply that top-posting is some horrible crime. A
single instance is often the result of excusable, and curable,
ignorance; persistent top-posting is rude, but the punishment won't
exceed flaming and possible kill-filing.)

Now do you understand?
 
M

Minti

Keith said:
Minti said:
Keith Thompson wrote: [...]
What on Earth are you talking about? This isn't about
DhollingsWorth2 (who has been criticized here at length for various
things). It's about you top-posting and then making excuses for
it.

I'm glad to see that you're not top-posting now. If you want to drop
this, then drop it.

Keith, I earnestly apologise, but I think _nobody_ has understood
"What-the-Hell" I am trying to SAY.

In simple words.

"If somebody top-posts ME, I will without thought, without
consideration, without shame, top-post him back."


If anybody considers it to be an excuse, so be it. I consider it to be
a way of life.

Ok, now I understand what you're trying to say. It's wrong, but I
understand it.

Nobody can "top-post you", and you cannot "top-post him back".

This is a newsgroup, not e-mail. Everything you write here will be
read by many people, not just by the person who wrote the article to
which you happen to be posting a followup. Top-posting is not
acceptable here under any circumstances.
Thanks.

By top-posting, you are being rude to all of us; whether the previous
poster top-posted is not at all relevant. Both of you will be flamed,
and we couldn't care less who started it.

When we post a followup to a top-posted article, we usually correct
the top-posting by rearranging the quoted text (and ask the poster not
to top-post). If you don't want to take the time to do that, just
don't post a followup (or snip the nested quotations if doing so
leaves enough context). If you want to have a private conversation,
with your text formatted any way you like, use e-mail. If you want to
post to this newsgroup, please follow the conventions we use here.

Once again, top-posting in comp.lang.c is *never* acceptable,
regardless of what anyone else has done, regardless of whom or what
you're replying to.

(I don't mean to imply that top-posting is some horrible crime. A
single instance is often the result of excusable, and curable,
ignorance; persistent top-posting is rude, but the punishment won't
exceed flaming and possible kill-filing.)

Now do you understand?

I think I do. BTW, I never meant to be rude with you or anybody else. I
earnestly apologize if I did end up.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,835
Latest member
lila30

Latest Threads

Top