From: tguez@jade.tufts.edu (Name)
Newsgroups: comp.os.ms-windows.misc
Subject: Re: Windows == OS     1/
Date: 28 Aug 92 18:34:32 GMT
Organization: Tufts University - Medford, MA

>   Not true!  I do this everyday in my Windows programming - and I work
>   exculsivley in large model - everything is far.  I can malloc huge
>   amounts of memory, all with different DS values.  Windows juggles them
>   just fine.  See, the pointer you get from Windows when you malloc is
>   not a pointer to a physical chunk of memory... instead of the
>   segment:offset you get with DOS, you get a segment_selector:offset
>   pointer.  This is "virtualization", as you are using the term.  Since
>   Windows maintains a table that converts the segment selector to the
>   actual physical segment, Windows can "move" segments around at will,
>   without ever invalidating your pointers.  Just like Unix.  I ask
>   again, how the heck else do you implement virtaul memory???  And
>   Windows certainly has virtual memory.
Ok, if this is 100% correct and there is nothing else to say about
windows and virtual-memory then why is it that windows must (and does)
return the dos application to the same exact memory location it was
swapped out from.  If what you say is complete and accurate windows
should be able to move DOS apps all around and have no trouble with
them in that respect.

>   I agree with your commentary about DOS.  I completely disagree with
>   your opinions on Windows virtual memory... and it seems you don't have
>   a good idea how virtual memory works in either Windows or Unix.  In
>   either case, memory is divided up into "pages".  If a process in
>   either Windows or Unix makes a reference to a page that isn't
>   currently in physical memory, then the OS gets that page from disk,
>   and determines which was the least recently used (or similar
	[some correct stuff deleted]
>   Tomer, I *highly* recommend that you read the WIndows Resource Kit
>   manual for Windows 3.1, and you will find that a lot of your
>   assumptions about how Windows operates are incorrect.
Exactly these are assumptions based on experiments that show windows
not to be an operating system.  Although it would do me good to get
to know window's specifics but there is really no need.  Let me quote
email exchages between me and a microsoft programmer that seems to
know the internals of windows well and see what I mean, actually I'll
quote them after the next paragraph (wrong! I don't use...) and your response.

>     >WRONG! I don't use DOS as an example of what a true OS CAN do.  I
>     >highlight things that an opearting system takes care of and show that
>     >windows is still a child to DOS;  In that DOS is the operating system
>     >opearting the PC, when you use windows.  I have never presented DOS as
>     >THE operating system.
>
>   Hmmm... you are partly right here. Windows is a child of DOS in that
>   it needs DOS to boot the system up.  After Windows is run, though, it
>   takes over *all* operating system services *except* for some file
>   management services.  DOS has nothing to do with the way Windows
>   manages memory or resources, except for some parts of the file system.
>   Thus, the original argument, which was "is Windows 90% of an OS", is
>   essentially correct.  You must understand, Tomer, that since DOS is
>   not re-entrant, it cannot be responsible for a lot of the things that
>   Windows does.  Windows does *not* pass on any OS responsiblities
>   through "layers" back to DOS, except for file opening and closing.
>   Thus, DOS is no longer operating the PC when you use Windows.
>   Honestly.  Windows takes full control away from DOS.

***********************My remarks are in square ([]) brakets **********
                                        -------------------
        ---------------                 Windows Application
        DOS application                 -------------------
        ---------------                        |
               |                        -------------------
               |                        Windows API layer
               |
               |                        Device drivers
               |                        Scheduler
               |                        Memory manager
               |                        -------------------
               |                           |   |
               |        ---------------------- |
               |        Windows device drivers |
               |        ---------------------- |
               |                           |   |
               |                           |   |
        ----------------------------------------------------
                            V M M

                                Scheduler
                                Memory manager
                                Device drivers
                                File I/O subsystem (*)

        ----------------------------------------------------
	[ The comand interperter goes here, and you have more dos
	  applications at this level, windows relies in the shell's
	  environement varaibles and many of settings, windows is
	  already too high up to be an OP, which is supposed to be
          the lowest thing interacting with the hardware not
	  above a user interperter shell (device-drivers are a part of
          an opearting system]
            |        |
            |        |
        ---------------------
            Global TSR
        ---------------------
            |           |
        ----------------------------------------------------
                            V M M (inserts itself in between)
	[here you go, this is painful, windows sends hooks 
	 to places it should not, it has to do this because
         it tries to be more then a shell, which it is much 
         closer to].
        ----------------------------------------------------
            |           |
        -------------   |
        MS-DOS device   |
            drivers     |
        -------------   |
            |           |
        ----------------------------------------------------
                            V M M (inserts itself in between)   (z)
	[this is what I mean, it intervines, replaces and
	 disturbes the whole ms-dos operating system
	 to an extent that it should take dos out and
         replace it completely.  It looks more like an
         extension.  Don't tell me layered OS again, no
      	 layered appliations are above an interperter like
         command.com and side to side with applications.  
	 The VM operating system is the classical example
         of nestted operating system, read my last post
         to heath (just because I summarized it there
	 that is incase you are not farmiler with it)]
        ----------------------------------------------------
            |           |           |           |
        --------------------        |           |
        MS-DOS kernel               |           |
        --------------------        |           |
            |           |           |           |
        ----------------------------|           |
      VMM (inserts itself in between)           |
	same
        ----------------------------|           |
            |           |           |           |
        ----------------------------------------------------
                                ROM-BIOS
        ----------------------------------------------------	
	Windows even by-passes this right?  Is in this enough
	cruelty to dos?

| MS-DOS is not structured well, and windows sorts
| of expands,replaces,intervines, completes, layers 
| and integrates into DOS.  Windows looks more like
| a shell that breaks the rules and does more than
| what a shell supposed to do, rather then being
| an operating system.
***********************************************
This is what my "experiments" have lead me to understand (you'll saw
my experimental results in and how I picture window's diagam look like
in a post previous to that, the one were I explain virtual machines,
notice that I was right in my general conclusions, my specific
examples with malloc and all there were bad examples (my work is is
centrilized around computer theories and only ocassionally do I touch
the keyboard) as I said in the virtual machines I was mis-understood
80% and was wrong 20% in my examples that is why I burst into flames when
you judge my theoretical knowledge after mis-understanding my
responses.  

Anyway, you see how windows implants itself?


>   I think you have taken the pieces and synthesized them incorrectly,
>   Tomer.  Or rather, you were given misleading peices to work with.
>   Improvising does not mean just guessing and hoping that you are
>   correct.  And one deosn't need the source code to know how something
>   works.  Since I DO know something about Windows internals, I can quite
>   confidently say that Windows does not use DOS as a device driver.  The
>   ONLY thing that Windows uses DOS for is to achieve a system boot-up,
>   and for some file management.
That is answered in the diagram above.  I also do not GUESS work, if I
install a lan driver on dos, and windows uses it then there is no
question what is window's and what is not.

>   Also, some of your assumptions about what DOS 6.0 is capable of are
>   incorrect.  DOS 6.0 will NOT be multitasking.  There are,
>   supposedly,
Possibly, they are not my assumtions as I SAID they were posts that
if you wish I could quote.


Great we are doing much better now we are talking not bitting each
other.  Let's totally discard all specifics and talk more abstractly
like discussions with the VM machine post and the diagrams above.  Now
we are starting to get somewhere.

Starting to smile,
Tomer
Newsgroups: comp.os.ms-windows.misc,comp.os.ms-windows.setup