home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / linux / 21178 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  2.2 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!sdd.hp.com!usc!howland.reston.ans.net!sol.ctr.columbia.edu!eff!world!ksr!zdenek
  2. From: zdenek@ksr.com (Zdenek Radouch)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: IMPORTANT [BUG in 0.99] Re: [ANNOUNCE]: linux version 0.99
  5. Keywords: kernel linux 0.99
  6. Message-ID: <20281@ksr.com>
  7. Date: 20 Dec 92 18:42:17 GMT
  8. References: <1992Dec14.174625.1102@galileo.cc.rochester.edu> <1992Dec14.192204.16359@klaava.Helsinki.FI> <1992Dec19.193230.282@grendel.demon.co.uk> <1992Dec19.222324.22106@klaava.Helsinki.FI>
  9. Sender: news@ksr.com
  10. Organization: Kendall Square Research Corp.
  11. Lines: 30
  12.  
  13. Lars Wirzenius writes:
  14.  
  15. [about questionable initialization of a static pointer to NULL]
  16.  
  17. >In normal C programs, yes, but the kernel is a bit special.  Like, for
  18. >instance, who is going to do the initialization?  Normally it is the
  19. >kernel (which zeroes out all memory before it is given to a user
  20. >process), the linker (which loads the pre-initialized variables from a
  21. >file, i.e. those variables which are given an explicit initializer),
  22. >and possbily the C startup code.  Trouble is, none of these are active
  23. >when the kernel is booting...
  24.  
  25. Sounds more like a slight design problem, or perhaps a "feature".
  26. Normally, the primary bootstrap code, before doing anything else, loads
  27. either itself or a kernel or a secondary boot code into memory (from a PROM
  28. or from a device). An integral part of this loading process is to initialize
  29. BSS. That way the loaded object can be written as any other piece of C code.
  30. Actually, even the loader itself can be written in C (I've written one myself),
  31. you just have to make sure there is no static data in the code.
  32.  
  33. I can't think of a reason for the kernel loader to skip the BSS initialization.
  34. And, as the bug more than clearly demonstrates, there are quite a few reasons
  35. to keep the kernel coding standard.
  36.  
  37. This reminded me that I was questioning why the linux kernel uses floating
  38. point code (I seem to remember a message posted, implying that it is used).
  39. Generally, there is no need for any floating point code in
  40. operating systems and absence of the floating point code eliminates all
  41. difficulties with handling the coprocessors or emulation code.
  42. -Z
  43.