home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / ibm / pc / hardware / 34378 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  2.7 KB

  1. Xref: sparky comp.sys.ibm.pc.hardware:34378 comp.sys.mac.hardware:25007 comp.os.ms-windows.advocacy:3501
  2. Path: sparky!uunet!gatech!rpi!uwm.edu!ogicse!cs.uoregon.edu!majestix.cs.uoregon.edu!tracer
  3. From: tracer@majestix.cs.uoregon.edu (Roger M. Wilcox)
  4. Newsgroups: comp.sys.ibm.pc.hardware,comp.sys.mac.hardware,comp.os.ms-windows.advocacy
  5. Subject: Re: Windows Memory Protection (was Re: "Windoze" slow? Naah...)
  6. Message-ID: <1992Dec29.165518.25293@cs.uoregon.edu>
  7. Date: 29 Dec 92 16:55:18 GMT
  8. Article-I.D.: cs.1992Dec29.165518.25293
  9. References: <trimble.724558422@ph-meter.beckman.uiuc.edu> <1992Dec21.062031.8868@cs.uoregon.edu> <1992Dec23.223919.26720@microsoft.com>
  10. Sender: news@cs.uoregon.edu (Netnews Owner)
  11. Organization: University of Oregon Computer and Information Sciences Dept.
  12. Lines: 41
  13.  
  14. In article <1992Dec23.223919.26720@microsoft.com> georgem@microsoft.com (George Moore) writes:
  15. >tracer@majestix.cs.uoregon.edu (Roger M. Wilcox) writes:
  16. >>
  17. >>And what [Windows] replaces DOS with is actually quite a powerful OS 
  18. >>in its own right.  True, even in Protected Mode (Standard/Enhanced) 
  19. >>all applications run at privilege level 0 (Kernel level), ...
  20. >
  21. >Correction.  As of Windows 3.1, all applications, including the shell, 
  22. >GDI.DLL, and USER.DLL run in Ring 3.  Only the p-mode kernel runs 
  23. >in Ring 0.
  24.  
  25.  
  26. Privilege Level 3?
  27. Uh oh.  Then I see a potential problem in possible future releases.
  28.  
  29. Before I was aware of the existence of OpenSound(), SetVoiceNote(), and the
  30. like (thanks loads Chuck Petzold :-( ), I made Windows programs emit sounds
  31. by programming the PC speaker directly.  This meant I had to make I/O port
  32. calls (IN 60H, OUT 61H, etc.).  Upon trying these programs under Windows 3.1,
  33. I found that they ran (and emitted sounds) just fine.
  34.  
  35. This meant that, under Windows 3.1, the I/O Privilege Level (IOPL) of the
  36. processor was set to be at least as big a number as the prilivege level my
  37. applications were running under.  Now, I'm informed that Windows 3.1 runs
  38. everything except KERNEL.EXE at Privilege Level 3.
  39.  
  40. Thus, IOPL in Windows 3.1 is set to 3.
  41.  
  42. This kind of closes a potential door for even greater protection in future
  43. releases of Windows.  If IOPL were 2, instead (as in OS/2), and for the
  44. present all Windows tasks were run at Ring 2 instead of Ring 3, it would
  45. be possible to give I/O protection in future releases by running non-I/O-
  46. dependent Windows apps in Ring 3 and old, misbehaved, I/O-port-using Windows
  47. apps in Ring 2 (selected by a check box in the "Run" dialog or something).
  48.  
  49. Or does Windows 3.1 use a 80386-style I/O Port Permissions Map?
  50.  
  51. -- 
  52. Roger *M.* Wilcox   (aka Jeff Boeing)
  53. tracer@majestix.cs.uoregon.edu
  54. Aleph null bottles of beer on the wall, aleph null bottles of beer, ...
  55.