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

  1. Path: sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!usc!sdd.hp.com!elroy.jpl.nasa.gov!nntp-server.caltech.edu!heathh
  2. From: heathh@cco.caltech.edu (Heath Ian Hunnicutt)
  3. Newsgroups: comp.os.ms-windows.misc
  4. Subject: Re: Windows == OS
  5. Message-ID: <1992Aug27.001245.10197@cco.caltech.edu>
  6. Date: 27 Aug 92 00:12:45 GMT
  7. References: <1961cd20@p3.f67.n245.z2.fidonet.org> <TGUEZ.92Aug24191246@jade.tufts.edu>     <1992Aug25.040007.5898@cco.caltech.edu>     <TGUEZ.92Aug25151752@jade.tufts.edu>     <1992Aug26.044858.25614@cco.caltech.edu> <TGUEZ.92Aug26163457@jade.tufts.edu>
  8. Sender: news@cco.caltech.edu
  9. Organization: California Institute of Technology, Pasadena
  10. Lines: 214
  11. Nntp-Posting-Host: punisher
  12.  
  13. tguez@jade.tufts.edu (Name) writes:
  14. >Let me see....  Virtualization, in my mind (with reference to this
  15. >discussion), is that the OP makes each application think it has a
  16. >certain resources all to itself without concern of other applications.
  17. >For instance, the IBM CP/M (I think this is the one) works on the
  18. >concept of virtual machines, each application feels like it has a
  19. >machine of it's own, memory of it's own, cpu of it's, tape drives of
  20. >it's own and so on.  Now stopping an application from accessing a
  21. >resource-- controling a resource-- is not virtualization.
  22.     Well, then (in your mind) you have no idea of what an OS is
  23. responsible for.  How many stinking tape drives do you think my
  24. machine has?  If Application 1 is using the tape drive, the OS
  25. should: a) Prevent App 2 from interfering.  b) Let App 2 know in
  26. some standard way why it can't open the tape drive just now.
  27.  
  28. >>       As I said, Windows 3.1 lets you do this.  If having malloc
  29. >>   makes it an OS, why not just do this:
  30. >>   #define malloc(size) GlobalLock(GlobalAlloc(GMEM_NODISCARD,(size)))
  31. >>
  32. >>       Ta,da!  I turned Windows into an OS with just one #define!
  33. >It's not the five letter combination m-a-l-l-o-c.  Malloc supposedly
  34. >get's memory from DOS.  Now, if ms-windows was an operating
  35. >system,i.e., taking over the system as an operating system and
  36. >releaving dos from it's duties, then it would of been able to juggle
  37. >with malloc memory blocks too.
  38.     Windows does not have to do it EXACTLY like DOS did in
  39. order to be an Operating System.  If that were true, Windows
  40. would have to BE DOS.
  41.  
  42.     The way Windows does it is fundamentally better than the
  43. way does handles a malloc.  DOS does not allow memory blocks to
  44. move, does not allow for virtual memory, and does not do any
  45. sort of garbage collection.  The reason for these difficiencies
  46. is due to the WAY DOS DOES MALLOC.  If Windows did it the DOS
  47. way, it too would suffer from various stupidities.
  48.     Tere is no good reason for Windows to support and manage
  49. an underlying DOS memory subsystem that has no reason to exist,
  50. and is not used.  Windows has its own memory management code, 
  51. its own way of doing things, and that is just fine.  Windows
  52. does not have to be masochistic to be an OS.
  53.  
  54. >>       Well, so does the unix _open call.  I rarely make (nor am
  55. >>   I allowed to) system calls or I/Os to the drive array, nor do
  56. >>   I ever open the raw file systems.  Yet, _open is little
  57. >>   more than a function call, which proceeds to issue an interrupt, 
  58. >>   trap, sysvect, or whatever to open a file.  How _open works
  59. >>   depends on that OS's API.  Yessiree, all OS's have APIs.
  60. >>   You're just going to have to accept that.   Just because Windows
  61. >>   uses dynamic linking and nice names like GlobalAlloc, doesn't
  62. >>   mean that it is any less an OS than any other OS.
  63. >>       Furthermore, Windows is more than an OS!  Yes, it
  64. >>   is 300% of an OS.  None of the functions provided in USER
  65. >>   and GDI have much to do with the OS aspects of it.  Yet, 
  66. >>   the functions in KERNEL and SYSTEM have all the functionality of
  67. >>   a real OS, except for managing the file system at the hardware
  68. >>level.
  69. >Unix's system calls are not the same as window's API functions.  On
  70. >unix you can use ONLY the system calls to do certain things.  For
  71. >instance try accessing process PCBs (processes control blocks)
  72. >directly in machine code without using any of UNIX system function
  73. >calls- your appllication will be terminated before you release the
  74. >return key (this is because unix takes advantage of the OPERATING
  75. >SYSTEM BIT or PRIVILEGE BIT).  Now you can freely do this on DOS, and
  76. >in ms-windows.  You can very easily play with the PCB of windows
  77. >engine itself.  This is because DOS does not take care of this (I am
  78. >sure that on 286 and up has this bit).  This means that DOS still
  79. >has a higher role than just a "device-driver for windows."  Hence,
  80. >windows does not releave DOS of it's most fundamental operating system
  81. >duties, and therefore, windows IS NOT an OP.
  82.     Well, the PCBs you refer to are created by Windows, not
  83. DOS.  They are similar to, but not the same as DOS's PSPs.  DOS
  84. is not used to create them, although calls to the DOS API are 
  85. supported by Windows. 
  86.     Not all versions of UNIX will stop you from messing with
  87. PCBs, since not all UNIX machines support memory protection.  The 286
  88. does not support it well enough to encourage anybody to write an
  89. OS that runs in more than one level on the 286.  DOS doesn't take
  90. care of protecting the PSP because DOS can run on 8086s.  Windows
  91. doesn't because it also has roots in the older processors.  Regardless,
  92. that does not keep it from being an OS, either.
  93.  
  94. >The protected mode windows is so famous for is either not the same
  95. >thing as I described in the previous paragraph or windows is not doing
  96. >the job properly because it's not windows job but DOS's job.  Just
  97. >yesterday I downloaded winvn, I executed from file-manager, and QEMM
  98. >wrote on window's screen like it did not exist, and it complained that
  99. >the CPU informed QEMM that the application *** executed a bad
  100. >instruction and it gave me the option to reboot the system.  Now if
  101. >DOS would of taken care these things like on unix, the application
  102. >would of terminated and UNIX would of cleaned up after it (more or
  103. >less) without rebooting.  Yet, it was not windows that complained, it
  104. >was QEMM which is DOS's baby.  There is another example of where DOS
  105. >still serves as an operating system were windows does not take serious
  106. >duties. 
  107.     That is really an example of you not having QEMM set up
  108. correctly, but I'd hate to pin any blame on you, who so obviously
  109. knows what an OS should do and is.  DOS is incapable of
  110. taking care of these things, and as a seperate entity from Windows,
  111. has no real place in this discussion of whether Windows is an OS.
  112. If you had set up QEMM right, or (better yet) used EMM386, you
  113. would have been given the Windows GPF dialog box.  This is the
  114. Windows analog to "Bus Error- Core dumped.) in Unix.
  115.  
  116.  
  117.  
  118. >>       What about the concept of Dynamic linking?  What about 
  119. >>   the fact that all functions must be reentrant?  And stop
  120. >>   misquoting my phrase "internal abstraction".  I did not mean
  121. >>   that it was presented to Apps, hence "internal".  I was talking
  122. >>  about DPMI, not the API.
  123. >>       Also, isn't the event-driven nature of Windows quite a bit
  124. >>   different from DOS?
  125. >Sorry about "internal abstraction."
  126.  
  127. >Dynamic Linking as you put it, is probably an extension of DOS
  128. >overlays, and is not a new thing introduced by windows.  The
  129.     Well, you probably don't know jack about dynamic linking,
  130. either.  Is UNIX's shared library concept just an extension of
  131. DOS's overlay idea?  Nope.  And DLL is much closer to shared
  132. libraries than DOS overlays.
  133.     For one thing, any app can use a DLL that has a documented
  134. interface.  Try that with DOS overlays.
  135.  
  136. >event-driven nature of windows has nothing to do with an operating
  137. >system.  X windows does exactly the same thing.  Ms-windows to dos
  138. >as x-windows is to unix.  This is much closer to the truth than
  139. >saying that ms-windows is an operating system.  This is not exactly so
  140. >because there things windows takes care of that X-Windows doesn't
  141. >touch (as should be) but still not enough to consider windows on the
  142. >same shelf with operating systems.  Here is were you should be
  143. >reminded of the argument in the above two paragraphs.
  144.  
  145.  
  146.  
  147. >>   Finally-
  148. >>    I seem to have unintentionally deleted your points about how the
  149. >>   Windows scheduling loop is not as OS-like as the one in, for example,
  150. >>   Unix.  You stated that since it doesn't switch stacks, it is not
  151. >>   really multitasking.  Well, I've got news for you:  All apps
  152. >>   have their own stack that the scheduler switches them to before
  153. >>   dispatching them.   They also have their own local heap, their own
  154. >>   data segment, etc.,
  155. >True.  Yet these are specifics that you'll have to check in the source
  156. >code for windows.  The fact that MS says in their manuals that each
  157. >application has a stack does not mean that this is literally true.  If
  158. >it is true the that windows engine is simply another DOS APPLICATION
  159. >being multi-tasking by this larger frame, which sure does explain
  160. >plenty of things, then a given windows program stack is not really
  161. >independent of this window's engine stack.  You know when you call a
  162. >function with automatic variables it simply creates them on the
  163. >current stack.  Now windows call WinMain and it must return from it
  164. >before moving to another window's application.  This simply means that
  165. >all the stack information (the private stack for each windows
  166. >application) does not really exsit it is merely created and stacked
  167. >over the single window's engine stack, which then totally unfolds when
  168. >WinMain returns and hence it looks to everybody that each window's
  169. >application has a private stock which is not true technically but is
  170. >equivelant (sp?) conceptually.  This is why I expressed an outrange
  171. >against the loop constract I have first introduced, and this is
  172. >certainly different than what UNIX does.  
  173.  
  174.     Well, you are wrong.  Windows does literally switch stacks,
  175. by loading the SS register, which you probably don't know about.
  176. Now you've gone and said that just because the docs say Windows does
  177. something one way (switch app stacks) doesn't mean it is true.
  178. Ok.  Well, neither does UNIX, and unless you show me the source code,
  179. I won't believe you, because the UNIX docs could say anything.
  180.     I KNOW THAT WINDOWS SWITCHES STACKS BETWEEN APPLICATIONS.
  181. In fact, your stack may even get thrown out to the swap file if you
  182. haven't been called in a while.  How do I know that?  By running
  183. debuggers through windows, and through windows apps.  I have seen
  184. pseudo-code of the Windows task switcher, and I can unequivicably 
  185. state that Windows does witch stacks for tasks.
  186.     So, if my app calls GetMessage() when it is, let's
  187. say 50000bytes deep on its stack(!), the app that gets control
  188. may have an entirely fresh stack, depending on where it is
  189. being resumed.
  190. >About the heap there is no problem there at all, all window's
  191. >appliation and DOS applications share one single huge heap which is
  192. >exactly the DOS's heap starting at the end of the DOS code+data (I
  193. >think at the beginning of physical memory) and end at the end of the
  194. >real memory.  In fact, I think I read someplace that if a windows
  195. >application attempts to use more heap that it declared in the *.def
  196. >file windows will increase the heap-- I am not sure though. If that is
  197. >true, then everything is truely absurde about windows because this
  198. >could mean that windows does not really care about any heap statements
  199. >and it is true that all applications simply share one huge global heap
  200. >provided by dos.
  201.  
  202.     At this point, it is becoming increasingly apparent that
  203. you have never written a Windows program.  Applications have
  204. seperate, individual local heaps.  These are accessed by LocalAlloc.
  205. What you read was probably that Windows can dynamically expand
  206. the heap, if an application over-commits it.  This is an example
  207. of something that makes Windows an OS, BTW.
  208.     All apps can also alloc off the shared heap, the so-called
  209. global heap.  NO DOS APP can use the global heap.
  210.     Global heap items are allocated and managed by Windows,
  211. not DOS.  DOS cannot use the global heap, as most of it is
  212. above 1 Megabyte.  The heap is not a DOS feature.  It is
  213. all part of the magic of Windows.
  214.  
  215.  
  216. >Don't worry about it as long as this is a civilized discussion and not
  217. >an dog-fight like what's going on in comp.os.windows.advocacy.
  218.     Well, I think this thread is starting to get a bit loopy,
  219. if you don't mind me saying so.  Why don't you go write a few
  220. Windows programs, and read a book other than Petzold, then tell
  221. me about Windows, and how it is not an OS at all.
  222.  
  223. Heath
  224.  
  225. -- 
  226. On Saturday, April 18, 1992, this .sig became self-aware.
  227.