home *** CD-ROM | disk | FTP | other *** search
- From: Monroe.Thomas@ttlg.UUCP (Monroe Thomas)
- Sender: postmaster@ttlg.UUCP
- 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
- Newsgroups: comp.os.ms-windows.misc
- Subject: Re: Windows == OS 2/
- Message-ID: <714962865.2@ttlg.ttlg.UUCP>
- Date: 27 Aug 92 16:44:12 mst
- Lines: 60
-
- >>> Continued from previous message
-
- Since DOS is not re-entrant, you have to play tricks with memory
- addresses to make DOS think its the only thing running. YOu can't
- multitask any other way than preemptively, since DOS doesn't know when
- to give up its time slice.
-
- Windows programs, up until now, have been based on another paradigm of
- mulktitasking, which has proven to be not as good as pre-emptive.
- However, each Windows app is its own separate entity, with its own
- separate stack and heap.
-
- As far as your other comments in another post concerning Dynamic
- Linking. This has nothing to do with DOS overlays, as you suggested,
- and again, this comment shows that your knowledge about Windows and
- what it does are lacking. Dynamic linking means that you don't have
- to bind in the executable code in the actual executable itself. You
- can make reference to it in another file, and when you call that
- function, Windows will use the code in the other file. This "other
- function" has a separate code segment than the caller, and also a
- different data segment, although it will share the caller's stack
- (necessary, since the DLL may be called by several different callers;
- this way the DLL has a separate stack for each different application
- that it is a part of).
-
- This brings me to your comments about the Windows stack, and how you
- believe that all windows apps stacks are just part of the main Windows
- "stack". Again, this is wrong. Each Windows app has its own
- physically separate stack, in a different segment than any stack that
- the Windows kernel might use. If the opposite were true, as you
- suggest, then it would be easy for applications to overwrite the
- "main" stack and it would be awfully inefficient to monitor this kind
- of activity to make sure you didn't violate another applications part
- of the stack. In fact, Windows does trap most illegal writes to parts
- of memory that don't belong to a particular process, but it does this
- by monitoring the segment selector of any pointer that you have.
- Also, think carefully about the structure of memory that Windows uses,
- and the maximum size of a segment in Windows: 64K. If all
- applications were to share the same stack then it would be very easy
- to exceed the 64K limit very quickly. In fact, each application's
- individual stack can grow to be as large as 64K (theoretically), but
- no larger.
-
- Which brings me to your point in another post about WinMain.
- WinMain's parameters are NOT on the same stack as any "main"
- application stack (which doesn't exist). Rather, there is the use of
- "instance thunks" which Windows uses to place the parameters on the
- application's stack.
-
- You have done a nice job of theorizing about some of the concepts, but
- frankly, you are wrong in a lot of your assumptions about what the
- functional specs for Windows are. Again, I point you to the Windows
- Resource Kit manual if you wish to gain a true understanding of what's
- going on.
-
- -Monroe
-
- * OLX 2.2 * "This isn't real turtle soup," said Tom mockingly.
-
- * Origin: Through the Looking Glass (42:100/14)
-