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

  1. Path: sparky!uunet!usc!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.92Aug30230551@jade.tufts.edu>
  6. Date: 31 Aug 92 03:15:58 GMT
  7. References: <197a1eea@p3.f67.n245.z2.fidonet.org>
  8. Sender: news@news.tufts.edu (USENET News System)
  9. Organization: Tufts University - Medford, MA
  10. Lines: 91
  11. In-Reply-To: Martin_Schloeter@eurologic.fido.de's message of 28 Aug 92 07:28:30 GMT
  12.  
  13. WHEN I WROTE THIS POST I ACCIDENTLY PRESSED C-C C-S AND IT WAS SENT TO
  14. BE POSTED THEREFORE I DID NOT FINISH IT.  THIS IS THE ONE THAT SHOULD
  15. BE CONSIDERED THE POST, THE OTHER ONE SHOULD BE DISCARDED.
  16.  
  17. >   N > >   makes it an OS, why not just do this:
  18. >   N > >   #define malloc(size) GlobalLock(GlobalAlloc(GMEM_NODISCARD,(size)))
  19. >   N > >
  20. >   N > >        Ta,da!  I turned Windows into an OS with just one #define!
  21. >   N > It's not the five letter combination m-a-l-l-o-c.  Malloc supposedly
  22. >   N > get's memory from DOS.  Now, if ms-windows was an operating
  23. >   N > system,i.e., taking over the system as an operating system and
  24. >   N > releaving dos from it's duties, then it would of been able to juggle
  25. >   N > with malloc memory blocks too.
  26. >   Sigh...
  27. >
  28. >   OK Simply take the MSC Compiler and write a Windows app which use malloc!
  29. >   This 
  30. >   will work! malloc well be automatically translated to the sequence 
  31. >   "LocalAlloc 
  32. >   - LocalLock".
  33. Good, refer back to my arguments that seemed stupid to you-- that
  34. gives me a swift chance to clear my name, the one you tryied so
  35. enthusastically to destroy.
  36.  
  37. The intention I had behind using malloc as an example was to show you
  38. the mess windows is doing to DOS, and this assumed you were keen to
  39. fundamental operating system concepts-- which you turnout to be a
  40. little rusty on-- and in particular the VM concept.
  41.  
  42. If windows was an operating system layered over dos, everything that
  43. happened at it's level and above would be completely under windows
  44. control-- as the defintion goes, the operating system is the ultimate
  45. controller of the underline hardware, and everything under window would
  46. be viewed as the underline hardware.  However, the fact that a malloc
  47. would allocate a memory block and windows is not able to control it
  48. (i.e. windows controls it's memory blocks with management that is
  49. above and beyond DOS's control, and the particular example I was
  50. refering to moving these malloc blocks, which windows cannot, and
  51. actually this malloc call is almost completely invisible to windows,
  52. because one does not use window's primitves here) suggests that
  53. windows is not a layered operating system (because DOS handles the
  54. memory management of the malloc block).
  55.  
  56. The explanation of the argument above (and the argument itself) is
  57. relevant to windows if and only if malloc calls are handled by DOS.  I
  58. had specifically not mention malloc blocks under dos-boxes because
  59. these are virtual dos machines, and hence, windows controls them
  60. (because windows does the virtualization here), this would again make
  61. the argument misplaced (by the way, do not confuse box-dos
  62. virtualization, and the virtulization necessary by dos to support and
  63. windows to bow to, in order to consider windows a layered operating
  64. system).  Since I have not seen any code of either DOS or Windows, and
  65. since it is not specifically mention, in any operating system books I
  66. have read during the time I studied operating systems, how malloc
  67. is really handled and implemented, I have resorted to Petzold's
  68. comment, that windows will swap out an MS-DOS box, and will have to
  69. return this MS-DOS box to the exact location whence it was swap from.
  70. This ment that windows does not virtualizes DOS machines very well (if
  71. it were these DOS-machines could be moved, since the underline
  72. hardware is virtual and can therefore be duplicated else where).  It
  73. also SUGGESTED that windows is not touching any of DOSs memory
  74. management, it leaves that to DOS.  This along with the knowledge that
  75. windows needs dos device-drivers to manage it's own memory (don't jump
  76. on me for this statement, by dos's device-drivers I mean that they are
  77. installed on DOS, and that DOS is the creature that runs them, hence
  78. windows is a slave to dos, it needs dos to survive), I decided that
  79. it is highly likely that windows will not dare to touch a malloc
  80. block, and if it di,d it would die a hurrible death and would cause the
  81. system to enter an unstable state.  
  82.  
  83. >   will work! malloc well be automatically translated to the sequence 
  84. >   "LocalAlloc 
  85. >   - LocalLock".
  86. Whatever the compiler is doing to cover up or fix windows' lack of
  87. control system-wide control (I have already explained system-wide, it
  88. follows from the definition of an operating system, which controls the
  89. whole of the underline hardware) is of no material to our discussion.
  90. I can understand why you put this statement and this argument of
  91. yours, this is the result of your misunderstanding of my arguments,
  92. and in this case, the specific malloc argument.
  93.  
  94.  
  95. >   If you write a DOS app with MSC malloc will be translated to "intr( XXX) - 
  96. >   blabla (additional stuff)".
  97. >   malloc-call on whatever OS will ALLWAYS be translated to underlaying memory>    managemant calls. There is no conceptional difference!
  98. Excellent, it is appearnt from you reply that you begin to surface.
  99. However, there is a conceptual difference because the compiler is doing
  100. these thing not an operating system.
  101.  
  102. >   Martin 
  103. Tomer
  104.