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

  1. From: Monroe.Thomas@ttlg.UUCP (Monroe Thomas)
  2. Sender: postmaster@ttlg.UUCP
  3. Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!wupost!usc!sol.ctr.columbia.edu!destroyer!ubc-cs!unixg.ubc.ca!kakwa.ucs.ualberta.ca!alberta!ttlg!postmaster
  4. Newsgroups: comp.os.ms-windows.misc
  5. Subject: Re: Windows == OS     1/
  6. Message-ID: <714962865.1@ttlg.ttlg.UUCP>
  7. Date: 27 Aug 92  16:44:10 mst
  8. Lines: 150
  9.  
  10.   >>   Once more "the same old same old", every OS should provide this exact
  11.   >>   amount of abstraction.  With Windows you CAN just malloc, Windows
  12.   >>   *will* "juggle" with your memory blocks.  How else do you think
  13.   >>   virtual memory is implemented?
  14.   >Execuse me!!!!  Windows WILL NOT touch your malloc memory blocks,
  15.   >and it will sort of juggle with your memory only with near pointers and
  16.   >that is also only because you got the same DS value; that is it does
  17.   >not play with your memory blocks in relation to your malloc calls, it
  18.   >will move your WHOLE program by changing the base address.  Compile
  19.   >in the compact or huge models where everything is far and windows will
  20.   >die a horrible death if it tried to play with it.
  21.  
  22. Not true!  I do this everyday in my Windows programming - and I work
  23. exculsivley in large model - everything is far.  I can malloc huge
  24. amounts of memory, all with different DS values.  Windows juggles them
  25. just fine.  See, the pointer you get from Windows when you malloc is
  26. not a pointer to a physical chunk of memory... instead of the
  27. segment:offset you get with DOS, you get a segment_selector:offset
  28. pointer.  This is "virtualization", as you are using the term.  Since
  29. Windows maintains a table that converts the segment selector to the
  30. actual physical segment, Windows can "move" segments around at will,
  31. without ever invalidating your pointers.  Just like Unix.  I ask
  32. again, how the heck else do you implement virtaul memory???  And
  33. Windows certainly has virtual memory.
  34.  
  35. NA>The sort of virtual memory windows provide is a joke compared to
  36.   >UNIX's virtual memory (a real OS), where whole processes get swapped
  37.   >out, readable and writable memory is swapped out.  Windows has a long
  38.   >way to go before real virtual memory support will appear.  AGGGGAIN,
  39.   >windows could not do this because it's still a slave for DOS which
  40.   >is a sorry execuse for an operating system now days.
  41.  
  42. I agree with your commentary about DOS.  I completely disagree with
  43. your opinions on Windows virtual memory... and it seems you don't have
  44. a good idea how virtual memory works in either Windows or Unix.  In
  45. either case, memory is divided up into "pages".  If a process in
  46. either Windows or Unix makes a reference to a page that isn't
  47. currently in physical memory, then the OS gets that page from disk,
  48. and determines which was the least recently used (or similar
  49. technique) for determining which page should be swapped from physical
  50. memory to disk.  Your idea that Unix swaps "whole" processes and all
  51. their associated memory out is simply incorrect.  It only swaps what
  52. it needs to, which can be any page, containing either code or data for
  53. any process.  And it is unlikely that a whole process's code or data
  54. will be in one page, since pages usually come in 4K sizes.  So at any
  55. given time, in either Windows or Unix, it is highly unlikely that if
  56. there are several processes running that any one process has all of
  57. its memory in physical memory at one time, or that any one process is
  58. entirely swapped out.  I do agree that Windows VM is not as fast as on
  59. Unix, because VM requires disk access, and remember that Windows must
  60. still use DOS (the only portion of DOS that it uses) for some disk
  61. operations.  As documented in the WIndows Resource Kit manual, the
  62. virtual memory scheme is virtually the same as any VM scheme on Unix.
  63. (ie, based on modified LRU algorithm for paged memory).
  64.  
  65. Tomer, I *highly* recommend that you read the WIndows Resource Kit
  66. manual for Windows 3.1, and you will find that a lot of your
  67. assumptions about how Windows operates are incorrect.
  68.  
  69.   >WRONG! I don't use DOS as an example of what a true OS CAN do.  I
  70.   >highlight things that an opearting system takes care of and show that
  71.   >windows is still a child to DOS;  In that DOS is the operating system
  72.   >opearting the PC, when you use windows.  I have never presented DOS as
  73.   >THE operating system.
  74.  
  75. Hmmm... you are partly right here. Windows is a child of DOS in that
  76. it needs DOS to boot the system up.  After Windows is run, though, it
  77. takes over *all* operating system services *except* for some file
  78. management services.  DOS has nothing to do with the way Windows
  79. manages memory or resources, except for some parts of the file system.
  80. Thus, the original argument, which was "is Windows 90% of an OS", is
  81. essentially correct.  You must understand, Tomer, that since DOS is
  82. not re-entrant, it cannot be responsible for a lot of the things that
  83. Windows does.  Windows does *not* pass on any OS responsiblities
  84. through "layers" back to DOS, except for file opening and closing.
  85. Thus, DOS is no longer operating the PC when you use Windows.
  86. Honestly.  Windows takes full control away from DOS.
  87.  
  88.   >>   Again, it is woefully apparent that you don't grasp what operating
  89.   >>   systems are all about.  That's OK... lots of people use OS's without
  90.   >>   understanding them.  Just because I use a car doesn't mean that I'm an
  91.   >>   expert on internal combustion engines.
  92.   >English is not my native tongue, and I have been using it on
  93.   >day-to-day basis for only two years.  Therefore, I may use the wrong
  94.   >words or I may grammatically structure a sentense that would be more
  95.   >transparent otherwise.  You should, therefore, pay much more attention to
  96.   >the essence of the argument than it's surface appearance.
  97.  
  98. You are doing very well with your English.  Keep it up!
  99.  
  100.   >Let me help you understand that paragraph: without any knowledge of
  101.   >how Windows or DOS are actually written (no source code) one must
  102.   >improvise.  Someone said that Windows 4.0 is going to introduce
  103.   >preemtive multi-tasking.  Another post said that, among other things,
  104.   >DOS 6.0 is a mutli-tasking DOS (the exact meaning of which was not
  105.   >clear).  Yet another, earlier, post said that MS is preparing DOS 6.0
  106.   >for the upcoming WINDOWS 4.0.  If you sit back now, and digest these
  107.   >three pieces of information you will see that windows cannot alone
  108.   >handle preemtive mutli-tasking (for window's apps), it needs some help
  109.   >from DOS, hence windows is NOT an operating system.  Now, again try to
  110.   >understand what I write.  I do not mean that multi-tasking equals an
  111.   >opearting system.  It should be clear to you that if you try to
  112.   >introduce multi-tasking to a non-multi-tasking environment and you
  113.   >cannot do it without making the non-mutli-tasking environment
  114.   >multi-tasking, you are seriously dependent on this non-multi-tasking
  115.   >environment, most likely to an extent of a master-slave
  116.   >relationship,i.e., Opearting System-Application.
  117.  
  118. I think you have taken the pieces and synthesized them incorrectly,
  119. Tomer.  Or rather, you were given misleading peices to work with.
  120. Improvising does not mean just guessing and hoping that you are
  121. correct.  And one deosn't need the source code to know how something
  122. works.  Since I DO know something about Windows internals, I can quite
  123. confidently say that Windows does not use DOS as a device driver.  The
  124. ONLY thing that Windows uses DOS for is to achieve a system boot-up,
  125. and for some file management.
  126.  
  127. Also, some of your assumptions about what DOS 6.0 is capable of are
  128. incorrect.  DOS 6.0 will NOT be multitasking.  There are, supposedly,
  129. hooks in place for multithreaded execution of a single process.  Also,
  130. some of the disk/file access routines are being re-written to support
  131. I/O in a multitasking environ.  This means that Windows 4.0 will
  132. probably contoinue to rely on DOS for some file management facilities.
  133.  
  134.   >If you follow this discussion, as it seems you have, you will
  135.   >encounter a post in which someone said that DOS is sort of a
  136.   >"device-driver" for windows.  So, when I write, "Hence, windows does
  137.   >not use DOS as a device-driver after all." I refer back to that to
  138.   >show that the concept of is not true, and in this particular example,
  139.   >DOS is more than a device-driver for windows.
  140.  
  141.   >>     >> So what if it is?  That is a lot like what UNIX does, too.
  142.   >>     >>   Windows also provides for interprocess communication, device
  143.   >>     >>   sharing, serialization of input, virtualization of all hardware,
  144.   >>     >>   file locking and sharing, true preemptive multitasking with DOS
  145.   >>     >>   boxes in enhanced mode.
  146.   >>     >Noooo, unix plays with the stack and does context switches and all
  147.   >>     >sorts of things.  You see if the loop outlined above is a good guess
  148.   >>     >of what's happending (again, never seen the source code), then the
  149.   >>     >function WinMain uses the same stack as the calling program (simple
  150.   >>     >function call).  Hence, in order to introduce preemptive multi-tasking
  151.   >>     >there should be some arrangement to make a copy of the stack, and hold
  152.   >>     >a few stocks in memory and switch between them and take care of PCLBs
  153.   >>     >and all sorts of things that windows does for DOS apps but not for
  154.   >>     >windows apps.
  155. >>> Continued to next message
  156.  
  157.  * OLX 2.2 * "This isn't real turtle soup," said Tom mockingly.
  158.  
  159.  * Origin: Through the Looking Glass (42:100/14)
  160.