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

  1. Path: sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!rpi!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.92Aug25151752@jade.tufts.edu>
  6. Date: 25 Aug 92 19:27:59 GMT
  7. References: <1961cd20@p3.f67.n245.z2.fidonet.org> <TGUEZ.92Aug24191246@jade.tufts.edu>
  8.     <1992Aug25.040007.5898@cco.caltech.edu>
  9. Sender: news@news.tufts.edu (USENET News System)
  10. Organization: Tufts University - Medford, MA
  11. Lines: 220
  12. In-Reply-To: heathh@cco.caltech.edu's message of 25 Aug 92 04:00:07 GMT
  13.  
  14. In article <1992Aug25.040007.5898@cco.caltech.edu> heathh@cco.caltech.edu (Heath Ian Hunnicutt) writes:
  15.  
  16. >       Sorry.  There is no hidden malloc in GlobalAlloc.  In fact,
  17. >   GlobalAlloc manipulates the appropriate data structures (Descriptor
  18. >   Tables, Global Arena Handler, and BurgerMaster) directly, in 
  19. >   order to set aside memory for your app.  (Addendum: Win 3.1 does
  20. >   not hack on the Descriptor Tables, but calls DPMI 0.9 instead.  This
  21. >   has added to the robustness of Win 3.1, but DPMI is still part of
  22. >   windows, just an extra layer of internal abstraction...)
  23.  
  24. Well it was my guess that there is something like malloc underneath.
  25. You put it nicely, "internal abstraction," everythig in windows API
  26. seemed to be aimed at an "internal abstraction." (I might add that
  27. they done a pertty good job at that).  However, this is nothing more
  28. than the definition of over 600 primitives-- My point will be come
  29. clearer as you read ahead.
  30.  
  31. >       THE ONLY DOS CALLS THAT WINDOWS MAKES ARE FOR FILE  MANIPULATION.
  32. >   few things that DOS can do well, and, for the most part, Windows
  33. >   lets it go ahead and handle that.  (32-bit access is an exception
  34. >   to this, but DOS is still used to open and close the files.)   
  35. >
  36. >       Windows intercepts and virtualizes:
  37. The way the sentence is phrased makes one think that windows
  38. virtualizes like an operating system virtualizes.  Yet, this is all
  39. nothing more than a layer of primitives.  You have to use window's
  40. primitives to fell this "virtualization" try accessing any of these
  41. things you mention directly and see how much of virtualization windows
  42. truely provides.
  43.  
  44.  
  45. >
  46. >   * All non-disk peripherals.  Keyboard, mouse, video, comm ports, printer,
  47. >       sound board, are all isolated from DOS, and managed by 
  48. >       Windows.
  49. >
  50. >   * Many of the DOS software services.  For example, the Get/Set PSP
  51. >       calls are intercepted by Windows, which returns appropriate
  52. >       info.
  53. >
  54. >   * Some disk access.  (Via 32-bit access)
  55. >
  56. >       So, windows is an operating system, with DOS as a file
  57. >   system device driver.
  58. >
  59. >       You know what would be neat?  If I could set SHELL=C:\windows\
  60. >   in my CONFIG.SYS.  I tried it, but the path wasn't set up yet, so 
  61. >   Windows couldn't find itself.  It would sure be nice to save the
  62. >   memory that COMMAND.COM takes up by booting straight to Windows.
  63. >
  64. >   >touch it because now you have the malloc pointer.  Yet a true
  65. >   >operating system, which supports this feature, does not care that
  66. >   >you have the actual pointer, it changes the base address of your
  67. >   >pointer on the hardware level.
  68. >       Actually, Win 3.1 changes the base address on the hardware
  69. >   level.  By abandoning real mode, Windows has gained greatly in 
  70. >   memory management abilities.  Now, you can lock that HGLOBAL once, and
  71. >   use the pointer throughout your App's life.  When you quit, just
  72. >   unlock it once.  Windows will still be able to juggle your blocks,
  73. >   it just doesn't have to have your cooperation to do it.
  74. Once more the same old same old, use window's primitves and you get
  75. the abstraction, the point is that if windows was a real operating
  76. system I could use malloc and the operating system could still juggle
  77. with my memory blocks.
  78.  
  79. >   >These API function calls are great, they hide most of the hardware and
  80. >   >they do a lot of work for you and simulate an operating systems.
  81. >   >Windows still uses msdos drivers to do things and it will continue to
  82. >   >do this.  In fact, even if MS will encorporate everything that windows
  83. >   >needs, and currently takes from dos, into windows in such a way that
  84. >   >you'll boot directly into windows and never boot dos (completely
  85. >   >remove DOS from the picture), I will still argue that windows is not
  86. >   >an operating system, and windows programs are really nothing more than
  87. >   >function calls, which is probably why it could not properly
  88. >   >multi-task:
  89. >
  90. >       Well, now there's a weird argument if ever there was one.
  91. >   If Windows is the only code that can access hardware or memory
  92. >   directly, at all times, and manages the access of user programs
  93. >   to hardware and memory, then it is DEFINITELY NOT AN OPERATING
  94. >   SYSTEM?  And what planet do you hail from, sir?
  95. You probably mis-understood what I wrote or I did not express myself
  96. clearly.  The API function, these primitives, hide the hardware and
  97. help you write software that is a little more distant from the
  98. hardware for that they are great.  They do a lot of work for you, one
  99. function call to FillRect stands for many complex lines of code, for
  100. this also they are great.
  101.  
  102. Again, the same thing.  You probably missed it but I worte, "simulate
  103. an operating system."  The fact that to open the communication port
  104. one calls OpenCom does not make windows an operating system.  In fact,
  105. in every well-designed communciation program there are primitves to
  106. access com ports that does not virtualize nor makes the program an
  107. operating system.  Windows still is a collection of 600+ primitives.
  108.  
  109.  
  110. >       Ther reason Windows cannot multitask stems from the
  111. >   design of 2.0, which could not assume hardware that made preemptive
  112. >   multitasking hardware a possibility.  Windows 3.0 has not completely
  113. >   abandoned some of the 2.0 concepts, and, as such, is stuck with
  114. >   cooperative multitasking.  However, both 4.0 and NT will support
  115. >   preemptive multitasking.
  116. WindowsNT is another issue (another operating system not a GUI),and
  117. Windows 4.0 is another story, and hay, I just read a post that says
  118. that DOS 6.0 has a few things changed to make it ready for Windows
  119. 4.0, and among other things, make some changes to DOS 6.0 so that
  120. windows 4.0 could become preemtive.  Hence, Windows does not solely
  121. use DOS as a system device driver after all.
  122.  
  123. >   >Again, I never saw any of the code for windows but it seems to me that
  124. >   >the whole "windows programs" environment is nothing more than a setup
  125. >   >like this: 
  126. >
  127. >   >loop on tasks ( simply run through a linked list of data structures)
  128. >   >  get then WinMain function pointer of the current data-structure
  129. >   >  (*func_pointer)([the winmain parameters here]) ;
  130. >   >  get next pointer 
  131. >   >end loop
  132. >       So what if it is?  That is a lot like what UNIX does, too.
  133. >   Windows also provides for interprocess communication, device
  134. >   sharing, serialization of input, virtualization of all hardware,
  135. >   file locking and sharing, true preemptive multitasking with DOS
  136. >   boxes in enhanced mode.
  137. Noooo, unix plays with the stack and does context switches and all
  138. sorts of things.  You see if the loop outlined above is a good guess
  139. of what's happending (again, never seen the source code), then the
  140. function WinMain uses the same stack as the calling program (simple
  141. function call).  Hence, in order to introduce preemptive multi-tasking
  142. there should be some arrangement to make a copy of the stack, and hold
  143. a few stocks in memory and switch between them and take care of PCLBs
  144. and all sorts of things that windows does for DOS apps but not for
  145. windows apps. 
  146.  
  147. >   >In Petzold's introduction for windows programming, he writes something
  148. >   >to the effect,"...windows will not take away the cpu from a task
  149. >   >the middle of a message processing....make's sense right?"  Of course
  150. >   >it does, windows could not take away the processing even if it
  151. >   >wanted to; All of windows "multi-tasking" is nothing more than very deep
  152. >   >function calls, so everything is on the stack and hence the message
  153. >   >(or actually the function) must finish so that the stack will come
  154. >   >back to this "ingenious" loop, and continue.   
  155. >       That's not really true.  Any app can yield, no matter
  156. >   how deep on the stack it is.  Just call GetMessage, and you've
  157. >   passed on control, without returning from your nested bunch
  158. >   of calls.  All operating system use stacks and function calls,
  159. >   that does not make them mere applications.
  160. Again that's not the point.  Sure you can inflate the stack with
  161. recursive calls that all have to unfold in the end, but that's
  162. hardly multi-tasking that's what I mean by multi-BSing.  Mutlitasking
  163. is what windows does window DOS apps.  And Again, what makes Windows
  164. an application in my view is that an emense use of API primitives does not
  165. make an appication an operating system.
  166.  
  167.  
  168. >   >I don't mean to be rude to anyone (not even Microsoft) but I am upset.
  169. >   >Somewhere in Petzold's book he says something like keep your message
  170. >   >processing short so other windows programs could run concurrently, and
  171. >   >if you have any big job to do divide your job to small parts and do it
  172. >   >with the help of the timer....  That is really disguesting, windows
  173. >   >programs need to do the job of the operating system, provide the
  174. >   >"ticks."  
  175. Here this is were all the stack calls gets annoying-- hardly an
  176. operating system approach.
  177.  
  178. >   I have still to figure out this one:  in the control
  179. >   panel, >386 enhanced setup, if you read the help about time slicning and a
  180. >   >that, it makes a soup out of the whole story and finally says that
  181. >   >ms-dos applications ("the old-applications") have a time slice setting
  182. >   >each, while windows programs share one setting.  Then, you get the
  183. >   >default of 20.  Now if you change it you get some differences in
  184. >   >behavior, but I still don't see how they could claim that windows
  185. >   >applications are actually and truely time-sliced given the discussion
  186. >   >above. 
  187. >       All windows applications are in a seperate address
  188. >   spaces from any DOS app.  (Except from the view of a VxD, which is
  189. >   hardly material here.)  *Windows programs get a time slice*, wherein
  190. >   many of them may yield, and several may execute during the interval.
  191. >   Then, DOS box 1 gets a slice, then DOS box 2, etc.,
  192. "Windows programs get a time slice" hmm... let me bite:  So there is
  193. one big frame that preemtively multi-tasks ONLY DOS APPLICATIONS like
  194. DesqView, and then there is only one dos application that always
  195. executes, i.e., the windows engine.  This DOS APPLICATION (windows
  196. engine) then dynamically links libraries that site in *.exe files and
  197. calls the WinMain of each.  Every such exe file is then really a small
  198. dos application that usually prints something that this is a win 
  199. executable file, and it has a WORD signature some were in the header of DOS
  200. executable that this is no ordernay DOS app, and then a database is
  201. attached to the end of this DOS executable.  This database is complex,
  202. includes resources, tables and more.  This DATABASE is then
  203. accessed by this DOS APPLICATION we know as the windows's engine, and
  204. it uses some type of an analog to dos overlays to load the actual
  205. library into memory (as regualr dos-like functions) and deals with the
  206. rest of this database,i.e.,resources, import/export tables and all
  207. that.  Then all these resources MUST be accessed via the
  208. primitves so widely knows as API functions, and this makes an
  209. operating system?  If this guess is correct at the core, then windows
  210. is not much different than DesqView and we have a dos application for
  211. an operating system.  As you mentioned earlier, "internal
  212. abstraction," correct internal to the dos application I refer to here
  213. as window's engine.  
  214.  
  215.  
  216. How are these function calls deferent than Borland BGI drivers?  You
  217. register the screen with the initate command and than you use their
  218. primitives.  Ture windows' API are much much more extensive but that
  219. does not make it an operating system.
  220.  
  221. >   >Therefore, I hold my position, windows is not even close to an
  222. >   >operating system.  True there are things that will make you think it's
  223. >   >an operating system, for instance, the ms-dos time sharing is very
  224. >   >nice compared to the windows apps "time BSing" but then you never hear
  225. >   >of DesqView held as an operating system.
  226. >       Windows has one up on DesqView because it runs 
  227. >   protected-mode executables, allows for many of the features described
  228. >   above, and requires native apps to use Windows services.  DesqView
  229. Native apps....  there are native libraries more likely.
  230.  
  231.  
  232.  
  233. -Tomer
  234.