home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / misc / 2406 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  11.6 KB

  1. Path: sparky!uunet!olivea!bu.edu!jade.tufts.edu!news.tufts.edu!news.tufts.edu!tguez
  2. From: tguez@jade.tufts.edu (Name)
  3. Newsgroups: comp.os.ms-windows.misc
  4. Subject: Re: Windows == OS
  5. Message-ID: <TGUEZ.92Aug26163457@jade.tufts.edu>
  6. Date: 26 Aug 92 20:45:04 GMT
  7. References: <1961cd20@p3.f67.n245.z2.fidonet.org> <TGUEZ.92Aug24191246@jade.tufts.edu>
  8.     <1992Aug25.040007.5898@cco.caltech.edu>
  9.     <TGUEZ.92Aug25151752@jade.tufts.edu>
  10.     <1992Aug26.044858.25614@cco.caltech.edu>
  11. Sender: news@news.tufts.edu (USENET News System)
  12. Organization: Tufts University - Medford, MA
  13. Lines: 197
  14. In-Reply-To: heathh@cco.caltech.edu's message of 26 Aug 92 04:48:58 GMT
  15.  
  16. >       And, you took my phrase "internal abstraction" out of
  17. Oops, apologies.
  18. >   context.  What I meant was, since DPMI is part of Windows,
  19. >   whether GlobalAlloc hacks on the LDT or calls DPMI, memory 
  20. >   allocation is still being handled by windows.
  21. >       My point was that Windows makes no calls outside
  22. >   its own modules when allocating memory. i.e., it does not 
  23. >   pass the request on to DOS.
  24. That's understood and well taken, read the paragraph after the one and
  25. see why I don't think this changes anything.
  26.  
  27. >   >>       Windows intercepts and virtualizes:
  28. >   >The way the sentence is phrased makes one think that windows
  29. >   >virtualizes like an operating system virtualizes.  Yet, this is all
  30. >   >nothing more than a layer of primitives.  You have to use window's
  31. >   >primitives to fell this "virtualization" try accessing any of these
  32. >   >things you mention directly and see how much of virtualization windows
  33. >   >truely provides.
  34. >       Ok.  If you directly access the DMA controller under
  35. >   Windows, you get a GPF.  (This assumes a 386, and enhanced mode,
  36. >   the only hardware that this is possible with, running under the
  37. >   appropriate software.)  If, however, you access the UART directly,
  38. >   and are the first to do so, you will succeed, but an OpenComm on the
  39. >   same port by another app willl fail.  That is virtualization.
  40. >   Furthermore, Windows even handles DOS apps doing hardware I/O,
  41. >   and controls which task gets the access.
  42. Let me see....  Virtualization, in my mind (with reference to this
  43. discussion), is that the OP makes each application think it has a
  44. certain resources all to itself without concern of other applications.
  45. For instance, the IBM CP/M (I think this is the one) works on the
  46. concept of virtual machines, each application feels like it has a
  47. machine of it's own, memory of it's own, cpu of it's, tape drives of
  48. it's own and so on.  Now stopping an application from accessing a
  49. resource-- controling a resource-- is not virtualization.
  50.  
  51. >   >>       Actually, Win 3.1 changes the base address on the hardware
  52. >   >>   level.  By abandoning real mode, Windows has gained greatly in 
  53. >   >>   memory management abilities.  Now, you can lock that HGLOBAL once, and
  54. >   >>   use the pointer throughout your App's life.  When you quit, just
  55. >   >>   unlock it once.  Windows will still be able to juggle your blocks,
  56. >   >>   it just doesn't have to have your cooperation to do it.
  57. >   >Once more the same old same old, use window's primitves and you get
  58. >   >the abstraction, the point is that if windows was a real operating
  59. >   >system I could use malloc and the operating system could still juggle
  60. >   >with my memory blocks.>
  61. >
  62. >       As I said, Windows 3.1 lets you do this.  If having malloc
  63. >   makes it an OS, why not just do this:
  64. >   #define malloc(size) GlobalLock(GlobalAlloc(GMEM_NODISCARD,(size)))
  65. >
  66. >       Ta,da!  I turned Windows into an OS with just one #define!
  67. It's not the five letter combination m-a-l-l-o-c.  Malloc supposedly
  68. get's memory from DOS.  Now, if ms-windows was an operating
  69. system,i.e., taking over the system as an operating system and
  70. releaving dos from it's duties, then it would of been able to juggle
  71. with malloc memory blocks too.
  72.  
  73. >   >>       Well, now there's a weird argument if ever there was one.
  74. >   >>   If Windows is the only code that can access hardware or memory
  75. >   >>   directly, at all times, and manages the access of user programs
  76. >   >>   to hardware and memory, then it is DEFINITELY NOT AN OPERATING
  77. >   >>   SYSTEM?  And what planet do you hail from, sir?
  78. >   >You probably mis-understood what I wrote or I did not express myself
  79. >   >clearly.  The API function, these primitives, hide the hardware and
  80. >   >help you write software that is a little more distant from the
  81. >   >hardware for that they are great.  They do a lot of work for you, one
  82. >   >function call to FillRect stands for many complex lines of code, for
  83. >   >this also they are great.
  84. >       Well, so does the unix _open call.  I rarely make (nor am
  85. >   I allowed to) system calls or I/Os to the drive array, nor do
  86. >   I ever open the raw file systems.  Yet, _open is little
  87. >   more than a function call, which proceeds to issue an interrupt, 
  88. >   trap, sysvect, or whatever to open a file.  How _open works
  89. >   depends on that OS's API.  Yessiree, all OS's have APIs.
  90. >   You're just going to have to accept that.   Just because Windows
  91. >   uses dynamic linking and nice names like GlobalAlloc, doesn't
  92. >   mean that it is any less an OS than any other OS.
  93. >       Furthermore, Windows is more than an OS!  Yes, it
  94. >   is 300% of an OS.  None of the functions provided in USER
  95. >   and GDI have much to do with the OS aspects of it.  Yet, 
  96. >   the functions in KERNEL and SYSTEM have all the functionality of
  97. >   a real OS, except for managing the file system at the hardware
  98. >level.
  99. Unix's system calls are not the same as window's API functions.  On
  100. unix you can use ONLY the system calls to do certain things.  For
  101. instance try accessing process PCBs (processes control blocks)
  102. directly in machine code without using any of UNIX system function
  103. calls- your appllication will be terminated before you release the
  104. return key (this is because unix takes advantage of the OPERATING
  105. SYSTEM BIT or PRIVILEGE BIT).  Now you can freely do this on DOS, and
  106. in ms-windows.  You can very easily play with the PCB of windows
  107. engine itself.  This is because DOS does not take care of this (I am
  108. sure that on 286 and up has this bit).  This means that DOS still
  109. has a higher role than just a "device-driver for windows."  Hence,
  110. windows does not releave DOS of it's most fundamental operating system
  111. duties, and therefore, windows IS NOT an OP.
  112.  
  113. The protected mode windows is so famous for is either not the same
  114. thing as I described in the previous paragraph or windows is not doing
  115. the job properly because it's not windows job but DOS's job.  Just
  116. yesterday I downloaded winvn, I executed from file-manager, and QEMM
  117. wrote on window's screen like it did not exist, and it complained that
  118. the CPU informed QEMM that the application *** executed a bad
  119. instruction and it gave me the option to reboot the system.  Now if
  120. DOS would of taken care these things like on unix, the application
  121. would of terminated and UNIX would of cleaned up after it (more or
  122. less) without rebooting.  Yet, it was not windows that complained, it
  123. was QEMM which is DOS's baby.  There is another example of where DOS
  124. still serves as an operating system were windows does not take serious
  125. duties. 
  126.  
  127.  
  128.  
  129. >   >dos application that usually prints something that this is a win 
  130. >   >executable file, and it has a WORD signature some were in the header of D
  131. >   >executable that this is no ordernay DOS app, and then a database is
  132. >   >attached to the end of this DOS executable.  This database is complex,
  133. >   >includes resources, tables and more.  This DATABASE is then
  134. >   >accessed by this DOS APPLICATION we know as the windows's engine, and
  135. >   >it uses some type of an analog to dos overlays to load the actual
  136. >   >library into memory (as regualr dos-like functions) and deals with the
  137. >   >rest of this database,i.e.,resources, import/export tables and all
  138. >   >that.  Then all these resources MUST be accessed via the
  139. >   >primitves so widely knows as API functions, and this makes an
  140. >   >operating system?  If this guess is correct at the core, then windows
  141. >   >is not much different than DesqView and we have a dos application for
  142. >   >an operating system.  As you mentioned earlier, "internal
  143. >   >abstraction," correct internal to the dos application I refer to here
  144. >   >as window's engine.  
  145. >       What about the concept of Dynamic linking?  What about 
  146. >   the fact that all functions must be reentrant?  And stop
  147. >   misquoting my phrase "internal abstraction".  I did not mean
  148. >   that it was presented to Apps, hence "internal".  I was talking
  149. >  about DPMI, not the API.
  150. >       Also, isn't the event-driven nature of Windows quite a bit
  151. >   different from DOS?
  152. Sorry about "internal abstraction."
  153.  
  154. Dynamic Linking as you put it, is probably an extension of DOS
  155. overlays, and is not a new thing introduced by windows.  The
  156. event-driven nature of windows has nothing to do with an operating
  157. system.  X windows does exactly the same thing.  Ms-windows to dos
  158. as x-windows is to unix.  This is much closer to the truth than
  159. saying that ms-windows is an operating system.  This is not exactly so
  160. because there things windows takes care of that X-Windows doesn't
  161. touch (as should be) but still not enough to consider windows on the
  162. same shelf with operating systems.  Here is were you should be
  163. reminded of the argument in the above two paragraphs.
  164.  
  165.  
  166.  
  167. >   Finally-
  168. >    I seem to have unintentionally deleted your points about how the
  169. >   Windows scheduling loop is not as OS-like as the one in, for example,
  170. >   Unix.  You stated that since it doesn't switch stacks, it is not
  171. >   really multitasking.  Well, I've got news for you:  All apps
  172. >   have their own stack that the scheduler switches them to before
  173. >   dispatching them.   They also have their own local heap, their own
  174. >   data segment, etc.,
  175. True.  Yet these are specifics that you'll have to check in the source
  176. code for windows.  The fact that MS says in their manuals that each
  177. application has a stack does not mean that this is literally true.  If
  178. it is true the that windows engine is simply another DOS APPLICATION
  179. being multi-tasking by this larger frame, which sure does explain
  180. plenty of things, then a given windows program stack is not really
  181. independent of this window's engine stack.  You know when you call a
  182. function with automatic variables it simply creates them on the
  183. current stack.  Now windows call WinMain and it must return from it
  184. before moving to another window's application.  This simply means that
  185. all the stack information (the private stack for each windows
  186. application) does not really exsit it is merely created and stacked
  187. over the single window's engine stack, which then totally unfolds when
  188. WinMain returns and hence it looks to everybody that each window's
  189. application has a private stock which is not true technically but is
  190. equivelant (sp?) conceptually.  This is why I expressed an outrange
  191. against the loop constract I have first introduced, and this is
  192. certainly different than what UNIX does.  
  193.  
  194. About the heap there is no problem there at all, all window's
  195. appliation and DOS applications share one single huge heap which is
  196. exactly the DOS's heap starting at the end of the DOS code+data (I
  197. think at the beginning of physical memory) and end at the end of the
  198. real memory.  In fact, I think I read someplace that if a windows
  199. application attempts to use more heap that it declared in the *.def
  200. file windows will increase the heap-- I am not sure though. If that is
  201. true, then everything is truely absurde about windows because this
  202. could mean that windows does not really care about any heap statements
  203. and it is true that all applications simply share one huge global heap
  204. provided by dos.
  205.  
  206.  
  207. >   If I have misrepresented your views, sorry.  I'd like to quote
  208. >you,
  209. Don't worry about it as long as this is a civilized discussion and not
  210. an dog-fight like what's going on in comp.os.windows.advocacy.
  211.  
  212. Tomer
  213.