home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / misc / 2388 < prev    next >
Encoding:
Text File  |  1992-08-25  |  7.9 KB  |  159 lines

  1. Newsgroups: comp.os.ms-windows.misc
  2. Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!nntp-server.caltech.edu!heathh
  3. From: heathh@cco.caltech.edu (Heath Ian Hunnicutt)
  4. Subject: Re: Windows == OS
  5. Message-ID: <1992Aug26.044858.25614@cco.caltech.edu>
  6. Sender: news@cco.caltech.edu
  7. Nntp-Posting-Host: punisher
  8. Organization: California Institute of Technology, Pasadena
  9. References: <1961cd20@p3.f67.n245.z2.fidonet.org> <TGUEZ.92Aug24191246@jade.tufts.edu>     <1992Aug25.040007.5898@cco.caltech.edu> <TGUEZ.92Aug25151752@jade.tufts.edu>
  10. Date: Wed, 26 Aug 1992 04:48:58 GMT
  11. Lines: 146
  12.  
  13. tguez@jade.tufts.edu (Name) writes:
  14.  
  15. >In article <1992Aug25.040007.5898@cco.caltech.edu> heathh@cco.caltech.edu (Heath Ian Hunnicutt) writes:
  16.  
  17. >Well it was my guess that there is something like malloc underneath.
  18. >You put it nicely, "internal abstraction," everythig in windows API
  19. >seemed to be aimed at an "internal abstraction." (I might add that
  20. >they done a pertty good job at that).  However, this is nothing more
  21. >than the definition of over 600 primitives-- My point will be come
  22. >clearer as you read ahead.
  23.     How do you think malloc works, anyway?  It just magically
  24. poofs some memory into existence.  Heck no, GlobalAlloc() works
  25. very much like a standard malloc would, and also much like the
  26. DOS functions for allocating memory blocks.  The only difference
  27. is in the special functionality for protected mode, along with
  28. some tracking of ownership, etc., to keep track of which memory
  29. belongs to whom.
  30.     And, you took my phrase "internal abstraction" out of
  31. context.  What I meant was, since DPMI is part of Windows,
  32. whether GlobalAlloc hacks on the LDT or calls DPMI, memory 
  33. allocation is still being handled by windows.
  34.     My point was that Windows makes no calls outside
  35. its own modules when allocating memory. i.e., it does not 
  36. pass the request on to DOS.
  37.  
  38. >>       THE ONLY DOS CALLS THAT WINDOWS MAKES ARE FOR FILE  MANIPULATION.
  39. >>   few things that DOS can do well, and, for the most part, Windows
  40. >>   lets it go ahead and handle that.  (32-bit access is an exception
  41. >>   to this, but DOS is still used to open and close the files.)   
  42. >>
  43. >>       Windows intercepts and virtualizes:
  44. >The way the sentence is phrased makes one think that windows
  45. >virtualizes like an operating system virtualizes.  Yet, this is all
  46. >nothing more than a layer of primitives.  You have to use window's
  47. >primitives to fell this "virtualization" try accessing any of these
  48. >things you mention directly and see how much of virtualization windows
  49. >truely provides.
  50.     Ok.  If you directly access the DMA controller under
  51. Windows, you get a GPF.  (This assumes a 386, and enhanced mode,
  52. the only hardware that this is possible with, running under the
  53. appropriate software.)  If, however, you access the UART directly,
  54. and are the first to do so, you will succeed, but an OpenComm on the
  55. same port by another app willl fail.  That is virtualization.
  56. Furthermore, Windows even handles DOS apps doing hardware I/O,
  57. and controls which task gets the access.
  58.  
  59.  
  60. >>       Actually, Win 3.1 changes the base address on the hardware
  61. >>   level.  By abandoning real mode, Windows has gained greatly in 
  62. >>   memory management abilities.  Now, you can lock that HGLOBAL once, and
  63. >>   use the pointer throughout your App's life.  When you quit, just
  64. >>   unlock it once.  Windows will still be able to juggle your blocks,
  65. >>   it just doesn't have to have your cooperation to do it.
  66. >Once more the same old same old, use window's primitves and you get
  67. >the abstraction, the point is that if windows was a real operating
  68. >system I could use malloc and the operating system could still juggle
  69. >with my memory blocks.
  70.  
  71.     As I said, Windows 3.1 lets you do this.  If having malloc
  72. makes it an OS, why not just do this:
  73. #define malloc(size) GlobalLock(GlobalAlloc(GMEM_NODISCARD,(size)))
  74.  
  75.     Ta,da!  I turned Windows into an OS with just one #define!
  76.  
  77. >>       Well, now there's a weird argument if ever there was one.
  78. >>   If Windows is the only code that can access hardware or memory
  79. >>   directly, at all times, and manages the access of user programs
  80. >>   to hardware and memory, then it is DEFINITELY NOT AN OPERATING
  81. >>   SYSTEM?  And what planet do you hail from, sir?
  82. >You probably mis-understood what I wrote or I did not express myself
  83. >clearly.  The API function, these primitives, hide the hardware and
  84. >help you write software that is a little more distant from the
  85. >hardware for that they are great.  They do a lot of work for you, one
  86. >function call to FillRect stands for many complex lines of code, for
  87. >this also they are great.
  88.     Well, so does the unix _open call.  I rarely make (nor am
  89. I allowed to) system calls or I/Os to the drive array, nor do
  90. I ever open the raw file systems.  Yet, _open is little
  91. more than a function call, which proceeds to issue an interrupt, 
  92. trap, sysvect, or whatever to open a file.  How _open works
  93. depends on that OS's API.  Yessiree, all OS's have APIs.
  94. You're just going to have to accept that.   Just because Windows
  95. uses dynamic linking and nice names like GlobalAlloc, doesn't
  96. mean that it is any less an OS than any other OS.
  97.     Furthermore, Windows is more than an OS!  Yes, it
  98. is 300% of an OS.  None of the functions provided in USER
  99. and GDI have much to do with the OS aspects of it.  Yet, 
  100. the functions in KERNEL and SYSTEM have all the functionality of
  101. a real OS, except for managing the file system at the hardware level.
  102.  
  103.  
  104. >dos application that usually prints something that this is a win 
  105. >executable file, and it has a WORD signature some were in the header of DOS
  106. >executable that this is no ordernay DOS app, and then a database is
  107. >attached to the end of this DOS executable.  This database is complex,
  108. >includes resources, tables and more.  This DATABASE is then
  109. >accessed by this DOS APPLICATION we know as the windows's engine, and
  110. >it uses some type of an analog to dos overlays to load the actual
  111. >library into memory (as regualr dos-like functions) and deals with the
  112. >rest of this database,i.e.,resources, import/export tables and all
  113. >that.  Then all these resources MUST be accessed via the
  114. >primitves so widely knows as API functions, and this makes an
  115. >operating system?  If this guess is correct at the core, then windows
  116. >is not much different than DesqView and we have a dos application for
  117. >an operating system.  As you mentioned earlier, "internal
  118. >abstraction," correct internal to the dos application I refer to here
  119. >as window's engine.  
  120.     What about the concept of Dynamic linking?  What about 
  121. the fact that all functions must be reentrant?  And stop
  122. misquoting my phrase "internal abstraction".  I did not mean
  123. that it was presented to Apps, hence "internal".  I was talking
  124. about DPMI, not the API.
  125.     Also, isn't the event-driven nature of Windows quite a bit
  126. different from DOS?
  127.  
  128.  
  129.  
  130. >How are these function calls deferent than Borland BGI drivers?  You
  131. >register the screen with the initate command and than you use their
  132. >primitives.  Ture windows' API are much much more extensive but that
  133. >does not make it an operating system.
  134.     For one thing, the BGI drivers do not support multiple
  135. applications calling them "at the same time."
  136.     However, as I said before, GDI does not make Windows an
  137. OS.  KERNEL does.  GDI and USER are for the interface, KERNEL
  138. is the OS component.
  139.  
  140. Finally-
  141.  I seem to have unintentionally deleted your points about how the
  142. Windows scheduling loop is not as OS-like as the one in, for example,
  143. Unix.  You stated that since it doesn't switch stacks, it is not
  144. really multitasking.  Well, I've got news for you:  All apps
  145. have their own stack that the scheduler switches them to before
  146. dispatching them.   They also have their own local heap, their own
  147. data segment, etc.,
  148.  
  149. If I have misrepresented your views, sorry.  I'd like to quote you,
  150. but my fumble-fingeredness got the better of me.  And if the
  151. point I represented above was something I read somewhere else, and
  152. attributed to you, sorry again.
  153.  
  154. Heath
  155.  
  156. -- 
  157. On Saturday, April 18, 1992, this .sig became self-aware.
  158.  
  159.