home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / gg243730.zip / gg243730.inf (.txt)
OS/2 Help File  |  1992-09-28  |  560KB  |  10,887 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. (C) Copyright IBM Corp. 1992 ΓòÉΓòÉΓòÉ
  3.  
  4. (C) Copyright International Business Machines Corporation 1992. All rights 
  5. reserved. 
  6.  
  7. Note to U.S. Government Users - Documentation related to restricted rights - 
  8. Use, duplication or disclosure is subject to restrictions set forth in GSA ADP 
  9. Schedule Contract with IBM Corp. 
  10.  
  11.  
  12. ΓòÉΓòÉΓòÉ 2. Cover ΓòÉΓòÉΓòÉ
  13.  
  14.  
  15. ΓòÉΓòÉΓòÉ <hidden> Title Page ΓòÉΓòÉΓòÉ
  16.  
  17.  
  18.                                                                 OS/2 Version 2.0
  19.                                                        Volume 1: Control Program
  20.  
  21.                                                     Document Number GG24-3730-00
  22.  
  23.                                                                       April 1992
  24.  
  25.  
  26.                                                          International Technical
  27.                                                                   Support Center
  28.  
  29.                                                                       Boca Raton
  30.  
  31.  
  32. ΓòÉΓòÉΓòÉ 3. Version Notice ΓòÉΓòÉΓòÉ
  33.  
  34. Take Note:  Before using this information and the product it supports, be sure 
  35.             to read the general information under Special Notices. 
  36.  
  37. First Edition (April 1992) 
  38.  
  39. This edition applies to OS/2 Version 2.0. 
  40.  
  41. Order publications through your IBM representative or the IBM branch office 
  42. serving your locality. Publications are not stocked at the address given below. 
  43.  
  44. A form for reader's comments appears at the back of this publication. If the 
  45. form has been removed, address your comments to: 
  46.  
  47. IBM Corporation, International Technical Support Center
  48. Dept. 91J, Building 235-2 Internal Zip 4423
  49. 901 NW 51st Street
  50. Boca Raton, Florida 33432 USA
  51.  
  52. When you send information to IBM, you grant IBM a non-exclusive right to use or 
  53. distribute the information in any way it believes appropriate without incurring 
  54. any obligation to you. 
  55.  
  56. MAK - Revision 1.0
  57.  
  58.  
  59. ΓòÉΓòÉΓòÉ 4. Abstract ΓòÉΓòÉΓòÉ
  60.  
  61. This document describes the Control Program component of OS/2 Version 2.0.  It 
  62. forms Volume 1 of a five volume set; the other volumes are: 
  63.  
  64.  OS/2 Version 2.0 - Volume 2:  DOS and Windows Environment, GG24-3731 
  65.  
  66.  OS/2 Version 2.0 - Volume 3:  Presentation Manager and Workplace Shell, 
  67.   GG24-3732. 
  68.  
  69.  OS/2 Version 2.0 - Volume 4:  Application Development, GG24-3774. 
  70.  
  71.  OS/2 Version 2.0 - Volume 5:  Print Subsystem, GG24-3775. 
  72.  
  73. The entire set may be ordered as OS/2 Version 2.0 Technical Compendium, 
  74. GBOF-2254. 
  75.  
  76. This document is intended for IBM system engineers, IBM authorized dealers, IBM 
  77. customers, and others who require a knowledge of the operating system features, 
  78. functions, and implementation in OS/2 Version 2.0. 
  79.  
  80. This document assumes that the reader is generally familiar with the function 
  81. provided in previous releases of OS/2. 
  82.  
  83.  
  84. ΓòÉΓòÉΓòÉ 5. Acknowledgements ΓòÉΓòÉΓòÉ
  85.  
  86. The project leader and editor for this project was: 
  87.  
  88. Hans J. Goetz
  89. International Technical Support Center, Boca Raton
  90.  
  91. The authors of this document are: 
  92.  
  93. Bill Bolton
  94. Westpac Banking Corporation, Australia
  95.  
  96. Calvin Bradshaw
  97. IBM Australia
  98.  
  99. Gert Ehing
  100. IBM Germany
  101.  
  102. Bo Falkenberg
  103. IBM Denmark
  104.  
  105. Darryl Frost
  106. ISM South Africa
  107.  
  108. Eddie Griborn
  109. IBM Sweden
  110.  
  111. Tim Sennitt
  112. IBM UK
  113.  
  114. Neil Stokes
  115. IBM Australia
  116.  
  117. Katsutoshi Suzuki
  118. IBM Japan
  119.  
  120. This publication is the result of a series of residencies conducted at the 
  121. International Technical Support Center, Boca Raton. 
  122.  
  123. This document was converted to the Information Presentation Facility by: 
  124.  
  125. Michael Kaply
  126. IBM Development Laboratories, Austin.
  127.  
  128. Thanks to the following people for the invaluable advice and guidance provided 
  129. in the production of this document: 
  130.  
  131. Craig Bennett
  132. IBM Programming Center, Boca Raton.
  133.  
  134. Sam Casto and his staff
  135. IBM Programming Center, Boca Raton.
  136.  
  137. Phil Doragh
  138. IBM Programming Center, Boca Raton.
  139.  
  140. Ari Erev
  141. IBM Israel, Hebrew Competence Group.
  142.  
  143. Alexandr Gregor
  144. International Technical Support Center, Boca Raton.
  145.  
  146. Alfredo Guti╨Ærrez
  147. IBM EMEA Education Center, Boca Raton.
  148.  
  149. Jamie Jamison
  150. IBM Programming Center, Boca Raton.
  151.  
  152. John Keenleyside
  153. IBM OS/2 C Library Development, Toronto.
  154.  
  155. Michael Kogan
  156. IBM Programming Center, Boca Raton.
  157.  
  158. Debbe McCombie
  159. IBM Programming Center, Boca Raton.
  160.  
  161. Thanks also to the many people, both within and outside IBM, who provided 
  162. suggestions and guidance, and who reviewed this document prior to publication. 
  163.  
  164. Thanks to the following people for providing excellent tools, used during 
  165. production of this document: 
  166.  
  167. Dave Hock (CUA Draw)
  168. IBM Cary.
  169.  
  170. J╨ærg von K╨önel (PM Camera)
  171. IBM Yorktown Heights.
  172.  
  173. Georg Haschek (BM2IPF)
  174. IBM Austria.
  175.  
  176.  
  177. ΓòÉΓòÉΓòÉ 6. Figures ΓòÉΓòÉΓòÉ
  178.  
  179.  The New OS/2 Version 2.0 Logo 
  180.  Evolution of OS/2 
  181.  4GB Global Linear Address Space 
  182.  Process Address Space Layout 
  183.  Address Translation - Linear Address to Physical Address 
  184.  Page Swapping 
  185.  Mapping 16:16 Memory References 
  186.  Thunk Concept 
  187.  Thunks - 16-Bit versus 32-Bit 
  188.  16:16 Shared Address Ranges 
  189.  DosDebug Function 
  190.  Sample DosDebug Function Call 
  191.  OS/2 Version 2.0 Installation 
  192.  The Initial System Configuration Screen 
  193.  Selecting Features to Install 
  194.  Configuration Details 
  195.  Installation Progress Indication 
  196.  OS/2 Version 2.0 Tutorial 
  197.  A Typical OS/2 Version 2.0 CONFIG.SYS 
  198.  OS/2 Version 2.0 I/O Related Components 
  199.  Hard Disk Layout 
  200.  FDISKPM Showing Disk One (of a Two Disk System) 
  201.  FDISKPM Showing Disk Two (of a Two Disk System) 
  202.  FDISK Utility (in Full-Screen Mode) 
  203.  Boot Manager Selection Menu 
  204.  Boot Manager Selection Menu - Advanced Mode 
  205.  80386 General, Segment, and Status Registers 
  206.  Real Mode Addressing 
  207.  Protected Mode Addressing - without Paging 
  208.  Protected Mode Addressing - with Paging 
  209.  80386 Ring-Oriented Privilege Scheme 
  210.  Virtual 8086 Environment - Memory Management 
  211.  Micro Channel Participants and Data Transfer Paths 
  212.  Basic Data Transfer Mode 
  213.  Streaming Data Mode 
  214.  Multiplexed Streaming Data Mode 
  215.  SCSI Subsystem Block Diagram 
  216.  Adapter Component Block Diagram 
  217.  SCSI BIOS Interface Block Diagram 
  218.  IBM SCSI Adapter I/O Ports 
  219.  Overview of Delivery Support 
  220.  Locate Mode Control Block Delivery Structure 
  221.  SCB Structure Used by the IBM SCSI Adapter 
  222.  
  223.  
  224. ΓòÉΓòÉΓòÉ 6.1. The New OS/2 Version 2.0 Logo ΓòÉΓòÉΓòÉ
  225.  
  226.  
  227. ΓòÉΓòÉΓòÉ 6.2. Evolution of OS/2 ΓòÉΓòÉΓòÉ
  228.  
  229.  
  230. ΓòÉΓòÉΓòÉ 6.3. 4GB Global Linear Address Space ΓòÉΓòÉΓòÉ
  231.  
  232. Note that the 32-bit region within the process address space is not used by 
  233. OS/2 Version 2.0, since "NN" is set to 512MB. 
  234.  
  235.  
  236. ΓòÉΓòÉΓòÉ 6.4. Process Address Space Layout ΓòÉΓòÉΓòÉ
  237.  
  238.  
  239. ΓòÉΓòÉΓòÉ 6.5. Address Translation - Linear Address to Physical Address ΓòÉΓòÉΓòÉ
  240.  
  241.  
  242. ΓòÉΓòÉΓòÉ 6.6. Page Swapping ΓòÉΓòÉΓòÉ
  243.  
  244.  
  245. ΓòÉΓòÉΓòÉ 6.7. Mapping 16:16 Memory References ΓòÉΓòÉΓòÉ
  246.  
  247.  
  248. ΓòÉΓòÉΓòÉ 6.8. Thunk Concept ΓòÉΓòÉΓòÉ
  249.  
  250. Note that a thunk performs services other than address translation, such as 
  251. structure and stack realignment.  See text. 
  252.  
  253.  
  254. ΓòÉΓòÉΓòÉ 6.9. Thunks - 16-Bit versus 32-Bit ΓòÉΓòÉΓòÉ
  255.  
  256.  
  257. ΓòÉΓòÉΓòÉ 6.10. 16:16 Shared Address Ranges ΓòÉΓòÉΓòÉ
  258.  
  259.  
  260. ΓòÉΓòÉΓòÉ 6.11. DosDebug Function ΓòÉΓòÉΓòÉ
  261.  
  262. DosDebug enables the calling application to control another
  263. application for debugging purposes.
  264.  
  265. #define INCL_DOSPROCESS
  266. #include <os2.h>
  267.  
  268. PVOID   pDbgBuf;          /*Pointer to the Debug Buffer Structure*/
  269. APIRET  rc;               /* Return code */
  270.  
  271. rc = DosDebug(pDbgBuf);
  272.  
  273. Return codes
  274.  
  275. DosDebug returns the following values:
  276.  
  277. 0       NO_ERROR
  278. 87      ERROR_INVALID_PARAMETER
  279. 95      ERROR_INTERRUPT
  280. 115     ERROR_PROTECTION_VIOLATION
  281.  
  282.  
  283. ΓòÉΓòÉΓòÉ 6.12. Sample DosDebug Function Call ΓòÉΓòÉΓòÉ
  284.  
  285. DbgBuf.Pid = Pid;       /* The process ID to receive the command */
  286. DbgBuf.Cmd = DBG_C_Go;  /* The command to be issued              */
  287.  
  288. rc = DosDebug (DbgBuf); /* Issue the command                     */
  289.  
  290.                         /* Display the result                    */
  291. printf("Return code = %u, command field = %u \n", rc, DbgBuf.Cmd);
  292.  
  293.  
  294. ΓòÉΓòÉΓòÉ 6.13. OS/2 Version 2.0 Installation ΓòÉΓòÉΓòÉ
  295.  
  296.  
  297. ΓòÉΓòÉΓòÉ 6.14. The Initial System Configuration Screen ΓòÉΓòÉΓòÉ
  298.  
  299.  
  300. ΓòÉΓòÉΓòÉ 6.15. Selecting Features to Install ΓòÉΓòÉΓòÉ
  301.  
  302.  
  303. ΓòÉΓòÉΓòÉ 6.16. Configuration Details ΓòÉΓòÉΓòÉ
  304.  
  305.  
  306. ΓòÉΓòÉΓòÉ 6.17. Installation Progress Indication ΓòÉΓòÉΓòÉ
  307.  
  308.  
  309. ΓòÉΓòÉΓòÉ 6.18. OS/2 Version 2.0 Tutorial ΓòÉΓòÉΓòÉ
  310.  
  311.  
  312. ΓòÉΓòÉΓòÉ 6.19. A Typical OS/2 Version 2.0 CONFIG.SYS ΓòÉΓòÉΓòÉ
  313.  
  314. 01   IFS=D:\OS2\HPFS.IFS  /CACHE:384 /CRECL:4 /AUTOCHECK:CDEFG
  315. 02   PROTSHELL=D:\OS2\PMSHELL.EXE
  316. 03   SET USER_INI=D:\OS2\OS2.INI
  317. 04   SET SYSTEM_INI=D:\OS2\OS2SYS.INI
  318. 05   SET OS2_SHELL=D:\OS2\CMD.EXE
  319. 06   SET AUTOSTART=PROGRAMS,TASKLIST,FOLDERS
  320. 07   SET RUNWORKPLACE=D:\OS2\PMSHELL.EXE
  321. 08   SET COMSPEC=D:\OS2\CMD.EXE
  322. 09   LIBPATH=.;D:\OS2\DLL;D:\OS2\MDOS;D:\;D:\OS2\APPS\DLL;
  323. 10   SET PATH=D:\OS2;D:\OS2\SYSTEM;D:\OS2\MDOS\WINOS2;
  324.         D:\OS2\INSTALL;D:\;D:\OS2\MDOS;D:\OS2\APPS;
  325. 11   SET DPATH=D:\OS2;D:\OS2\SYSTEM;D:\OS2\MDOS\WINOS2;
  326.         D:\OS2\INSTALL;D:\;D:\OS2\BITMAP;D:\OS2\MDOS;D:\OS2\APPS;
  327. 12   SET PROMPT=$i[$p]
  328. 13   SET HELP=D:\OS2\HELP;D:\OS2\HELP\TUTORIAL;
  329. 14   SET GLOSSARY=D:\OS2\HELP\GLOSS;
  330. 15   PRIORITY_DISK_IO=YES
  331. 16   FILES=20
  332. 17   DEVICE=D:\OS2\TESTCFG.SYS
  333. 18   DEVICE=D:\OS2\DOS.SYS
  334. 19   DEVICE=D:\OS2\PMDD.SYS
  335. 20   BUFFERS=30
  336. 21   IOPL=YES
  337. 22   DISKCACHE=64,LW
  338. 23   MAXWAIT=3
  339. 24   MEMMAN=SWAP,PROTECT
  340. 25   SWAPPATH=D:\OS2\SYSTEM 2048 4096
  341. 26   BREAK=OFF
  342. 27   THREADS=256
  343. 28   PRINTMONBUFSIZE=134,134,134
  344. 29   COUNTRY=001,D:\OS2\SYSTEM\COUNTRY.SYS
  345. 30   SET KEYS=ON
  346. 31   REM SET DELDIR=C:\DELETE,512;D:\DELETE,512;E:\DELETE,512;
  347.         F:\DELETE,512;G:\DELETE,512;
  348. 32   BASEDEV=PRINT02.SYS
  349. 33   BASEDEV=IBM2FLPY.ADD
  350. 34   BASEDEV=IBM2SCSI.ADD /LED
  351. 35   BASEDEV=OS2SCSI.DMD
  352. 36   BASEDEV=OS2DASD.DMD
  353. 37   REM IFS=D:\OS2\CDFS.IFS /Q
  354. 38   REM DEVICE=D:\OS2\CDROM.SYS /Q /I /N:4
  355. 39   SET BOOKSHELF=D:\OS2\BOOK
  356. 40   SET EPATH=D:\OS2\APPS
  357. 41   DEVICE=D:\OS2\APPS\SASYNCDB.SYS
  358. 42   PROTECTONLY=NO
  359. 43   SHELL=D:\OS2\MDOS\COMMAND.COM D:\OS2\MDOS /P
  360. 44   FCBS=16,8
  361. 45   RMSIZE=640
  362. 46   DEVICE=D:\OS2\MDOS\VEMM.SYS
  363. 47   DEVICE=D:\OS2\MDOS\VMOUSE.SYS
  364. 48   DOS=LOW,NOUMB
  365. 49   DEVICE=D:\OS2\MDOS\VDPX.SYS
  366. 50   DEVICE=D:\OS2\MDOS\VXMS.SYS /UMB
  367. 51   DEVICE=D:\OS2\MDOS\VDPMI.SYS
  368. 52   DEVICE=D:\OS2\MDOS\VWIN.SYS
  369. 53   DEVICE=D:\OS2\MDOS\VCDROM.SYS
  370. 54   DEVINFO=SCR,VGA,D:\OS2\VIOTBL.DCP
  371. 55   SET VIDEO_DEVICES=VIO_VGA
  372. 56   SET VIO_VGA=DEVICE(BVHVGA)
  373. 57   DEVICE=D:\OS2\MDOS\VVGA.SYS
  374. 58   DEVICE=D:\OS2\MDOS\V8514A.SYS
  375. 59   DEVICE=D:\OS2\POINTDD.SYS
  376. 60   DEVICE=D:\OS2\MOUSE.SYS
  377. 61   DEVICE=D:\OS2\COM.SYS
  378. 62   DEVICE=D:\OS2\MDOS\VCOM.SYS
  379. 63   CODEPAGE=437,850
  380. 64   DEVINFO=KBD,US,D:\OS2\KEYBOARD.DCP
  381.  
  382.  
  383. ΓòÉΓòÉΓòÉ 6.20. OS/2 Version 2.0 I/O Related Components ΓòÉΓòÉΓòÉ
  384.  
  385.  
  386. ΓòÉΓòÉΓòÉ 6.21. Hard Disk Layout ΓòÉΓòÉΓòÉ
  387.  
  388.  
  389. ΓòÉΓòÉΓòÉ 6.22. FDISKPM Showing Disk One (of a Two Disk System) ΓòÉΓòÉΓòÉ
  390.  
  391.  
  392. ΓòÉΓòÉΓòÉ 6.23. FDISKPM Showing Disk Two (of a Two Disk System) ΓòÉΓòÉΓòÉ
  393.  
  394.  
  395. ΓòÉΓòÉΓòÉ 6.24. FDISK Utility (in Full-Screen Mode) ΓòÉΓòÉΓòÉ
  396.  
  397.  
  398. ΓòÉΓòÉΓòÉ 6.25. Boot Manager Selection Menu ΓòÉΓòÉΓòÉ
  399.  
  400.  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  401.  Γöé                         Boot Manager                          Γöé
  402.  Γöé                             Menu                              Γöé
  403.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  404.  Γöé DR-DOS                                                        Γöé
  405.  Γöé OS/2 2.0                                                      Γöé
  406.  Γöé OS2 Devl                                                      Γöé
  407.  Γöé                                                               Γöé
  408.  Γöé                                                               Γöé
  409.  Γöé                                                               Γöé
  410.  Γöé                                                               Γöé
  411.  Γöé                                                               Γöé
  412.  Γöé                                                               Γöé
  413.  Γöé                                                               Γöé
  414.  Γöé                                                               Γöé
  415.  Γöé                                                               Γöé
  416.  Γöé                                                               Γöé
  417.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  418.  Γöé No selection within 30 seconds, boots OS/2 2.0                Γöé
  419.  Γöé Press Esc to disable Timer                                    Γöé
  420.  Γöé Use  or  to select. Press Enter to Boot                     Γöé
  421.  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  422.  
  423.  
  424. ΓòÉΓòÉΓòÉ 6.26. Boot Manager Selection Menu - Advanced Mode ΓòÉΓòÉΓòÉ
  425.  
  426.  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  427.  Γöé                         Boot Manager                          Γöé
  428.  Γöé                             Menu                              Γöé
  429.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  430.  Γöé DR-DOS      Disk 1    Primary     (hidden)                    Γöé
  431.  Γöé OS/2 2.0    Disk 1    Primary                                 Γöé
  432.  Γöé OS2 Devl    Disk 2    Primary                                 Γöé
  433.  Γöé                                                               Γöé
  434.  Γöé                                                               Γöé
  435.  Γöé                                                               Γöé
  436.  Γöé                                                               Γöé
  437.  Γöé                                                               Γöé
  438.  Γöé                                                               Γöé
  439.  Γöé                                                               Γöé
  440.  Γöé                                                               Γöé
  441.  Γöé                                                               Γöé
  442.  Γöé                                                               Γöé
  443.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  444.  Γöé No selection within 30 seconds, boots OS/2 2.0                Γöé
  445.  Γöé Press Esc to disable Timer                                    Γöé
  446.  Γöé Use  or  to select. Press Enter to Boot                     Γöé
  447.  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  448.  
  449.  
  450. ΓòÉΓòÉΓòÉ 6.27. 80386 General, Segment, and Status Registers ΓòÉΓòÉΓòÉ
  451.  
  452.  
  453. ΓòÉΓòÉΓòÉ 6.28. Real Mode Addressing ΓòÉΓòÉΓòÉ
  454.  
  455.  
  456. ΓòÉΓòÉΓòÉ 6.29. Protected Mode Addressing - without Paging ΓòÉΓòÉΓòÉ
  457.  
  458.  
  459. ΓòÉΓòÉΓòÉ 6.30. Protected Mode Addressing - with Paging ΓòÉΓòÉΓòÉ
  460.  
  461.  
  462. ΓòÉΓòÉΓòÉ 6.31. 80386 Ring-Oriented Privilege Scheme ΓòÉΓòÉΓòÉ
  463.  
  464.  
  465. ΓòÉΓòÉΓòÉ 6.32. Virtual 8086 Environment - Memory Management ΓòÉΓòÉΓòÉ
  466.  
  467.  
  468. ΓòÉΓòÉΓòÉ 6.33. Micro Channel Participants and Data Transfer Paths ΓòÉΓòÉΓòÉ
  469.  
  470.  
  471. ΓòÉΓòÉΓòÉ 6.34. Basic Data Transfer Mode ΓòÉΓòÉΓòÉ
  472.  
  473.  
  474.                   4 bytes   4 bytes   4 bytes   4 bytes   4 bytes
  475.  Address  ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
  476.  Bus        Γöé ADDRESS Γöé         Γöé ADDRESS Γöé         Γöé ADDRESS Γöé
  477.           ΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇ
  478.  Data     ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
  479.  Bus        Γöé         Γöé   DATA  Γöé         Γöé   DATA  Γöé         Γöé
  480.           ΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇ
  481.             ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  482.                       Γöé
  483.                       Γöé
  484.                200 nanoseconds
  485.  
  486.  
  487. ΓòÉΓòÉΓòÉ 6.35. Streaming Data Mode ΓòÉΓòÉΓòÉ
  488.  
  489.  
  490.                   4 bytes   4 bytes   4 bytes   4 bytes   4 bytes
  491.  Address  ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
  492.  Bus        Γöé ADDRESS Γöé         Γöé         Γöé         Γöé         Γöé
  493.           ΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇ
  494.  Data     ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
  495.  Bus        Γöé         Γöé  DATA   Γöé  DATA   Γöé  DATA   Γöé  DATA   Γöé
  496.           ΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇ
  497.                       ΓööΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÿ
  498.                            Γöé
  499.                            Γöé
  500.                     100 nanoseconds
  501.  
  502.  
  503. ΓòÉΓòÉΓòÉ 6.36. Multiplexed Streaming Data Mode ΓòÉΓòÉΓòÉ
  504.  
  505.  
  506.                   4 bytes   4 bytes   4 bytes   4 bytes   4 bytes
  507.  Address  ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
  508.  Bus        Γöé ADDRESS Γöé  DATA   Γöé  DATA   Γöé  DATA   Γöé  DATA   Γöé
  509.           ΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇ
  510.  Data     ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
  511.  Bus        Γöé         Γöé  DATA   Γöé  DATA   Γöé  DATA   Γöé  DATA   Γöé
  512.           ΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇ
  513.                       ΓööΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÿ
  514.                            Γöé
  515.                            Γöé
  516.                     100 nanoseconds
  517.  
  518.  
  519. ΓòÉΓòÉΓòÉ 6.37. SCSI Subsystem Block Diagram ΓòÉΓòÉΓòÉ
  520.  
  521.  
  522. ΓòÉΓòÉΓòÉ 6.38. Adapter Component Block Diagram ΓòÉΓòÉΓòÉ
  523.  
  524.  
  525. ΓòÉΓòÉΓòÉ 6.39. SCSI BIOS Interface Block Diagram ΓòÉΓòÉΓòÉ
  526.  
  527.  
  528. ΓòÉΓòÉΓòÉ 6.40. IBM SCSI Adapter I/O Ports ΓòÉΓòÉΓòÉ
  529.  
  530.                 31  30  29  28  27  26      6   5   4   3   2   1   0
  531.  Port Base    ΓöîΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ/ /ΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÉ
  532.  Address ΓöÇΓöÇΓö¼ΓöÇΓöé Command Interface Port (32 bit)                       Γöé
  533.            Γöé  ΓööΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇ/ /ΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÿ
  534.            Γöé
  535.            Γöé  7  6   5   4   3   2   1   0
  536.            Γöé  ΓöîΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÉ
  537.          +4Γö£ΓöÇΓöé    Attention Port             Γöé
  538.            Γöé  ΓööΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÿ
  539.            Γöé
  540.            Γöé  7  6   5   4   3   2   1   0
  541.            Γöé  ΓöîΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÉ
  542.          +5Γö£ΓöÇΓöé    Subsystem Control Port     Γöé
  543.            Γöé  ΓööΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÿ
  544.            Γöé
  545.            Γöé  7  6   5   4   3   2   1   0
  546.            Γöé  ΓöîΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÉ
  547.          +6Γö£ΓöÇΓöé    Interrupt Status Port      Γöé
  548.            Γöé  ΓööΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÿ
  549.            Γöé
  550.            Γöé  7  6   5   4   3   2   1   0
  551.            Γöé  ΓöîΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÉ
  552.          +7ΓööΓöÇΓöé    Command Busy/Status Port   Γöé
  553.               ΓööΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÿ
  554.  
  555.  
  556. ΓòÉΓòÉΓòÉ 6.41. Overview of Delivery Support ΓòÉΓòÉΓòÉ
  557.  
  558.  
  559. ΓòÉΓòÉΓòÉ 6.42. Locate Mode Control Block Delivery Structure ΓòÉΓòÉΓòÉ
  560.  
  561.  
  562. ΓòÉΓòÉΓòÉ 6.43. SCB Structure Used by the IBM SCSI Adapter ΓòÉΓòÉΓòÉ
  563.  
  564.          31       24          16           8           0
  565.         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  566.         Γöé  Enable Word          Γöé  Command Word         Γöé
  567.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  568.         Γöé          Logical Block Address                Γöé
  569.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  570.         Γöé          System Buffer Address                Γöé
  571.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  572.         Γöé        System Buffer Byte Count               Γöé
  573.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  574.         Γöé    Termination Status Block Address           Γöé
  575.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  576.         Γöé       Optional SCB Chain Address              Γöé
  577.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  578.         Γöé    Block Count        Γöé   Block Length        Γöé
  579.         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  580.  
  581.  
  582. ΓòÉΓòÉΓòÉ 6.44. IBM SCSI Adapter Scatter/Gather List ΓòÉΓòÉΓòÉ
  583.  
  584.          31       24          16           8           0
  585.         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  586.         Γöé         Buffer 1 Physical Address             Γöé
  587.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  588.         Γöé              Buffer 1 Byte Count              Γöé
  589.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  590.         Γöé           Buffer 2 Physical Address           Γöé
  591.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  592.         Γöé              Buffer 2 Byte Count              Γöé
  593.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  594.         Γöé                                               Γöé
  595.  
  596.         Γöé                                               Γöé
  597.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  598.         Γöé           Buffer n Physical Address           Γöé
  599.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  600.         Γöé              Buffer n Byte Count              Γöé
  601.         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  602.  
  603.  
  604. ΓòÉΓòÉΓòÉ 6.45. IBM SCSI Adapter Termination Status Block ΓòÉΓòÉΓòÉ
  605.  
  606.          31       24          16           8           0
  607.         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  608.         Γöé   Retry Counts        Γöé      End Status       Γöé
  609.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  610.         Γöé         Residual Buffer Count                 Γöé
  611.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  612.         Γöé        Residual Buffer Address                Γöé
  613.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  614.         Γöé  Command Status       Γöé 000Ch Add. Area Size  Γöé
  615.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  616.         Γöé  Command Error Code   Γöé   Device Error Code   Γöé
  617.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  618.         Γöé  Attachment Diagnostic Error Modifier         Γöé
  619.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  620.         Γöé         Cache Information Word                Γöé
  621.         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  622.         Γöé        Last SCB Physical Address              Γöé
  623.         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  624.  
  625.  
  626. ΓòÉΓòÉΓòÉ 7. Tables ΓòÉΓòÉΓòÉ
  627.  
  628.  Memory Object Classes 
  629.  Partition Format Accessibility 
  630.  IPF NLS Language Files 
  631.  NLS Country Codes and Codepages 
  632.  Data and Address Bus Widths for Micro Channel Participants 
  633.  
  634.  
  635. ΓòÉΓòÉΓòÉ 7.1. Memory Object Classes ΓòÉΓòÉΓòÉ
  636.  
  637.  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  638.  Γöé  Memory Object Classes.  This table shows the way in which   Γöé
  639.  Γöé  memory objects may be placed in shared or private storage.  Γöé
  640.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  641.  Γöé ARENA     Γöé PRIVATE STORAGE       Γöé SHARED STORAGE           Γöé
  642.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  643.  Γöé PRIVATE   Γöé EXE read/write data   Γöé Shared run-time data     Γöé
  644.  Γöé           Γöé Process run-time data Γöé Shared DLL data          Γöé
  645.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  646.  Γöé SHARED    Γöé DLL instance data     Γöé DLL code and global data Γöé
  647.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  648.  Γöé NOTE: Code includes read-only objects such as Presentation   Γöé
  649.  Γöé Manager resources                                            Γöé
  650.  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  651.  
  652.  
  653. ΓòÉΓòÉΓòÉ 7.2. Partition Format Accessibility ΓòÉΓòÉΓòÉ
  654.  
  655.  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  656.  Γöé Partition Format Accessibility                               Γöé
  657.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  658.  Γöé FORMAT  Γöé DOS 3.3  Γöé DOS 4.0  Γöé DOS 5.0  Γöé OS/2    Γöé AIX     Γöé
  659.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  660.  Γöé FAT-16  Γöé Yes      Γöé Yes      Γöé Yes      Γöé Yes     Γöé Yes     Γöé
  661.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  662.  Γöé BIG-FAT Γöé No       Γöé Yes      Γöé Yes      Γöé Yes     Γöé No      Γöé
  663.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  664.  Γöé HPFS    Γöé No       Γöé No       Γöé No       Γöé Yes     Γöé No      Γöé
  665.  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  666.  
  667.  
  668. ΓòÉΓòÉΓòÉ 7.3. IPF NLS Language Files ΓòÉΓòÉΓòÉ
  669.  
  670.  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  671.  Γöé IPF NLS Language Files                                       Γöé
  672.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  673.  Γöé ID                 Γöé LANGUAGE           Γöé NLS FILE           Γöé
  674.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  675.  Γöé CHT                Γöé Chinese            Γöé IPFCHT.NLS         Γöé
  676.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  677.  Γöé DAN                Γöé Danish             Γöé IPFDAN.NLS         Γöé
  678.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  679.  Γöé DEU                Γöé German             Γöé IPFDEU.NLS         Γöé
  680.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  681.  Γöé ENG                Γöé English UK         Γöé IPFENG.NLS         Γöé
  682.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  683.  Γöé ENU                Γöé English US         Γöé IPFENU.NLS         Γöé
  684.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  685.  Γöé ESP                Γöé Spanish            Γöé IPFESP.NLS         Γöé
  686.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  687.  Γöé FIN                Γöé Finnish            Γöé IPFFIN.NLS         Γöé
  688.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  689.  Γöé FRA                Γöé French             Γöé IPFFRA.NLS         Γöé
  690.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  691.  Γöé FRC                Γöé Canadian French    Γöé IPFFRC.NLS         Γöé
  692.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  693.  Γöé ITA                Γöé Italian            Γöé IPFITA.NLS         Γöé
  694.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  695.  Γöé JPN                Γöé Japanese           Γöé IPFJPN.NLS         Γöé
  696.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  697.  Γöé KOR                Γöé Korean             Γöé IPFKOR.NLS         Γöé
  698.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  699.  Γöé NLD                Γöé Dutch              Γöé IPFNLD.NLS         Γöé
  700.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  701.  Γöé NOR                Γöé Norwegian          Γöé IPFNOR.NLS         Γöé
  702.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  703.  Γöé PTG                Γöé Portuguese         Γöé IPFPTG.NLS         Γöé
  704.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  705.  Γöé SVE                Γöé Swedish            Γöé IPFSVE.NLS         Γöé
  706.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  707.  Γöé UND                Γöé User Defined       Γöé IPFUND.NLS         Γöé
  708.  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  709.  
  710.  
  711. ΓòÉΓòÉΓòÉ 7.4. NLS Country Codes and Codepages ΓòÉΓòÉΓòÉ
  712.  
  713.  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  714.  Γöé NLS Country Codes and Codepages                              Γöé
  715.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  716.  Γöé COUNTRY             Γöé COUNTRY CODE Γöé CODEPAGES SUPPORTED     Γöé
  717.  Γöé                     Γöé              Γöé (PRIMARY/SECONDARY)     Γöé
  718.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  719.  Γöé Arabic              Γöé 785          Γöé 864 / 437 or 850        Γöé
  720.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  721.  Γöé Asian English       Γöé 099          Γöé 437 / 850               Γöé
  722.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  723.  Γöé Australia           Γöé 061          Γöé 437 / 850               Γöé
  724.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  725.  Γöé Belgium             Γöé 032          Γöé 437 / 850               Γöé
  726.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  727.  Γöé Canadian English    Γöé 001          Γöé 437 / 850               Γöé
  728.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  729.  Γöé Canadian French     Γöé 002          Γöé 863 / 850               Γöé
  730.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  731.  Γöé Czechoslovakia      Γöé 042          Γöé 852 / 850               Γöé
  732.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  733.  Γöé Denmark             Γöé 045          Γöé 865 / 850               Γöé
  734.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  735.  Γöé Finland             Γöé 358          Γöé 437 / 850               Γöé
  736.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  737.  Γöé France              Γöé 033          Γöé 437 / 850               Γöé
  738.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  739.  Γöé Germany             Γöé 049          Γöé 437 / 850               Γöé
  740.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  741.  Γöé Hebrew              Γöé 972          Γöé 862 / 437 or 850        Γöé
  742.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  743.  Γöé Hungary             Γöé 036          Γöé 852 / 850               Γöé
  744.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  745.  Γöé Iceland             Γöé 354          Γöé 850 / 861               Γöé
  746.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  747.  Γöé Italy               Γöé 039          Γöé 437 / 850               Γöé
  748.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  749.  Γöé Japan               Γöé 081          Γöé 932 or 942 / 437 or 850 Γöé
  750.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  751.  Γöé Korea               Γöé 082          Γöé 934 or 944 / 437 or 850 Γöé
  752.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  753.  Γöé Latin America       Γöé 003          Γöé 437 / 850               Γöé
  754.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  755.  Γöé Netherlands         Γöé 031          Γöé 437 / 850               Γöé
  756.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  757.  Γöé Norway              Γöé 047          Γöé 865 / 850               Γöé
  758.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  759.  Γöé People's Republic   Γöé 086          Γöé 936 or 946 / 437 or 850 Γöé
  760.  Γöé of China            Γöé              Γöé                         Γöé
  761.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  762.  Γöé Poland              Γöé 048          Γöé 852 / 850               Γöé
  763.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  764.  Γöé Portugal            Γöé 351          Γöé 860 / 850               Γöé
  765.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  766.  Γöé Spain               Γöé 034          Γöé 437 / 850               Γöé
  767.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  768.  Γöé Sweden              Γöé 046          Γöé 437 / 850               Γöé
  769.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  770.  Γöé Switzerland         Γöé 041          Γöé 437 / 850               Γöé
  771.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  772.  Γöé Taiwan (Traditional Γöé 088          Γöé 938 or 948 / 437 or 850 Γöé
  773.  Γöé Chinese)            Γöé              Γöé                         Γöé
  774.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  775.  Γöé Turkey              Γöé 090          Γöé 857 / 850               Γöé
  776.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  777.  Γöé United Kingdom      Γöé 044          Γöé 437 / 850               Γöé
  778.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  779.  Γöé United States       Γöé 001          Γöé 437 / 850               Γöé
  780.  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  781.  Γöé Yugoslavia          Γöé 038          Γöé 852 / 850               Γöé
  782.  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  783.  
  784.  
  785. ΓòÉΓòÉΓòÉ 7.5. Data and Address Bus Widths for Micro Channel Participants ΓòÉΓòÉΓòÉ
  786.  
  787. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  788. Γöé Data and Address Bus Widths for Micro Channel Participants     Γöé
  789. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  790. Γöé PARTICIPANT      Γöé ADDRESS BUS WIDTH Γöé DATA BUS WIDTH          Γöé
  791. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  792. Γöé System Processor Γöé 24-bit or 32-bit  Γöé 16-bit or 32-bit        Γöé
  793. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  794. Γöé DMA Controller   Γöé 24-bit            Γöé 16-bit                  Γöé
  795. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  796. Γöé Bus Master       Γöé 24-bit or 32-bit  Γöé 16-bit, 32-bit or 64-bitΓöé
  797. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  798. Γöé DMA Slave        Γöé 16-bit            Γöé 8-bit or 16-bit         Γöé
  799. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  800. Γöé I/O Slave        Γöé 16-bit            Γöé 8-bit, 16-bit or 32-bit Γöé
  801. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  802. Γöé Memory Slave     Γöé 24-bit or 32-bit  Γöé 8-bit, 16-bit or 32-bit Γöé
  803. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  804.  
  805.  
  806. ΓòÉΓòÉΓòÉ 8. Special Notices ΓòÉΓòÉΓòÉ
  807.  
  808. This publication is intended to help customers and system engineers to 
  809. understand and utilize the new features in Version 2.0 of OS/2. The information 
  810. in this publication is not intended as the specification of the programming 
  811. interfaces that are provided by the Programming Tools and Information package 
  812. for use by customers in writing programs to request or receive its services. 
  813. See the PUBLICATIONS SECTION of the IBM Programming Announcement for OS/2 
  814. Version 2.0. 
  815.  
  816. References in this publication to IBM products, programs or services do not 
  817. imply that IBM intends to make these available in all countries in which IBM 
  818. operates.  Any reference to an IBM product, program, or service is not intended 
  819. to state or imply that only IBM's product, program, or service may be used. Any 
  820. functionally equivalent program that does not infringe any of IBM's 
  821. intellectual property rights may be used instead of the IBM product, program or 
  822. service. 
  823.  
  824. Information in this book was developed in conjunction with use of the equipment 
  825. specified, and is limited in application to those specific hardware and 
  826. software products and levels. 
  827.  
  828. IBM may have patents or pending patent applications covering subject matter in 
  829. this document.  The furnishing of this document does not give you any license 
  830. to these patents.  You can send license inquiries, in writing, to the IBM 
  831. Director of Commercial Relations, IBM Corporation, Purchase, NY 10577. 
  832.  
  833. The information contained in this document has not been submitted to any formal 
  834. IBM test and is distributed AS IS. The information about non-IBM ("vendor") 
  835. products in this manual has been supplied by the vendor and IBM assumes no 
  836. responsibility for its accuracy completeness. The use of this information or 
  837. the implementation of any of these techniques is a customer responsibility and 
  838. depends on the customer's ability to evaluate and integrate them into the 
  839. customer's operational environment.  While each item may have been reviewed by 
  840. IBM for accuracy in a specific situation, there is no guarantee that the same 
  841. or similar results will be obtained elsewhere.  Customers attempting to adapt 
  842. these techniques to their own environments do so at their own risk. 
  843.  
  844. References in this publication to IBM products, programs or services do not 
  845. imply that IBM intends to make these available in all countries in which IBM 
  846. operates.  Any reference to an IBM product, program, or service is not intended 
  847. to state or imply that only IBM's product, program, or service may be used. Any 
  848. functionally equivalent program that does not infringe any of IBM's 
  849. intellectual property rights may be used instead of the IBM product, program or 
  850. service. 
  851.  
  852. This document has not been subjected to any formal review and has not been 
  853. checked for technical accuracy.  Results may be individually evaluated for 
  854. applicability to a particular installation.  You may discuss pertinent 
  855. information from this document with a customer, and you may abstract pertinent 
  856. information for presentation to your customers.  However, any code included is 
  857. for internal information purposes only and may not be given to customers. If 
  858. included code is identified as incidental programming, its use must conform to 
  859. the guidelines in the relevant section of the sales manual. 
  860.  
  861. Any performance data contained in this document was obtained in a controlled 
  862. environment based on the use of specific data and is presented only to 
  863. illustrate techniques and procedures to assist IBM personnel to better 
  864. understand IBM products.  The results that may be obtained in other operating 
  865. environments may vary significantly.  Users of this document should verify the 
  866. applicable data in their specific environment.  No performance data may be 
  867. abstracted or reproduced and given to non-IBM personnel without prior written 
  868. approval by Business Practices. 
  869.  
  870. Any performance data contained in this document was determined in a controlled 
  871. environment, and therefore, the results that may be obtained in other operating 
  872. environments may vary significantly. Users of this document should verify the 
  873. applicable data for their specific environment. 
  874.  
  875. The following document contains examples of data and reports used in daily 
  876. business operations.  To illustrate them as completely as possible, the 
  877. examples contain the names of individuals, companies, brands, and products. 
  878. All of these names are fictitious and any similarity to the names and addresses 
  879. used by an actual business enterprise is entirely coincidental. 
  880.  
  881. Reference to PTF numbers that have not been released through the normal 
  882. distribution process does not imply general availability. The purpose of 
  883. including these reference numbers is to alert IBM customers to specific 
  884. information relative to the implementation of the PTF when it becomes available 
  885. to each customer according to the normal IBM PTF distribution process. 
  886.  
  887. You can reproduce a page in this document as a transparency, if that page has 
  888. the copyright notice on it.  The copyright notice must appear on each page 
  889. being reproduced. 
  890.  
  891. The following terms, which are denoted by an asterisk (*) in this publication, 
  892. are trademarks of the International Business Machines Corporation in the United 
  893. States and/or other countries: 
  894.  
  895.  AIX
  896.  C/2
  897.  IBM
  898.  Micro Channel
  899.  Operating System/2
  900.  OS/2
  901.  PC AT
  902.  Personal System/1
  903.  Personal System/2
  904.  Presentation Manager
  905.  PS/1
  906.  PS/2
  907.  SAA
  908.  Systems Application Architecture
  909.  WIN-OS/2
  910.  Workplace Shell
  911.  
  912. The following terms, which are denoted by a double asterisk (**) in this 
  913. publication, are trademarks of other companies. 
  914.  
  915. CompuServe is a trademark of CompuServe Incorporated.
  916. HP and Hewlett-Packard are trademarks of Hewlett-Packard Corporation.
  917. Intel is a trademark of Intel Corporation.
  918. Logitech is a trademark of Logitech, Incorporated.
  919. Lotus is a trademark of the Lotus Development Corporation.
  920. MicroMaster is a registered trademark of AOX Inc.
  921. Microsoft is a trademark of Microsoft Corporation.
  922. Windows is a trademark of Microsoft Corporation.
  923. Xenix is a trademark of Microsoft Corporation.
  924. 386, 486, SX are trademarks of Intel Corporation.
  925. 80286, 80386 and 80486 are trademarks of Intel Corporation.
  926.  
  927.  
  928. ΓòÉΓòÉΓòÉ 9. Preface ΓòÉΓòÉΓòÉ
  929.  
  930. This document is intended to provide readers with an understanding of the 
  931. functions provided by the Control Program component in OS/2 Version 2.0 and its 
  932. implementation. The document should enable readers to make an evaluation of the 
  933. OS/2 Version 2.0 product and its components. 
  934.  
  935. The document contains information on the implementation of operating system 
  936. functions such as task management, memory management, and the 32-bit 
  937. application programming interfaces provided by OS/2 Version 2.0. Information is 
  938. also provided on hardware support and interrupt management, application 
  939. debugging aids within the operating system, and the support for multiple 
  940. bootable fixed disk partitions.  The document also discusses pre-installation 
  941. planning considerations, and the migration of existing applications from 16-bit 
  942. versions of OS/2 to OS/2 Version 2.0. 
  943.  
  944. This document is intended for: 
  945.  
  946.  Planners and technical support personnel who require an understanding of the 
  947.   internal function implementation in OS/2 Version 2.0. 
  948.  
  949.  Programmers who wish to develop applications which use the 32-bit application 
  950.   programming interfaces and extended flat memory model provided under OS/2 
  951.   Version 2.0, and/or wish to migrate applications from previous versions of 
  952.   OS/2. 
  953.  
  954. The code examples used in this document are available in electronic form via 
  955. CompuServe** or through a local IBM Support BBS, as package RB3730.ZIP. IBM 
  956. employees may obtain the code examples from the GG243730 PACKAGE on OS2TOOLS. 
  957.  
  958. The document is organized as follows: 
  959.  
  960.  Overview provides a brief introduction to the topics covered in this 
  961.   document. 
  962.  
  963.   This chapter is recommended for all readers of the document. 
  964.  
  965.  Memory Management describes the memory management under OS/2 Version 2.0, 
  966.   including the implementation of the 32-bit flat memory model and memory 
  967.   paging.  The chapter also describes the allocation and protection of memory 
  968.   objects, and support for 16-bit applications under OS/2 Version 2.0. 
  969.  
  970.   This chapter is recommended for those readers who require an understanding of 
  971.   the way in which OS/2 Version 2.0 manages the allocation of real and virtual 
  972.   memory, and the way in which this implementation differs from that in 
  973.   previous versions of OS/2.  Those readers who require a knowledge of the 
  974.   hardware implementation of these components may also read Intel 80386 
  975.   Architecture. 
  976.  
  977.  Task Management describes the task management, dispatching implementation and 
  978.   interrupt handling under OS/2 Version 2.0.  Process synchronization through 
  979.   the use of semaphores is also discussed. 
  980.  
  981.   This chapter is recommended for those readers who are concerned with the 
  982.   implementation of multitasking under OS/2 Version 2.0. 
  983.  
  984.  Debugging Support describes the built-in application trace and debugging aids 
  985.   provided as part of OS/2 Version 2.0, which enable debugger and trace 
  986.   applications to provide additional information. 
  987.  
  988.   This chapter is recommended for those readers who desire an understanding of 
  989.   these capabilities, or who may wish to design their own trace and/or debug 
  990.   applications. 
  991.  
  992.  Installation Considerations discusses pre-installation planning and 
  993.   installation considerations to be borne in mind when installing OS/2 Version 
  994.   2.0, particularly when installing it over existing versions of OS/2. 
  995.   Hardware, memory, and fixed disk space requirements are also described. 
  996.  
  997.   This chapter is intended primarily for planners who will be developing 
  998.   implementation schemes for OS/2 Version 2.0. 
  999.  
  1000.  Hardware Considerations discusses the OS/2 Version 2.0 device driver 
  1001.   structure, changes in the OS/2 V2.0 file system handlers and other topics 
  1002.   related to hardware support. 
  1003.  
  1004.   This chapter is recommended for those readers who require information about 
  1005.   OS/2 V2.0 support for IBM and OEM personal computers and related hardware, 
  1006.   such as disk subsystems. 
  1007.  
  1008.  Boot Manager describes the capability for multiple bootable fixed disk 
  1009.   partitions, which is supported by OS/2 Version 2.0.  This support enables 
  1010.   different operating systems to be installed on different disk partitions 
  1011.   within the same machine, and for the active partition to be switched in order 
  1012.   to boot the machine with an alternative operating system. 
  1013.  
  1014.   This chapter is intended for those planners who may wish to have multiple 
  1015.   operating systems installed on machines in their enterprise. 
  1016.  
  1017.  National Language Considerations describes the support provided within OS/2 
  1018.   Version 2.0 for languages other than English, including support for 
  1019.   double-byte character sets. 
  1020.  
  1021.   This chapter is recommended for those readers who wish to use languages other 
  1022.   than English. 
  1023.  
  1024. The following appendixes are included in this document: 
  1025.  
  1026.  Intel 80386 Architecture provides an overview of the Intel 80386 
  1027.   microprocessor architecture, with an emphasis on the exploitation of this 
  1028.   architecture by OS/2 Version 2.0. 
  1029.  
  1030.   This chapter is recommended for those readers who desire a more complete 
  1031.   understanding of OS/2 Version 2.0's use of 80386 capabilities. 
  1032.  
  1033.  Micro Channel Architecture and SCSI provides a brief description of the IBM 
  1034.   Micro Channel architecture, as well as the Subsystem Control Block (SCB) 
  1035.   architecture and SCSI. 
  1036.  
  1037.   This chapter is recommended for those readers who desire a deeper 
  1038.   understanding of the exploitation of these architectures in OS/2 Version 2.0. 
  1039.  
  1040.  Lab Session - 32-Bit Memory Model provides an agenda for a laboratory session 
  1041.   which deals with the 32-bit memory model and multi-threading capabilities of 
  1042.   OS/2 Version 2.0. 
  1043.  
  1044.   This chapter is intended for those readers who will use this document as the 
  1045.   base material for an OS/2 Version 2.0 classroom course. 
  1046.  
  1047.  
  1048. ΓòÉΓòÉΓòÉ 10. Related Publications ΓòÉΓòÉΓòÉ
  1049.  
  1050. The following publications are considered particularly suitable for a more 
  1051. detailed discussion of the topics covered in this document. 
  1052.  
  1053. Prerequisite Publications 
  1054.  
  1055.  OS/2 Version 2.0 Installation Guide 
  1056.  
  1057.  OS/2 Version 2.0 Overview Guide 
  1058.  
  1059.  OS/2 Version 2.0 Online Documentation. 
  1060.  
  1061. Additional Publications 
  1062.  
  1063.  OS/2 V1.2 Standard Edition Internals and Evaluation, GG24-3466 
  1064.  
  1065.  OS/2 V1.3 Volume 1: New Features, GG24-3630 
  1066.  
  1067.  OS/2 V1.3 Volume 2: Print Subsystem, GG24-3631 
  1068.  
  1069.  OS/2 Version 2.0 - Volume 2:  DOS and Windows Environment, GG24-3731 
  1070.  
  1071.  OS/2 Version 2.0 - Volume 3:  Presentation Manager and Workplace Shell, 
  1072.   GG24-3732 
  1073.  
  1074.  OS/2 Version 2.0 - Volume 4:  Application Development, GG24-3774 
  1075.  
  1076.  OS/2 Version 2.0 - Volume 5:  Print Subsystem, GG24-3775 
  1077.  
  1078.  OS/2 Version 2.0 Remote Installation and Maintenance, GG24-3780 
  1079.  
  1080.  Intel 80386 System Software Writer's Guide, ISBN 1-55512-023-7 
  1081.  
  1082.  The Design of OS/2, Harvey M. Deitel and Michael J. Kogan, Addison Wesley 
  1083.   1992 ISBN 0-201-54889-5 (SC25-4005) 
  1084.  
  1085.  Micro Channel Architecture Bus Master Release 1.0, GG24-3477 
  1086.  
  1087.  SCSI - Architecture and Implementation, GG24-3507. 
  1088.  
  1089.  
  1090. ΓòÉΓòÉΓòÉ 11. Overview ΓòÉΓòÉΓòÉ
  1091.  
  1092. IBM* OS/2* Version 2.0 is an advanced multitasking, single-user operating 
  1093. system for IBM Personal System/2* computers and other machines equipped with 
  1094. the Intel** 80386** or compatible microprocessors.  It inherits a rich set of 
  1095. features from previous versions of OS/2, such as support for multitasking, 
  1096. multiple threads, dynamic linking, interprocess communication, a graphical user 
  1097. interface, and a graphics programming interface.  Features such as a High 
  1098. Performance File System, Extended Attributes, and long filenames are also 
  1099. available in OS/2 Version 2.0. 
  1100.  
  1101. Figure "The New OS/2 Version 2.0 Logo" 
  1102.  
  1103. Unlike previous versions of OS/2, Version 2.0 takes advantage of the advanced 
  1104. features of the Intel 80386 processor architecture, such as a 32-bit memory 
  1105. model, paged virtual memory, and an enhanced processor instruction set. More 
  1106. extensive use is also made of IBM's Micro Channel* architecture for improved 
  1107. hardware performance. 
  1108.  
  1109. OS/2 Version 2.0 requires the features of the Intel 80386 or compatible 32-bit 
  1110. microprocessors, and therefore does not run on computers that use the Intel 
  1111. 80286** processor, or its predecessors.  In order to maintain compatibility, 
  1112. OS/2 Version 2.0  supports applications written for previous versions of OS/2 
  1113. by providing both a 16-bit as well as a 32-bit application programming 
  1114. interface, allowing existing applications to execute under OS/2 Version 2.0 
  1115. without modification.  Note, however, that only the 32-bit interface provides 
  1116. the full features and performance of OS/2 Version 2.0, and that while existing 
  1117. OS/2 Version 1.x applications will execute under OS/2 Version 2.0, they must be 
  1118. modified in order to take full advantage of the new features of Version 2.0. 
  1119.  
  1120. The following new features have been implemented in OS/2 Version 2.0: 
  1121.  
  1122.  Support for the Intel 80386 32-bit microprocessor instruction set;  the 80386 
  1123.   was previously supported only in 80286 emulation mode. 
  1124.  
  1125.  32-bit memory management. 
  1126.  
  1127.  Enhanced hardware exploitation. 
  1128.  
  1129.  Increased maximum file and disk partition sizes. 
  1130.  
  1131.  Multiple Virtual DOS Machines. 
  1132.  
  1133.  Support for Windows** applications. 
  1134.  
  1135.  New graphical installation program, which includes the ability to install 
  1136.   from a local area network (LAN) server. 
  1137.  
  1138.  New, portable 32-bit programming environment. 
  1139.  
  1140.  Binary compatibility with previous versions of OS/2, allowing 16-bit 
  1141.   applications written for previous versions to execute under Version 2.0 
  1142.   without modification. 
  1143.  
  1144.  An enhanced Presentation Manager* user shell, known as the Workplace Shell*, 
  1145.   which implements the 1991 IBM Systems Application Architecture* (SAA*) Common 
  1146.   User Access (CUA) Workplace Environment. 
  1147.  
  1148.  Implementation of SOM - System Object Model. 
  1149.  
  1150. Figure "Evolution of OS/2" 
  1151.  
  1152. Many of these new features are described in this document.  Others are 
  1153. described in the remaining volumes in the series; see Related Publications. 
  1154.  
  1155.  
  1156. ΓòÉΓòÉΓòÉ 11.1. Intel 80386 32-Bit Microprocessor Support ΓòÉΓòÉΓòÉ
  1157.  
  1158. The basis for OS/2 Version 2.0 is its support for the Intel 80386 
  1159. microprocessor. This support means that a powerful set of 32-bit features now 
  1160. becomes available to the operating system and applications, including enhanced 
  1161. memory management and more sophisticated multitasking.  The Intel 80386 and 
  1162. 80486** offer significant improvements over the previous generation of 16-bit 
  1163. microprocessors, while retaining compatibility with these processors. 
  1164.  
  1165. The Intel 80386 architecture incorporates the following on-chip features, which 
  1166. enhance the throughput and performance of the system: 
  1167.  
  1168.  Multitasking support 
  1169.  
  1170.  Memory management 
  1171.  
  1172.  Instruction pipelining 
  1173.  
  1174.  Address translation cache 
  1175.  
  1176.  High-speed bus interface. 
  1177.  
  1178. Along with these features also comes the greater addressing capacity of the 
  1179. Intel 80386: 
  1180.  
  1181.  4 gigabyte (GB) physical address space, with up to 512 megabytes (MB) per 
  1182.   process under OS/2 Version 2.0. 
  1183.  
  1184.   Note:   This figure applies to the 80386DX processor and all 80486 
  1185.   processors; the 80386SX, 80386SL and 80386SLC may only address up to 16MB of 
  1186.   physical memory. 
  1187.  
  1188.  1 byte to 4 gigabyte memory objects. 
  1189.  
  1190. OS/2 Version 2.0 uses many of these processor features and capabilities to 
  1191. provide a more powerful and flexible operating system platform.  Note that OS/2 
  1192. Version 2.0 does not implement the full 64 terabyte virtual address space 
  1193. provided by the 80386, since this requires use of the segmented memory model; 
  1194. OS/2 Version 2.0 uses a flat memory model which is described below. 
  1195.  
  1196.  
  1197. ΓòÉΓòÉΓòÉ 11.2. Memory Management ΓòÉΓòÉΓòÉ
  1198.  
  1199. Memory management is the way in which the operating system allows applications 
  1200. to access the system's memory.  This includes the way in which memory is 
  1201. allocated, either to a single application or to be shared by multiple 
  1202. applications. The operating system must check how much memory is available to 
  1203. an application, and handle the situation where there is no longer any real 
  1204. memory left to satisfy an application's requests. 
  1205.  
  1206. In OS/2 Version 2.0, memory management has been enhanced to provide a flat 
  1207. memory model, which takes advantage of the 32-bit addressing scheme provided by 
  1208. the Intel 80386 architecture.  This means that through memory management, the 
  1209. system's memory is seen as one large linear address space of 4GB. Applications 
  1210. have access to memory by requesting the allocation of memory objects. Under 
  1211. OS/2 Version 2.0, these memory objects can be of any size between 1 byte and 
  1212. 512MB.  The use of a flat memory model removes the need for application 
  1213. developers to directly manipulate segments, and thereby removes a significant 
  1214. obstacle in porting applications between OS/2 Version 2.0 and other 32-bit 
  1215. environments such as AIX*.  Application performance is also improved when 
  1216. manipulating memory, since the use of a linear address space eliminates pointer 
  1217. arithmetic and segment register loads. 
  1218.  
  1219. OS/2 Version 2.0 manages memory internally using pages, each of which is 4KB in 
  1220. size.  Each memory object is regarded by the operating system as a set of one 
  1221. or more pages.  For practical purposes therefore, memory is allocated in units 
  1222. of 4KB, although a page may be broken down into smaller parts and may contain 
  1223. multiple memory objects. 
  1224.  
  1225. One of the useful aspects of paged memory is the way in which memory 
  1226. overcommitment is handled, that is, what happens when there is no more real 
  1227. memory left to load applications.  Under OS/2 Version 2.0, individual pages may 
  1228. be swapped to and from disk, rather than entire memory objects. This technique 
  1229. improves swapping performance, particularly when large memory objects exist in 
  1230. the system. The fixed page size also improves swapping performance since the 
  1231. operating system need not be concerned with moving objects in memory to 
  1232. accommodate the various object sizes, as was the case with previous versions of 
  1233. OS/2. 
  1234.  
  1235. Memory management under OS/2 Version 2.0 is described in more detail in Memory 
  1236. Management. 
  1237.  
  1238.  
  1239. ΓòÉΓòÉΓòÉ 11.3. Task Management ΓòÉΓòÉΓòÉ
  1240.  
  1241. The management of processes and threads executing in the system is greatly 
  1242. simplified and streamlined under OS/2 Version 2.0. This improvement is due 
  1243. primarily to the fact that support for processes executing in real mode (such 
  1244. as the DOS Compatibility Box in previous versions of OS/2) is no longer 
  1245. required, since the execution of DOS applications is supported using virtual 
  1246. DOS machines which run as protected mode processes under OS/2 Version 2.0 (see 
  1247. section Multiple Virtual DOS Machines for further information). 
  1248.  
  1249. OS/2 Version 2.0 supports execution of the following types of applications: 
  1250.  
  1251.  DOS applications, in full-screen mode or in windows on the Presentation 
  1252.   Manager desktop. 
  1253.  
  1254.  Windows applications, running in a full-screen session or in windows on the 
  1255.   Presentation Manager desktop. 
  1256.  
  1257.  16-bit OS/2 applications developed for previous versions of OS/2. 
  1258.  
  1259.  New 32-bit applications developed for OS/2 Version 2.0. 
  1260.  
  1261. All applications execute as protected mode processes under OS/2 Version 2.0, 
  1262. and are therefore provided with pre-emptive multitasking and full memory 
  1263. protection between processes. 
  1264.  
  1265. Interrupt handling under OS/2 Version 2.0 is simplified by removal of the need 
  1266. to handle real mode software interrupts.  Interrupts issued by DOS and Windows 
  1267. applications are trapped and translated to the appropriate device access 
  1268. commands for the protected mode environment. 
  1269.  
  1270. Signal handling has been combined with exception handling, giving a more 
  1271. elegant and flexible means for an application to handle events such as 
  1272. Ctrl+Break and DosKillProcess() calls.  Applications may register exception 
  1273. handling routines to trap such events.  These routines are registered on a 
  1274. per-thread basis, allowing multiple applications to trap the same exception 
  1275. type, and may be chained or nested.  Exception handlers may be written in 
  1276. high-level languages such as C; the use of assembler language is not required. 
  1277.  
  1278. The number of threads per process has been raised under OS/2 Version 2.0 to 
  1279. 4096, which is equal to the total system thread limit.  Thus, a process may 
  1280. consume as many threads as required, up to the total available after the 
  1281. operating system itself has consumed a number of threads for its own use. 
  1282.  
  1283. The process of dispatching secondary threads has been streamlined through the 
  1284. incorporation of stack allocation/deallocation into the DosCreateThread() 
  1285. function under Version 2.0. This improvement simplifies the process of thread 
  1286. dispatching by removing the need for an application to explicitly allocate and 
  1287. free memory for the secondary thread's stack. 
  1288.  
  1289. Semaphores for maintaining synchronization between threads and processes are 
  1290. more sophisticated under OS/2 Version 2.0, and their implementation is less 
  1291. dependent on the processor architecture.  In addition, system functions are 
  1292. provided which enable a thread to wait for the completion of another thread, or 
  1293. to forcibly terminate another thread. This functionality provides additional 
  1294. flexibility compared to previous versions of OS/2. 
  1295.  
  1296.  
  1297. ΓòÉΓòÉΓòÉ 11.4. 32-Bit Programming Environment ΓòÉΓòÉΓòÉ
  1298.  
  1299. OS/2 Version 2.0 provides a 32-bit programming interface, providing enhanced 
  1300. performance through use of the 80386 instruction set, and allowing applications 
  1301. to take full advantage of the 32-bit flat memory model.  Since the application 
  1302. developer is no longer concerned with the details of manipulating segments, 
  1303. this simplifies the task of memory management within an application, 
  1304. particularly where large memory objects are used.  The lack of a segmented 
  1305. memory model also facilitates porting of applications between OS/2 Version 2.0 
  1306. and other 32-bit environments. 
  1307.  
  1308. The 32-bit environment also provides performance improvements since 
  1309. applications have access to 32-bit processor instructions and 32-bit 
  1310. arithmetic.  The flat memory model eliminates pointer arithmetic and segment 
  1311. register reloading, which further improves overall performance. 
  1312.  
  1313. The lack of segmentation also makes program compilation much simpler, since the 
  1314. compiler (and hence the programmer) need no longer be concerned with calling 
  1315. sequences and far versus near memory references.  Only when creating mixed 
  1316. model programs (see 16-Bit Application Compatibility) does segmentation become 
  1317. an issue. 
  1318.  
  1319. Operations such as stack allocation for threads are also simplified in the 
  1320. 32-bit environment.  Additional capabilities have been built into the operating 
  1321. system functions, removing the need for the application developer to explicitly 
  1322. perform these functions within the application code. This allows easier 
  1323. exploitation of the multithreading capabilities of OS/2 Version 2.0. 
  1324.  
  1325. OS/2 Version 2.0 also provides application-transparent emulation of numeric 
  1326. coprocessor functions.  If a coprocessor instruction is issued by an 
  1327. application in a machine with no coprocessor installed, the operating system 
  1328. traps the resulting exception condition and emulates the coprocessor 
  1329. instruction, returning the result to the application.  Emulation is performed 
  1330. on a per-thread basis, thereby preventing interference between instructions 
  1331. from different threads or processes.  All applications developed for Version 
  1332. 2.0 may therefore be compiled with in-line coprocessor instructions, removing 
  1333. the need for conditional testing or coprocessor emulation within the 
  1334. application itself. 
  1335.  
  1336. Programming for the 32-bit environment is described in more detail in OS/2 
  1337. Version 2.0 - Volume 4:  Application Development. 
  1338.  
  1339.  
  1340. ΓòÉΓòÉΓòÉ 11.5. 16-Bit Application Compatibility ΓòÉΓòÉΓòÉ
  1341.  
  1342. An important feature of OS/2 Version 2.0 is its ability to run existing 16-bit 
  1343. applications, written for previous versions of OS/2, without alteration. This 
  1344. compatibility is achieved internally by the operating system through a special 
  1345. interface called a thunk. A thunk is a piece of code responsible for converting 
  1346. 16-bit segmented memory references to 32-bit linear references and vice versa, 
  1347. as well as realigning the thread's stack and data structures where necessary. 
  1348. This restructuring allows the 16-bit applications to interface with 32-bit 
  1349. service layers within the operating system, and allows 32-bit applications to 
  1350. utilize 16-bit service layers, modules and resources. 
  1351.  
  1352. Applications may also be written for the 32-bit environment, while making use 
  1353. of existing 16-bit DLLs and resources.  This technique is known as mixed model 
  1354. programming, and allows the application developer to make the best possible use 
  1355. of existing service routines, private window classes, etc., developed for 
  1356. previous versions of OS/2. 
  1357.  
  1358. Note, however, that the use of mixed 16-bit and 32-bit modules within an 
  1359. application requires special consideration by the application developer, since 
  1360. the 16-bit modules utilize the segmented memory model, and therefore are 
  1361. restricted in the size and location of the memory objects to which they have 
  1362. access.  The subject of mixed-model programming is discussed in greater detail 
  1363. in OS/2 Version 2.0 - Volume 4:  Application Development. 
  1364.  
  1365.  
  1366. ΓòÉΓòÉΓòÉ 11.6. Installation ΓòÉΓòÉΓòÉ
  1367.  
  1368. The installation process for OS/2 Version 2.0 has been enhanced over that 
  1369. provided for previous versions of OS/2.  After partitioning the fixed disk (if 
  1370. required) and loading the base operating system, the remainder of the 
  1371. installation is carried out using a graphical installation procedure based on 
  1372. Presentation Manager, with full mouse and keyboard support.  Indicators are 
  1373. provided to allow the user to determine the progress of the installation. 
  1374.  
  1375. Installation of optional features is carried out by selecting the required 
  1376. options from a graphical menu displayed by the installation procedure. Default 
  1377. system settings such as display type, mouse type, etc. are set by interrogating 
  1378. the hardware; these defaults may be modified by the user during installation. 
  1379.  
  1380. Many parameters such as disk cache size, maximum number of threads and so on, 
  1381. may be set from within the installation procedure.  These parameters are set 
  1382. using a dialog box which is displayed when the user selects the Software 
  1383. Configuration option from the OS/2 Setup and Installation panel. 
  1384.  
  1385. The installation procedure for OS/2 Version 2.0 is described in detail in 
  1386. Installation Considerations. 
  1387.  
  1388. OS/2 Version 2.0 may also be installed over a local area network (LAN) from a 
  1389. server machine.  When installing in this manner, optional features may be 
  1390. specified either by the user or in a response file tailored by a network 
  1391. administrator.  The process of installation over a LAN is described in OS/2 
  1392. Version 2.0 Remote Installation and Maintenance. 
  1393.  
  1394.  
  1395. ΓòÉΓòÉΓòÉ 11.7. Hardware Exploitation ΓòÉΓòÉΓòÉ
  1396.  
  1397. OS/2 Version 2.0 will operate on IBM and other manufacturer's personal 
  1398. computers which are based on either the Intel 80386 or Intel 80486 (both SX and 
  1399. DX) microprocessors. Included in this group are systems based on the 80386SL 
  1400. (the low power version of the 80386SX) and the 80386SLC (the IBM version of the 
  1401. 80386SL with a 8KB cache included on the chip for improved performance). Models 
  1402. in the IBM PS/2 range, which meet the microprocessor requirement, will run OS/2 
  1403. V2.0. 
  1404.  
  1405. In order to run OS/2 V2.0, systems should be configured with a minimum of 4MB 
  1406. of memory.  A hard disk of at least 60MB is also recommended. 
  1407.  
  1408. IBM has established a large compatibility test facility in order to verify that 
  1409. certain key functions of OS/2 Version 2.0 perform correctly on hardware 
  1410. manufactured by companies other than IBM. The list of systems, which have 
  1411. passed these tests, is continually being updated and your PC dealer or IBM 
  1412. representative should be able to provide information on the OS/2 V2.0 
  1413. compatibility of a particular system. 
  1414.  
  1415. Where a system unit is equipped with more than 16MB of real memory, OS/2 V2.0 
  1416. will use all the available memory, providing the system unit is able to support 
  1417. memory above 16MB. Before installing additional memory in a system, it is 
  1418. advisable to check that the system unit is able to address memory above 16MB. 
  1419.  
  1420. Cache management for disk access in OS/2 V2.0 is more intelligent than previous 
  1421. versions of OS/2.  In particular the file system will attempt to prefetch 
  1422. records when doing sequential file access. 
  1423.  
  1424. OS/2 Version 2.0 exploits the capabilities of the IBM SCSI Busmaster adapters. 
  1425. Requests to the adapter can be chained together and a single command can 
  1426. initiate multiple reads from and writes to the disk subsystem. Devices other 
  1427. than disks attached to the adapter are also supported.  OS/2 V2.0 also provides 
  1428. support for some non-IBM SCSI adapters. Details will be found in the "Readme" 
  1429. file which is installed with OS/2 V2.0. 
  1430.  
  1431. The use and exploitation of hardware facilities by OS/2 Version 2.0 is 
  1432. described in more detail in Hardware Considerations. 
  1433.  
  1434.  
  1435. ΓòÉΓòÉΓòÉ 11.8. Boot Manager ΓòÉΓòÉΓòÉ
  1436.  
  1437. OS/2 Version 2.0 provides a tool that can enable execution of multiple 
  1438. operating systems on the same physical machine, with selection of an operating 
  1439. system by the user at boottime.  This capability is provided by an OS/2 Version 
  1440. 2.0 feature known as Boot Manager. 
  1441.  
  1442. Using Boot Manager, the user may select from various operating systems such as 
  1443. DOS, OS/2 Version 1.x, OS/2 Version 2.0 or AIX.  Other operating systems may 
  1444. also be supported, provided they do not directly modify the master boot record 
  1445. of the fixed disk.  With this feature, OS/2 V2.0 is now capable of installing 
  1446. to and initializing from a logical disk, other than C:.  For further details on 
  1447. Boot Manager and its implementation, see Boot Manager. 
  1448.  
  1449.  
  1450. ΓòÉΓòÉΓòÉ 11.9. Multiple Virtual DOS Machines ΓòÉΓòÉΓòÉ
  1451.  
  1452. A significant part of OS/2 Version 2.0 is its ability to multitask DOS sessions 
  1453. along with OS/2 sessions, using the Multiple Virtual DOS Machines feature of 
  1454. OS/2 Version 2.0.  In previous versions of OS/2, support for DOS applications 
  1455. was limited, with low available memory and a single DOS session, which operated 
  1456. in full-screen mode only and suspended when in the background. 
  1457.  
  1458. The DOS support has been totally rewritten in OS/2 Version 2.0, and allows 
  1459. multiple concurrent DOS applications where each is executed as a 
  1460. single-threaded, protect mode OS/2 program.  This method of implementation uses 
  1461. the virtual 8086 mode of the 80386 processor, and provides normal OS/2 levels 
  1462. of memory protection; that is, it provides protection of system memory and 
  1463. other applications, isolation from illegal memory accesses by ill-behaved 
  1464. applications, and the ability to terminate sessions where applications are 
  1465. "hung".  DOS sessions may also be multitasked along with all other OS/2 
  1466. sessions. 
  1467.  
  1468. DOS support is achieved through the use of virtualization techniques, allowing 
  1469. the creation of multiple instances of separate, independent virtual DOS 
  1470. machines. In this way, a virtual interface is provided to each DOS machine, 
  1471. giving the impression that each application owns all the required resources, 
  1472. both hardware and software. 
  1473.  
  1474. Each virtual DOS machine has more base memory than the DOS Compatibility Box 
  1475. implemented in previous versions of OS/2; more than 630KB of free base memory 
  1476. (that is, memory below the 640KB line) is available for each virtual DOS 
  1477. machine.  OS/2 Version 2.0 also supports the use of Lotus**-Intel-Microsoft** 
  1478. (LIM) expanded memory (EMS) Version 4.0 emulation and extended memory (XMS) 
  1479. Version 2.0 to provide additional memory for those DOS applications which are 
  1480. capable of using such extensions.  OS/2 Version 2.0 maps this extended or 
  1481. expanded memory into the system's normal linear memory address space, and 
  1482. manages it in the same manner as any other allocated memory. The DOS Protect 
  1483. Mode Interface (DPMI) specification is also supported to allow access to memory 
  1484. above 1MB. 
  1485.  
  1486. The ability of a virtual DOS machine to run within a Presentation Manager 
  1487. window provides immediate productivity gains to existing DOS applications, 
  1488. since they may utilize Presentation Manager desktop features.  These features 
  1489. include window manipulation and the ability to cut/copy/paste information 
  1490. between applications using the clipboard. 
  1491.  
  1492. Application compatibility in the virtual DOS machine is also enhanced over 
  1493. previous versions of OS/2.  The virtual DOS machine can be used to execute 
  1494. DOS-based communications applications and other applications which address 
  1495. hardware I/O devices, through the use of virtual device drivers which map the 
  1496. device driver calls from the applications to the appropriate physical device 
  1497. driver within the operating system.  Applications using hardware devices which 
  1498. are not required to be shared with other applications in the same system may be 
  1499. accessed using the standard DOS device drivers, without the need for a virtual 
  1500. device driver.  Certain restrictions still apply with respect to communications 
  1501. line speed and time-critical interrupt handling. 
  1502.  
  1503. Application compatibility in a virtual DOS machine is further enhanced by the 
  1504. DOS Settings feature, which allows virtual DOS machines to be customized to 
  1505. suit the requirements of the applications running in them.  Properties such as 
  1506. video characteristics, hardware environment emulation, and the use of memory 
  1507. extenders can all be customized using this feature. 
  1508.  
  1509. The concept of Multiple Virtual DOS Machines, and its implementation in OS/2 
  1510. Version 2.0, is described in more detail in OS/2 Version 2.0 - Volume 2:  DOS 
  1511. and Windows Environment. 
  1512.  
  1513.  
  1514. ΓòÉΓòÉΓòÉ 11.10. Windows Application Support ΓòÉΓòÉΓòÉ
  1515.  
  1516. OS/2 Version 2.0 provides the capability for Windows applications to run under 
  1517. OS/2 Version 2.0 using its WIN-OS/2* component. This support allows 
  1518. applications written for Windows 3.0 and previous versions of Windows to 
  1519. coexist and execute in the same machine. 
  1520.  
  1521. Each Windows application executes as a protected mode process.  Windows 
  1522. applications are, therefore, subject to the full application protection 
  1523. facilities provided to protected mode applications under OS/2 Version 2.0, and 
  1524. are protected from one another and from DOS or OS/2 applications executing in 
  1525. the system. This protection is in contrast to the native Windows 3.0 
  1526. environment, where protection is limited to Windows 3.0 applications only, 
  1527. provided these applications use Windows' memory management services. 
  1528. Protection for DOS applications is provided only when Windows is running in 386 
  1529. enhanced mode. 
  1530.  
  1531. The execution of Windows applications as protected mode tasks also allows these 
  1532. applications to take full advantage of the pre-emptive multitasking 
  1533. capabilities of OS/2 Version 2.0, with full pre-emptive multitasking between 
  1534. Windows applications, DOS applications, and OS/2 applications. This protection 
  1535. is again in contrast to the native Windows 3.0 environment, where pre-emptive 
  1536. multitasking is available only when Windows 3.0 is running in 386 enhanced 
  1537. mode, and only for DOS applications, thereby impacting performance and 
  1538. preventing many applications written for previous versions of Windows from 
  1539. executing.  OS/2 Version 2.0 has no such restriction. 
  1540.  
  1541. Support for Windows applications under OS/2 Version 2.0 is discussed in more 
  1542. detail in OS/2 Version 2.0 - Volume 2:  DOS and Windows Environment. 
  1543.  
  1544.  
  1545. ΓòÉΓòÉΓòÉ 11.11. Workplace Shell ΓòÉΓòÉΓòÉ
  1546.  
  1547. The component of the operating system which is responsible for interaction with 
  1548. the end user is known as the user shell.  OS/2 Version 2.0  provides an 
  1549. enhanced, object-based user shell known as the Workplace Shell, which 
  1550. implements the 1991 SAA CUA Workplace Environment. 
  1551.  
  1552. In the Workplace Shell, system resources such as files, printers, etc. are 
  1553. regarded as objects, and represented by graphical icons on the screen. Users 
  1554. may manipulate objects (open them for editing, copy them, print them, etc.) by 
  1555. direct manipulation of the icons.  For example, a file is copied from one 
  1556. location to another by pointing to it with the mouse, dragging the object's 
  1557. icon to the required destination, and dropping the icon by releasing the mouse 
  1558. button. This action is known as drag and drop manipulation. 
  1559.  
  1560. The Workplace Shell allows users to become more task-oriented by simplifying 
  1561. the user interface and reducing the amount of system-specific knowledge 
  1562. required to perform work tasks.  The performance of these tasks using the 
  1563. Workplace Shell is more analogous to the way in which such tasks would be 
  1564. performed manually, thereby requiring less user education on the operation of 
  1565. the system. 
  1566.  
  1567. The Workplace Shell is described in detail in OS/2 Version 2.0 - Volume 3: 
  1568. Presentation Manager and Workplace Shell. 
  1569.  
  1570.  
  1571. ΓòÉΓòÉΓòÉ 11.12. Summary ΓòÉΓòÉΓòÉ
  1572.  
  1573. OS/2 Version 2.0 provides significant enhancements over previous versions of 
  1574. OS/2.  It provides a sophisticated memory management and task management 
  1575. architecture, allowing full exploitation of the power of the Intel 80386 
  1576. processor. 
  1577.  
  1578. OS/2 Version 2.0 provides the ability to execute multiple concurrent DOS 
  1579. applications, in full-screen mode or in windows on the Presentation Manager 
  1580. desktop.  These applications may address I/O devices such as printers, 
  1581. scanners, and communications adapters.  Each DOS application typically has 
  1582. approximately 630KB of memory in which to execute and store its data;  for 
  1583. those applications which require more memory, OS/2 Version 2.0 provides 
  1584. emulation of the LIM, EMS, and XMS memory extenders. 
  1585.  
  1586. OS/2 Version 2.0 provides the ability for Windows applications, written for 
  1587. Windows 3.0 and previous versions of Windows, to execute under OS/2 Version 
  1588. 2.0, concurrently with DOS and OS/2 applications.  Windows applications execute 
  1589. as protected mode processes, and full memory protection and pre-emptive 
  1590. multitasking are, therefore, provided for these applications. 
  1591.  
  1592. OS/2 Version 2.0 provides a more powerful 32-bit programming environment which, 
  1593. due to the use of the flat memory model, is free from the limitations and 
  1594. inherent complexity of the segmented memory model used by DOS and previous 
  1595. versions of OS/2.  Memory management within applications is greatly simplified, 
  1596. allowing applications to be developed faster, with better performance due to 
  1597. reduced memory manipulation overheads.  Through the use of the flat memory 
  1598. model, applications may be more easily ported to or from other operating system 
  1599. platforms. 
  1600.  
  1601. OS/2 Version 2.0 also provides an enhanced user shell, known as the Workplace 
  1602. Shell, through enhancements to Presentation Manager.  The Workplace Shell is 
  1603. object-based and implements the 1991 SAA CUA workplace environment.  This shell 
  1604. is more intuitive than the Presentation Manager shell implemented in previous 
  1605. versions of OS/2, and allows users to become familiar with the system more 
  1606. quickly. 
  1607.  
  1608.  
  1609. ΓòÉΓòÉΓòÉ 12. Memory Management ΓòÉΓòÉΓòÉ
  1610.  
  1611. OS/2 Version 2.0 is based on the Intel 80386 microprocessor architecture, and 
  1612. exploits the 32-bit features of the 80386 processor.  The features used by OS/2 
  1613. Version 2.0 are: 
  1614.  
  1615.  32-bit register set 
  1616.  
  1617.  32-bit instructions/addressing 
  1618.  
  1619.  Large memory objects (greater than 64KB) 
  1620.  
  1621.  Paging. 
  1622.  
  1623. Version 2.0 introduces a flat memory model with a linear address space of 4 
  1624. gigabytes (GB), and removes many of the memory management restrictions 
  1625. experienced in previous versions of OS/2.  The purpose of this chapter is to 
  1626. provide the reader with an understanding of the way that OS/2 Version 2.0 
  1627. manages memory and the impact of this on system administrators and application 
  1628. developers. 
  1629.  
  1630.  
  1631. ΓòÉΓòÉΓòÉ 12.1. Introduction ΓòÉΓòÉΓòÉ
  1632.  
  1633. Memory management is the way in which an operating system allows applications 
  1634. to access memory, either for private use by a single application or to be 
  1635. shared between applications.  In either case, it is the responsibility of the 
  1636. operating system's memory management component to supervise the correct use of 
  1637. memory and to ensure that no application gains access to memory outside its own 
  1638. address space. 
  1639.  
  1640. Previous versions of OS/2 were based upon the Intel 80286 processor 
  1641. architecture.  In this architecture, there is a limitation on the amount of 
  1642. memory that can be addressed as a single unit.  This is due to the fact that 
  1643. memory is managed in segments of up to 64KB in size.  Previous versions of OS/2 
  1644. maintained a series of descriptor tables for memory segments, and 16 bits were 
  1645. allocated in each table entry for the length of the segment. Thus, each 
  1646. descriptor table entry gave access to a segment of up to 2^16 = 64KB in size. 
  1647.  
  1648. The particular implementation of the segmented memory model within the 80286 
  1649. processor allowed a minimum segment size of 1 byte.  Hence an application could 
  1650. request the allocation of a memory segment from 1 byte to 64KB in size, in a 
  1651. single operation.  These segments formed the basis of memory allocation within 
  1652. the system, and of the virtual memory implementation by which memory 
  1653. overcommitment was supported. 
  1654.  
  1655. If the need arose for more than 64KB to be used for a single memory object or 
  1656. data structure, the programmer and the operating system had to take this 
  1657. limitation into consideration, and implement appropriate algorithms to use 
  1658. multiple memory segments for a single logical structure. 
  1659.  
  1660. OS/2 Version 2.0, however, is based upon the Intel 80386 processor 
  1661. architecture.  This processor has a 32-bit addressing scheme in place of the 
  1662. 24-bit overlapped scheme used in the 80286, thereby giving access to 2^32 = 4GB 
  1663. of memory in a single logical unit. 
  1664.  
  1665. However, if a unit of this size were to be allocated and manipulated in the 
  1666. same segment-oriented manner as implemented in the 80286, severe problems would 
  1667. arise.  For instance, the segment could potentially be larger than the 
  1668. available memory in the system.  An alternative mechanism for memory 
  1669. manipulation is therefore required with the 80386. 
  1670.  
  1671. In the 80386 architecture, memory is split into fixed size units of 4KB. All 
  1672. memory allocation, addressing, swapping and protection is based on pages. As 
  1673. with previous versions of OS/2 the total memory, allocated to all processes 
  1674. running in the system, may exceed the physical memory available. Memory objects 
  1675. or parts of memory objects, which are not required by the currently executing 
  1676. process, may be temporarily migrated out to secondary storage (disk).  When 
  1677. used with a paged memory management scheme, this procedure is known as paging. 
  1678. An application may request a large amount of memory, in which case multiple 
  1679. pages are allocated.  However, since virtual memory is managed on a 
  1680. page-by-page basis, such units of storage may now exist partly in real memory 
  1681. and partly in a file on disk, thereby significantly easing the constraints on 
  1682. memory overcommitment. 
  1683.  
  1684. OS/2 Version 1.3 moved complete segments between main memory and the swap file. 
  1685. The fact that segments were variable in length complicated the management of 
  1686. both main memory and space in the swap file.  There was also the requirement to 
  1687. compress memory regularly to reclaim the gaps, which formed when memory was 
  1688. freed.  Under OS/2 V2.0, in most cases there is no requirement to find 
  1689. contiguous pages in memory to satisfy an allocation request. Consequently there 
  1690. is no need to move pages around in memory.  The exception to this is the need 
  1691. for buffers used in DMA I/O transfer, which must be in contiguous locations in 
  1692. memory. 
  1693.  
  1694. The remainder of this chapter will explore the memory management capabilities 
  1695. of the 80386, as implemented by OS/2 Version 2.0, in more detail. 
  1696.  
  1697.  
  1698. ΓòÉΓòÉΓòÉ 12.2. Flat Memory Model ΓòÉΓòÉΓòÉ
  1699.  
  1700. The memory model used by OS/2 Version 2.0 is known as a flat memory model. This 
  1701. term refers to the fact that memory is regarded as a single large linear 
  1702. address space of 4GB, using 32 bits for direct memory addressing. This view 
  1703. applies for each and every process in OS/2 Version 2.0.  Memory addresses are 
  1704. defined using a 32-bit addressing scheme, which results in a linear address 
  1705. space of 4GB in size. 
  1706.  
  1707. Like the 80286 processor, the 80386 also supports a segmented memory model, 
  1708. except that in the case of the 80386 the maximum segment size is 4GB. While the 
  1709. 80386 processor does not explicitly provide a facility for disabling the 
  1710. segmented memory model, OS/2 Version 2.0 implements the flat memory model by 
  1711. mapping the 4GB address space as a single code segment and a single data 
  1712. segment, each of which has a base address of zero and a size of 4GB. Only two 
  1713. segment selectors are therefore required in the system; an executable/readable 
  1714. code segment in the CS register, and a read/write data segment in the DS, ES, 
  1715. FS, GS, and SS registers.  These selectors are known as aliases, since they all 
  1716. map to the same linear address range.  The way, in which the address space is 
  1717. implemented using the Intel 80386 processor, is explained in Intel 80386 
  1718. Architecture. 
  1719.  
  1720. The 32-bit addressing scheme used by OS/2 Version 2.0 will hereafter be 
  1721. referred to as 0:32, in order to differentiate it from the 16-bit segmented 
  1722. addressing scheme used by previous versions of OS/2, which will be referred to 
  1723. as 16:16. These terms reflect the fact that the older segmented memory model 
  1724. uses a 16-bit segment selector and a 16-bit offset to refer to a specific 
  1725. memory location, whereas the newer flat memory model has no need of a segment 
  1726. selector, and simply uses a 32-bit offset within the system's linear address 
  1727. space. 
  1728.  
  1729. The system's global address space is the entire 4GB linear address space. Each 
  1730. process has its own process address space, completely distinct from that of all 
  1731. other processes in the system.  All threads within a process share the same 
  1732. process address space.  This address space is theoretically also 4GB in size. 
  1733. However, the maximum size for process address spaces is defined at system 
  1734. initialization time and is somewhat less than 4GB, to allow space for memory 
  1735. used by the operating system. 
  1736.  
  1737. Figure "4GB Global Linear Address Space" shows the mapping of a process address 
  1738. space into the system's global address space.  The NN shown in Figure "4GB 
  1739. Global Linear Address Space" represents the maximum defined linear address of 
  1740. the process address space, set at system initialization time.  OS/2 Version 2.0 
  1741. sets this limit to 512MB, reserving the linear address range above this point 
  1742. for operating system use.  The space above 512MB is known as the system region. 
  1743.  
  1744. This limitation on the size of the process address space is used by the 
  1745. operating system to ensure protection of the system region from access by 
  1746. applications.  See Memory Protection for further explanation. 
  1747.  
  1748. Conceptually, the process address space is divided into two different regions, 
  1749. as shown in Figure "4GB Global Linear Address Space".  One of these regions may 
  1750. be accessed by both 16:16 and 0:32 applications, and is known as the 16/32-bit 
  1751. region or compatibility region. The other region is accessible by 0:32 
  1752. applications only, and is known as the 32-bit region. 
  1753.  
  1754. The 16:16 addressing scheme allows access of up to 512MB per process, since the 
  1755. local descriptor tables used in this model contain up to 8192 entries, each of 
  1756. which can point to a segment of up to 64KB in size. In order to ensure that 
  1757. there is no problem in coexisting 16-bit and 32-bit applications under OS/2 
  1758. V2.0, the maximum size of the process address space has been set at 512MB. 
  1759. This means that all memory in the process address space can be addressed using 
  1760. either the 16:16 or the 0:32 addressing scheme. This capability is important 
  1761. since it allows applications to be composed of mixed 16-bit and 32-bit code, 
  1762. allows 32-bit applications to make function calls to 16-bit service layers, and 
  1763. permits 16-bit applications written for OS/2 Version 1.x to run unmodified, 
  1764. effectively allowing a "hybrid" memory management environment. 
  1765.  
  1766. The 32-bit flat memory model greatly simplifies the migration of 32-bit 
  1767. applications to OS/2 Version 2.0 from other operating system platforms, and the 
  1768. migration of OS/2 Version 2.0 applications to other platforms. This is in 
  1769. contrast to the segmented memory model implemented by the 80286 processor. All 
  1770. the features described above arise from the fact that a flat linear memory 
  1771. model is used, taking advantage of the advanced features of the 80386 
  1772. processor.  The paging scheme is more general than the segmentation scheme used 
  1773. by the 80286, and the flat memory model will facilitate any future migration of 
  1774. OS/2 to a hardware platform other than the Intel 80x86 family. 
  1775.  
  1776.  
  1777. ΓòÉΓòÉΓòÉ 12.3. Memory Objects ΓòÉΓòÉΓòÉ
  1778.  
  1779. A memory object is the term used under OS/2 Version 2.0 for a linear, 
  1780. contiguous range of memory addresses, which is regarded and manipulated as a 
  1781. single logical unit by an application.  A memory object is actually composed of 
  1782. one or more discrete 4KB pages, and is viewed as such by the operating system. 
  1783. With minor exceptions however, an application need not be aware of the paged 
  1784. nature of a memory object, since OS/2 Version 2.0 handles all paging 
  1785. internally.  See Physical Memory Management for further discussion of paging. 
  1786.  
  1787. Each process under OS/2 Version 2.0 uses memory objects, and all memory 
  1788. allocation and sharing from an application viewpoint is based on memory 
  1789. objects. The reader may conceptually regard memory objects as similar to 
  1790. segments, but the means of addressing memory objects is greatly simplified, 
  1791. since there is no need to construct the address using a segment selector. 
  1792.  
  1793.  
  1794. ΓòÉΓòÉΓòÉ 12.3.1. Allocation and Management ΓòÉΓòÉΓòÉ
  1795.  
  1796. OS/2 Version 2.0 allows a memory object to have any size between 1 byte and 
  1797. 512MB, which is the maximum amount of memory addressable in a process address 
  1798. space.  A program uses the DosAllocMem() and DosAllocSharedMem() function calls 
  1799. to allocate memory objects. The use of these and other available functions to 
  1800. manipulate memory objects is described in OS/2 Version 2.0 - Volume 4: 
  1801. Application Development. 
  1802.  
  1803. Allocating a memory object with a size of 1 byte will in reality reserve a full 
  1804. 4KB page, since the operating system allocates memory on a page-by-page basis. 
  1805. In order to avoid large amounts of wasted memory, an application, which uses 
  1806. many small memory objects, should request the allocation of a storage pool from 
  1807. the operating system, and then suballocate this storage as required.  This 
  1808. technique reduces memory fragmentation and allows more efficient use of memory 
  1809. resources.  It is described in detail in OS/2 Version 2.0 - Volume 4: 
  1810. Application Development. 
  1811.  
  1812. When a memory object is allocated, its base address and maximum size are 
  1813. defined. The location of the object and the size of the object is fixed for the 
  1814. lifetime of the object.  It can be neither re-sized or moved within the virtual 
  1815. address space. By default, however, no physical storage is reserved for a 
  1816. memory object at allocation time; the operating system merely reserves a range 
  1817. of addresses in the process address space for that object.  A memory object 
  1818. which is allocated in this way is known as a sparse object. 
  1819.  
  1820. Before an application can write to a memory object, the object must be 
  1821. committed; upon commitment, physical storage is reserved for the memory object. 
  1822. Storage can be committed at either of two points: 
  1823.  
  1824.  The memory object may be committed in its entirety at the time the object is 
  1825.   allocated.  This method is typically used for small memory objects, the size 
  1826.   of which is fixed and predetermined prior to execution. 
  1827.  
  1828.  The memory object or any part of it may be committed after allocation, in 4KB 
  1829.   (page) units.  This method is typically used for memory objects such as 
  1830.   documents or spreadsheets, which are likely to increase in size during 
  1831.   execution. 
  1832.  
  1833. This effectively allows an application to increase the size of a memory object 
  1834. in a series of steps, as the storage requirements for that object increase 
  1835. during application execution. A memory object can therefore be allocated at its 
  1836. maximum possible size during initialization, without imposing large memory 
  1837. overheads on the system as a whole, since real storage is reserved only as it 
  1838. is required. 
  1839.  
  1840. Each page within the memory object can be individually committed, or a group of 
  1841. pages may be committed at the same time, up to the maximum size of the memory 
  1842. object stipulated during allocation.  Note that this is one of the few 
  1843. instances where an application developer must be aware of the paged memory 
  1844. architecture. 
  1845.  
  1846.  
  1847. ΓòÉΓòÉΓòÉ 12.3.2. Guard Page Technique ΓòÉΓòÉΓòÉ
  1848.  
  1849. When the amount of real storage reserved for a memory object is increased 
  1850. dynamically by progressive commitment of pages, the application is not required 
  1851. to explicitly determine whether the next write operation will exceed the limit 
  1852. of the storage already reserved.  When such a write operation occurs, the 
  1853. operating system may notify the application, by raising a guard page fault 
  1854. exception. 
  1855.  
  1856. This technique is useful for situations where storage requirements grow 
  1857. linearly.  OS/2 V2.0 implements automatic stack growth by using guard pages. 
  1858. When wishing to limit physical storage requirements but at the same time allow 
  1859. for situations where large data areas might be needed, an application should 
  1860. consider using guard pages.  A memory object is allocated with the largest 
  1861. possible size that might be required. The application then commits the minimum 
  1862. number of pages, that are required. Usually this would start at the lowest 
  1863. address in the memory object and proceed upwards.  The application then marks 
  1864. the next highest page as a guard page. The guard page is also a committed page. 
  1865.  
  1866. The application must also register an exception handler.  Exception handlers 
  1867. are described in Signal and Exception Handling. When the application tries to 
  1868. write data into the guard page, a guard page fault will be raised and control 
  1869. passed to the application's exception handler.  The application must then 
  1870. unguard the current guard page, commit the next highest page and then set guard 
  1871. on that page.  Should the application try to access uncommitted storage above 
  1872. the guard page, a general protection exception will occur. 
  1873.  
  1874. OS/2 Version 2.0 provides a default guard page exception handler, which commits 
  1875. the next lower page in the object;  this is done because the default handler is 
  1876. written to handle dynamic stack growth.  Stacks are always propagated downward. 
  1877. For all threads other than the first in any process, OS/2 V2.0 allocates the 
  1878. stack as a sparse object.  The page with the highest address is committed and 
  1879. the page immediately below it is marked as a guard page.  No other pages are 
  1880. committed.  When the guard page is accessed, the default handler tries to get 
  1881. another guard page below the current one.  If successful, the original guard 
  1882. page becomes a normal stack page. An application could allow the default 
  1883. handler to process guard page exceptions on its private memory objects; 
  1884. however, in most cases the actions taken by this default handler will not be 
  1885. appropriate and an application should register its own exception handler. 
  1886.  
  1887. Use of the guard page technique is strongly recommended whenever the amount of 
  1888. data to be written into a memory object is variable, or when the size of a 
  1889. memory object may increase during execution. The process of creating and 
  1890. registering an exception handler and of using guard pages and the handling of 
  1891. guard page exceptions within applications is described in OS/2 Version 2.0 - 
  1892. Volume 4:  Application Development. 
  1893.  
  1894.  
  1895. ΓòÉΓòÉΓòÉ 12.3.3. Virtual Memory Management ΓòÉΓòÉΓòÉ
  1896.  
  1897. The virtual address space is split into two regions: 
  1898.  
  1899.  System Region 
  1900.  
  1901.   This is the region above the 512MB, which is only accessible to tasks running 
  1902.   at operating system privilege level. 
  1903.  
  1904.  Process Region 
  1905.  
  1906.   This is the first 512MB of the virtual address and only memory objects in 
  1907.   this region are mapped into a process's address space when that process is 
  1908.   running at user privilege level.  Each process present in the system has its 
  1909.   own mapping of this region. The process region is further split into: 
  1910.  
  1911.    - A shared area 
  1912.  
  1913.      This is used to hold shared memory objects such as DLL code and shared 
  1914.      data areas. 
  1915.  
  1916.    - A private area 
  1917.  
  1918.      This contains EXE code and process private data. 
  1919.  
  1920. In order to manage virtual memory, OS/2 V2.0 uses the concept of an arena. 
  1921. There are three arena types in the system: 
  1922.  
  1923.  The system arena 
  1924.  
  1925.  The shared arena 
  1926.  
  1927.  Per-process private arenas. 
  1928.  
  1929. Associated with each arena is the virtual address space, which it maps. The 
  1930. system arena contains all the memory objects that are in the system region. It 
  1931. maps the virtual address space between 512MB and 4GB. The shared arena 
  1932. describes all the shared memory objects in the process region. 
  1933.  
  1934. Each process has its own private arena, which contains EXE code and the 
  1935. process's private data. The private arena starts at the lowest address of the 
  1936. process region's virtual address space and has a minimum size of 64MB. A 
  1937. program loaded into the address space will be loaded at the low end of the 
  1938. address space. Because of this, a particular EXE will always occupy the same 
  1939. range of addresses.  If a program is used by more than one process it is 
  1940. possible to share one copy of the program code. 
  1941.  
  1942. The shared arena is allocated starting at the top end of the process region and 
  1943. moves down towards the private arena. It has a minimum size of 64MB. The upper 
  1944. limit of the private arena and the lower limit of the shared move towards one 
  1945. another. Each object in the shared arena is allocated its own linear address 
  1946. range. It will have the same address range in each of the process address 
  1947. spaces, into which it is mapped. 
  1948.  
  1949. Each process has its own address space, which maps memory objects in the 
  1950. process's private arena and the shared arena. Only those objects in the shared 
  1951. arena, which a process requires access to and is authorized to access, will be 
  1952. mapped into the process's address space. 
  1953.  
  1954. Figure "Process Address Space Layout" 
  1955.  
  1956. Both private and shared storage for memory objects may be allocated within each 
  1957. arena. For example, DLL instance data is located within the shared memory 
  1958. arena, but each instance of the data uses a separate memory object in order to 
  1959. preserve data integrity, and hence each memory object is treated as private 
  1960. storage.  Although separate memory objects, they each map to the same range of 
  1961. addresses in the shared arena. Table "Memory Object Classes" shows the types of 
  1962. storage (private or shared) available within each memory arena, and the uses to 
  1963. which these types of storage may be put by applications. 
  1964.  
  1965. Private storage in the private arena is used for read/write data, allocated at 
  1966. either loadtime or runtime, which is accessed only by a single process. Shared 
  1967. storage in the private arena is used for executable code, which may be shared 
  1968. between processes. 
  1969.  
  1970. Shared storage in the shared arena is used for DLL code and read-only data, as 
  1971. well as DLL read/write data, which is not instance-specific.  Such objects may 
  1972. be accessed by all processes in the system.  Private storage in the shared 
  1973. arena is used for DLL instance data, which is unique to each process accessing 
  1974. the DLL. 
  1975.  
  1976. For a more detailed discussion of the process of virtual memory management, 
  1977. readers should refer to The Design of OS/2. 
  1978.  
  1979.  
  1980. ΓòÉΓòÉΓòÉ 12.3.4. Page Attributes ΓòÉΓòÉΓòÉ
  1981.  
  1982. An application may specify the types of access permitted for memory objects 
  1983. when those objects are allocated, thereby ensuring the proper use of each 
  1984. memory object. The type of access for individual pages within the memory object 
  1985. may be altered subsequent to allocation.  The attributes available for memory 
  1986. objects and their component pages are: 
  1987.  
  1988.  Commit 
  1989.  
  1990.   The pages within a memory object must be committed in order to be used for 
  1991.   read or write operations.  Until it is committed, the system merely reserves 
  1992.   a linear address range without reserving physical storage.  The committing of 
  1993.   a page obtains a page frame for the page; see Address Translation for further 
  1994.   explanation. 
  1995.  
  1996.  Read 
  1997.  
  1998.   Read access to the page is allowed.  All other access attempts will result in 
  1999.   a page fault. 
  2000.  
  2001.  Write 
  2002.  
  2003.   Write access to the page is allowed.  Write access implies both read and 
  2004.   execute access. 
  2005.  
  2006.  Execute 
  2007.  
  2008.   Execute access to the page is allowed.  Execute access implies read access. 
  2009.  
  2010.  Guard 
  2011.  
  2012.   When an application attempts to write into the guard page, a guard page fault 
  2013.   exception is generated for the thread that referenced the guard page.  This 
  2014.   exception can be handled by an application-registered exception handler for 
  2015.   this thread.  This process is described in Guard Page Technique. 
  2016.  
  2017.  Tile 
  2018.  
  2019.   Defining a memory object to be tiled causes it to be placed in the 
  2020.   compatibility region and mapped using the 16:16 addressing scheme, even 
  2021.   though the object may be used by a 0:32 process. 
  2022.  
  2023.   Specifying this attribute has no effect under OS/2 Version 2.0 as all 
  2024.   application-created storage  must reside below the 512MB address limit, and 
  2025.   is therefore within the compatibility region.  This attribute is provided to 
  2026.   allow applications to be developed that will be forwardly compatible with 
  2027.   future versions of the operating system. It is likely that in a future 
  2028.   release of OS/2 the 32-bit region (above 512MB) will be enabled for 
  2029.   application use. This attribute must then be specified for a memory object 
  2030.   that will be used by 16-bit code. 
  2031.  
  2032. The 80386 processor does not distinguish between read and execute access.  The 
  2033. one implies the other.  Write access implies both read and execute access. 
  2034.  
  2035. At allocation, all pages within the object will be given the attributes 
  2036. specified on the DosAllocMem or DosAllocSharedMem. After allocation, attributes 
  2037. of individual pages or groups of pages within the memory object may be changed 
  2038. using the DosSetMem() function.  This function is described in OS/2 Version 2.0 
  2039. - Volume 4:  Application Development. 
  2040.  
  2041.  
  2042. ΓòÉΓòÉΓòÉ 12.3.5. Memory Protection ΓòÉΓòÉΓòÉ
  2043.  
  2044. With the flat memory model, OS/2 V2.0 implements memory protection using two 
  2045. machine states (user and supervisor) and by providing separate address spaces 
  2046. for the supervisor and each of the processes running in the system. The global 
  2047. address space encompasses the entire linear address space and consists of the 
  2048. system region and the current process's address space.  The global address 
  2049. space is only accessible when the processor is running at ring 0, which is 
  2050. reserved for the operating system.  All other processes run in ring 3 
  2051. (privilege level 3). The ring protection architecture of the 80386 processor is 
  2052. described in Privilege Levels. While executing at ring 3, the system region is 
  2053. not visible to the current process. Neither are the addresses spaces of any of 
  2054. the other processes running in the system accessible. 
  2055.  
  2056. Since memory is managed by the operating system on a page-by-page basis, even 
  2057. the allocation of a 1 byte memory object will actually reserve a full page 
  2058. (4KB) in memory.  Furthermore, as the memory protection scheme has also changed 
  2059. under OS/2 Version 2.0, a memory reference outside the expected range but 
  2060. within the 4KB page boundary will not give the Trap 000D segmentation violation 
  2061. experienced in previous versions of OS/2. Instead, an exception is generated 
  2062. only when an invalid page is referenced or an invalid access occurs (such as 
  2063. write operation to a page previously declared as read-only).  An invalid page 
  2064. is a page that has not been committed in the process address space or is 
  2065. outside the limit of the address space. 
  2066.  
  2067. Here is where we see a major difference between the segmented memory model and 
  2068. the linear or flat memory model.  A 32-bit program can address the entire 4GB 
  2069. address space with a 32-bit offset.  Memory is seen as a single continuum. 
  2070. 16-bit applications see memory as discrete areas each with their own defined 
  2071. size. 16-bit applications running under OS/2 V2.0 are subject to segment limit 
  2072. checking and generally behave as they did under previous versions of OS/2.  The 
  2073. discussion here refers to 32-bit applications. 
  2074.  
  2075. For example, an application may request the allocation of 1KB of memory; the 
  2076. operating system will allocate a full 4KB page.  The application can then write 
  2077. up to 4096 bytes of data into the memory object, and the operating system will 
  2078. not detect an error.  However, if the application attempts to write 4097 bytes 
  2079. into the memory object, a general protection exception (Trap 000D) may occur. 
  2080. Such an exception is only generated when the next page in the process address 
  2081. space is invalid. If the next page exists in the process address space, no 
  2082. exception is generated. 
  2083.  
  2084. Note that any of these exceptions may be trapped and processed using exception 
  2085. handlers registered by the application.  See Task Management for further 
  2086. discussion of exception handling. 
  2087.  
  2088. Since 32-bit programs can address the entire address space with a 32-bit 
  2089. offset, it is easier for 32-bit programs to corrupt data in the shared region 
  2090. than for 16-bit programs.  OS/2 V2.0 provides a facility for DLL routines to 
  2091. have their shared data areas allocated in a protected area of memory, which is 
  2092. not accessible to 32-bit programs, thereby providing a level of protection. 
  2093. There is a new PROTECT option on the MEMMAN statement in the CONFIG.SYS, which 
  2094. is used to enable memory protection for DLLs. 
  2095.  
  2096.  
  2097. ΓòÉΓòÉΓòÉ 12.4. Physical Memory Management ΓòÉΓòÉΓòÉ
  2098.  
  2099. The previous discussion has concentrated on the application's view of memory 
  2100. management. Applications running under OS/2 Version 2.0 need not even be aware 
  2101. of the mechanism through which the 0:32 addressing scheme is implemented; the 
  2102. application only deals with 32-bit addresses, and is not concerned with the way 
  2103. these are mapped to physical addresses in processor storage. 
  2104.  
  2105. When using the flat memory model, the 80386 processor regards each memory 
  2106. address as a 32-bit address, seen solely as an offset from address 0 into a 
  2107. linear address space.  If the 80386 processor is running with paging disabled, 
  2108. this linear address and the physical address in memory are equal. Physical 
  2109. memory is now divided 4KB blocks, which is allocated as required to processes 
  2110. running in the system. There is no direct correlation between the linear 
  2111. address of a page and its address in physical storage.  In fact, not all pages 
  2112. in the linear address space will be represented in physical memory.  The 80386 
  2113. processor has a paging subsystem, which handles the conversion of the linear 
  2114. address into a physical address and also detects situations where there is no 
  2115. physical page corresponding to a page in the linear address space. 
  2116.  
  2117. Paging is usually carried out without any awareness on the part of an 
  2118. application. 
  2119.  
  2120.  
  2121. ΓòÉΓòÉΓòÉ 12.4.1. Address Translation ΓòÉΓòÉΓòÉ
  2122.  
  2123. With paging enabled the 80386 processor maps the linear address using an entry 
  2124. in the page directory and an entry in one of the page tables currently present 
  2125. in the system.  The page directory and page tables are structures created in 
  2126. the linear address space. The address translation process is shown in Figure 
  2127. "Address Translation - Linear Address to Physical Address". The linear address 
  2128. is split into three parts: 
  2129.  
  2130.  Page Directory Entry or PDE (10 bits) 
  2131.  Page Table Entry or PTE (10 bits) 
  2132.  Page Offset or PO (12 bits). 
  2133.  
  2134. OS/2 Version 2.0 maintains a single page directory for the entire system; the 
  2135. entries contained within the page directory are unique for each process in the 
  2136. system, and are copied into the page directory by the operating system when a 
  2137. task switch occurs.  The page directory entries contain pointers to the page 
  2138. tables, which in turn point to the memory pages (both shared and private) 
  2139. belonging to the current process.  The page directory and each page table are 
  2140. defined to be one page (4KB) in size, and are aligned on 4KB page boundaries. 
  2141. There is a maximum of 1024 entries per page table, and a maximum of 1024 page 
  2142. tables per page directory.  Since each page is 4KB in size, this means a single 
  2143. page table gives access to 4MB of memory. 1024 page tables, the maximum, gives 
  2144. access to the full 4GB global address space. 
  2145.  
  2146. The format of page directory entries and page table entries are identical. The 
  2147. upper 20 bits in each page directory entry specify the address of the page 
  2148. table, and the lower 12 bits are used to store control and status information. 
  2149. This 20-bit address is possible since each page table is aligned on a 4KB 
  2150. boundary.  Hence, the lower 12 bits of the address are assumed to be zero for 
  2151. addressing purposes; these 12 bits are in fact used to contain control and 
  2152. status information.  A page table contains entries pointing to the physical 
  2153. memory location of the page. 
  2154.  
  2155. The address resolution may appear complex, but in fact very little overhead is 
  2156. involved since the 80386 maintains a cache buffer for page table entries, known 
  2157. as the translation lookaside buffer (TLB). The TLB satisfies most access 
  2158. requests for page tables, avoiding the necessity to access system memory for 
  2159. PDEs and PTEs. 
  2160.  
  2161. When page table entries are changed or during a task switch, the TLB must be 
  2162. flushed in order to remove invalid entries. Otherwise, invalid data might be 
  2163. used for address translation. 
  2164.  
  2165. For each page frame, a bit in the page table entry known as the present bit 
  2166. indicates whether the address in that page table entry maps to a page in 
  2167. physical memory.  When the present bit is set, the page is in memory.  When the 
  2168. present bit is clear in either the page directory or in the page table, a page 
  2169. fault is generated if an attempt is made to use a page table entry for address 
  2170. translation. 
  2171.  
  2172.  
  2173. ΓòÉΓòÉΓòÉ 12.4.2. Managing Paging ΓòÉΓòÉΓòÉ
  2174.  
  2175. Pages can have the following types: 
  2176.  
  2177. Fixed            These are pages that are permanently resident in storage. 
  2178.                  They may not be moved or swapped out to secondary storage. 
  2179.  
  2180. Swappable        When there is a shortage of physical memory, these pages can 
  2181.                  be swapped to disk. 
  2182.  
  2183. Discardable      It is possible to reload these pages from either an EXE or a 
  2184.                  DLL file. When memory becomes overcommitted, space used for 
  2185.                  discardable pages can be freed up, and when the pages are 
  2186.                  required again they are loaded from the original file. 
  2187.  
  2188. Invalid          These are pages that have been allocated but not committed. 
  2189.  
  2190. The operating system needs information over and above that contained in the 
  2191. page directories and the page tables to manage the paging process. OS/2 V2.0 
  2192. builds three arrays of data structures that represent: 
  2193.  
  2194.  1. Committed pages in the process and system address spaces 
  2195.  
  2196.  2. Pages in physical memory 
  2197.  
  2198.  3. Pages held on secondary storage. 
  2199.  
  2200. The following sections describe these arrays and the way in which OS/2 V2.0 
  2201. uses them. 
  2202.  
  2203. Virtual Pages 
  2204.  
  2205. A virtual page structure (VP) is allocated whenever a page is committed in 
  2206. response to an application request.  No physical memory is allocated for the 
  2207. page at this time.  The PTE is updated to point to the VP but the present bit 
  2208. in the page table is not set. When the page is first referenced, a page fault 
  2209. occurs.  The allocation of physical memory is left to the last possible moment. 
  2210.  
  2211. The virtual page structure describes the current disposition of a page. When a 
  2212. page fault occurs, the virtual memory manager obtains the address of the VP 
  2213. from the page table entry, and uses the information held in the VP to determine 
  2214. the required action which must be taken to resolve the page fault. The possible 
  2215. actions are: 
  2216.  
  2217.  The page manager will provide a page, initialized to zeros if required 
  2218.  
  2219.  The page will be loaded from an EXE or DLL file 
  2220.  
  2221.  The page will be loaded from the swap file on secondary storage. 
  2222.  
  2223. If the page is to be loaded from an EXE or DLL, the VP contains a pointer to 
  2224. the loader block. If from the swap file, it points to a page in the swap file. 
  2225.  
  2226. Page Frames 
  2227.  
  2228. A page frame (PF) exists for each page of physical memory in the system.  Page 
  2229. frames are stored in an array, which is indexed by the physical frame number 
  2230. within the system. 
  2231.  
  2232. A page frame may have one of three states: 
  2233.  
  2234.  Free, in which case the page frame is available for allocation to a process 
  2235.   in the system.  The page frame addresses of all the free pages in the system 
  2236.   are held in a doubly linked list known as the free list, with PFs for fast 
  2237.   planar memory at one end of the list, and PFs for the slower memory on 
  2238.   adapters at the other end.  This permits the allocation of faster memory 
  2239.   before the slower memory. 
  2240.  
  2241.  In-use, in which case the page has been allocated to the current process in 
  2242.   the system. 
  2243.  
  2244.  Idle, in which case the page frame has been allocated to a process, but no 
  2245.   page table entries for the current process reference this frame. This lack of 
  2246.   reference normally indicates that the process, which is using the page, has 
  2247.   been switched out; that is, the process is not the current process. 
  2248.  
  2249. When the system is overcommitted, the number of free and idle page frames 
  2250. begins to fall.  When it reaches a threshold level, pages are migrated from the 
  2251. in-use state to the idle state by a page ager. The page ager looks for pages 
  2252. that have not been accessed since the last time the page ager ran.  The ager 
  2253. examines the accessed bit in the PTE.  If clear, it marks the page not present. 
  2254. If a page is referenced by more than one PTE, a shared page, all PTEs must be 
  2255. marked not present before the page is placed on the idle list. The idle list is 
  2256. also a doubly linked list and least recently used (LRU) entries are at one end 
  2257. of the list and most recently used (MRU) entries are at the other end of the 
  2258. list. 
  2259.  
  2260. Pages are also classified as dirty or clean.  A dirty page is one that has been 
  2261. written to and must have its contents swapped to disk before it can be 
  2262. allocated to another process.  A clean page does not need to be swapped out, 
  2263. since it typically contains code or read-only data, which can be reloaded from 
  2264. the original file on disk.  It could also be that a copy of the page currently 
  2265. exists in the swap file. 
  2266.  
  2267. Placing a page frame on the idle list does not destroy its contents.  The page 
  2268. frame is only reused when the operating system is forced to steal a page frame 
  2269. from the idle list in order to accommodate the loading of a page after a page 
  2270. fault. The swapping of an idle swappable page to disk is also usually delayed 
  2271. until there is a need to reuse the page frame to satisfy a page fault.  To take 
  2272. advantage of the capability of certain I/O adapters to chain operations, other 
  2273. pages on the idle list may be swapped out at the same time. 
  2274.  
  2275. Swap Frames 
  2276.  
  2277. A swap frame (SF) is similar to a page frame except that an SF refers to a slot 
  2278. in the swap file, which can be used to hold a page when main storage becomes 
  2279. overcommitted. The swap frame array is used to control allocation of space in 
  2280. the swap file. If the SWAP option is present on the MEMMAN statement in the 
  2281. CONFIG.SYS, the SWAPPER.DAT file will be created in the directory pointed to in 
  2282. the SWAPPATH statement.  The initial size of the file is 512KB. 
  2283.  
  2284. The size of the swap file is determined by the amount of memory overcommitment 
  2285. in the system.  The algorithm used in this calculation takes into account the 
  2286. amount of storage needed for all the fixed pages and swappable pages in the 
  2287. system and the amount by which this exceeds the physical storage installed in 
  2288. the system.  The memory overcommitment is recalculated each time pages are 
  2289. committed.  It should not be necessary to increase the size of the swap file 
  2290. each time pages are committed because of the fact that increases to the swap 
  2291. file will always be in steps of 512KB. 
  2292.  
  2293. However allocation of VPs to SFs does not take place when the page is 
  2294. committed. All the operating system ensures at this time is that there will be 
  2295. space in the swap file for the page when it becomes necessary to swap it out. 
  2296. The SF is allocated to the page when it is first selected from the idle list 
  2297. for swapping.  When the page is swapped back in, the SF will not be immediately 
  2298. freed up, but a link to the VP is maintained. If the page is then again 
  2299. selected for swapping out before it has been changed, it will not be necessary 
  2300. to write it to disk as a copy of it still exists in the swap file. 
  2301.  
  2302. The OS/2 V2.0 swap file can also decrease in size.  Decrements to the size of 
  2303. the swap file will be in 512KB blocks. When the overcommitment calculation 
  2304. indicates that the swap file is too large by one or more multiples of 512KB, 
  2305. the area at the end of the swap file is marked for shrinking. No new 
  2306. allocations of SFs in the area marked for shrinking will take place.  When all 
  2307. SFs in the shrinkable area are free, the swap file is reduced in size. No 
  2308. attempt is made to force the freeing of SFs in this area; consequently there 
  2309. can be a longish delay in the swap file becoming eligible for shrinking and the 
  2310. shrinking actually taking place. 
  2311.  
  2312.  
  2313. ΓòÉΓòÉΓòÉ 12.4.3. Processing Page Faults ΓòÉΓòÉΓòÉ
  2314.  
  2315. When a process attempts to access a page, for which the present bit in the PTE 
  2316. is not set, a page fault occurs.  The page fault is passed to OS/2 Version 
  2317. 2.0's page fault handler, and the following sequence of events takes place: 
  2318.  
  2319.  1. A PF is allocated from the free list or the LRU end of the idle list. 
  2320.     Should the PF be taken from the idle list, and its current contents be 
  2321.     marked as "dirty ", it will be necessary to first write the page to the 
  2322.     swap file. 
  2323.  
  2324.  2. Once the PF is available, its contents will be loaded based on information 
  2325.     contained in the VP.  The source could be one of the following: 
  2326.  
  2327.     If the page is marked "allocate on demand ", the physical memory manager 
  2328.      will provide the page. If requested the page is initialized to zeros. 
  2329.  
  2330.     If the page is discardable, it is reloaded from an executable file on 
  2331.      disk. 
  2332.  
  2333.     If the page is swappable but is currently on the idle list, it can be 
  2334.      reclaimed because it is still present in memory. 
  2335.  
  2336.     If the page is swapped out, it is reloaded from the swap file. 
  2337.  
  2338.  3. The PTE is updated with the PF address and the present bit is set on. 
  2339.  
  2340.  4. The TLB is flushed. 
  2341.  
  2342.  5. The program instruction that caused the exception is restarted. 
  2343.  
  2344. Figure "Page Swapping" 
  2345.  
  2346.  
  2347. ΓòÉΓòÉΓòÉ 12.5. 16-Bit Applications in a 32-Bit Environment ΓòÉΓòÉΓòÉ
  2348.  
  2349. One of the major concerns when developing OS/2 Version 2.0 was to ensure 
  2350. compatibility with applications written for previous versions of OS/2. Since 
  2351. there are a significant number of 16:16 modules and resources in existence, 
  2352. consideration was also given to the coexistence and interaction of 16:16 and 
  2353. 0:32 modules and resources within an application, with issues such as: 
  2354.  
  2355.  0:32 applications using existing 16:16 DLLs and libraries 
  2356.  
  2357.  16:16 applications using 0:32 DLLs and libraries 
  2358.  
  2359.  "Huge" segments (greater than 64KB in size). 
  2360.  
  2361. The 16:16 applications are placed in the compatibility region and accessed 
  2362. through tiled local descriptor tables (LDTs); see Address Conversion and 
  2363. Translation for further explanation. Such applications take advantage of the 
  2364. fact that memory in the compatibility region may be addressed with both 16:16 
  2365. and 0:32 addressing schemes.  Addressing memory objects from both 16-bit and 
  2366. 32-bit applications is therefore quite simple, since no physical movement of 
  2367. the memory object is required.  Since the entire process address space under 
  2368. OS/2 Version 2.0 is located within the compatibility region, this also means 
  2369. that communication between 16-bit and 32-bit applications and modules may take 
  2370. place. 
  2371.  
  2372.  
  2373. ΓòÉΓòÉΓòÉ 12.5.1. Address Conversion and Translation ΓòÉΓòÉΓòÉ
  2374.  
  2375. Under previous versions of OS/2, an application addressed memory using the 
  2376. segmented memory model, which was translated to physical memory addresses by 
  2377. the operating system using a local descriptor table (LDT), with one LDT per 
  2378. process.  Under OS/2 Version 2.0, 16:16 references (see Flat Memory Model) are 
  2379. managed by a technique called LDT tiling, which provides compatibility for 
  2380. 16-bit applications and provides a mechanism for 32-bit applications to utilize 
  2381. 16-bit libraries. 
  2382.  
  2383. A tiled LDT contains up to 8192 descriptors, where the segment base address in 
  2384. each descriptor is a multiple of 64KB, and each descriptor therefore points to 
  2385. a 64KB region of memory.  Contiguous descriptors map into a contiguous linear 
  2386. address space, thereby using a potential maximum of 512MB, and allowing a 
  2387. 16-bit application to address the 512MB of the process address space in the 
  2388. compatibility region. Figure "Mapping 16:16 Memory References" shows the way in 
  2389. which memory addresses within the tiled LDT are mapped into the process address 
  2390. space. 
  2391.  
  2392. The addresses within the process address space may be referenced by 
  2393. applications or modules using the 16:16 addressing scheme, in a similar manner 
  2394. to previous versions of OS/2.  However, the same physical memory locations may 
  2395. also be accessed by 32-bit applications and modules using the 0:32 addressing 
  2396. scheme.  Both the LDT entries used by the 16:16 scheme and the page table 
  2397. entries used by the 0:32 scheme may translate to the same memory locations. 
  2398. This translation enables 32-bit applications to make use of 16-bit modules and 
  2399. resources, and allows 32-bit and 16-bit applications to coexist and communicate 
  2400. with one another. 
  2401.  
  2402. LDTs are managed in a different way from previous versions of OS/2.  Each LDT 
  2403. is allocated as a sparse object until descriptors are inserted upon loading an 
  2404. application.  Descriptors for shared memory objects are inserted downwards 
  2405. commencing at the top of the LDT, whereas private memory object descriptors are 
  2406. inserted upwards commencing at the bottom of the LDT. This order reflects the 
  2407. management of the linear address space by the operating system.  Therefore the 
  2408. minimum LDT size is 8KB, using one page for the shared descriptors and one page 
  2409. for the private descriptors.  Note that each code or data selector reserves a 
  2410. full 64KB of linear address space to be able to handle an eventual reallocation 
  2411. of segments to the maximum size of 64KB.  See Figure "Mapping 16:16 Memory 
  2412. References". 
  2413.  
  2414. The following memory objects use LDT descriptors: 
  2415.  
  2416.  16-bit .EXE files 
  2417.  
  2418.  16-bit .DLL files 
  2419.  
  2420.  DosAllocSeg() calls 
  2421.  
  2422.  DosAllocMem() calls with tiling 
  2423.  
  2424.  32-bit .EXE files with tiling 
  2425.  
  2426.  32-bit .DLL files with tiling. 
  2427.  
  2428. This use of descriptors is effectively equivalent to the implementation used in 
  2429. the previous versions of OS/2.  It must be noted, however, that a memory object 
  2430. greater than 64KB may not be handled in an orderly manner by a 16-bit 
  2431. application. 
  2432.  
  2433. A memory object allocated in the compatibility region has both a 16:16 address 
  2434. (far16) and a 0:32 address (near32), allowing access by applications using 
  2435. either addressing scheme.  The two types of addresses are related by the 
  2436. following arithmetic functions: 
  2437.  
  2438.  near32 = SEL (far16) >> 3 << 16 + OFFSET(far16) 
  2439.  
  2440.  far16  = MAKEP (HIGH (near32) << 3 + 7, LOW (near32) ). 
  2441.  
  2442. The term near32 refers to the fact that all 0:32 calls are of type near (based 
  2443. on offset only).  The term far16 refers to the fact that 16:16 calls are based 
  2444. on the segment selector and offset used in combination.  Bit shift right is 
  2445. shown as >>, and bit shift left is shown as <<. 
  2446.  
  2447. 32-bit executable modules can therefore create 16:16 aliases for memory objects 
  2448. in the compatibility region and conversely, 16-bit modules may create 0:32 bit 
  2449. aliases.  As these conversions are arithmetically based, a high performance 
  2450. address conversion layer may be implemented, assuring automatic address 
  2451. conversion between 16:16 and 0:32 memory objects.  See Thunking. 
  2452.  
  2453.  
  2454. ΓòÉΓòÉΓòÉ 12.5.2. Thunking ΓòÉΓòÉΓòÉ
  2455.  
  2456. Address conversion between 16:16 and 0:32 addressing models is achieved by the 
  2457. use of a thunk. A thunk exists for each programming interface in the system. 
  2458. Thunking implies: 
  2459.  
  2460.  Converting the addressing scheme used (0:32 - 16) 
  2461.  
  2462.   OS/2 Version 2.0 uses a flat linear (0:32) addressing scheme.  16:16 program 
  2463.   modules expect a selector:offset (16:16) addressing scheme.  The thunk 
  2464.   converts memory references between these two schemes.  See Figure "Thunk 
  2465.   Concept". 
  2466.  
  2467.  Different parameter sizes (DWORD versus WORD) 
  2468.  
  2469.   The 0:32 addressing scheme uses 32-bit (LONG or DWORD) values as the basic 
  2470.   data type.  The 16:16 scheme uses a 16-bit (SHORT or WORD) value as the basic 
  2471.   data type.  The thunk converts between WORD and DWORD length data. 
  2472.  
  2473.  Structure alignment 
  2474.  
  2475.   The 16:16 addressing scheme normally causes data structures to be WORD 
  2476.   aligned, whereas the 0:32 addressing scheme defaults to DWORD alignment; 
  2477.   blank space is included within the structure so that each element is aligned 
  2478.   on a DWORD boundary.  The thunk must realign data structures where necessary. 
  2479.  
  2480.  Stack conversion 
  2481.  
  2482.   The 0:32 stack is DWORD-based.  The 16:16 stack is WORD-based. Stack-based 
  2483.   addressing between the two schemes is therefore different. The thunk must 
  2484.   make a new copy of the parameters on the stack, realigning when needed. 
  2485.  
  2486.  Restrictions on the 16:16 addressing scheme 
  2487.  
  2488.   The 16:16 code can only address up to 64KB in any segment.  The only limit on 
  2489.   the 0:32 code is the maximum size of the linear address space (4GB). This 
  2490.   disparity creates a problem when a data item in the 0:32 module or resource 
  2491.   is larger than 64KB or is allocated across a 64KB boundary, and must be 
  2492.   passed to a 16:16 routine.  Where possible, the thunk must make the data item 
  2493.   addressable by the 16:16 routine. 
  2494.  
  2495.  Different call models 
  2496.  
  2497.   The 0:32 addressing scheme uses near calls for all operating system 
  2498.   functions.  The 16:16 scheme uses far calls for operating system functions. 
  2499.   If a procedure using one scheme tries to call a procedure of the other 
  2500.   scheme, different return values may be placed on the stack.  The thunk is 
  2501.   responsible for producing the correct calling sequence. 
  2502.  
  2503. The above considerations apply to all executable programs, libraries (both 
  2504. statically and dynamically linked) and Presentation Manager messages. 
  2505.  
  2506. OS/2 Version 2.0 provides a number of thunks to handle function calls from 
  2507. 16-bit applications to 32-bit service layers, and vice versa.  Almost all of 
  2508. the thunks in OS/2 Version 2.0 are of the 0:32 to 16:16 conversion kind, except 
  2509. for those that handle semaphores and DosSubxxxx() service calls.  Thunks are 
  2510. packaged with the module that contains the supporting code for the 16-bit 
  2511. and/or the 32-bit entry point.  See Figure "Thunks - 16-Bit versus 32-Bit" for 
  2512. an overview of the two different types of thunks. This implementation of mixed 
  2513. 16:16 and 0:32 applications also raises a number of considerations: 
  2514.  
  2515.  Each resource will effectively occupy at least 4KB (one page), since this is 
  2516.   the minimum allocated in the 32-bit environment. 
  2517.  
  2518.  Stack size is a maximum of 64KB, since this is the maximum addressable by the 
  2519.   16-bit portion of the application. 
  2520.  
  2521.  In Presentation Manager applications, caution must be exercised when passing 
  2522.   user-defined messages between window procedures in modules that use different 
  2523.   addressing models; such messages will require application-defined thunks. 
  2524.  
  2525.  Presentation Manager hooks should only be used with system-defined message 
  2526.   contents. 
  2527.  
  2528. When developing 32-bit applications using 16-bit modules, the programmer is 
  2529. responsible for supplying appropriate address conversion via thunks, for 
  2530. pointers passed as parameters and for application-defined messages under 
  2531. Presentation Manager. These considerations and restrictions are discussed 
  2532. further in OS/2 Version 2.0 - Volume 4:  Application Development. 
  2533.  
  2534.  
  2535. ΓòÉΓòÉΓòÉ 12.5.3. Shared Memory ΓòÉΓòÉΓòÉ
  2536.  
  2537. When memory objects are shared between processes in the 16-bit environment, the 
  2538. processes may share either the linear address spaces or the actual physical 
  2539. pages, depending upon the way in which the memory is shared.  The allocation of 
  2540. shared memory by 16-bit applications using the DosAllocShrSeg() function 
  2541. involves shared linear addresses, which are referenced by different LDT entries 
  2542. in each 16-bit process.  This mapping of LDT entries to linear addresses is 
  2543. shown in Figure "16:16 Shared Address Ranges". 
  2544.  
  2545. Memory objects are shared using the alias technique, whereby the different 
  2546. 16:16 memory references used by each application are mapped by the operating 
  2547. system, using the tiled LDTs, to the same locations in memory. This is very 
  2548. similar to the technique used for shared memory in a pure 0:32 environment. 
  2549.  
  2550.  
  2551. ΓòÉΓòÉΓòÉ 12.5.4. Program Loading ΓòÉΓòÉΓòÉ
  2552.  
  2553. OS/2 V2.0 will load programs linked by both LINK386 (the linear executable 
  2554. linker) and by LINK (the segmented executable linker).  Executables linked 
  2555. under previous versions of OS/2 can be executed without relinking on OS/2 V2.0. 
  2556.  
  2557. Included in the executable files are relocation records (also referred to as 
  2558. fixup records), because not all address references can be resolved at the time 
  2559. of linking. These records are used by the OS/2 program loader to resolve 
  2560. addresses that were unknown at link time. There is a difference in the way that 
  2561. LINK386 and LINK packages fixup records.  LINK386 fixup records are identified 
  2562. by the page to which they belong, whereas LINK produces fixup records by 
  2563. segment. 
  2564.  
  2565. LINK386 executables are page orientated.  LINK executables are segment 
  2566. orientated.  The loader employs different strategies when handling modules 
  2567. produced by the different link editors.  In both cases there is no preloading 
  2568. of any part of the executable.  Loading only takes place when an attempt is 
  2569. made to access a section of the module, which is not already loaded. 
  2570.  
  2571. In the case of LINK386, the executable will be loaded on a page-by-page basis. 
  2572. Reloading parts of a module that has been discarded is no problem since when a 
  2573. page fault occurs, the contents of the page and its fixup records can easily be 
  2574. recovered from the EXE or DLL file on disk. 
  2575.  
  2576. With LINK executables, the situation is different as everything is segment 
  2577. based.  The procedure that is followed depends on whether a particular segment 
  2578. is swappable or discardable.  Again there is no preloading of segments.  The 
  2579. initial load of a particular segment is triggered by a segment not present 
  2580. fault.  At this time, sufficient pages to hold the segment will be allocated. 
  2581. The complete segment is loaded and fixups applied.  If the segment and hence 
  2582. the pages that contain it are swappable, the fixup records are discarded.  In 
  2583. the case of discardable segments, the fixup data is reorganized on a per-page 
  2584. basis and held in swappable memory.  Pages of a swappable segment are recovered 
  2585. from the swap file.  When a page of a discardable segment needs to be 
  2586. recovered, it must be reloaded from the EXE or DLL file.  After the first load 
  2587. of the segment, only the page needs loading, as the fixup data is now available 
  2588. by page. Generally read-only pages are discardable, read/write pages are 
  2589. swappable. 
  2590.  
  2591. However there is a further complication.  Memory is always allocated in a 
  2592. multiple of 4KB pages.  If a segment contains 20 bytes or 4000 bytes, one page 
  2593. will be allocated to contain it. There is a potential for using far more memory 
  2594. to load a program than the program actually requires.  To overcome this, OS/2 
  2595. V2.0 uses a technique called segment packing.  A single page may contain parts 
  2596. from two or more segments.  When segments are packed onto a page, the page is 
  2597. always marked swappable. This is true even if all segments on the page are 
  2598. read-only. 
  2599.  
  2600. By default, segment packing is enabled.  The MEMMAN statement has a new option 
  2601. NOPACK, which turns off segment packing. A segment will be considered for 
  2602. packing, if there are other qualifying segments, its is less than a certain 
  2603. size and if loaded on its own, would result in there being significant free 
  2604. space in the last or only page into which the segment is loaded. The current 
  2605. recommendation would be to leave segment packing enabled. 
  2606.  
  2607.  
  2608. ΓòÉΓòÉΓòÉ 12.6. Summary ΓòÉΓòÉΓòÉ
  2609.  
  2610. OS/2 Version 2.0 provides significant enhancements in memory management over 
  2611. previous versions of OS/2.  Full use is made in Version 2.0 of the 32-bit 
  2612. addressing and paged virtual memory capabilities of the Intel 80386 processor, 
  2613. giving theoretical access to 4GB of memory per process.  In practical terms, 
  2614. however, it is unlikely that the full amount of memory could be used, due to 
  2615. other constraining factors such as hardware limitations. 
  2616.  
  2617. OS/2 Version 2.0 manages its memory as a single linear address space of up to 
  2618. 4GB in size.  This global address space is divided into a number of regions. 
  2619. The region below 512MB is known as the process address space, and is available 
  2620. to applications for storage of executable code, resources and data.  The region 
  2621. above 512MB is reserved for operating system use.  The choice of 512MB as the 
  2622. dividing line between the two regions allows 16-bit applications and resources, 
  2623. written for previous versions of OS/2, to be executed and address memory within 
  2624. the process address space. 
  2625.  
  2626. OS/2 Version 2.0 allocates memory in multiples of 4KB; each 4KB unit is known 
  2627. as a page.  An application may request larger memory objects, and may access 
  2628. and manipulate these objects as logical entities, but the operating system 
  2629. internally manages each page as a separate unit.  This allows a more efficient 
  2630. virtual memory implementation, since individual pages may be swapped in and out 
  2631. of real storage, rather than entire memory objects. Page swapping is typically 
  2632. faster, especially when memory objects become very large. 
  2633.  
  2634. OS/2 Version 2.0 allows 16-bit applications and resources to execute within any 
  2635. process, since all processes execute in memory within the 16:16 addressing 
  2636. scheme limit of 512MB.  OS/2 Version 2.0 also allows interaction between 16-bit 
  2637. and 32-bit modules within a process, and provides address conversion, parameter 
  2638. conversion, stack alignment, etc., between 16:16 and 0:32 addressing schemes 
  2639. using thunk layers. 
  2640.  
  2641. The memory management implementation under OS/2 Version 2.0, therefore, 
  2642. provides access to larger amounts of physical and virtual storage in a more 
  2643. efficient manner than previous versions of OS/2, and removes many of the 
  2644. constraints imposed by previous versions.  At the same time, it maintains 
  2645. compatibility with 16-bit applications and resources. 
  2646.  
  2647.  
  2648. ΓòÉΓòÉΓòÉ 13. Task Management ΓòÉΓòÉΓòÉ
  2649.  
  2650. The task management component of OS/2 Version 2.0 controls the execution and 
  2651. dispatching of processes and threads started by the user or by applications. 
  2652. The design objective of task management in OS/2 Version 2.0 was to meet the 
  2653. following criteria: 
  2654.  
  2655.  Support all existing 16-bit applications written for previous versions of 
  2656.   OS/2 
  2657.  
  2658.  Support the development and execution of 32-bit applications 
  2659.  
  2660.  Relieve system constraints on resources such as threads 
  2661.  
  2662.  Simplify the management of processes and threads within applications. 
  2663.  
  2664. This chapter discusses the implementation of task management under OS/2 Version 
  2665. 2.0 in order to satisfy these criteria. 
  2666.  
  2667.  
  2668. ΓòÉΓòÉΓòÉ 13.1. Dispatching ΓòÉΓòÉΓòÉ
  2669.  
  2670. OS/2 Version 2.0 treats all processes executing in the system as protected mode 
  2671. processes.  No real mode support is provided by OS/2 Version 2.0; such support 
  2672. is not necessary since the Multiple Virtual DOS Machines feature allows DOS and 
  2673. DOS extender applications such as Microsoft Windows 3.0 applications to run in 
  2674. virtual DOS machines, which are regarded by the operating system as protected 
  2675. mode tasks in their own right.  In this way, full pre-emptive multitasking and 
  2676. memory protection are available to all applications executing in the system, 
  2677. including DOS and Microsoft Windows applications. 
  2678.  
  2679.  
  2680. ΓòÉΓòÉΓòÉ 13.1.1. 16-Bit Application Support ΓòÉΓòÉΓòÉ
  2681.  
  2682. OS/2 Version 2.0 supports the execution of 16-bit applications directly, with 
  2683. no modification required.  These applications execute as protected mode 
  2684. processes under operating system control, exactly as they did under previous 
  2685. versions of OS/2.  Full memory protection and interprocess communication 
  2686. facilities are available to such applications. 
  2687.  
  2688. OS/2 Version 2.0 also allows both 16-bit and 32-bit modules and resources to 
  2689. reside and execute within the same process.  Address conversion and translation 
  2690. is accomplished using tiled local descriptor tables and thunks.  These concepts 
  2691. are fully described in 16-Bit Applications in a 32-Bit Environment. 
  2692.  
  2693.  
  2694. ΓòÉΓòÉΓòÉ 13.1.2. 32-Bit Application Support ΓòÉΓòÉΓòÉ
  2695.  
  2696. To take full advantage of the 32-bit flat memory model implemented by OS/2 
  2697. Version 2.0, a full set of 32-bit application programming interfaces is 
  2698. provided for developers.  This allows memory allocation in logical units 
  2699. dictated by the requirements of the application rather than by the constraints 
  2700. of the segmented memory model implemented under previous versions of OS/2. 
  2701. Simplified memory management within an application allows developers to write 
  2702. applications that may be more easily migrated to other operating system 
  2703. platforms, perhaps running on non-Intel processors. 
  2704.  
  2705. These 32-bit applications are executed as protected mode processes within the 
  2706. system, and have the same multitasking, multithreading, memory protection and 
  2707. interprocess communication facilities available to 16-bit applications, plus 
  2708. some additional facilities implemented under OS/2 Version 2.0. 
  2709.  
  2710.  
  2711. ΓòÉΓòÉΓòÉ 13.2. Interrupt Handling ΓòÉΓòÉΓòÉ
  2712.  
  2713. The interrupt manager component of the operating system is responsible for 
  2714. maintaining the interrupt context for the system.  It dispatches hardware 
  2715. interrupts to device drivers which are registered for those interrupts. The 
  2716. interrupt manager is also responsible for supervising the use of the 
  2717. programmable interrupt controller (8259 PIC).  Since performance is always a 
  2718. major issue in interrupt handing, particularly with time-critical applications, 
  2719. special considerations have been taken to ensure the maximum possible 
  2720. performance levels. 
  2721.  
  2722. The functions performed by the interrupt manager are basically similar to those 
  2723. implemented for previous versions of OS/2.  The interrupt manager provides the 
  2724. following: 
  2725.  
  2726.  High-performance routing of interrupts to device drivers 
  2727.  
  2728.  Compatibility with 16-bit DevHlp() interfaces 
  2729.  
  2730.  Support for PS/2-like interrupt devices (level-triggered interrupt sharing) 
  2731.  
  2732.  Support for PC AT-like interrupt devices (edge-triggered interrupts) 
  2733.  
  2734.  Efficient interrupt packaging/adaptation for OEM extensions. 
  2735.  
  2736. The internal implementation of the interrupt manager is very similar to 
  2737. previous versions of OS/2.  The only major difference between the interrupt 
  2738. manager in OS/2 Version 2.0 and previous versions is that real mode interrupt 
  2739. handling is no longer supported; this method of interrupt handling is no longer 
  2740. needed due to the provision of the Multiple Virtual DOS Machines feature in 
  2741. OS/2 Version 2.0, which supports DOS applications as virtual 8086 mode tasks. 
  2742. All hardware and software interrupts from virtual 8086 mode tasks in an 80386 
  2743. system cause a switch to protected mode.  Thus interrupt requests issued by DOS 
  2744. applications are translated to the appropriate protected-mode device service 
  2745. requests by the virtual DOS machine.  This process is explained more fully in 
  2746. OS/2 Version 2.0 - Volume 2:  DOS and Windows Environment. 
  2747.  
  2748. Upon servicing an interrupt, the interrupt manager reschedules all threads 
  2749. currently pending in the system. This rescheduling is done to ensure that high 
  2750. priority threads are scheduled and dispatched as soon as possible.  The only 
  2751. exception is the operating system kernel, which cannot be preempted. Forced 
  2752. actions such as Ctrl+Break or DosKillProcess() must be serviced before more 
  2753. application code is executed. This priority is necessary to avoid situations 
  2754. where a process is terminated by the user and an instruction from this process 
  2755. is then executed before the operating system processes the interrupt. 
  2756. Interrupt priorities are therefore checked by the interrupt manager upon 
  2757. receiving each interrupt. 
  2758.  
  2759.  
  2760. ΓòÉΓòÉΓòÉ 13.3. Signal and Exception Handling ΓòÉΓòÉΓòÉ
  2761.  
  2762. Under previous versions of OS/2, signals were dispatched from a number of 
  2763. sources and were used to interrupt executing processes.  These signals included 
  2764. Ctrl-C, Ctrl-Break, and signals generated by the DosKillProcess() function 
  2765. call. 
  2766.  
  2767. Under OS/2 Version 2.0, signal handling has been merged with exception handling 
  2768. to provide a general, portable mechanism for handling all such events.  OS/2 
  2769. Version 2.0 provides four new system functions for exception handling on a 
  2770. per-thread basis: 
  2771.  
  2772.  DosRaiseException() 
  2773.  
  2774.  DosSetExceptionHandler() 
  2775.  
  2776.  DosUnsetExceptionHandler() 
  2777.  
  2778.  DosUnwindException(). 
  2779.  
  2780. The DosSetSignalExceptionFocus() function is used to allow 32-bit applications 
  2781. to inform the operating system that they are to be the focus for Ctrl+Break and 
  2782. Ctrl-C signals.  However, these signals are dispatched and treated as 
  2783. exceptions. 
  2784.  
  2785. Applications may register their own routines using the DosSetExceptionHandler() 
  2786. function to handle specific types of exceptions, including general protection 
  2787. exceptions which could not be trapped by applications under previous versions 
  2788. of OS/2.  These exception handlers may be written in high-level languages such 
  2789. as "C"; they are not required to be written in assembly language, as was the 
  2790. case with previous versions of OS/2. 
  2791.  
  2792. One significant difference in exception handling between OS/2 Version 2.0 and 
  2793. previous versions of OS/2 is the ability, under Version 2.0, to handle general 
  2794. protection exceptions within the application.  Under previous versions, such 
  2795. exceptions invariably resulted in application termination with a Trap 000D 
  2796. error; with Version 2.0 however, an application may recover or at least 
  2797. terminate in an orderly manner. 
  2798.  
  2799. The generalized exception-handling approach has several advantages: 
  2800.  
  2801.  Exception handlers may be chained and/or nested, and each handler may decide 
  2802.   whether or not to pass an exception to subsequent handlers. 
  2803.  
  2804.  Exception handlers under OS/2 Version 2.0 may be written entirely in a 
  2805.   high-level programming language; assembly language routines are not required. 
  2806.   This reduces the dependence on the Intel 80386 architecture, and facilitates 
  2807.   porting applications to other operating system and hardware platforms. 
  2808.  
  2809. Note that OS/2 Version 2.0 does not allow applications to register an exception 
  2810. handler for a "coprocessor not found" exception.  Instead, the operating system 
  2811. itself traps such exceptions and provides transparent floating-point emulation 
  2812. on a per-thread basis. 
  2813.  
  2814. Note that OS/2 Version 2.0 provides its own exception handlers within the 
  2815. service layers for all 32-bit system functions.  These exception handlers allow 
  2816. the service routines to recover from page fault exceptions and general 
  2817. protection exceptions encountered due to bad pointers in applications' function 
  2818. calls.  The function call returns an ERROR_BAD_PARAMETER code rather than a 
  2819. Trap 000D or Trap 000E code, thereby allowing the application to more easily 
  2820. recover from the error. This recoverability represents a significant 
  2821. enhancement over previous versions of OS/2, since it allows easier debugging 
  2822. and more flexible pointer handling, without the necessity for 
  2823. application-registered exception handlers to process these exceptions. 
  2824.  
  2825. Exception handling within applications is described in detail in OS/2 Version 
  2826. 2.0 - Volume 4:  Application Development. The reader will also find programming 
  2827. examples of other topics, covered in this chapter, in that volume. 
  2828.  
  2829.  
  2830. ΓòÉΓòÉΓòÉ 13.4. Thread Management ΓòÉΓòÉΓòÉ
  2831.  
  2832. Under previous versions of OS/2, there was a limitation of 53 threads per 
  2833. process.  Under Version 2.0, this limitation is lifted, and the thread limit 
  2834. for each process is now the same as the overall system limit, that is, a total 
  2835. of 4096 threads.  Note, however, that the operating system itself consumes some 
  2836. threads, so the practical number of threads available to an application will be 
  2837. fewer than 4096. 
  2838.  
  2839. The number of threads available is also affected by the THREADS= statement in 
  2840. CONFIG.SYS.  This statement sets the maximum number of threads available in the 
  2841. system; hence the number of threads available to applications will be the 
  2842. number specified in this statement, less the number of threads consumed by the 
  2843. operating system. 
  2844.  
  2845.  
  2846. ΓòÉΓòÉΓòÉ 13.4.1. Creating Threads ΓòÉΓòÉΓòÉ
  2847.  
  2848. The preparation and dispatching of secondary threads within applications is 
  2849. greatly simplified under OS/2 Version 2.0.  Under previous versions of OS/2, 
  2850. the application was required to explicitly allocate and deallocate memory for 
  2851. the stack segment of a secondary thread.  Version 2.0 allows the operating 
  2852. system to perform the allocation of the stack memory object on the 
  2853. application's behalf as part of the DosCreateThread() function, and to free the 
  2854. stack segment when the thread terminates.  The application need only specify 
  2855. the required size of the segment in the DosCreateThread() call. 
  2856.  
  2857. OS/2 Version 2.0 uses the guard page technique described in Memory Management 
  2858. to progressively commit each thread's stack during execution, up to the maximum 
  2859. size specified in the DosCreateThread() function.  This minimizes the real 
  2860. storage requirement of the stack, makes the most efficient use of available 
  2861. real storage, and thereby improves overall system performance. 
  2862.  
  2863.  
  2864. ΓòÉΓòÉΓòÉ 13.4.2. Controlling Threads ΓòÉΓòÉΓòÉ
  2865.  
  2866. Under previous versions of OS/2, control information for threads was stored in 
  2867. a number of different locations and accessed via a number of function calls. 
  2868. Under Version 2.0, much of this information has been combined into a thread 
  2869. information block (TIB). The TIB contains the following information for the 
  2870. current thread: 
  2871.  
  2872.  Process identifier 
  2873.  Parent process identifier 
  2874.  Module handle 
  2875.  Command line pointer 
  2876.  Environment block pointer 
  2877.  Thread identifier 
  2878.  Priority 
  2879.  Base address of the thread's stack 
  2880.  Stack size 
  2881.  Pointer to the exception handler chain for the thread. 
  2882.  
  2883. The TIB is accessed using the DosGetInfoBlocks() function, which replaces the 
  2884. DosGetPrty(), DosGetPID(), DosGetPPID() and DosGetInfoSeg() functions. 
  2885.  
  2886.  
  2887. ΓòÉΓòÉΓòÉ 13.4.3. Waiting On and Terminating Threads ΓòÉΓòÉΓòÉ
  2888.  
  2889. Under previous versions of OS/2, when an application wished to determine 
  2890. whether an asynchronous thread had completed execution, it was required to do 
  2891. so through the use of semaphores, which were periodically checked by the 
  2892. waiting thread.  OS/2 Version 2.0 provides a DosWaitThread() function which 
  2893. allows an application to determine whether a given thread is currently 
  2894. executing, and to either wait for the thread to complete, or time-out 
  2895. immediately. 
  2896.  
  2897. A thread may also be terminated from within an application using the 
  2898. DosKillThread() function.  Under previous versions of OS/2, a thread could not 
  2899. be forcibly terminated by another thread, unless its parent process was also 
  2900. terminated. 
  2901.  
  2902.  
  2903. ΓòÉΓòÉΓòÉ 13.5. Semaphores ΓòÉΓòÉΓòÉ
  2904.  
  2905. OS/2 Version 2.0 provides significantly enhanced semaphore facilities for 
  2906. synchronization between threads and processes.  In order to maintain 
  2907. compatibility with 16-bit applications, the task management component handles 
  2908. both the older semaphores implemented in previous versions of OS/2, and the new 
  2909. types introduced in Version 2.0. 
  2910.  
  2911. OS/2 Version 2.0 provides two classes of semaphores: private and shared 
  2912. semaphores.  A process may have up to 64KB of private semaphores, available 
  2913. only to threads within that process, and may also access up to 64KB of shared 
  2914. semaphores, available to all processes in the system. 
  2915.  
  2916. There are three different types of semaphores in OS/2 Version 2.0: 
  2917.  
  2918.  Mutex semaphores provide mutually exclusive access to a particular resource. 
  2919.  
  2920.  Event semaphores are used to signal system or application events. 
  2921.  
  2922.  MuxWait semaphores may be used when waiting for multiple events to occur or 
  2923.   multiple mutex semaphores to clear. 
  2924.  
  2925. A particular area of enhancement is that of the suspension/reactivation of 
  2926. threads based on semaphores.  In previous versions of OS/2, the internal 
  2927. reactivation of threads was based on a "multiple wakeup" approach.  When a 
  2928. thread wished to wait for some event, it was placed in an event ID table. 
  2929. Threads waiting for that event were queued in the order in which their wait 
  2930. request occurred.  When the event occurred, all threads waiting for this event 
  2931. would contend for the semaphore, and the first queued thread or the thread with 
  2932. the highest priority would be dispatched. However, this algorithm led to 
  2933. considerable system overhead. 
  2934.  
  2935. Under previous versions of OS/2, the event ID table was examined using a linear 
  2936. search to find waiting threads.  While this method was acceptable for a system 
  2937. with a maximum of 512 threads, it is clearly not suitable for a system with 
  2938. 4096 threads.  OS/2 Version 2.0 provides more sophisticated semaphore services, 
  2939. allowing both "single wakeup" and "multiple wakeup" services in a more 
  2940. efficient manner. 
  2941.  
  2942. Under Version 2.0, the event ID table is implemented using a hashing algorithm, 
  2943. thereby increasing the speed of access to the table and thereby improving 
  2944. performance when resolving thread contention. This algorithm provides a more 
  2945. efficient method of handling the 4096 threads allowed under Version 2.0. 
  2946.  
  2947.  
  2948. ΓòÉΓòÉΓòÉ 13.6. Summary ΓòÉΓòÉΓòÉ
  2949.  
  2950. The task management component of OS/2 Version 2.0 is greatly improved over that 
  2951. implemented in previous versions of OS/2, while maintaining backward 
  2952. compatibility for applications and resources written to previous versions. 
  2953. Significant effort has been made to enhance performance and remove system 
  2954. limitations experienced in previous versions. 
  2955.  
  2956. The result of these efforts is summarized below: 
  2957.  
  2958.  All 16-bit applications and resources may be used in the OS/2 Version 2.0 
  2959.   environment. 
  2960.  
  2961.  New 32-bit applications are able to exploit the benefits of the 80386 
  2962.   processor. 
  2963.  
  2964.  The thread limitation of 53 threads per process is removed. 
  2965.  
  2966.  The thread limitation for the entire system is increased from 512 to 4096 
  2967.   threads. 
  2968.  
  2969.  The process limitation for the entire system is increased to 4095. 
  2970.  
  2971.  The operating system contains more swappable code, thereby reducing its real 
  2972.   memory requirements and allowing more storage to be used by applications. 
  2973.  
  2974. These enhancements provide a greater diversity of function for the application 
  2975. developer, allowing more sophisticated applications to be written and executed 
  2976. under OS/2 Version 2.0 using multiple threads and processes, while reducing the 
  2977. effort required to synchronize and communicate between threads and processes. 
  2978.  
  2979. Threads may be more easily created, controlled and terminated under OS/2 
  2980. Version 2.0 than under previous versions of OS/2, thereby reducing the effort 
  2981. required to generate high-function, multithreaded applications which fully 
  2982. exploit the OS/2 Version 2.0 platform. 
  2983.  
  2984. Improved efficiency in module loading and execution results in enhanced 
  2985. application performance.  Improved mechanisms for resolution of semaphore 
  2986. contention allow improved dispatching and thereby reduce overhead, further 
  2987. enhancing overall performance. 
  2988.  
  2989.  
  2990. ΓòÉΓòÉΓòÉ 14. Debugging Support ΓòÉΓòÉΓòÉ
  2991.  
  2992. The debug component of OS/2 Version 2.0 consists of a set of system services 
  2993. which make it possible to trace and locate problems in programs, in order to 
  2994. increase productivity during the testing phase of the application development 
  2995. process. These services make use of the debug registers present in the Intel 
  2996. 80386 processor to implement features such as data watchpoints and soft 
  2997. instruction breakpoints.  By  using these registers, it becomes possible to 
  2998. implement watchpoints and breakpoints without making modifications to the code 
  2999. being debugged. 
  3000.  
  3001. The debug component does not provide a complete debugging tool, but merely 
  3002. provides a mechanism whereby one process may control and monitor the execution 
  3003. of one or more related processes.  It provides the services which are used by 
  3004. debugging tools such as the C Set/2 debugger. Debug provides functions such as 
  3005. single-stepping through a program, interrogation of processor registers and 
  3006. locations in memory and changing the contents of registers and locations in 
  3007. memory.  The debugging tool provides the user interface which displays source 
  3008. code listings, allows the user to set breakpoints, start execution of a program 
  3009. and to monitor changes in the value of program variables. 
  3010.  
  3011.  
  3012. ΓòÉΓòÉΓòÉ 14.1. Functional Description ΓòÉΓòÉΓòÉ
  3013.  
  3014. The main objective of the debug component is to provide the required services 
  3015. to enable developers to build powerful debugging tools. The interface provided 
  3016. by the debug component is designed to be: 
  3017.  
  3018.  Fast 
  3019.  Powerful 
  3020.  Flexible 
  3021.  Non-intrusive 
  3022.  Accurate 
  3023.  As portable as possible 
  3024.  Able to debug programs and DLLs 
  3025.  Able to debug mixed or pure 16 and 32-bit applications. 
  3026.  
  3027. The term "non-intrusive" means that debugging services must: 
  3028.  
  3029.  In no way compromise the integrity of the operating system 
  3030.  Minimize any impact on system performance 
  3031.  Have no effect on processes, other than the process or processes being 
  3032.   debugged. 
  3033.  
  3034. Debuggers usually require that a program, to be debugged be preprocessed 
  3035. accordingly, compiled and linked with special options.  If a program is 
  3036. prepared for debugging but not actually being debugged, the debugging services 
  3037. should have no impact on the execution of  the program. Particularly 
  3038. application performance should not be affected in any way. These design 
  3039. objectives of the OS/2 V2.0 debug component should be kept in mind by the 
  3040. developers of debugging tools. 
  3041.  
  3042. The power of the debug component is an important issue to consider when 
  3043. designing and developing debugging tools. Since the debugger gains access to 
  3044. the memory and registers of the application being debugged, it is the 
  3045. responsibility of the debugging tool developer to ensure the correct use of 
  3046. these resources to prevent deadlocks or inadvertent corruption of application 
  3047. resources. 
  3048.  
  3049. Debuggers should not be used as tools for evaluating program performance. The 
  3050. debug component does not provide reliable timings for the execution of program 
  3051. steps. It is useful, however, for examining the execution path of a particular 
  3052. transaction through a program. 
  3053.  
  3054.  
  3055. ΓòÉΓòÉΓòÉ 14.2. What Can Be Debugged ΓòÉΓòÉΓòÉ
  3056.  
  3057. The debug component sees a process as the unit that will be debugged. Debugging 
  3058. is managed on the basis of a connection between a debugger and a process that 
  3059. was started to run the program that is to be debugged. The debugging tool will 
  3060. usually issue either a DosExecPgm or a DosStartSession call to start the 
  3061. program. When starting the program, flags must be set in the call to request 
  3062. that the program be started for debugging.  Whether the program is started as a 
  3063. child process in the same session as the debugger or as a process in a child 
  3064. session, the connection between the debugger and the program is process to 
  3065. process. 
  3066.  
  3067. The debug component can be used to debug programs running in: 
  3068.  
  3069.  The same screen group (foreground session) 
  3070.  Another screen group 
  3071.  Detached mode (background session). 
  3072.  
  3073. A debugger may debug more than one process simultaneously, but any process can 
  3074. only be connected to one debugger at any one time. All threads within a process 
  3075. are accessible to the debugger. 
  3076.  
  3077. The debugging services allow access to code and data in both a primary 
  3078. executable module and in DLLs. Resources such as DLLs are not associated 
  3079. directly with threads, but are accessed and manipulated by threads.  The debug 
  3080. component, therefore, supports debugging of the DLLs by permitting the debugger 
  3081. to observe the memory of the DLL and the registers of a thread while it uses 
  3082. the DLL. 
  3083.  
  3084. The debug component notifies the debugging tool when a DLL is loaded, and 
  3085. provides the debugging tool with the handle of the module table entry (MTE) of 
  3086. the DLL. From this the debugging tool is able to determine the name of the DLL 
  3087. by issuing a DosQueryModuleName call. 
  3088.  
  3089. The debug component provides control and information at a hardware level. It 
  3090. provides access to a process's registers and memory.  It can be used to start a 
  3091. process executing and provide feedback when the process stops executing, 
  3092. usually because a breakpoint has been encountered.  It provides a notification 
  3093. when a new thread is created in a process and when the contents of designated 
  3094. memory location change. It does not trace the passage of system API calls 
  3095. through the system. It does not understand resources implemented by the 
  3096. operating system. The debug component provides no information about: 
  3097.  
  3098.  Semaphores 
  3099.  Pipes 
  3100.  Queues 
  3101.  Files. 
  3102.  
  3103. The debugging tool, therefore, cannot give feedback on the status of semaphores 
  3104. or the contents of pipes and queues. It is up to the debugging tool to provide 
  3105. facilities that the application programmer would find useful.  One way of 
  3106. providing these facilities is for the debugging tool to include additional 
  3107. routines in an executable module that is being prepared for debugging.  The 
  3108. execution of these routines could be controlled in the same way that the 
  3109. debugging tool controls execution of the program being debugged. 
  3110.  
  3111. The debug component cannot be used to debug processes running in virtual 8086 
  3112. mode (that is, applications executing within a virtual DOS machine). 
  3113.  
  3114.  
  3115. ΓòÉΓòÉΓòÉ 14.3. DosDebug() Function ΓòÉΓòÉΓòÉ
  3116.  
  3117. The debugging services provided by the operating system are accessed using the 
  3118. DosDebug() function.  Debugging services are obtained by repeated calls to 
  3119. DosDebug(), thereby simplifying the interface and increasing portability. 
  3120.  
  3121. This function replaces the DosPTrace() function implemented in previous 
  3122. versions of OS/2.  However, the DosPTrace() function is still  available under 
  3123. OS/2 Version 2.0 as a 16-bit entry point, thus allowing debugging tools written 
  3124. for previous versions of OS/2 to be used to debug 16-bit applications. 
  3125.  
  3126. The typical application programmer is unlikely to use the DosDebug() function. 
  3127. It is intended to be used by developers of high-level application debugging 
  3128. tools. 
  3129.  
  3130. The syntax of DosDebug call is shown in Figure "DosDebug Function". 
  3131.  
  3132. The DbgBuf parameter is a pointer to a data structure, which contains values 
  3133. used to control the execution of the DosDebug() function. One of the fields 
  3134. within the structure is used to hold a command word.  On return, the same field 
  3135. contains a notification code.  Commands may result in the reading or writing of 
  3136. memory, single stepping through the program, changing values in registers or 
  3137. the setting of watchpoints. The notifiers indicate events such as the loading 
  3138. of a DLL, encountering a breakpoint during program execution and watchpoint 
  3139. hits. The command to be executed is placed in the DbgBuf structure together 
  3140. with the necessary additional information for that specific command.  The 
  3141. structure contains fields for all registers present in the system.  There are 
  3142. other fields in the structure which are command specific.  There are also 
  3143. fields for the process ID and the thread ID which identify the target for the 
  3144. debug command. 
  3145.  
  3146. The DosDebug() function, its commands, parameters and return codes are 
  3147. described in detail in the IBM OS/2 Version 2.0 Control Program Reference. 
  3148.  
  3149. The DosDebug() function executes synchronously; that is, the debugging process 
  3150. executing the call must wait for the function to complete and return control 
  3151. before it may continue execution. 
  3152.  
  3153. The result of the DosDebug() call is a return code and an update of the command 
  3154. field with a notification code.  See Figure "Sample DosDebug Function Call". 
  3155.  
  3156. If this is the first DBG_C_Go command to be issued, a typical return code is RC 
  3157. = 0, and the notifier placed in the command field is set = DBG_N_ModuleLoad. 
  3158. This return implies that the application has just loaded an executable module 
  3159. and will always occur at program start.  A notification is generated for each 
  3160. module loaded.  Because there may be several DLLs loaded when the program is 
  3161. started, there will be several notifications pending.  Only a single 
  3162. notification is returned on each DosDebug call.  The debugger must issue 
  3163. DBG_C_Stop commands to retrieve all the outstanding DBG_N_ModuleLoad 
  3164. notifications. 
  3165.  
  3166.  
  3167. ΓòÉΓòÉΓòÉ 14.4. Summary ΓòÉΓòÉΓòÉ
  3168.  
  3169. OS/2 Version 2.0 provides a comprehensive set of debugging facilities which may 
  3170. be used to develop powerful application debugging tools.  These facilities make 
  3171. use of the debug registers present in the 80386 processor, and allow debugging 
  3172. on a per-process basis. The debugging of multi threaded applications is 
  3173. possible. It is also possible to debug code residing in DLLs. 
  3174.  
  3175. Access to the debugging facilities is provided through the DosDebug() function 
  3176. call.  Debugging services are requested by repetitive use of this function call 
  3177. with different command parameters. 
  3178.  
  3179. The DosDebug() function replaces the DosPTrace() function implemented in 
  3180. previous versions of OS/2.  However, the DosPTrace() function is implemented 
  3181. under OS/2 Version 2.0 as a 16-bit entry point, thereby allowing debugging 
  3182. tools written for previous versions of OS/2, and which use the DosPTrace() 
  3183. function, to be used under Version 2.0. 
  3184.  
  3185.  
  3186. ΓòÉΓòÉΓòÉ 15. Installation Considerations ΓòÉΓòÉΓòÉ
  3187.  
  3188. The installation of OS/2 Version 2.0 is greatly simplified when compared to 
  3189. previous versions of OS/2, through the provision of a graphical installation 
  3190. procedure.  This installation procedure addresses a number of the shortcomings 
  3191. experienced in previous versions of OS/2: 
  3192.  
  3193.  It provides greater feedback to the user during installation. 
  3194.  
  3195.  It provides a more flexible way for users to customize their system. 
  3196.  
  3197.   The user is able to add optionally installable features at any time and to 
  3198.   change the system configuration without having to boot from diskette. 
  3199.  
  3200.  It uses the standard OS/2 Presentation Manager user interface to guide the 
  3201.   user through the installation process. 
  3202.  
  3203.  It supports installation from any drive to any drive. 
  3204.  
  3205.   This feature makes it possible to install OS/2 V2.0 from a drive on a LAN 
  3206.   server, CD-ROM or any other media which can be accessed as a "normal" drive 
  3207.   letter. The process of installation over a LAN is described in OS/2 Version 
  3208.   2.0 Remote Installation and Maintenance. 
  3209.  
  3210. The installation procedure provided in Version 2.0 will in most cases be able 
  3211. to sense the hardware configuration of the system on which it is being 
  3212. installed, and will select the required device drivers. This awareness applies 
  3213. to the video and disk subsystems, keyboard and pointing devices. The user will 
  3214. be given the option to change or add to the configuration determined by the 
  3215. installation procedure. 
  3216.  
  3217.  
  3218. ΓòÉΓòÉΓòÉ 15.1. Pre-Installation Planning ΓòÉΓòÉΓòÉ
  3219.  
  3220. The following considerations should be addressed prior to commencing 
  3221. installation of OS/2 Version 2.0. 
  3222.  
  3223.  
  3224. ΓòÉΓòÉΓòÉ 15.1.1. Processor Requirements ΓòÉΓòÉΓòÉ
  3225.  
  3226. OS/2 Version 2.0 is designed to use the instruction set of the Intel 80386 
  3227. processor, and therefore requires a system unit equipped with either an Intel 
  3228. 80386 DX, SX, SL or SLC processor, or subsequent Intel processors such as the 
  3229. 80486 series, which implement the same processor instruction set.  IBM machines 
  3230. equipped with such processors include: 
  3231.  
  3232.  IBM Personal System/1*  (2121) 
  3233.  IBM Personal System/2 Model N33 SX  (8533) 
  3234.  IBM Personal System/2 Model 35 SX  (8535) 
  3235.  IBM Personal System/2 Model 40 SX  (8540) 
  3236.  IBM Personal System/2 Model L40 SX  (8543) 
  3237.  IBM Personal System/2 Model N51 SLC/SX  (8551) 
  3238.  IBM Personal System/2 Model CL51 SX  (8554) 
  3239.  IBM Personal System/2 Model 55 SX  (8555) 
  3240.  IBM Personal System/2 Model 56 SX  (8556) 
  3241.  IBM Personal System/2 Model 57 SX  (8557) 
  3242.  IBM Personal System/2 Model 57 SLC  (8557) 
  3243.  IBM Personal System/2 Model 65 SX  (8565) 
  3244.  IBM Personal System/2 Model 70 386  (8570) 
  3245.  IBM Personal System/2 Model 70 386  (8570) with the IBM Personal System/2 
  3246.   Power Platform* 
  3247.  IBM Personal System/2 Model 70 486  (8570) 
  3248.  IBM Personal System/2 Model P70 386  (8573) 
  3249.  IBM Personal System/2 Model P75 486  (8575) 
  3250.  IBM Personal System/2 Model 80 386  (8580) 
  3251.  IBM Personal System/2 Model 90 XP 486  (8590) 
  3252.  IBM Personal System/2 Model 95 XP 486  (8595). 
  3253.  
  3254. Exception:  The IBM PS/2 N33 SX Model A13, which was available only in certain 
  3255.             countries, does not support OS/2 V2.0. 
  3256.  
  3257. OS/2 Version 2.0 will not run on machines equipped with an Intel 80286 
  3258. processor. Hence machines such as the IBM PC AT*, PS/2 Model 30-286, and Models 
  3259. 50, 50Z, and 60 may not be used to run OS/2 Version 2.0. However, OS/2 V2.0 
  3260. does support 80286-based machines which have been upgraded with a 386 or 486 
  3261. processor using cards such as the AOX MicroMaster** card. 
  3262.  
  3263. The use of OS/2 Version 2.0 is not limited to IBM hardware; the operating 
  3264. system will execute on other manufacturers' machines, provided they are 
  3265. sufficiently compatible and equipped with an appropriate processor and hardware 
  3266. configuration.  For information on hardware compatibility with OS/2 Version 
  3267. 2.0, readers should consult their dealer, hardware supplier or IBM marketing 
  3268. representative.  Information is also available on CompuServe** and IBM bulletin 
  3269. board systems.  Documentation shipped with OS/2 V2.0 contains details of 
  3270. gaining access to these systems. 
  3271.  
  3272. Note:  This new 32-bit OS/2 Version 2.0 uses advanced features of PC systems 
  3273.        that were not exploited with the earlier 16-bit operating systems.  In 
  3274.        order to avoid any problems with installing or running OS/2 V2.0, it is 
  3275.        advisable to update the PC system configuration to the latest release 
  3276.        levels.  Depending on the manufacturer of the system, this may involve 
  3277.        different steps from running the system configuration software through 
  3278.        to replacing the BIOS.  Users of IBM PS/2s should obtain the latest 
  3279.        version of their PS/2 reference diskette from IBM.  Running automatic 
  3280.        system configuration with this reference diskette will ensure the system 
  3281.        is updated to the new level. This particularly applies to PS/2s such as 
  3282.        the Models 90 and 95 which load their BIOS from disk. 
  3283.  
  3284.  
  3285. ΓòÉΓòÉΓòÉ 15.1.2. Memory Requirements ΓòÉΓòÉΓòÉ
  3286.  
  3287. The OS/2 Version 2.0 installation procedure examines the hardware of the 
  3288. machine to determine the amount of installed memory.  Since the recommended 
  3289. minimum memory configuration is 4MB, the installation procedure will indicate 
  3290. an error if less than this amount of memory is present at installation time. 
  3291.  
  3292. Although 4MB is the minimum memory to start OS/2 V2.0, better performance will 
  3293. be achieved with 6MB or more.  This is especially true if the workplace 
  3294. scenario involves running many large or complex applications, or multiple DOS 
  3295. or Windows applications.  Some examples of typical user scenarios can be found 
  3296. in OS/2 Version 2.0 - Volume 3:  Presentation Manager and Workplace Shell. 
  3297.  
  3298.  
  3299. ΓòÉΓòÉΓòÉ 15.1.3. Fixed Disk Requirements ΓòÉΓòÉΓòÉ
  3300.  
  3301. When all installable options are selected, OS/2 Version 2.0 requires 30MB of 
  3302. fixed disk space in which to install itself.  Approximately 26MB is used by the 
  3303. operating system files and 4MB used in the initial SWAPPER.DAT file. This usage 
  3304. may be substantially reduced if some of the installable options are omitted. 
  3305. Users should ensure that the required amount of fixed disk space is available 
  3306. in their system. 
  3307.  
  3308. If partitioning the fixed disk for multiple partitions, users should ensure 
  3309. that the partition into which OS/2 Version 2.0 is to be installed is of 
  3310. sufficient size to accommodate the operating system and required options.  A 
  3311. recommended minimum partition size is 40MB. 
  3312.  
  3313. Don't forget to plan for the appropriate amount of fixed disk space to hold the 
  3314. SWAPPER.DAT file.  This file will grow rapidly when overcommitting the system 
  3315. resources (memory).  Also, the \SPOOL subdirectory holds print jobs that have 
  3316. been spooled and are waiting to be printed.  This subdirectory can quickly use 
  3317. up available disk space if large or complex print jobs are sent. The default 
  3318. path for the spool path is \SPOOL on the drive the operating system is 
  3319. installed on.  The spool path can be changed by opening Spooler settings by 
  3320. selecting in turn OS/2 System from the Desktop, System Setup and Spooler. 
  3321.  
  3322. Partitioning fixed disks for support of OS/2 Version 2.0 is also discussed in 
  3323. Boot Manager. 
  3324.  
  3325.  
  3326. ΓòÉΓòÉΓòÉ 15.2. Beginning Installation ΓòÉΓòÉΓòÉ
  3327.  
  3328. Upon commencing the installation of OS/2 Version 2.0, using the installation 
  3329. diskette, the user is presented with a simple character-based screen which 
  3330. requests the user to insert the initial operating system diskette into the 
  3331. diskette drive.  The first six diskettes (installation diskette and operating 
  3332. system diskettes 1 to 5) are used to prepare and partition the fixed disk, 
  3333. install Boot Manager and dual boot if required, and load the basic code 
  3334. required to drive the graphical installation procedure. 
  3335.  
  3336. Once this code is transferred to the system's fixed disk, the installation 
  3337. procedure prompts the user to reboot the system. When the system restarts, the 
  3338. Presentation Manager shell is loaded and the graphical installation procedure 
  3339. is immediately invoked. Since the operating system has now been loaded off the 
  3340. fixed disk, paging is enabled, relieving constraints on real memory. 
  3341.  
  3342. The graphical installation procedure supports both mouse and keyboard input. A 
  3343. generic mouse driver is provided by the graphical installation procedure, in 
  3344. order to support mouse input before the specific mouse driver is identified and 
  3345. loaded.  This means that certain pointing devices might not be usable at this 
  3346. time and only keyboard input will be accepted. 
  3347.  
  3348. The graphical installation procedure first presents the user with a single 
  3349. dialog box, centered on the screen.  This dialog box enables the user to select 
  3350. one of several options: 
  3351.  
  3352.  Learn how to use a mouse. 
  3353.  
  3354.  Install a basic set of preselected features. 
  3355.  
  3356.  Install all features of OS/2 Version 2.0, accepting the default values for 
  3357.   system options and parameters as assigned by the installation procedure. 
  3358.  
  3359.  Select particular options and features to install, allowing modification of 
  3360.   system parameters. 
  3361.  
  3362. These options are displayed to the user as radio buttons.  Since both mouse and 
  3363. keyboard support are fully enabled within the graphical installation procedure, 
  3364. the user may use either method to select an option.  The user then selects the 
  3365. OK pushbutton to continue. 
  3366.  
  3367. If the user elects to install all options, the installation procedure 
  3368. immediately requests that the user insert the next diskette into the diskette 
  3369. drive. 
  3370.  
  3371. If the user wishes to select particular options to install, the installation 
  3372. procedure presents a further series of dialog boxes from which the user selects 
  3373. the required options and features.  See Installation Options, below. 
  3374.  
  3375.  
  3376. ΓòÉΓòÉΓòÉ 15.3. Installation Options ΓòÉΓòÉΓòÉ
  3377.  
  3378. The user is presented with a panel which displays icons for mouse, keyboard, 
  3379. display, and country options, along with the default setting for each.  These 
  3380. settings are determined by the installation procedure by interrogating the 
  3381. installed hardware in the system.  The user may elect to alter one or more of 
  3382. these settings by selecting a check box next to each icon, and then selecting 
  3383. the OK pushbutton on the dialog box. 
  3384.  
  3385. For each selected option, the installation procedure then displays a dialog box 
  3386. which contains a list of the valid settings for that option.  This list is 
  3387. displayed using a standard Presentation Manager list box.  The user selects the 
  3388. required setting with the mouse or keyboard, and commits the choice by 
  3389. selecting the OK pushbutton. 
  3390.  
  3391. The default options selected by the installation procedure are as follows: 
  3392.  
  3393. Setting      Default 
  3394.  
  3395. Mouse        The installation procedure automatically detects the type of mouse 
  3396.              currently attached to the system (if any) and sets the default 
  3397.              option accordingly.  The user need only make alterations to the 
  3398.              default if mouse support is required and no mouse is currently 
  3399.              attached. 
  3400.  
  3401. Keyboard     The installation procedure automatically detects the type of 
  3402.              keyboard currently attached to the system and sets the default 
  3403.              option accordingly. 
  3404.  
  3405. Display      The installation procedure automatically detects the type of 
  3406.              display adapter currently installed in the system, and sets the 
  3407.              default option accordingly.  The user need only make alterations 
  3408.              if some nonstandard type of display option is required (for 
  3409.              example, the user has an XGA adapter installed, but only wishes to 
  3410.              use it in VGA emulation mode). 
  3411.  
  3412. Country      Unless a National Language Support (NLS) version of OS/2 Version 
  3413.              2.0  is being installed, the country settings default to those for 
  3414.              the United States, with appropriate time, date, and numeric 
  3415.              representations, and use of primary codepage 437 and secondary 
  3416.              codepage 850.  Users who require codepages other than these should 
  3417.              make the appropriate alterations. 
  3418.  
  3419.  
  3420. ΓòÉΓòÉΓòÉ 15.3.1. Installing Optional Features ΓòÉΓòÉΓòÉ
  3421.  
  3422. For optional installable features, the user is prompted to indicate which 
  3423. options are required.  The name of each option is displayed, along with the 
  3424. amount of fixed disk space required by that option.  Selections are made using 
  3425. check boxes, as shown in Figure "Selecting Features to Install". 
  3426.  
  3427. In certain cases, additional information may be specified to install a 
  3428. particular option; for example, the Tools and Games option represents a group 
  3429. of individually installable applications, of which the user may elect to 
  3430. install any or all.  The presence of additional information is indicated using 
  3431. More... pushbuttons adjacent to each such option.  Selecting one of these 
  3432. pushbuttons displays a dialog box which allows the user to configure the 
  3433. option. 
  3434.  
  3435. When the user has selected all the required options to be installed, the 
  3436. installation is commenced by selecting the OK pushbutton on the dialog box. 
  3437.  
  3438.  
  3439. ΓòÉΓòÉΓòÉ 15.3.2. Configuring System Parameters ΓòÉΓòÉΓòÉ
  3440.  
  3441. The graphical installation procedure removes the need for a user to directly 
  3442. access and modify system configuration files such as CONFIG.SYS and 
  3443. AUTOEXEC.BAT during installation.  Instead, the installation procedure provides 
  3444. a simple interface to allow the alteration of system parameters.  This 
  3445. interface is invoked by the user selecting the Software Configuration menu item 
  3446. in the OS/2 Setup and Installation window.  Selection of this item displays an 
  3447. additional window, as shown in Figure "Configuration Details". 
  3448.  
  3449. Other parameters are added to CONFIG.SYS based upon the chosen settings for 
  3450. country, mouse type, etc. 
  3451.  
  3452.  
  3453. ΓòÉΓòÉΓòÉ 15.4. Progress Indication ΓòÉΓòÉΓòÉ
  3454.  
  3455. Once options are configured (or the user indicates that the default options are 
  3456. to be used), the user is prompted to insert the next diskette into the machine. 
  3457. A progress indicator is then displayed, which shows the name of the file 
  3458. currently being installed, and the percentage of data on the current diskette 
  3459. that has already been copied. 
  3460.  
  3461. The progress through the installation is also displayed by the use of diskette 
  3462. icons at the bottom of the screen; the diskette currently being copied is 
  3463. displayed with a highlighted border around it. 
  3464.  
  3465.  
  3466. ΓòÉΓòÉΓòÉ 15.5. After Installation ΓòÉΓòÉΓòÉ
  3467.  
  3468. When installation is complete, the installation procedure instructs the user to 
  3469. reboot the system. OS/2 Version 2.0 is then loaded in the normal way. 
  3470.  
  3471. Notes: 
  3472.  
  3473.  1. Upon loading the operating system for the first time, the Workplace Shell 
  3474.     must initialize itself and build its desktop. This initialization means 
  3475.     that, for this first IPL after installation, the loading time will be 
  3476.     significantly longer than normal. 
  3477.  
  3478.  2. After the system has been started for the first time, it is strongly 
  3479.     recommended that the system be immediately shutdown, followed by a reboot. 
  3480.  
  3481.     It is important that this shutdown be performed before any DOS or Windows 
  3482.     applications are started. 
  3483.  
  3484. When OS/2 V2.0  is first started after installation, startup time will be 
  3485. longer than normal. However OS/2 V2.0 will load the tutorial so that the user 
  3486. has the option to view the OS/2 Version 2.0 Tutorial while the operating system 
  3487. is initializing itself.  This tutorial provides a basic introduction to OS/2 
  3488. Version 2.0 and the graphical user interface, including use of the mouse and 
  3489. keyboard to interact with Presentation Manager. 
  3490.  
  3491. The tutorial provides very simple instructions to allow the user to navigate 
  3492. through the tutorial panels.  Using the tutorial teaches the user about the 
  3493. various capabilities of OS/2 Version 2.0, while at the same time allowing the 
  3494. user to become familiar with the ways of interacting with a typical OS/2 
  3495. Presentation Manager application. 
  3496.  
  3497.  
  3498. ΓòÉΓòÉΓòÉ 15.6. Understanding the System Parameters ΓòÉΓòÉΓòÉ
  3499.  
  3500. The installation of OS/2 Version 2.0 provides the user with a chance to tailor 
  3501. the OS/2 and DOS system parameters from the OS/2 Setup and Installation panel. 
  3502. During normal operation of OS/2 V2.0 there is little need to directly edit 
  3503. system files such as CONFIG.SYS. The installation of OS/2 generates a 
  3504. CONFIG.SYS file in the root directory of the installation drive, similar to 
  3505. that shown in Figure "A Typical OS/2 Version 2.0 CONFIG.SYS".  Note that in 
  3506. this example the user has installed OS/2 V2.0 on the "D:" logical drive. 
  3507.  
  3508. The CONFIG.SYS files for OS/2 V2.0  are similar to those in previous versions 
  3509. of OS/2 with a few exceptions.  Here is a brief explanation of the function 
  3510. performed by each line in the CONFIG.SYS used as an example above.  A full 
  3511. description of each of the statements used can be found in the Online Command 
  3512. Reference. 
  3513.  
  3514. 01   IFS=D:\OS2\HPFS.IFS  /CACHE:384 /CRECL:4 /AUTOCHECK:CDEFG
  3515.  
  3516.           This line installs the High Performance File System (HPFS) driver. 
  3517.           Installable File System (IFS) drivers load code to manage disks and 
  3518.           other storage media with file systems other than FAT (File Allocation 
  3519.           Table). 
  3520.  
  3521.           The /CACHE parameter specifies the amount of memory (KB) that the 
  3522.           HPFS file system driver will use for file system disk caching.  The 
  3523.           cache for the FAT file system is handled by the DISKCACHE= statement, 
  3524.           line 22 in this example. The amount of cache specified in the 
  3525.           CONFIG.SYS can have a significant impact on performance.  The OS/2 
  3526.           V2.0 installation process will select an amount of cache for the 
  3527.           system based on the amount of installed memory, the disk size and the 
  3528.           file system being used. The optimum amount of cache to use will 
  3529.           depend on the factors just mentioned, and the mix of operations 
  3530.           performed by the system.  For example, an I/O intensive system, such 
  3531.           as a server, may perform better with a larger cache. 
  3532.  
  3533.           The /CRECL parameter specifies the maximum record size (in multiples 
  3534.           of 2KB) for caching.  This value is also important for performance as 
  3535.           it represents the maximum size an I/O can be, and still be read into 
  3536.           the HPFS cache. 
  3537.  
  3538.           For more information on the parameters associated with the HPFS 
  3539.           driver, refer to the Online Command Reference. 
  3540.  
  3541. 02   PROTSHELL=D:\OS2\PMSHELL.EXE
  3542.  
  3543.           This line loads PMSHELL.EXE as the user interface program and OS/2 
  3544.           command processor.  PROTSHELL replaces the default OS/2 command 
  3545.           processor (CMD.EXE) with another command processor. 
  3546.  
  3547. 03   SET USER_INI=D:\OS2\OS2.INI
  3548. 04   SET SYSTEM_INI=D:\OS2\OS2SYS.INI
  3549. 05   SET OS2_SHELL=D:\OS2\CMD.EXE
  3550. 06   SET AUTOSTART=PROGRAMS,TASKLIST,FOLDERS
  3551. 07   SET RUNWORKPLACE=D:\OS2\PMSHELL.EXE
  3552. 08   SET COMSPEC=D:\OS2\CMD.EXE
  3553. 10   SET PATH=D:\OS2;D:\OS2\SYSTEM;D:\OS2\MDOS\WINOS2;
  3554.        D:\OS2\INSTALL;D:\;D:\OS2\MDOS;D:\OS2\APPS;
  3555. 11   SET DPATH=D:\OS2;D:\OS2\SYSTEM;D:\OS2\MDOS\WINOS2;
  3556.        D:\OS2\INSTALL;D:\;D:\OS2\BITMAP;D:\OS2\MDOS;D:\OS2\APPS;
  3557. 12   SET PROMPT=$i[$p]
  3558. 13   SET HELP=D:\OS2\HELP;D:\OS2\HELP\TUTORIAL;
  3559. 14   SET GLOSSARY=D:\OS2\HELP\GLOSS;
  3560.  
  3561.           These lines set OS/2 V2.0 system variables stored in the OS/2 V2.0 
  3562.           environment.  The environment is a special place in storage used by 
  3563.           the operating system and applications to store and look up values of 
  3564.           variables. DOS sessions and OS/2 sessions operate independently; 
  3565.           therefore each command processor that starts a session can have its 
  3566.           own environment.  For information on how command processors within a 
  3567.           session inherit the environment, refer to the Online Command 
  3568.           Reference. 
  3569.  
  3570.           The main change from OS/2 V1.3 is the inclusion of some variables 
  3571.           used by the Workplace Shell, namely lines 3 though 7. 
  3572.  
  3573. 09   LIBPATH=.;D:\OS2\DLL;D:\OS2\MDOS;D:\;D:\OS2\APPS\DLL;
  3574.  
  3575.           This sets the LIBPATH variable.  It is used to identify a set of 
  3576.           directories to be searched when OS/2 loads dynamic link libraries. 
  3577.           LIBPATH is not a part of the environment and therefore cannot be 
  3578.           viewed with the SET command.  Also, unlike the PATH environment 
  3579.           variable, the current directory is not searched first.  The entry " 
  3580.           .; " at the beginning of the LIBPATH statement is used to force OS/2 
  3581.           V2.0 to search the current directory. 
  3582.  
  3583. 15   PRIORITY_DISK_IO=YES
  3584.  
  3585.           Specifies disk input/output priority for applications running in the 
  3586.           foreground.  When PRIORITY_DISK_IO=YES is specified, applications 
  3587.           running in the foreground will receive disk I/O priority over 
  3588.           applications running in the background. 
  3589.  
  3590. 16   FILES=20
  3591.  
  3592.           Determines the maximum number of files available in DOS sessions. 
  3593.           Regardless of the FILES= setting, all DOS programs are initialized to 
  3594.           a maximum of 20 files.  It is the responsibility of an application to 
  3595.           increase the number of files up to the maximum set by the FILES= 
  3596.           statement.  Each DOS session can also be customized by changing the 
  3597.           appropriate DOS setting.  This statement has no effect in OS/2 
  3598.           sessions. 
  3599.  
  3600. 17   DEVICE=D:\OS2\TESTCFG.SYS
  3601. 18   DEVICE=D:\OS2\DOS.SYS
  3602. 19   DEVICE=D:\OS2\PMDD.SYS
  3603.  
  3604.           Install device drivers using the DEVICE= statement.  Both DOS and 
  3605.           OS/2 device drivers can be loaded with this statement in the 
  3606.           CONFIG.SYS.  OS/2 V2.0 device drivers are initialized when you start 
  3607.           OS/2 and can process requests from either DOS or OS/2 programs. DOS 
  3608.           device drivers are also initialized when you start the OS/2 operating 
  3609.           system but they can only process requests from DOS programs. 
  3610.  
  3611.           TESTCFG.SYS is a new device driver in OS/2 V2.0 which is used during 
  3612.           the install process to test the system configuration.  This DEVICE 
  3613.           statement should not be removed from the CONFIG.SYS as it is also 
  3614.           used by the selective install process and during device driver 
  3615.           installation. 
  3616.  
  3617. 20   BUFFERS=30
  3618.  
  3619.           Sets the number of disk buffers the system will keep in memory. Each 
  3620.           buffer uses 512 bytes of available memory.  If you run many programs 
  3621.           in OS/2 sessions, you can increase the speed of your system by 
  3622.           increasing the value specified for BUFFERS (for example, BUFFERS=70). 
  3623.           However, remember that when you increase the number of disk buffers, 
  3624.           you decrease the available memory by 512 bytes for each buffer 
  3625.           specified.  In memory-constrained systems (4MB) reduce the number of 
  3626.           buffers to 20. 
  3627.  
  3628. 21   IOPL=YES
  3629.  
  3630.           Allows I/O privilege to be granted to requesting processes in OS/2 
  3631.           sessions. 
  3632.  
  3633. 22   DISKCACHE=64,LW
  3634.  
  3635.           Specifies the number of blocks of storage (KB) allocated to the FAT 
  3636.           file system cache.  This parameter can have a marked effect on 
  3637.           performance.  See the comments on line 01 of this example CONFIG.SYS 
  3638.           and also the Online Command Reference for more information on the 
  3639.           parameters associated with DISKCACHE. 
  3640.  
  3641. 23   MAXWAIT=3
  3642.  
  3643.           Sets the length of time, in seconds, a process waits before the 
  3644.           system assigns it a higher priority.  The most appropriate length of 
  3645.           time to set MAXWAIT to depends on the number of applications that 
  3646.           must run concurrently and the kinds of activities the applications 
  3647.           perform.  The default is 3 seconds. 
  3648.  
  3649. 24   MEMMAN=SWAP,PROTECT
  3650.  
  3651.           This line specifies the various memory management options for the 
  3652.           OS/2 V2.0  environment.  SWAP enables paging whereas NOSWAP disables 
  3653.           paging.  PROTECT enables the use of protected memory by DLLs. There 
  3654.           is also the MOVE/NOMOVE parameter which has no effect under OS/2 V2.0 
  3655.           and is provided for compatibility with OS/2 V1.3 only. 
  3656.  
  3657. 25   SWAPPATH=D:\OS2\SYSTEM 2048 4096
  3658.  
  3659.           The swap file (SWAPPER.DAT) is used to temporarily store pages that 
  3660.           the system has removed from physical memory in order to free up space 
  3661.           to satisfy page-in requests generated as a result of page faults. If 
  3662.           paging is enabled, this command specifies the location and initial 
  3663.           size of the swap file.  The first parameter specifies the amount of 
  3664.           disk space (in KB) at which the system will begin to warn you that 
  3665.           there is less than this amount of space left on the partition 
  3666.           containing your SWAPPER.DAT file.  The second parameter specifies the 
  3667.           size of the swapper file (in KB) initially allocated at the time OS/2 
  3668.           is started. 
  3669.  
  3670. 26   BREAK=OFF
  3671.  
  3672.           The Ctrl-Break keys sequence will stop a command from completing its 
  3673.           task.  The BREAK parameter instructs the system to check if you 
  3674.           pressed Ctrl-Break before the system carries out a program request. 
  3675.           BREAK=ON could decrease overall performance, but means the operating 
  3676.           system will probably intercept Ctrl-Break faster. 
  3677.  
  3678. 27   THREADS=256
  3679.  
  3680.           This specifies the maximum number of threads available to OS/2 V2.0 
  3681.           and its applications.  The maximum that can be specified here is 
  3682.           4095.  Normally the system default of 256 is sufficient.  In 
  3683.           memory-constrained systems (4MB) reduce this to 128. 
  3684.  
  3685. 28   PRINTMONBUFSIZE=134,134,134
  3686.  
  3687.           This sets the parallel-port device-driver buffer size.  Each number 
  3688.           corresponds to the buffer size for LPT1, LPT2, or LPT3 respectively. 
  3689.           The minimum value that can be specified is 134 bytes and the maximum 
  3690.           is 2048 bytes.  The system will default to 134 bytes if 
  3691.           PRINTMONBUFSIZE is not specified or is out of this range.  Changing 
  3692.           these values will allow you to increase the size of the parallel-port 
  3693.           device-driver buffers and thereby increase performance of data 
  3694.           transfer to devices connected to the parallel ports. 
  3695.  
  3696. 29   COUNTRY=001,D:\OS2\SYSTEM\COUNTRY.SYS
  3697.  
  3698.           This specifies the country code and the file containing the country 
  3699.           information used.  This information is selected by the user at 
  3700.           installation.  Refer to the Online Command Reference for more details 
  3701.           and information on code-page switching. 
  3702.  
  3703. 30   SET KEYS=ON
  3704.  
  3705.           This permits commands issued at the OS/2 command prompt to be 
  3706.           retrieved later and reissued and/or edited. 
  3707.  
  3708. 31   REM SET DELDIR=C:\DELETE,512;D:\DELETE,512;E:\DELETE,512;
  3709.        F:\DELETE,512;G:\DELETE,512;
  3710.  
  3711.           The DELDIR environment variable is new with OS/2 V2.0  and is used by 
  3712.           the UNDELETE command.  DELDIR specifies a path used to store files 
  3713.           that have been DELETED or ERASED.  A separate directory and maximum 
  3714.           directory size must be specified for each logical disk. Installation 
  3715.           will add an appropriate DELDIR statement to the CONFIG.SYS but 
  3716.           remarks it out.  To enable UNDELETE, remove the 'REM' from the 
  3717.           beginning of this line. 
  3718.  
  3719. 32   BASEDEV=PRINT02.SYS
  3720. 33   BASEDEV=IBM2FLPY.ADD
  3721. 34   BASEDEV=IBM2SCSI.ADD /LED
  3722. 35   BASEDEV=OS2SCSI.DMD
  3723. 36   BASEDEV=OS2DASD.DMD
  3724.  
  3725.           These lines install base device drivers for the following: 
  3726.           PRINT02.SYS; Device support for locally attached printers on Micro 
  3727.           Channel workstations. 
  3728.           IBM2FLPY.ADD; Device support for diskette drives on Micro Channel 
  3729.           workstations. 
  3730.           IBM2SCSI.ADD; Device support for Micro Channel SCSI adapters. The 
  3731.           /LED parameter is only applicable when running on a PS/2 Model 95 and 
  3732.           if present, the device driver will use the system information display 
  3733.           panel to simulate a disk activity light. 
  3734.           OS2SCSI.DMD; General-purpose device support for non-disk SCSI 
  3735.           devices. 
  3736.           OS2DASD.DMD; General-purpose device support for disk drives. 
  3737.  
  3738.           In addition, OS/2 V2.0 includes the following base device drivers: 
  3739.           PRINT01.SYS; Device support for locally attached printers on 
  3740.           non-Micro Channel workstations. 
  3741.           IBM1FLPY.ADD; Device support for diskette drives on non-Micro Channel 
  3742.           workstations. 
  3743.           IBM1S506.ADD; Device support for non-SCSI disk drives on non-Micro 
  3744.           Channel workstations. 
  3745.           IBM2ADSK.ADD; Device support for non-SCSI disk drives on Micro 
  3746.           Channel workstations. 
  3747.           IBMINT13.I13; General-purpose device support for non-Micro Channel 
  3748.           SCSI adapters. 
  3749.  
  3750.           A device driver is a file that contains the code that the OS/2 
  3751.           operating system needs to recognize a device and correctly process 
  3752.           information received from or sent to that device.  A base device 
  3753.           driver is one that is needed when the OS/2 operating system is first 
  3754.           started. 
  3755.  
  3756.           The BASEDEV statement is used to load base device drivers. Device 
  3757.           support for disks, diskettes, printers connected to the workstation, 
  3758.           and other devices, is loaded with the BASEDEV statement. 
  3759.  
  3760.           Unlike the DEVICE statement, the BASEDEV statement cannot contain 
  3761.           either drive or path information because the OS/2 operating system 
  3762.           cannot process such information at the stage of the startup sequence 
  3763.           when the BASEDEV statements are processed. The root directory of the 
  3764.           startup partition is first searched for the specified file name, then 
  3765.           the \OS2 directory of the startup partition.  If drive or path 
  3766.           information is included in a BASEDEV statement, an error is 
  3767.           generated. 
  3768.  
  3769.           In addition, BASEDEV statements are not necessarily processed in the 
  3770.           order in which they appear in your CONFIG.SYS file.  The extensions 
  3771.           of the file names specified in the BASEDEV statements are examined; 
  3772.           the statements are then processed in the following order of file name 
  3773.           extensions:  .SYS .BID .VSD .TSD .ADD .I13 .FLT then .DMD 
  3774.  
  3775. 37   REM IFS=D:\OS2\CDFS.IFS /Q
  3776. 38   REM DEVICE=D:\OS2\CDROM.SYS /Q /I /N:4
  3777.  
  3778.           These lines contain the CD-ROM file system IFS driver and the IBM 
  3779.           CD-ROM device driver for OS/2 V2.0  If CD-ROM device support was 
  3780.           selected at the OS/2 Setup and Installation screen during 
  3781.           installation, then these lines will be present.  Refer to the Online 
  3782.           Command Reference for an explanation of the parameters used. 
  3783.  
  3784. 39   SET BOOKSHELF=D:\OS2\BOOK
  3785. 40   SET EPATH=D:\OS2\APPS
  3786.  
  3787.           Lines 39 and 40 are two more environment variables used by OS/2 V2.0 
  3788.           or applications.  For example, the BOOKSHELF environment variable 
  3789.           points to the path of the system .INF files.  These files are used by 
  3790.           the system VIEW.EXE. 
  3791.  
  3792. 41   DEVICE=D:\OS2\APPS\SASYNCDB.SYS
  3793.  
  3794.           The SASYNCDx.SYS device driver loads the asynchronous communications 
  3795.           device interface (ACDI) support for the PM terminal program.  If the 
  3796.           PM Terminal program was not installed, this line may be REMarked out. 
  3797.           If this is the case, delete "REM" from the beginning of the line to 
  3798.           enable ACDI support.  Remember, after changes are made to the 
  3799.           CONFIG.SYS the system needs to be rebooted for the changes to come 
  3800.           into effect. Refer to the Online Command Reference entries for Device 
  3801.           Drivers (COM.SYS) for an explanation of how device drivers such as 
  3802.           SASYNCH.SYS and COM.SYS are used. 
  3803.  
  3804. 42   PROTECTONLY=NO
  3805.  
  3806.           This line allows OS/2 to run both DOS and OS/2 processes.  If only 
  3807.           OS/2 applications are required, specify PROTECTONLY=YES. 
  3808.  
  3809. 43   SHELL=D:\OS2\MDOS\COMMAND.COM D:\OS2\MDOS /P
  3810.  
  3811.           The SHELL= line specifies the DOS command processor (COMMAND.COM), or 
  3812.           allows you to replace the DOS command processor with another command 
  3813.           processor.  In this example we are loading and starting the DOS 
  3814.           COMMAND.COM processor.  The parameters following it are specific to 
  3815.           the command processor.  In this case the parameters are the path for 
  3816.           COMMAND.COM and /P, which is used to retain COMMAND.COM in storage. 
  3817.           The SHELL= statement does not affect either the OS/2 SET command, or 
  3818.           the SHELL command in BASIC. 
  3819.  
  3820. 44   FCBS=16,8
  3821. 45   RMSIZE=640
  3822. 46   DEVICE=D:\OS2\MDOS\VEMM.SYS
  3823. 47   DEVICE=D:\OS2\MDOS\VMOUSE.SYS
  3824. 48   DOS=LOW,NOUMB
  3825. 49   DEVICE=D:\OS2\MDOS\VDPX.SYS
  3826. 50   DEVICE=D:\OS2\MDOS\VXMS.SYS /UMB
  3827. 51   DEVICE=D:\OS2\MDOS\VDPMI.SYS
  3828. 52   DEVICE=D:\OS2\MDOS\VWIN.SYS
  3829. 53   DEVICE=D:\OS2\MDOS\VCDROM.SYS
  3830.  
  3831.           Lines 44 through 53 are needed to configure and load drivers for the 
  3832.           DOS environment. 
  3833.  
  3834.           The first line sets the file control block (FCB) management 
  3835.           information for DOS sessions.  A FCB is a record that contains all of 
  3836.           the information about a file (for example, its structure, length, and 
  3837.           name).  If a program tries to open more than the number of files 
  3838.           specified in the FCBS statement, the system closes the least recently 
  3839.           used file control block and opens the new file.  This parameter 
  3840.           should not need to be changed and has no effect on OS/2 sessions. 
  3841.  
  3842.           The RMSIZE= statement specifies the highest storage address allowed 
  3843.           for the DOS operating environment.  In certain circumstances this can 
  3844.           be used to limit the size of the DOS environment. 
  3845.  
  3846.           In line 48, the DOS= parameter specifies whether the DOS kernel will 
  3847.           reside in the high memory area (HMA) and whether the operating system 
  3848.           or DOS applications will control upper memory blocks (UMBs).  The HMA 
  3849.           refers to space between 1MB and 1MB+64KB and UMBs reside between 
  3850.           640KB and 1MB. 
  3851.  
  3852.           If DOS=HIGH/LOW,UMB is specified in CONFIG.SYS, then the operating 
  3853.           system controls the UMBs.  This means that DOS applications can be 
  3854.           loaded into upper memory but cannot allocate UMBs. 
  3855.  
  3856.           On the other hand, if DOS=HIGH/LOW,NOUMB is specified in CONFIG.SYS, 
  3857.           then the operating system will not control any UMBs and DOS 
  3858.           applications can allocate UMBs but cannot be loaded there. 
  3859.  
  3860.           Lines 46 and 47, and 49 through 53 contain the device drivers for the 
  3861.           virtual DOS/Windows environment.  More information on these specific 
  3862.           drivers and a complete discussion of tailoring the DOS environment 
  3863.           under OS/2 V2.0 may be found in OS/2 Version 2.0 - Volume 2:  DOS and 
  3864.           Windows Environment. 
  3865.  
  3866. 54   DEVINFO=SCR,VGA,D:\OS2\VIOTBL.DCP
  3867. 55   SET VIDEO_DEVICES=VIO_VGA
  3868. 56   SET VIO_VGA=DEVICE(BVHVGA)
  3869. 57   DEVICE=D:\OS2\MDOS\VVGA.SYS
  3870. 58   DEVICE=D:\OS2\MDOS\V8514A.SYS
  3871.  
  3872.           These lines configure the display environment under OS/2 V2.0 
  3873.  
  3874.           The DEVINFO= statement in line 54 is used to prepare a device (such 
  3875.           as a keyboard (KBD), display terminal (SCR), or printer (LPT#)) for 
  3876.           codepage switching.  Separate DEVINFO statements are required for 
  3877.           each device to be used for codepage switching. 
  3878.  
  3879.           This line prepares the display screen for codepage switching. The 
  3880.           display statement specifies your display name and a file named 
  3881.           VIOTBL.DCP that contains a video font table for displaying characters 
  3882.           in each of the codepages supported by the system. 
  3883.  
  3884.           Lines 55 and 56 set environment variables related to the display 
  3885.           driver being used. 
  3886.  
  3887.           Lines 57 and 58 load virtual device drivers for the VGA and 8514/A 
  3888.           devices, for use by the DOS/Windows environment.  In this example, 
  3889.           the user specified VGA resolution with an 8514/A adapter installed. 
  3890.  
  3891.           If OS/2 V2.0 were installed on a system with an XGA adapter, and high 
  3892.           resolution was specified for the Windows environment (that is, 
  3893.           Windows was to be run full-screen only), then the appropriate lines 
  3894.           in the CONFIG.SYS would be: 
  3895.  
  3896.                             DEVINFO=SCR,VGA,D:\OS2\VIOTBL.DCP
  3897.                             SET VIDEO_DEVICES=VIO_XGA
  3898.                             SET VIO_XGA=DEVICE(BVHVGA,BVHXGA)
  3899.                             DEVICE=D:\OS2\MDOS\VVGA.SYS
  3900.                             DEVICE=D:\OS2\MDOS\VXGA.SYS
  3901.  
  3902.           Adding or changing your display adapter support after installation 
  3903.           can be performed automatically using the OS/2 V2.0 selective install 
  3904.           process.  A complete description of how this is done can be found in 
  3905.           the Master Help Index under adding display adapter support. 
  3906.  
  3907. 59   DEVICE=D:\OS2\POINTDD.SYS
  3908. 60   DEVICE=D:\OS2\MOUSE.SYS
  3909.  
  3910.           POINTDD.SYS provides mouse-pointer draw support in all text modes for 
  3911.           OS/2 sessions.  To function, an appropriate mouse device driver must 
  3912.           also be loaded.  In this example, this is done in line 60 with the 
  3913.           MOUSE.SYS driver.  These two lines will provide support for a 
  3914.           PS/2-style mouse. 
  3915.  
  3916.           If the pointing device used was a Microsoft mouse attached to the 
  3917.           COM1 port, line 60 would change to: 
  3918.  
  3919.                     60    DEVICE=D:\OS2\MOUSE.SYS SERIAL=COM1
  3920.  
  3921.           Some pointing devices such as the Logitech** mouse need a 
  3922.           device-dependent device driver as well as the MOUSE.SYS 
  3923.           device-independent device driver. 
  3924.  
  3925.           Refer to Pointing Device Support and the Online Command Reference, if 
  3926.           installing support for a pointing device not directly supported by 
  3927.           the OS/2 installation procedure. 
  3928.  
  3929. 61   DEVICE=D:\OS2\COM.SYS
  3930. 62   DEVICE=D:\OS2\MDOS\VCOM.SYS
  3931.  
  3932.           The COM.SYS device driver supports ports COM1, COM2, COM3, and COM4. 
  3933.           It does not provide support for specific devices that are attached to 
  3934.           the COM port.  Instead, it provides enabling support for the 
  3935.           asynchronous communications interface itself. Application programs, 
  3936.           subsystems, and system programs must provide the support needed to 
  3937.           use devices attached to the COM port.  VCOM.SYS is a virtual device 
  3938.           driver that provides support in DOS sessions for up to four COM 
  3939.           ports. 
  3940.  
  3941.           Note:   The COM.SYS device driver is used for all IBM PS/2 models. 
  3942.                   There is no COMDMA.SYS device driver for the IBM PS/2 Models 
  3943.                   90 and 95 as described in the Online Command Reference. 
  3944.  
  3945.           Some devices which attach to the COM ports provide their own device 
  3946.           drivers.  COM.SYS allows other drivers which support COM ports to be 
  3947.           installed, provided they are listed in the CONFIG.SYS before COM.SYS. 
  3948.           When COM.SYS is loaded, it will claim all COM ports not already 
  3949.           allocated to other device drivers. 
  3950.  
  3951.           In the following example DEVCOM1.SYS uses COM1 and PRINTER4.SYS uses 
  3952.           COM4.  COM2 and COM3 are available for use by COM.SYS. 
  3953.  
  3954.                             DEVICE=C:\OS2\DEVCOM1.SYS
  3955.                             DEVICE=C:\OS2\PRINTER4.SYS
  3956.                             DEVICE=C:\OS2\COM.SYS
  3957.  
  3958. 63   CODEPAGE=437,850
  3959. 64   DEVINFO=KBD,US,D:\OS2\KEYBOARD.DCP
  3960.  
  3961.           Line 63 sets the system codepages (defined character sets) to be 
  3962.           prepared by the OS/2 operating system for codepage switching. Line 64 
  3963.           is DEVINFO specification for the keyboard.  It specifies the keyboard 
  3964.           layout and a file named KEYBOARD.DCP that contains a keyboard layout 
  3965.           table for translating keystrokes into the characters of each codepage 
  3966.           supported by the system. Codepage support in OS/2 V2.0 is similar to 
  3967.           that provided under previous versions of OS/2.  More information on 
  3968.           DEVINFO and CODEPAGE can be found in the Online Command Reference. 
  3969.  
  3970.  
  3971. ΓòÉΓòÉΓòÉ 15.7. Starting Programs Automatically ΓòÉΓòÉΓòÉ
  3972.  
  3973. While the system is starting, programs will be started as a result of: 
  3974.  
  3975. Inclusion of commands in STARTUP.CMD 
  3976.  
  3977. This command file is used exactly as it was in previous releases of OS/2. 
  3978. During installation of IBM OS/2 LAN Server components, a STARTUP.CMD file is 
  3979. optionally built, which automatically starts the LAN Server components that 
  3980. were installed. STARTUP.CMD is useful for running programs where: 
  3981.  
  3982.     The order in which programs run is important; one program must complete 
  3983.      before the next one is started 
  3984.  
  3985.     A program must be run only if the previous program ran successfully. 
  3986.  
  3987. Program objects in the Startup folder 
  3988.  
  3989. The Startup folder contains program objects which are to be run when the 
  3990. Workplace Shell is started.  An example is LOGON.EXE which performs a logon to 
  3991. the server.  It should not be used to start programs which are to run 
  3992. continuously.  The Startup folder is found in the OS/2 System folder which 
  3993. appears on the OS/2 desktop.  For a detailed discussion of folders and objects 
  3994. see OS/2 Version 2.0 - Volume 3:  Presentation Manager and Workplace Shell. 
  3995.  
  3996. Programs not closed before the last system shutdown 
  3997.  
  3998. All programs that were started and were still running when the system was last 
  3999. shutdown will be restarted when the system is next started.  This is the 
  4000. preferred method for starting those programs which will run continuously.  An 
  4001. example is the Communications Manager when it is used to provide host terminal 
  4002. emulation. 
  4003.  
  4004. It possible to suppress automatically starting programs from the Startup folder 
  4005. and programs that were not closed. During startup of the Workplace Shell after 
  4006. rebooting the operating system, press and hold the Ctrl, left Shift and F1 keys 
  4007. when the white screen first appears and hold them down till the icons appear on 
  4008. the screen. 
  4009.  
  4010.  
  4011. ΓòÉΓòÉΓòÉ 15.8. Selective Install ΓòÉΓòÉΓòÉ
  4012.  
  4013. The graphical installation procedure provides for the reinstallation of 
  4014. particular operating system features, and the subsequent installation of 
  4015. required features which have not been installed during the initial installation 
  4016. process.  This is achieved by allowing the graphical installation procedure to 
  4017. run as a stand-alone process under Presentation Manager. 
  4018.  
  4019. The graphical installation procedure may, therefore, be executed at any time by 
  4020. choosing Selective Install from the System Setup option in the OS/2 System 
  4021. folder. 
  4022.  
  4023.  
  4024. ΓòÉΓòÉΓòÉ 15.9. Recovering the Desktop ΓòÉΓòÉΓòÉ
  4025.  
  4026. During the installation of OS/2 V2.0, copies of certain system files 
  4027. (CONFIG.SYS, OS2.INI, and OS2SYS.INI) are placed in the \OS2\INSTALL 
  4028. subdirectory.  If the system becomes corrupted and the desktop is no longer 
  4029. usable (after rebooting no icons appear on the desktop or the system TRAPs when 
  4030. starting), it is possible to use these copies to restore the system files to 
  4031. their initial state. 
  4032.  
  4033. Warning:  Using this function will restore the desktop to the same state it was 
  4034.           in immediately after installation.  Any customization done to the 
  4035.           desktop after installation will be lost. 
  4036.  
  4037. To perform this restore function, do the following; 
  4038.  
  4039.  1. Restart the computer. 
  4040.  2. Before the first OS/2 Logo panel appears, hold down Alt+F1 for 20 seconds. 
  4041.  
  4042. When you perform the recovery function described above, the current versions of 
  4043. those files are automatically renamed and are replaced by the default 
  4044. installation versions.  If you have a STARTUP.CMD file, that file is also 
  4045. renamed, so that it will not be executed during the next system startup. 
  4046.  
  4047.  
  4048. ΓòÉΓòÉΓòÉ 15.10. Installation from a LAN ΓòÉΓòÉΓòÉ
  4049.  
  4050. OS/2 Version 2.0 may be installed from another machine on a local area network. 
  4051. This method of installation is typically much faster than installation using 
  4052. diskettes.  Remote installation over a LAN is described in detail in OS/2 
  4053. Version 2.0 Remote Installation and Maintenance. 
  4054.  
  4055.  
  4056. ΓòÉΓòÉΓòÉ 15.11. Installing over Existing Versions ΓòÉΓòÉΓòÉ
  4057.  
  4058. OS/2 Version 2.0  is designed to be installed over OS/2 Version 1.2, OS/2 
  4059. Version 1.3, OS/2 Version 2.0 Limited Availability (LA), DOS, or Windows 3.0. 
  4060. No special considerations are necessary when carrying out such an installation. 
  4061. However, if Boot Manager  is to be used, the machine's fixed disk might need 
  4062. repartitioning to make space for the Boot Manager partition.  See Boot Manager 
  4063. for further information. 
  4064.  
  4065.  
  4066. ΓòÉΓòÉΓòÉ 15.12. Summary ΓòÉΓòÉΓòÉ
  4067.  
  4068. The process of installation has been greatly improved for OS/2 Version 2.0 over 
  4069. previous versions of OS/2.  Once partitioning of the fixed disk and 
  4070. installation of the base operating system has been accomplished, the remainder 
  4071. of the installation procedure is carried out using a graphical installation 
  4072. procedure which runs under Presentation Manager.  Full mouse and keyboard 
  4073. support is provided. 
  4074.  
  4075. Progress indicators are given, allowing the user to easily determine the 
  4076. current point in the process.  Optional features are installed by selecting 
  4077. them from a list of icons.  Default settings for properties such as display and 
  4078. mouse type are determined by interrogating the hardware; these defaults may 
  4079. easily be altered by the user. 
  4080.  
  4081. For those users who may not be familiar with use of the system, a tutorial is 
  4082. provided as part of the graphical installation procedure.  This tutorial 
  4083. illustrates the use of windows, the keyboard and mouse, and drag-and-drop 
  4084. manipulation using icons. 
  4085.  
  4086. Installation of specific optional features may be carried out after the 
  4087. operating system is installed, in an easier manner than with previous versions 
  4088. of OS/2.  The graphical installation procedure is available from the 
  4089. Presentation Manager desktop or from the command line, and may be invoked to 
  4090. install only specific optional features. 
  4091.  
  4092.  
  4093. ΓòÉΓòÉΓòÉ 16. Hardware Considerations ΓòÉΓòÉΓòÉ
  4094.  
  4095. This chapter describes the enhancements made to OS/2 Version 2.0 in the area of 
  4096. hardware support.  We begin by focusing on the I/O-related components of the 
  4097. operating system which are collectively known as the I/O supervisor. Later in 
  4098. this chapter we investigate IBM and OEM hardware support. The changes in OS/2 
  4099. Version 2.0 are specifically targeted to optimize disk device requests through 
  4100. improvements to the High Performance File System (HPFS) and FAT file system 
  4101. drivers, and to make use of the capabilities of the new SCSI adapters and 
  4102. disks. Figure "OS/2 Version 2.0 I/O Related Components" provides an overview of 
  4103. the I/O related components of OS/2 Version 2.0. 
  4104.  
  4105. The enhancements in the I/O supervisor result in: 
  4106.  
  4107.  Improved overall system I/O throughput capability by: 
  4108.  
  4109.    - Using new protocol and data structures designed to optimize the submission 
  4110.      of I/O requests 
  4111.    - Allowing I/O command chaining by permitting file systems to submit a list 
  4112.      of I/O operations to the device driver rather than submitting them one at 
  4113.      a time 
  4114.    - Providing a high-performance mechanism for transferring data to and from 
  4115.      buffers for which pages are physically discontiguous in real storage 
  4116.    - Providing reductions in the overhead of interrupt processing and I/O 
  4117.      request completion 
  4118.  
  4119.  An architected and effective set of interfaces for an Installable File System 
  4120.   (IFS) to allow paging I/O requests to be managed by a File System Driver 
  4121.   (FSD). 
  4122.  
  4123. The remainder of this chapter will discuss device driver and file system 
  4124. changes made under OS/2 Version 2.0, and IBM and OEM hardware support. 
  4125.  
  4126.  
  4127. ΓòÉΓòÉΓòÉ 16.1. Device Driver Support ΓòÉΓòÉΓòÉ
  4128.  
  4129. While OS/2 Version 2.0 is a 32-bit operating system, its device drivers and 
  4130. Device Helper (DevHlp) functions remain 16-bit.  OS/2 V1.3 device drivers are 
  4131. generally compatible with OS/2 V2.0.  New in OS/2 V2.0 is a layered device 
  4132. driver architecture.  Also new are virtual device drivers for use by programs 
  4133. running in virtual DOS machine. 
  4134.  
  4135.  
  4136. ΓòÉΓòÉΓòÉ 16.1.1. Compatibility with OS/2 V1.3 ΓòÉΓòÉΓòÉ
  4137.  
  4138. OS/2 Version 2.0 generally provides compatibility with OS/2 V1.3 device drivers 
  4139. written to the published OS/2 V1.3 device driver interface. Device driver 
  4140. incompatibilities with OS/2 V2.0 are summarized here: 
  4141.  
  4142.  Drivers that directly modify or utilize the contents of the Global Descriptor 
  4143.   Table (GDT) 
  4144.  
  4145.  The PhysToVirt DevHlp returns different results to what is expected 
  4146.  
  4147.  Drivers that set up their own GDT call gate will not work 
  4148.  
  4149.  Drivers that switch to real mode will fail 
  4150.  
  4151.  Device drivers that were written to support a single DOS session can fail if 
  4152.   accessed by more than one DOS session concurrently. 
  4153.  
  4154. Although OS/2 V2.0 device drivers remain 16-bit, the 32-bit architecture of 
  4155. OS/2 V2.0 can affect performance characteristics: 
  4156.  
  4157.  OS/2 V2.0 provides 32-bit demand-paging virtual memory management based on 
  4158.   Intel 386 while OS/2 V1.3 provides 16-bit segment-swapping virtual memory 
  4159.   based on Intel 286 
  4160.  
  4161.   Therefore, I/O requests are no longer guaranteed to occur in a single 
  4162.   physically contiguous memory range. For compatibility, OS/2 V2.0 detects an 
  4163.   OS/2 V1.3 device driver and breaks application I/O requests into multiple I/O 
  4164.   requests to the OS/2 V1.3 driver at physical memory boundaries rather than a 
  4165.   single I/O request as before in OS/2 V1.3. 
  4166.  
  4167.  OS/2 V2.0 supports more than 16 MB of physical memory 
  4168.  
  4169.   For compatibility, when a device driver utilizes an OS/2 V1.3 compatible 
  4170.   request to lock memory for DMA transfers, OS/2 V2.0 rearranges memory so that 
  4171.   the requested physical memory address range is below 16 MB. 
  4172.  
  4173.  
  4174. ΓòÉΓòÉΓòÉ 16.1.2. Virtual Device Drivers ΓòÉΓòÉΓòÉ
  4175.  
  4176. OS/2 Version 2.0 makes use of two distinct types of device drivers to 
  4177. communicate between the operating system and hardware devices: 
  4178.  
  4179.  Physical device drivers communicate directly with hardware devices 
  4180.  
  4181.   They operate in protected mode, and are accessed by protected mode processes 
  4182.   and by virtual device drivers. 
  4183.  
  4184.  Virtual device drivers (VDD) do not communicate directly with hardware 
  4185.   devices; instead, they provide a virtual device driver interface for DOS 
  4186.   applications running in virtual DOS machines 
  4187.  
  4188.   Some VDDs have an associated physical device driver to which they pass 
  4189.   requests. VDDs are 32-bit device drivers and make it possible for devices to 
  4190.   be shared between processes running in virtual DOS machines and OS/2 screen 
  4191.   groups. 
  4192.  
  4193. See OS/2 Version 2.0 - Volume 2:  DOS and Windows Environment for a complete 
  4194. discussion of OS/2 Version 2.0 virtual device drivers. 
  4195.  
  4196.  
  4197. ΓòÉΓòÉΓòÉ 16.1.3. Device Helper Functions ΓòÉΓòÉΓòÉ
  4198.  
  4199. OS/2 Version 2.0 still uses a 16-bit device driver model. In order to optimize 
  4200. existing device drivers for the 32-bit flat memory model, new DevHlp() 
  4201. functions have been added for memory management. 
  4202.  
  4203.  Locking specific address ranges 
  4204.  
  4205.   Since paging is used in OS/2 Version 2.0, segments no longer need to be 
  4206.   physically contiguous in memory.  Thus, when locking these segments in 
  4207.   memory, the memory manager may need to "shuffle" pages to make them 
  4208.   contiguous. 
  4209.  
  4210.   This shuffling can greatly increase the amount of time it takes to perform 
  4211.   the locking.  Locking of entire segments should therefore be avoided by using 
  4212.   the new VMLock DevHlp() function, which locks only the required range of 
  4213.   addresses within a memory object. 
  4214.  
  4215.  Address context conversion without locking 
  4216.  
  4217.   In previous versions of OS/2, device drivers were required to lock the user's 
  4218.   buffers to gain context-free addressability.  Since locking degrades 
  4219.   performance and reduces available pageable system memory, new DevHlp() 
  4220.   functions have been added to convert these addresses without the need for 
  4221.   locking. 
  4222.  
  4223.  Removal of frequent selector loads 
  4224.  
  4225.   Device drivers can reduce the amount of selector loading by using the new 
  4226.   flat memory model DevHlp() functions to allocate memory.  All of the memory 
  4227.   allocated by the new VMAlloc DevHlp() function can be addressed via one flat 
  4228.   selector available to device drivers at initialization time. 
  4229.  
  4230.  Scatter/gather DMA support 
  4231.  
  4232.   Scatter/gather DMA adapters (such as the IBM SCSI adapters described in Micro 
  4233.   Channel Architecture and SCSI) allow DMA operations on physically 
  4234.   discontiguous pages of memory. This ability provides a significant 
  4235.   performance advantage over contiguous DMA operations. 
  4236.  
  4237.   By using the new VMLock DevHlp() function, a device driver can specify that 
  4238.   pages should be locked without being physically contiguous in memory.  VMLock 
  4239.   will then return the physical addresses of each page that was locked. 
  4240.  
  4241.  Address-limited devices 
  4242.  
  4243.   Address-limited devices (using 24-bit addressing) do not support memory above 
  4244.   16MB.  The device drivers for these products will use a new bit on the VMLock 
  4245.   and VMAlloc calls, which specifies that the memory must be locked or 
  4246.   allocated below the 16MB line. 
  4247.  
  4248. The following are some of the new DevHlp() functions implemented in OS/2 
  4249. Version 2.0: 
  4250.  
  4251.  VMAlloc - Allocate block of physical memory 
  4252.  
  4253.   VMAlloc is used to allocate linear and/or physical address space in memory. 
  4254.   These allocations can exceed 64KB in size and can be either fixed, movable or 
  4255.   swappable memory.  This call can be used to map non-system memory into the 
  4256.   current process context. 
  4257.  
  4258.  VMFree - Free memory allocated via VMAlloc 
  4259.  
  4260.   Memory allocated via VMAlloc can be freed with the VMFree DevHlp() function. 
  4261.   VMFree is also used to remove the mappings created by VMGlobalToProcess and 
  4262.   VMProcessToGlobal. 
  4263.  
  4264.  VMLock - Locks a range of memory within a segment 
  4265.  
  4266.   VMLock is used to lock a linear address range into physical memory.  If the 
  4267.   lock is needed for scatter/gather DMA, then a list of physical page addresses 
  4268.   is returned. 
  4269.  
  4270.  VMUnlock - Unlocks a range of memory within a segment 
  4271.  
  4272.   VMUnlock is the counterpart of the VMLock function.  It is used to unlock 
  4273.   memory previously locked via VMLock. 
  4274.  
  4275.  VMProcessToGlobal - Map process address into global address space 
  4276.  
  4277.   The VMProcessToGlobal DevHlp() function is used to convert an address that is 
  4278.   in the context of the current process to an address in a global context. 
  4279.   This allows context-free addressability to the memory objects of a process. 
  4280.  
  4281.  VMGlobalToProcess - Map global address into process address space 
  4282.  
  4283.   VMGlobalToProcess can be used to map a global context address into the 
  4284.   address space of the current process.  When used for video buffers, the 
  4285.   calling process can specify if the memory should be under screen group 
  4286.   control.  This will cause the memory to be validated or invalidated at task 
  4287.   switch time. 
  4288.  
  4289.  VirtToLin - Converts a selector:offset address to a linear address 
  4290.  
  4291.   VirtToLin will convert a selector:offset address into a flat 32-bit linear 
  4292.   address. 
  4293.  
  4294.  LinToGDTSelector - Convert a linear address to a virtual address 
  4295.  
  4296.   LinToGDTSelector is used to convert a linear address to a virtual 
  4297.   (selector:offset) address by mapping the given GDT selector to the memory 
  4298.   region referred to by the given linear address and range. 
  4299.  
  4300.  PhysToGDTSel - Maps a physical address to a GDT selector 
  4301.  
  4302.   PhysToGDTSel converts a 32-bit physical address to a GDT selector:offset 
  4303.   pair. 
  4304.  
  4305.  FreeGDTSelector - Free selector allocated via AllocateGDTSelector 
  4306.  
  4307.   FreeGDTSelector frees up a GDT selector allocated via the AllocGDTSelector 
  4308.   DevHlp() function. 
  4309.  
  4310.  PageListToGDTSelector - Maps given physical addresses to selector 
  4311.  
  4312.   PageListToGDTSelector is used to map physical addresses to a GDT selector, 
  4313.   setting the access byte of the descriptor to the requested type. The virtual 
  4314.   memory needed to map the physical ranges described by the page list array 
  4315.   must not exceed 64KB. 
  4316.  
  4317.  GetDescInfo - Return information on the contents of the descriptor 
  4318.  
  4319.   GetDescInfo is used to return the access byte, linear address, and size of a 
  4320.   descriptor allocated via the AllocGDTSelector DevHlp() function. 
  4321.  
  4322.  PageListToLin - Maps physical pages to a linear address 
  4323.  
  4324.   PageListToLin is used to map physical memory pages described in an array of 
  4325.   page list structures to a linear address. 
  4326.  
  4327.  LinToPageList - Returns the physical pages mapped by a linear range 
  4328.  
  4329.   LinToPageList is used to translate a linear address range to an array of page 
  4330.   list structures that describe the physical pages mapped. 
  4331.  
  4332.  
  4333. ΓòÉΓòÉΓòÉ 16.1.4. New Disk Device Driver ΓòÉΓòÉΓòÉ
  4334.  
  4335. A new disk device driver interface has been defined for use by OS/2 V2.0 file 
  4336. systems. The request-passing mechanism employs a request list of prioritized 
  4337. commands which the device driver may reorder to optimize access.  Read and 
  4338. write operations use scatter/gather descriptors (as used by SCSI adapters) 
  4339. allowing data transfer to and from discontiguous memory buffers.  The interface 
  4340. is designed to be data-structure compatible with future versions of OS/2 in 
  4341. order to minimize work at the time of migration. 
  4342.  
  4343. With this extended device driver support, both the standard OS/2 interface 
  4344. (using ABIOS read/write) and the new high performance interface (using the 
  4345. ABIOS Transfer SCB) allow both OS/2 file systems and the OS/2 kernel to access 
  4346. the disk. 
  4347.  
  4348. The following is a summary of the device driver changes: 
  4349.  
  4350.  The disk device driver records the information indicating the type of DASD 
  4351.   (ESDI/ST506 or SCSI) and the level of caching support for each logical drive 
  4352.   (LID) 
  4353.  
  4354.  Support is provided for the new device command 1Dh - GetDeviceSupport.  The 
  4355.   device driver will return addresses to two structures in the request packet: 
  4356.  
  4357.     1. The Driver Capabilities Structure (DCS) indicates the specific features 
  4358.        that are supported by the device driver 
  4359.  
  4360.        Examples are disk mirroring, disk duplexing and whether the device 
  4361.        supports more than 16MB of memory. 
  4362.  
  4363.     2. The Volume Characteristics Structure (VCS) for the device identified by 
  4364.        the unit code in the device command 
  4365.  
  4366.        Examples of characteristics reported in this structure are read-only, 
  4367.        removable media, average seek time, outboard caching supported, SCB 
  4368.        protocol supported and read prefetch supported. 
  4369.  
  4370.  Support is provided for the new device command 1Ch - ExecuteChain 
  4371.  
  4372.  Support is provided for the new device commands 1Eh, 1Fh, and 20h - Read, 
  4373.   Write and WriteVerify 
  4374.  
  4375.  Support is provided for the new device command 21h - Prefetch 
  4376.  
  4377.  I/O requests are placed on the device queue based on a priority passed in the 
  4378.   request list 
  4379.  
  4380.   To optimize the I/O operation, all requests are sorted in logical block 
  4381.   number sequence.  If a specific flag is on in the request list indicating 
  4382.   that the execution order is critical, then the list will not be sorted. 
  4383.  
  4384.   The possible priorities are: 
  4385.  
  4386.    Priority  Meaning 
  4387.  
  4388.    00h       Prefetch requests 
  4389.  
  4390.    01h       Low priority request - (lazy-write) 
  4391.  
  4392.    02h       Read ahead, low priority pager I/O 
  4393.  
  4394.    04h       Background synchronous user I/O 
  4395.  
  4396.    08h       Foreground synchronous user I/O 
  4397.  
  4398.    10h       High priority pager I/O 
  4399.  
  4400.    80h       Urgent request - used by kernel in critical situations. 
  4401.  
  4402.  Calling threads with ExecuteChain() requests are no longer blocked by the 
  4403.   device driver strategy routine 
  4404.  
  4405.   The strategy routine instead returns control to the caller after the I/O is 
  4406.   initiated or queued. 
  4407.  
  4408.  Upon I/O completion, the device driver calls the notification routine 
  4409.   specified in the request list. 
  4410.  
  4411.  
  4412. ΓòÉΓòÉΓòÉ 16.1.5. Layered Device Driver Architecture ΓòÉΓòÉΓòÉ
  4413.  
  4414. An OS/2 Version 2.0 DASD or SCSI device driver is no longer one large module as 
  4415. with previous versions of OS/2 but a layered device driver. The higher layer 
  4416. that interfaces with the OS/2 file systems and the OS/2 kernel is the Device 
  4417. Manager.  The lower layer that interfaces with the device adapter is the 
  4418. adapter device driver (ADD). In addition, a filter ADD can exist in the middle 
  4419. between the Device Manager and the ADD.  A filter ADD can be used to provide 
  4420. special services such as data compression or data encryption. 
  4421.  
  4422. The new Adapter Device Driver interface for an ADD module defines direct call 
  4423. commands that are issued by the Device Manager or filter ADDs down to the 
  4424. registered entry point of an ADD. 
  4425.  
  4426. It is now possible to add new device support to OS/2 V2.0 merely by writing the 
  4427. device support portion of the device driver.  The higher level routines, 
  4428. required to support disk and SCSI devices, are only written once. 
  4429.  
  4430.  
  4431. ΓòÉΓòÉΓòÉ 16.1.6. Base Device Drivers ΓòÉΓòÉΓòÉ
  4432.  
  4433. In order to be more flexible in providing support for OEM machines, OS/2 
  4434. Version 2.0 introduces a new class of device driver, a base device driver.  A 
  4435. base device driver is one which is needed during the loading of the operating 
  4436. system.  In order to identify and initiate the loading of base device drivers a 
  4437. new CONFIG.SYS statement BASEDEV is introduced.  The BASEDEV statement is used 
  4438. to load support for disks, diskettes and printer devices. 
  4439.  
  4440. Only the name of the base device driver is included on the BASEDEV statement as 
  4441. base device drivers are load during an early stage of OS/2 initialization and 
  4442. there is insufficient support available at this point to process a path.  Base 
  4443. device drivers are installed in the root directory of the partition from which 
  4444. OS/2 is loaded or alternatively in the \OS2 directory in that partition. 
  4445.  
  4446. The BASEDEV statement makes it possible to specify the device drivers required 
  4447. for system initialization.  In previous releases of OS/2 this information was 
  4448. included as part of the system loader and this restricted the range of hardware 
  4449. that these releases could support. 
  4450.  
  4451.  
  4452. ΓòÉΓòÉΓòÉ 16.2. File System Considerations ΓòÉΓòÉΓòÉ
  4453.  
  4454. The following components are new to OS/2 Version 2.0 or contain changes from 
  4455. previous versions: 
  4456.  
  4457.  HPFS device driver 
  4458.  
  4459.  FAT file system device driver 
  4460.  
  4461.  UNDELETE command 
  4462.  
  4463.  Volume manager 
  4464.  
  4465.  Pager (swapper). 
  4466.  
  4467.  
  4468. ΓòÉΓòÉΓòÉ 16.2.1. High Performance File System Changes ΓòÉΓòÉΓòÉ
  4469.  
  4470. The following changes have been made to the High Performance File System (HPFS) 
  4471. driver under OS/2 Version 2.0: 
  4472.  
  4473.  At initialization time, the level of support provided by the device driver is 
  4474.   determined using the new device command 1DH - GetDeviceSupport. 
  4475.  
  4476.  The HPFS driver passes physical addresses for data pointers, in the 
  4477.   appropriate request format, to the device driver. 
  4478.  
  4479.  The HPFS driver now supports command chaining, calling the volume manager 
  4480.   with a list of all contiguous sector requests required to fulfill an I/O 
  4481.   request. 
  4482.  
  4483.   This function is supported for all DASD types. 
  4484.  
  4485.  The HPFS driver supports scatter/gather by passing physical pointers to each 
  4486.   page in the data buffer (physically discontiguous) as part of the I/O 
  4487.   request. 
  4488.  
  4489.   This allows I/O controllers such as the IBM SCSI adapters which support the 
  4490.   scatter/gather capability to perform the I/O in a single operation. 
  4491.  
  4492.  The HPFS driver now supports disk caching in the IFS driver, rather than in 
  4493.   the device driver. 
  4494.  
  4495.  The HPFS driver is able to recognize devices which have outboard caches 
  4496.   (non-system memory), and incorporate them into the total caching scheme. 
  4497.  
  4498.   The HPFS file system under OS/2 Version 2.0 supports a maximum file size of 
  4499.   2GB.  The maximum size for an HPFS volume is 512GB. 
  4500.  
  4501.  
  4502. ΓòÉΓòÉΓòÉ 16.2.2. FAT File System Changes ΓòÉΓòÉΓòÉ
  4503.  
  4504. Changes have also been made to the FAT file system driver under OS/2 Version 
  4505. 2.0, in order to provide improved performance and enhanced support for disk 
  4506. hardware devices: 
  4507.  
  4508.  The FAT driver now supports command chaining 
  4509.  
  4510.   The driver attempts to call the volume manager with a list of all contiguous 
  4511.   sector requests required to fulfill an I/O request, thus allowing multiple 
  4512.   page-in and page-out requests in a single logical operation. 
  4513.  
  4514.  The FAT driver provides faster allocation of free space on the logical drive, 
  4515.   using a bitmap to track free clusters on the disk. 
  4516.  
  4517. Disk caching is now supported within the FAT driver, and has been removed from 
  4518. the device driver.  A cache buffer is provided to support disk caching with the 
  4519. following features: 
  4520.  
  4521.  Lazy writing 
  4522.  
  4523.  Lazy reading on writes, that is, the ability to write to the cache and flush 
  4524.   the cache to disk, but then to read the updated information from the cache 
  4525.   rather than requiring a physical disk read operation 
  4526.  
  4527.  Asynchronous read-ahead through a multi-purpose asynchronous read thread 
  4528.  
  4529.  Large cache size (theoretical maximum of 64MB, although practical limitations 
  4530.   will necessitate a smaller cache) 
  4531.  
  4532.  The ability to dynamically enable and disable the cache in response to a user 
  4533.   command 
  4534.  
  4535.  Bad sectors are automatically bypassed on reads. 
  4536.  
  4537. There are a number of advantages in performing caching in the FAT driver rather 
  4538. than the device driver; more operating system kernel services are available at 
  4539. this level, and intelligent read-ahead operations can more easily be performed. 
  4540. Lazy writing is also more easily implemented at the file system level than at 
  4541. the device driver level. 
  4542.  
  4543. The FAT file system under OS/2 Version 2.0 supports a maximum file size of 2GB. 
  4544. The maximum supported size for a FAT volume is also 2GB. 
  4545.  
  4546.  
  4547. ΓòÉΓòÉΓòÉ 16.2.3. Disk Volume Considerations ΓòÉΓòÉΓòÉ
  4548.  
  4549. The maximum size for a disk volume under OS/2 Version 2.0 is 512GB using HPFS 
  4550. and 2GB using the FAT file system, with the following conditions: 
  4551.  
  4552.  1. OS/2 V2.0 requires that the bootable partition be within the 1023rd 
  4553.     cylinder of the disk 
  4554.  
  4555.     When a machine's BIOS reports on the characteristics of a disk, it returns 
  4556.     three values; it determines the number of sectors per head, the number of 
  4557.     heads per cylinder, and the number of cylinders. The IBM BIOS sets the disk 
  4558.     geometry such that one cylinder equals one megabyte of disk storage.  For 
  4559.     IBM disk drives, 1023 cylinders corresponds to one gigabyte. Other 
  4560.     manufacturers may use different sector and head values causing the 1023 
  4561.     cylinder limit to be greater than or less than one gigabyte. 
  4562.  
  4563.  2. A FAT file system volume must not exceed the 1023rd cylinder of the disk 
  4564.     drive. 
  4565.  
  4566.     It may also not exceed 2GB even if, due to the manufacturer's disk 
  4567.     geometry, the 1023rd cylinder is beyond 2GB. 
  4568.  
  4569. Imagine a 10GB disk where the geometry of the disk has sector/head/cylinder 
  4570. values such that the 1023rd cylinder corresponds to 7.4GB, as is the case with 
  4571. some OEM SCSI disks.  Using the FAT file system, the way to configure the 
  4572. volumes to maximize their size would be to have three volumes of 2GB and one 
  4573. volume of 1.4GB.  In this case the 2.6GB of free space (beyond the 1023rd 
  4574. cylinder) would be unusable by OS/2 using the FAT file system.  These volumes 
  4575. may exist in primary partitions or an extended partition, or both.  In an 
  4576. extended partition, the volume would occupy one or more of the logical 
  4577. partitions defined in the extended partition. 
  4578.  
  4579. Although an HPFS volume can take up the entire disk, for performance reasons 
  4580. the practical limit is much less than 512GB. 
  4581.  
  4582. There are 24 drive letters available for hard disk drives (a: and b: are 
  4583. reserved for diskette drives), and currently the largest tested IBM SCSI hard 
  4584. disk available for the PS/2 is 400MB.  Using 24 single SCSI disks chained on 
  4585. four SCSI adapters we would get a maximum of 24 x 400MB, or 9.6GB of online 
  4586. DASD. 
  4587.  
  4588.  
  4589. ΓòÉΓòÉΓòÉ 16.2.4. UNDELETE Command ΓòÉΓòÉΓòÉ
  4590.  
  4591. OS/2 Version 2.0 provides a facility to delay the permanent removal of files 
  4592. that have been deleted.  By default, files that are deleted or erased are 
  4593. stored (as hidden system files) in the \DELETE subdirectory.  The UNDELETE 
  4594. command gives the user the ability to recover such deleted files and restore 
  4595. them to their original path. 
  4596.  
  4597. A new environment variable DELDIR is provided to specify the path used to store 
  4598. deleted files.  A separate directory and maximum directory size must be 
  4599. specified for each logical disk.  The absence of a DELDIR environment variable 
  4600. in the CONFIG.SYS or a DELDIR statement with no path specified will disable the 
  4601. facility. 
  4602.  
  4603. The function DosForceDelete() has been added to allow files to be deleted 
  4604. permanently without first making them recoverable. 
  4605.  
  4606.  
  4607. ΓòÉΓòÉΓòÉ 16.2.5. Volume Manager ΓòÉΓòÉΓòÉ
  4608.  
  4609. A number of changes have been made to the volume manager, in order to provide 
  4610. enhanced support for SCSI adapters, and to support the new SCB architecture 
  4611. request list data structures. 
  4612.  
  4613. During the ABIOS initialization, one SCSI adapter-type logical ID (LID) will be 
  4614. generated for each SCSI adapter in the system.  These LIDs cannot be allocated 
  4615. by the device driver, so in order to secure access to these LIDs, the device 
  4616. manager must include them in its list of LIDs. 
  4617.  
  4618. The volume manager also supports fast path processing for the new request list 
  4619. data structures.  These structures need no longer be transformed into request 
  4620. packets.  However, volume verification must still be performed by the volume 
  4621. manager.  This function is required since the system must support removable 
  4622. media. 
  4623.  
  4624. If the device driver written for previous versions of OS/2 is used with the 
  4625. OS/2 Version 2.0 volume manager, it will give an "invalid device command" 
  4626. return code to the GetDeviceSupport() command from the file system.  In this 
  4627. case, the file system must be structured in a compatible form for the device 
  4628. driver.  The volume manager then functions as before with no changes. 
  4629.  
  4630.  
  4631. ΓòÉΓòÉΓòÉ 16.2.6. Pager (Swapper) ΓòÉΓòÉΓòÉ
  4632.  
  4633. The swapper builds its I/O requests in a format similar to the ExecuteChain() 
  4634. format, using the SCB architecture and 32-bit physical page frame addresses. 
  4635. It then calls the file system to perform the paging operations. 
  4636.  
  4637. When memory is overcommitted, page-in operations will occur in conjunction with 
  4638. page-outs which will free memory frames for the requested pages.  The swapper 
  4639. may build request chains that contain both page-in and page-out operations, 
  4640. which results in a significant reduction in start I/O and interrupt processing 
  4641. overhead, thereby providing improved paging performance. 
  4642.  
  4643. Normally the device driver has the possibility to sort I/O requests in order to 
  4644. optimize physical disk access.  However, since a paging I/O request may contain 
  4645. both page-out and page-in instructions that address the same physical page in 
  4646. memory (as described above), the execution order of the individual operations 
  4647. may be critical. 
  4648.  
  4649. In such circumstances, a flag indicating a critical I/O request is set by the 
  4650. swapper when issuing the request.  The device driver will then not sort the 
  4651. chain, but will execute the operations in the exact sequence they were 
  4652. requested.  The pager/swapper, therefore, optimizes I/O requests wherever 
  4653. possible, while maintaining the integrity of critical requests. 
  4654.  
  4655. OS/2 Version 2.0 also contains a new interface (new calls) for those who 
  4656. program their own file systems.  The new calls provide a clear interface 
  4657. between the file system and the FSD for paging. All calls are guaranteed to be 
  4658. used only for paging operations, so that the underlying FSDs may be optimized 
  4659. in supporting them. This guarantee implies that no argument checking, address 
  4660. verification, or size control takes place. 
  4661.  
  4662.  
  4663. ΓòÉΓòÉΓòÉ 16.3. Hardware Support Levels ΓòÉΓòÉΓòÉ
  4664.  
  4665. OS/2 Version 2.0 has been designed to run on both IBM and non-IBM (OEM) 
  4666. personal computers which incorporate processors from the Intel 80386 or 80486 
  4667. families.  The specific OEM models and their devices that are supported is a 
  4668. matter of testing and verification.  IBM in conjunction with OEMs have tested 
  4669. OS/2 V2.0 on many OEM models and verified correct operation for those models 
  4670. tested.  This process of verification is ongoing and more models are being 
  4671. added to the list of personal computers, on which OS/2 V2.0 will run, all the 
  4672. time. The architecture and design of OS/2 V2.0 supports OEM models in the 
  4673. following ways: 
  4674.  
  4675.  All Machine Readable Information (MRI), text messages, online help, etc. is 
  4676.   generic wherever possible. This generality means end user system text does 
  4677.   not contain IBM or OEM specific references. 
  4678.  
  4679.  Program code is generic wherever possible. This generality means it is not 
  4680.   hard coded to recognize and handle only IBM specific systems or conditions. 
  4681.  
  4682.  The device driver architecture has been enhanced to allow OEMs and 
  4683.   Independent Hardware Vendors (IHVs) to more easily replace and add device 
  4684.   support through the layered device driver architecture. 
  4685.  
  4686. In this section we discuss the factors that determine whether OS/2 V2.0 will 
  4687. run on a particular hardware configuration. We also look at which of the 
  4688. hardware features of the system OS/2 V2.0 exploits. 
  4689.  
  4690. A design point of OS/2 V2.0 is that it will enable support for a feature if it 
  4691. can do so without compromising the integrity of the system. This design point 
  4692. means that OS/2 V2.0 will only use a feature if it can do so reliably. 
  4693.  
  4694. The first topic covered is the usage of large main memory, that is, systems 
  4695. with more than 16MB of RAM. 
  4696.  
  4697.  
  4698. ΓòÉΓòÉΓòÉ 16.3.1. Large Main Memory Support ΓòÉΓòÉΓòÉ
  4699.  
  4700. The Intel 80386 and 80486 families of microprocessors are capable of addressing 
  4701. 64TB of virtual memory. At present, OS/2 Version 2.0 has the capability of 
  4702. supporting up to 4GB of virtual memory and 4GB of real memory. In order to 
  4703. support more than 16MB of memory however, certain requirements must be met. 
  4704.  
  4705. Firstly, the OS/2 V2.0 physical memory manager needs to know how much memory is 
  4706. present. This is done during kernel initialization by calling the BIOS 
  4707. interrupt 15 with subfunction code x'88'.  This call will return the total 
  4708. amount of memory present. If the BIOS supports interrupt 15 with subfunction 
  4709. code x'C7', "return memory map information", then this function will be used to 
  4710. return an array giving the layout of the different levels of memory; for 
  4711. example, system board memory and adapter memory available in the machine, 
  4712. together with address ranges for the different memory types. Should the 
  4713. function not be present, the interrupt will return with the carry flag set. 
  4714. Support for this function is not mandatory. Information obtained is used by 
  4715. OS/2 V2.0 to prioritize the areas of physical memory that are allocated first. 
  4716.  
  4717. The second requirement for supporting more than 16MB is that the paging device 
  4718. fixed disk controller can support data transfers to or from memory locations 
  4719. above the 16MB line. This ability usually requires the availability of a DMA 
  4720. controller with a 32-bit addressing capability, either on the system board or 
  4721. on a busmaster SCSI adapter. To determine whether this DMA is available, the 
  4722. disk device driver level is queried. If it is a level 3 device driver, it is 
  4723. further interrogated to find out if the DMA that the disk controller uses has 
  4724. support for 32-bit addressing. If this second requirement is satisfied and the 
  4725. disk controller can handle 32-bit addresses larger than 16MB, then all of 
  4726. memory is used by OS/2 for programs and data.  If it cannot, then the OS/2 page 
  4727. manager allocates all of the memory above 16MB as a paging cache to be used 
  4728. before paging to the disk. This substitution is a good use of the memory above 
  4729. 16MB, but not as good as using it directly. 
  4730.  
  4731. A final requirement for supporting more than 16MB is that the machine's ABIOS 
  4732. is capable of handling requests with addresses above the 16MB line. 
  4733.  
  4734. Presently in the IBM PS/2 range, only the Models 90 and 95 have support for 
  4735. more than 16MB of memory and when using 8MB SIMMs will support up to 64MB. 
  4736. Machines using 80386SX, 80386SL or 80386SLC processors are not able to support 
  4737. more than 16MB as they only support 24-bit addressing external to the 
  4738. processor. 
  4739.  
  4740. If OS/2 V2.0 detects the presence of a device that does not support 32-bit 
  4741. addressing, and if support for more than 16MB is enabled, it will ensure that 
  4742. buffers used by that device's driver are locked below the 16MB line during I/O 
  4743. operations.  Level 3 device drivers are then given a permanent buffer below the 
  4744. 16MB line. For level 1 and 2 device drivers the OS/2 V2.0 virtual memory 
  4745. manager, when requested to lock a user buffer for that device, will move the 
  4746. buffer below the 16MB line. 
  4747.  
  4748. The only device for which 32-bit addressing support is mandatory is the paging 
  4749. device.  Pages are written to or read from their exact physical location in 
  4750. memory and are not moved before I/O takes place.  Should paging be disabled by 
  4751. specifying MEMMAN=NOSWAP in the CONFIG.SYS, then more than 16MB can be 
  4752. supported even though there is no disk subsystem support for it. 
  4753.  
  4754. When determining whether an OEM machine will support more than 16MB, the 
  4755. considerations are: 
  4756.  
  4757.  Is the BIOS/ABIOS in the machine capable of supporting the memory size? 
  4758.  
  4759.  Is the BIOS capable of telling OS/2 that more than 16MB is present in the 
  4760.   machine? 
  4761.  
  4762.  If paging is enabled, does the paging device support 32-bit addressing? 
  4763.  
  4764.  If the paging device does support 32-bit addressing, does its device driver 
  4765.   have the capability of responding correctly to OS/2 V2.0 with this 
  4766.   information? 
  4767.  
  4768.  
  4769. ΓòÉΓòÉΓòÉ 16.3.2. Microprocessor Support ΓòÉΓòÉΓòÉ
  4770.  
  4771. As with software, there are different releases of the Intel 80386 and 80486 
  4772. family processors. The different releases of the processors are known as 
  4773. stepping levels. Later stepping levels fix bugs that were found in earlier 
  4774. stepping levels of the processor. OS/2 V2.0 will take into account the 
  4775. different stepping levels of processors and handle any nuances. An example 
  4776. would be when OS/2 V2.0 is running on an 80386 at B1 stepping level, with a 
  4777. numeric coprocessor present; OS/2 V2.0 will disable the coprocessor and provide 
  4778. emulation for the coprocessor, as it would do if the coprocessor were not 
  4779. present. This is one of the ways in which OS/2 V2.0 will circumvent the known 
  4780. bugs in a 80386 at B1 stepping level.  Bugs such as these were fixed in the 
  4781. 80386SX and 80486 processors.  In the case of the 80386 processor, a stepping 
  4782. level of D0 or higher is preferred. 
  4783.  
  4784. Some early IBM PS/2s might have B1 stepping level 80386 processors on their 
  4785. system boards and might qualify for a free engineering change (EC) to upgrade 
  4786. the system board. If you experience problems running OS/2 on an older system, 
  4787. contact your dealer or the IBM service organization in your country to have 
  4788. your system unit checked. 
  4789.  
  4790.  
  4791. ΓòÉΓòÉΓòÉ 16.3.3. Disk and SCSI Device Drivers ΓòÉΓòÉΓòÉ
  4792.  
  4793. The layered device driver architecture has made it possible to easily support 
  4794. IBM and non-IBM disk and SCSI controllers. At the device management driver 
  4795. level, OS/2 V2.0 supplies two drivers: 
  4796.  
  4797. OS2DASD.DMD         General-purpose support for disk drives 
  4798.  
  4799. OS2SCSI.DMD         General-purpose support for non-disk SCSI devices. 
  4800.  
  4801. OS2DASD.DMD will always be loaded.  OS2SCSI.DMD is only needed when a SCSI 
  4802. adapter is present. 
  4803.  
  4804. OS/2 V2.0 provides a number of adapter device drivers (ADDs) which are specific 
  4805. to the adapter or adapters installed in the system. At installation time, OS/2 
  4806. V2.0 can in most cases sense the adapters installed and will then load the 
  4807. necessary ADDs and include the necessary BASEDEV statements in the CONFIG.SYS. 
  4808. ADDs are currently available for all IBM disk devices and some selected non-IBM 
  4809. adapters.  See the OS/2 V2.0 Online Command Reference and the README file, 
  4810. which comes with OS/2 V2.0, for details of the supported adapters.  The README 
  4811. file should always be consulted when using a non-IBM SCSI adapter. 
  4812.  
  4813. At general availability of OS/2 V2.0, support was available for IBM, Future 
  4814. Domain** and Adaptec** SCSI adapters. 
  4815.  
  4816. Shipped with OS/2 V2.0 is a generic disk device driver IBMINT13.I13. When 
  4817. specific support is not provided for a particular adapter, it should be 
  4818. possible to use this driver. 
  4819.  
  4820.  
  4821. ΓòÉΓòÉΓòÉ 16.3.4. Video Display Support ΓòÉΓòÉΓòÉ
  4822.  
  4823. At general availability OS/2 Version 2.0 provides the most complete support for 
  4824. video systems which provide VGA resolution.  This is the only resolution 
  4825. supported for "seamless" WIN-OS/2 sessions at this time and if using "seamless" 
  4826. WIN-OS/2 on a particular system, the Presentation Manager desktop must be 
  4827. configured to use this resolution even if the display hardware is capable of 
  4828. higher resolution output. 
  4829.  
  4830. OS/2 V2.0 provides support for devices with lower resolutions than VGA, namely 
  4831. CGA and EGA, for all types of sessions except "seamless" WIN-OS/2.  Use of CGA 
  4832. for Presentation Manager is not recommended. 
  4833.  
  4834. Devices with resolutions above VGA (640x480, 16 colors) are known as Super VGA 
  4835. (SVGA).  The OS/2 installation process will detect display systems capable of 
  4836. running in SVGA mode. However, because of the wide variety of display systems 
  4837. currently available that fall into this category, full support is not provided. 
  4838.  
  4839. Support is provided for 8514 and XGA display systems and drivers for 
  4840. Presentation Manager and WIN-OS/2 full-screen sessions will be installed during 
  4841. system installation.  All other SVGA display systems will be supported in VGA 
  4842. mode.  Systems with 8514 and XGA display hardware can also run in VGA mode. 
  4843.  
  4844. Support however is provided to allow DOS full-screen and WIN-OS/2 full-screen 
  4845. sessions to use the display system in SVGA mode even though Presentation 
  4846. Manager is using it as a VGA device.  A base video device handler (VDH) is 
  4847. provided which permits switching the display system between VGA and an SVGA 
  4848. mode. The list of video modes currently supported is: 
  4849.  
  4850.  Graphic 
  4851.  
  4852.     1. 640x480       256 colors 
  4853.     2. 800x600       16 colors 
  4854.     3. 800x256       256 colors 
  4855.     4. 1024x768       16 colors 
  4856.     5. 1024x768       256 colors 
  4857.  
  4858.  Text 
  4859.  
  4860.     1. 132x25 characters 
  4861.     2. 132X43 characters 
  4862.     3. 132X44 characters 
  4863.  
  4864. SVGA support is enabled by: 
  4865.  
  4866.  Including the SVGA base VDH, which is installed along with the VGA VDH, by 
  4867.   changing the SET VIO_VGA statement in the CONFIG.SYS to: 
  4868.  
  4869.              SET VIO_VGA=DEVICE(BVHVGA,BVHSVGA)
  4870.  
  4871.  By running SVGA.EXE 
  4872.  
  4873.   From a DOS full-screen command prompt issue the command: 
  4874.  
  4875.              SVGA ON
  4876.  
  4877.   Executing this program will result in a file called SVGADATA.PMI being 
  4878.   created in the OS2 directory.  This file contains the information about the 
  4879.   video modes supported by the video adapter present in the system. 
  4880.  
  4881.   This file also serves a flag to say that SVGA mode is enabled in the system. 
  4882.   The SVGA support is only active once the SVGA program has been run.  SVGA 
  4883.   VDHs will run in VGA mode if the SVGADATA.PMI file is not present. 
  4884.  
  4885.  Install the SVGA virtual VDH instead of the VGA VDH. 
  4886.  
  4887.   This substitution provides support for DOS full-screen sessions to run in 
  4888.   SVGA mode. The VVGA.SYS virtual VDH is replaced by VSVGA.SYS by changing the 
  4889.   DEVICE statement in the CONFIG.SYS to read: 
  4890.  
  4891.               DEVICE=x:\OS2\MDOS\VSVGA.SYS
  4892.  
  4893.           where x = the drive letter of the system partition
  4894.  
  4895.  Install a Windows V3.0 driver for the SVGA adapter in the system to provide 
  4896.   support for WIN-OS/2 full-screen sessions. 
  4897.  
  4898.   If a Windows V3.0 driver is available for the adapter, this should work under 
  4899.   OS/2 V2.0. Update the "display.drv=" line in the SYSTEM.INI file in the 
  4900.   \OS2\MDOS\WINOS2 directory to point to the new driver.  The DEVICE statement 
  4901.   for the video driver in the CONFIG.SYS also needs to be changed. 
  4902.  
  4903. To disable SVGA support run the SVGA.EXE program with the OFF parameter: 
  4904.  
  4905.           SVGA OFF
  4906.  
  4907. Changing DOS settings may rectify problems experienced when running with SVGA 
  4908. enabled: 
  4909.  
  4910.  If corruption occurs when switching to the WIN-OS/2 full-screen session, turn 
  4911.   VIDEO_SWITCH_NOTIFICATION ON. 
  4912.  
  4913.  If difficulty is experienced with animated graphics, turn 
  4914.   VIDEO_RETRACE_EMULATION OFF. 
  4915.  
  4916. Some manufacturers of SVGA hardware are working to develop OS/2 V2.0 video 
  4917. device drivers that will support Presentation Manager. It is advisable to check 
  4918. with the hardware supplier about the availability of drivers for a particular 
  4919. video subsystem. Information will also be posted on OS/2 bulletin boards and 
  4920. these can be checked for the latest information. 
  4921.  
  4922.  
  4923. ΓòÉΓòÉΓòÉ 16.3.5. AT Bus Serial Port Support ΓòÉΓòÉΓòÉ
  4924.  
  4925. COM.SYS will support COM3 and COM4 ports on AT bus machines. This is in 
  4926. addition to the published support for COM1 and COM2. In order to use COM3 
  4927. and/or COM4 on AT bus machines it is necessary to include parameters on the 
  4928. DEVICE=COM.SYS command in the CONFIG.SYS.  The format of the statement is: 
  4929.  
  4930.              DEVICE=COM.SYS (N,XXX,I)
  4931.  
  4932.      where N   is the COM port number       ( 3 or 4 )
  4933.            XXX is the I/O port address      ( 3E8, 2E8, etc )
  4934.            I   is the IRQ (interrupt) level ( from 1 to 15 )
  4935.  
  4936. The I/O port address will be found in the specifications for the adapter card. 
  4937. The port address must be unique for each COM port. The port address for COM1 is 
  4938. 3F8 and for COM2 it is 2F8. 
  4939.  
  4940. The IRQ level must be chosen in such a way that it does not conflict with 
  4941. another adapter card in the system. COM1 uses IRQ 4 and COM2 uses IRQ 3.  It is 
  4942. possible that the IRQ level of the COM3 or COM4 adapter cards is not settable 
  4943. and will default to either IRQ 3 or IRQ 4.  In this case it is still possible 
  4944. to have up to four COM ports installed. However, if two or more ports use the 
  4945. same IRQ level, it is only possible to have one of those ports active at any 
  4946. one time.  If the IRQ level is settable on the adapter card, choose an IRQ 
  4947. level not used in the system.  Levels that are usually available include 5, 10 
  4948. and 15. 
  4949.  
  4950.  
  4951. ΓòÉΓòÉΓòÉ 16.3.6. Pointing Device Support ΓòÉΓòÉΓòÉ
  4952.  
  4953. OS/2 Version 2.0 provides support for some of the popular pointing devices such 
  4954. the IBM PS/2 mouse and several mouse types which attach to the serial port. 
  4955. Some pointing devices are supplied with their own device drivers.  An example 
  4956. of this is the Hewlett-Packard** (HP) mouse. Support for these devices can only 
  4957. be activated after installation of OS/2 V2.0 is completed. The OS/2 V2.0 
  4958. installation will have to be carried out using the keyboard. During the 
  4959. installation, install support for the IBM PS/2 style pointing device. 
  4960.  
  4961. After the system has been restarted, support for the pointing device can be 
  4962. installed. This installation will usually involve copying one or more device 
  4963. drivers to the \OS2 directory and updating the CONFIG.SYS. In the case of the 
  4964. HP mouse and assuming OS/2 is installed on the C: partition, the steps involved 
  4965. are: 
  4966.  
  4967.  1. Copy the EXBIOS.SYS and HILMOU.SYS to the C:\OS2 directory from the 
  4968.     diskette supplied with the mouse 
  4969.  
  4970.  2. Update the CONFIG.SYS as follows: 
  4971.  
  4972.         add----->   DEVICE=C:\OS2\EXBIOS.SYS
  4973.         add----->   DEVICE=C:\OS2\HILMOU.SYS
  4974.         modify-->   DEVICE=C:\OS2\MOUSE.SYS TYPE=HILMOU$
  4975.  
  4976.  
  4977. ΓòÉΓòÉΓòÉ 16.3.7. When OS/2 Version 2.0 Will Not Run ΓòÉΓòÉΓòÉ
  4978.  
  4979. IBM has been working with a number of OEMs of IBM-compatible PCs to ensure that 
  4980. OS/2 Version 2.0 will work on as wide a range of hardware as possible. 
  4981.  
  4982. At general availability of OS/2 V2.0, a list of OEM machines that have been 
  4983. tested and support OS/2 V2.0 will be published. The updating of this list will 
  4984. be an ongoing process. Even if your machine appears on this list, you will need 
  4985. to check if there are any special considerations for installing OS/2 V2.0 on 
  4986. your machine. The dealer from whom you purchased the machine will be able to 
  4987. provide you with details supplied by the manufacturer and any special device 
  4988. drivers you may need. 
  4989.  
  4990. Also to be considered is the support required for any adapters installed in the 
  4991. machine, which are not normally standard for the machine. This consideration 
  4992. applies to IBM PS/2s as well. For example, it is common to replace the disk 
  4993. controller in older machines with a newer SCSI controller.  If this is an IBM 
  4994. controller, it is not a problem. However if a controller from an OEM is used, 
  4995. then a different device driver might be required. 
  4996.  
  4997. If OS/2 V2.0 fails to run on a particular machine, these are some of the things 
  4998. that can be checked: 
  4999.  
  5000.  1. Check the documentation shipped with OS/2 V2.0 such as the online README 
  5001.     File, which is found in the Information folder, for any special 
  5002.     installation considerations which apply. 
  5003.  
  5004.  2. If any OS/2 bulletin boards are available, access them for any revised 
  5005.     installation instructions or device driver requirements for the machine's 
  5006.     configuration. 
  5007.  
  5008.  3. Check that the microprocessor on the system board is from the 80386 or 
  5009.     80486 families of processors. 
  5010.  
  5011.  4. If it is an 80386 processor, check that it has a stepping level of D0 or 
  5012.     later. 
  5013.  
  5014.  5. Check that at least 4MB of memory is installed and available. 
  5015.  
  5016.  6. Check that there is sufficient free space in the disk partition containing 
  5017.     SWAPPER.DAT to allow for growth of this file. 
  5018.  
  5019.  7. Check that the BIOS/ABOIS installed is the latest available for the 
  5020.     machine. 
  5021.  
  5022.  8. Check if the disk system needs a special device driver and if there any 
  5023.     special instructions for installing it. 
  5024.  
  5025.  9. Check for any other device driver requirements. 
  5026.  
  5027. 10. If installing on an IBM PS/2 Model 57, 90 or 95 update the system partition 
  5028.     using the latest available reference diskette. 
  5029.  
  5030.  
  5031. ΓòÉΓòÉΓòÉ 16.4. Summary ΓòÉΓòÉΓòÉ
  5032.  
  5033. The I/O supervisor components of OS/2 Version 2.0 are designed to make greater 
  5034. use of advanced I/O devices than previous versions of OS/2.  Particular 
  5035. emphasis has been given to the optimization of disk access through the use of 
  5036. the High Performance File System and SCSI devices. 
  5037.  
  5038. New to OS/2 V2.0 is the Layered Device Driver architecture which enables the 
  5039. device drivers to be developed more easily to support OEM hardware. This 
  5040. interface expedites the development of new DASD and SCSI device support by 
  5041. OEM's by reducing device driver code and complexity. This architecture allows 
  5042. OS/2 to better support a broad range of OEM platforms and devices. 
  5043.  
  5044. Device drivers are provided with new device help commands to enable drivers to 
  5045. more efficiently use the 32-bit flat memory model and the paging facility for 
  5046. virtual memory management. 
  5047.  
  5048. A new disk device driver has been defined for use by the High Performance File 
  5049. System, which optimizes access to SCSI devices by allowing request 
  5050. prioritization and making use of the command chaining capabilities of the SCSI 
  5051. adapters. This optimization allows more efficient use of the physical devices. 
  5052. For paging operations where the sequence of read and write operations may be 
  5053. critical, the device driver allows the request optimization to be disabled. 
  5054.  
  5055.  
  5056. ΓòÉΓòÉΓòÉ 17. Boot Manager ΓòÉΓòÉΓòÉ
  5057.  
  5058. OS/2 Version 2.0 provides the capability to support multiple operating systems 
  5059. on the same machine, by providing an operating system independent boot utility 
  5060. known as Boot Manager. 
  5061.  
  5062. For example, OS/2 Version 2.0, DOS and AIX may be installed on the same 
  5063. physical machine, using separate fixed disk partitions and/or disks as 
  5064. supported by Boot Manager. When starting the machine, a user is presented with 
  5065. a panel allowing selection of the required operating system.  The partition 
  5066. which contains the desired operating system is then activated, and that 
  5067. operating system is loaded and started. 
  5068.  
  5069.  
  5070. ΓòÉΓòÉΓòÉ 17.1. Boot Manager Architecture ΓòÉΓòÉΓòÉ
  5071.  
  5072. The following is a brief description of the Boot Manager architecture provided 
  5073. by OS/2 Version 2.0, and is provided in order to facilitate planning for Boot 
  5074. Manager support.  Readers who are primarily interested in using Boot Manager 
  5075. rather than understanding its implementation may wish to skip this section and 
  5076. proceed to Partitioning the Fixed Disk. 
  5077.  
  5078.  
  5079. ΓòÉΓòÉΓòÉ 17.1.1. Partitions ΓòÉΓòÉΓòÉ
  5080.  
  5081. Each physical disk drive in a machine is divided into partitions. A partition 
  5082. defines the area of the disk that belongs to a particular operating system. 
  5083. Each disk can be divided into multiple primary partitions and/or one extended 
  5084. partition. Each operating system formats its partition in its own way; this 
  5085. format may or may not be supported by other operating systems. 
  5086.  
  5087. Only one primary partition on each physical disk drive is accessible at any one 
  5088. time; other primary partitions on that drive are hidden.  Boot Manager allows 
  5089. up to four primary partitions on each physical disk drive. 
  5090.  
  5091. Note that the first physical disk drive in the machine must have a primary 
  5092. partition. 
  5093.  
  5094. An extended partition can be created in place of one of the four primary 
  5095. partitions when logical drives are desired.  All logical drives in an extended 
  5096. partition are accessible at any time, regardless of which primary partition is 
  5097. active, provided that the format of the logical drives is supported by the 
  5098. currently active operating system. 
  5099.  
  5100.  
  5101. ΓòÉΓòÉΓòÉ 17.1.2. Logical Drives ΓòÉΓòÉΓòÉ
  5102.  
  5103. Operating systems typically access partitions through logical drives, each of 
  5104. which is assigned a logical drive letter.  A primary partition contains only 
  5105. one logical drive, but an extended partition may be subdivided into one or more 
  5106. logical drives.  An operating system only assigns logical drive letters to 
  5107. those partitions with a recognizable format, that is, supported by the 
  5108. operating system. 
  5109.  
  5110. The assignment of drive letters is done by the operating system's volume 
  5111. manager when the operating system is loaded.  The first physical disk drive is 
  5112. searched for a recognizable primary partition.  This partition is assigned the 
  5113. logical drive letter "C" and the next physical disk is searched. After logical 
  5114. drives in primary partitions have been assigned for all physical drives, drive 
  5115. letters are assigned to the recognizable logical drives in extended partitions. 
  5116.  
  5117. A different operating system may reside on each of the logical drives in an 
  5118. extended partition (with certain limitations; see Operating System 
  5119. Restrictions). Usually, DOS 5.0 and OS/2 V1.3 will only be installed on a 
  5120. primary partition on the first physical disk.  An exception could be with DOS, 
  5121. for example, where there are no recognizable primary partitions on the first 
  5122. physical disk.  In this case DOS (V4.1 or later) may recognize the primary 
  5123. partition(s) on the first physical drive to be formatted with the HPFS or Boot 
  5124. Manager, and treat them as unusable to DOS.  In these situations, the first 
  5125. drive letter C: may be assigned to a primary partition on the next physical 
  5126. disk. 
  5127.  
  5128. Logical drives in extended partitions are shareable; any data installed on 
  5129. these logical drives can be used by an operating system running from any other 
  5130. logical drive in the system, provided the partition formats are compatible. 
  5131. Although 26 logical drive letters are available (A: through Z:), A: and B: are 
  5132. typically reserved for diskette media. Under DOS or OS/2, up to 24 logical 
  5133. drives may be created using the logical drive support for extended partitions. 
  5134.  
  5135.  
  5136. ΓòÉΓòÉΓòÉ 17.1.3. Logical Drive Boot Names ΓòÉΓòÉΓòÉ
  5137.  
  5138. A user may assign a boot name to a logical drive, to simplify its 
  5139. identification. A boot name is a unique name which identifies the logical drive 
  5140. for booting, and is independent of the logical drive letter assigned to the 
  5141. drive by the currently active operating system. The boot name is only 
  5142. recognized by the Boot Manager. 
  5143.  
  5144. Boot names are useful in the event of a hardware reconfiguration where 
  5145. additional fixed disks are added to the machine. Boot names assigned to logical 
  5146. drives on the original fixed disk will not change and will still identify the 
  5147. same area on the disk, unlike the logical drive letters which may change due to 
  5148. the reconfiguration. 
  5149.  
  5150.  
  5151. ΓòÉΓòÉΓòÉ 17.1.4. Multi-Boot Block ΓòÉΓòÉΓòÉ
  5152.  
  5153. The Boot Manager architecture distinguishes between system-independent and 
  5154. system-dependent components as part of the startup process of an operating 
  5155. system. The system-independent components are used to connect the POST code 
  5156. sequence executed on a PS/2 or compatible machine to a system selection 
  5157. sequence supplied as part of Boot Manager, which then chains to the operating 
  5158. system-dependent initialization sequence.  The system-independent components 
  5159. are: 
  5160.  
  5161.  The Master Boot Record (MBR) located in the first sector of the physical disk 
  5162.   drive. 
  5163.  
  5164.  A Multi-Boot Block (MBB) which resides in a primary partition on the physical 
  5165.   drive, outside of the logical disks accessible by operating systems. 
  5166.  
  5167. When Boot Manager is enabled as a startable primary partition, the MBR boots it 
  5168. first, like traditional MBR environments.  The MBB manages the remainder of the 
  5169. boot process. 
  5170.  
  5171. The layers of system independent and system dependent code on the physical disk 
  5172. drive are shown in Figure "Hard Disk Layout". 
  5173.  
  5174. The MBB is installed in a 1MB primary partition which must be created at the 
  5175. request of the user, by installing Boot Manager. This space is allocated on 
  5176. request by OS/2 Version 2.0's FDISK/FDISKPM utilities and can be created at any 
  5177. location on the disk after track zero.  It uses one of the four available 
  5178. primary partitions on the first physical disk. 
  5179.  
  5180. The MBB contains code that: 
  5181.  
  5182.  Displays the logical drive selection menu. 
  5183.  
  5184.  Allows the user to select the logical drive from which to start the system. 
  5185.  
  5186.  Gives control to the boot record of the selected logical drive. 
  5187.  
  5188.  Manages a timer tracking the time available for logical drive selection 
  5189.   before using a default logical drive. 
  5190.  
  5191.  Contains a data area for the names of the designated default, fallback, and 
  5192.   selectable logical drives, the time-out value for the selection menu and some 
  5193.   reserved data space. 
  5194.  
  5195.  Contains a data area reserved for boot error messages. 
  5196.  
  5197.  Contains a data area describing locations and status of logical drives by 
  5198.   boot name. 
  5199.  
  5200. The operating system dependent code resides within the logical drives assigned 
  5201. to each operating system.  Upon selection of a specific system to be started, 
  5202. this system specific code is executed, loading the chosen operating system. 
  5203.  
  5204. The logical drives are allocated using the FDISK/FDISKPM utilities provided 
  5205. with OS/2 Version 2.0.  These tools update the MBR to indicate which areas on 
  5206. the physical disk have been defined as logical drives containing the operating 
  5207. systems. Boot Manager logical drives can be defined on any ST-506, ESDI or SCSI 
  5208. interface fixed disk drive which is accessed through INT 13h.  This precludes 
  5209. logical drives from being created on SCSI devices which are accessed through 
  5210. INT 4Bh; for example, logical drives may not be created on removable media 
  5211. devices. 
  5212.  
  5213. Once one or more physical drives are set up and logical drives created, the 
  5214. specific operating system's formatting utility is used to supply the operating 
  5215. system boot record within the logical drive.  It is important to note that the 
  5216. OS/2 Dual Boot function operates with the system-dependent boot code.  Boot 
  5217. Manager neither enhances nor disables the Dual Boot function, since Boot 
  5218. Manager does not affect the contents of any logical drive. Therefore, Dual Boot 
  5219. will work in conjunction with and independent of Boot Manager. 
  5220.  
  5221. No operating system may store its own information in the MBB or MBR.  Any such 
  5222. information must be held within the logical disks owned by that operating 
  5223. system.  Operating systems which do not obey this rule will not function 
  5224. correctly in the Boot Manager environment nor in any other "multi-boot" 
  5225. environment, and may compromise disk integrity.  Operating systems which are 
  5226. known to obey this rule, and operate correctly in the Boot Manager environment, 
  5227. include: 
  5228.  
  5229.  DOS Version 3.2 or above, 4.x and 5.0 
  5230.  OS/2 Version 1.x 
  5231.  OS/2 Version 2.0 
  5232.  AIX. 
  5233.  
  5234.  
  5235. ΓòÉΓòÉΓòÉ 17.1.5. Migration from Other Operating Systems ΓòÉΓòÉΓòÉ
  5236.  
  5237. The Boot Manager architecture requires repartitioning of fixed disks already 
  5238. set up under any operating systems other than OS/2 Version 2.0.  Although this 
  5239. may seem troublesome, it must be remembered that Boot Manager is only of use 
  5240. when multiple partitions are allocated, so it is likely that repartitioning 
  5241. would be necessary to support multiple operating systems. 
  5242.  
  5243. Migration from previous versions of OS/2 to OS/2 Version 2.0 with Boot Manager 
  5244. is eased by installation support that allows migration to the new Boot Manager 
  5245. scheme with minimal user impact, other than the possible repartitioning 
  5246. discussed above. A Boot Manager installation on a system that had previous 
  5247. versions of OS/2 or DOS installed attempts to minimize the impact by providing 
  5248. as much automatic support during installation time as possible. 
  5249.  
  5250. Note:   There seems to be the possibility of a conflict between OS/2 V2.0's 
  5251.         Boot Manager and other third party disk organizers and boot utilities. 
  5252.         In order to avoid any trouble which could come up after installation of 
  5253.         OS/2 V2.0  in these situations, it is highly recommended that a 
  5254.         low-level format be performed before installing OS/2 V2.0. On a PS/2, 
  5255.         such a low-level format  can be performed by booting from the 
  5256.         appropriate reference diskette and executing the Advanced Diagnostics 
  5257.         (CTRL-A).  Once Boot Manager is installed, future migration steps will 
  5258.         not require such an operation. 
  5259.  
  5260.  
  5261. ΓòÉΓòÉΓòÉ 17.1.6. Performance Impacts ΓòÉΓòÉΓòÉ
  5262.  
  5263. The path length added to the overall system startup time path consists solely 
  5264. of the instructions contained in the MBB.  The OS/2 Version 2.0 MBB is 
  5265. approximately 16KB in size, with about 50% being instructions and the remaining 
  5266. 50% being data and space for the boot table and error messages. Tests have 
  5267. shown no measurable increase in overall startup time, counting the time from 
  5268. POST exit to display of the selection menu, plus the time from the selection 
  5269. being entered to the appearance of the first OS/2 or DOS operating system 
  5270. message on the screen.  Based on these tests, the impact of Boot Manager during 
  5271. boot time is considered negligible. 
  5272.  
  5273. The MBB is loaded into memory during startup, and is later overwritten by the 
  5274. operating system boot record loaded from the logical drive from which the 
  5275. system is IPLed.  Thus, no memory impact is realized when using Boot Manager. 
  5276. Memory requirements for the various operating systems participating in a Boot 
  5277. Manager environment do not change. 
  5278.  
  5279.  
  5280. ΓòÉΓòÉΓòÉ 17.2. Partitioning the Fixed Disk ΓòÉΓòÉΓòÉ
  5281.  
  5282. Boot Manager can be installed, the machine's fixed disks partitioned, and 
  5283. logical disks created at the beginning of OS/2 Version 2.0 installation.  It is 
  5284. possible to install Boot Manager after the operating system has been installed 
  5285. by use of OS/2 V2.0's full-screen FDISK command.  See Boot Manager Installation 
  5286. for further information. 
  5287.  
  5288. The names of the logical drives presented at the Boot Manager startup menu are 
  5289. stored in the MBB for primary partitions and in the Extended Boot Record (EBR) 
  5290. for logical drives in extended partitions.  For SCSI drives that may be moved 
  5291. freely between different workstations, this approach allows Boot Manager to 
  5292. identify that drive continuously via the same logical name, even though the 
  5293. internal drive letter assignment may have changed. 
  5294.  
  5295. Operating systems such as OS/2 and DOS are installed on the logical drives, and 
  5296. the user may then switch back and forth between operating systems via the 
  5297. selection menu displayed at IPL time. 
  5298.  
  5299. OS/2 Version 2.0 provides two programs to create and maintain partitions on 
  5300. fixed disks.  These programs provide substantially similar function and differ 
  5301. primarily in their presentation support requirements: 
  5302.  
  5303.  FDISK operates in character mode in a full-screen session, and supports 
  5304.   command line parameters and options, but does not support pointer device 
  5305.   (mouse) input.  FDISK is provided for use during the initial installation of 
  5306.   OS/2 Version 2.0, before the Presentation Manager components are loaded, and 
  5307.   for occasions when it is not possible to load Presentation Manager or a 
  5308.   command line parameter-driven interface is required. 
  5309.  
  5310.  FDISKPM operates on the Presentation Manager desktop and supports pointer 
  5311.   devices, but does not support command line parameters and options. 
  5312.  
  5313. The normal expectation is that FDISKPM will be utilized for partition 
  5314. maintenance, unless there is some reason that Presentation Manager cannot be 
  5315. loaded. 
  5316.  
  5317. An FDISK utility was supplied with OS/2 Version 1.3. However, its only function 
  5318. was to completely erase any existing partition information and as such it was 
  5319. only intended for use by the installation process, had no meaningful user 
  5320. interface and was not documented.  The primary difference between FDISKPM 
  5321. supplied with OS/2 Version 1.3 and the FDISK/FDISKPM supplied with OS/2 Version 
  5322. 2.0 is the addition of a facility for the creation and management of multiple 
  5323. primary partitions together with additional facilities for management of 
  5324. logical drives, as well as support for managing multiple operating systems 
  5325. installed on the logical drives. 
  5326.  
  5327.  
  5328. ΓòÉΓòÉΓòÉ 17.2.1. Boot Manager Installation ΓòÉΓòÉΓòÉ
  5329.  
  5330. Since the only way that a physical drive may be partitioned for Boot Manager is 
  5331. to utilize OS/2 Version 2.0, it must be the first operating system installed. 
  5332.  
  5333. Note:   OS/2 Version 2.0 will not specifically prompt for the installation of 
  5334.         Boot Manager as part of the normal installation process.  To ensure 
  5335.         that Boot Manager is installed, the user should elect not to accept the 
  5336.         default disk partitioning when prompted by the installation procedure. 
  5337.         The user should take the option to modify the default partitioning if 
  5338.         Boot Manager is required to be installed. 
  5339.  
  5340. Any disk partitioning required during installation is provided through the 
  5341. full-screen FDISK utility.  To ensure that Boot Manager support is installed, 
  5342. "Install Boot Manager..." must be chosen and remain startable. If users wish to 
  5343. install an operating system on any one of the partitions available, they must 
  5344. make this partition installable.  The FDISK utility provides advisory warning 
  5345. messages to remind users of this requirement. 
  5346.  
  5347. Note that after installing OS/2 V1.3 or DOS 5.0 on one of the primary 
  5348. partitions, this partition will automatically become startable.  To reactivate 
  5349. Boot Manager, the user has to use the FDISK command in order to make Boot 
  5350. Manager startable again. 
  5351.  
  5352.  
  5353. ΓòÉΓòÉΓòÉ 17.2.2. FDISKPM Program ΓòÉΓòÉΓòÉ
  5354.  
  5355. The following description applies to the FDISKPM program.  The facilities 
  5356. provided by the full-screen interface of the FDISK program are generally the 
  5357. same, though they are accessed slightly differently.  Since there are such 
  5358. strong similarities between FDISK and FDISKPM, only the FDISKPM program will be 
  5359. described in this section.  The command line interface for FDISK is described 
  5360. in FDISK Program. 
  5361.  
  5362. FDISKPM is used to create or delete logical drives in primary or extended 
  5363. partitions on a fixed disk.  With FDISKPM, a user can use Boot Manager to set 
  5364. up fixed disks on the system. The FDISKPM interface is shown in Figure "FDISKPM 
  5365. Showing Disk One (of a Two Disk System)" and Figure "FDISKPM Showing Disk Two 
  5366. (of a Two Disk System)". 
  5367.  
  5368. The FDISKPM window has five columns containing specific information about the 
  5369. partitions that exist on the hard disks in the system.  Each hard disk is 
  5370. represented by an icon at the top of the FDISKPM window.  When a hard disk is 
  5371. selected, its partition information is displayed in the window.  Partitions are 
  5372. either primary partitions or logical drives within an extended partition.  Any 
  5373. free space (space within the hard disk that is available for more partitions) 
  5374. is also displayed in the window. 
  5375.  
  5376. This information includes: 
  5377.  
  5378.  Name: Displays the name that has been assigned to any primary partition or 
  5379.   logical drive to be displayed on the Boot Manager menu.  This name is 
  5380.   specified using the Add to Boot Manager menu choice and can be changed by 
  5381.   using the Change Partition Name choice. 
  5382.  
  5383.  Status: Shows the partition status, which may be one of the following. 
  5384.  
  5385.    - Installable: the partition is used as the target for installing another 
  5386.      operating system. 
  5387.  
  5388.    - Bootable: the partition is displayed on the Boot Manager menu when the 
  5389.      system is restarted. 
  5390.  
  5391.    - Startable: the system will restarts directly to this partition.  This 
  5392.      option is available for primary partitions only.  Remember, one of the 
  5393.      primary partitions must be set as startable for the system to restart 
  5394.      successfully. 
  5395.  
  5396.  Access: specifies if a partition is accessible.  The letter in the column 
  5397.   indicates that the partition is accessible.  This column also indicates if 
  5398.   the partition is a primary partition or a logical drive within the extended 
  5399.   partition. 
  5400.  
  5401.  File System Type: indicates the type of file system on the partition.  Any 
  5402.   partitions that have not been formatted will be displayed as unformatted. 
  5403.   Any area on the hard disk not assigned to a partition will be displayed as 
  5404.   free space. 
  5405.  
  5406.  MBytes: indicates the size in megabytes of the partition or free space. 
  5407.  
  5408. The user may select choices on the options pull-down to: 
  5409.  
  5410.  Install the Boot Manager partition. 
  5411.  Create a primary partition or logical drive. 
  5412.  Add a partition to the Boot Manager menu. 
  5413.  Change the partition name. 
  5414.  Assign the accessibility of primary partitions. 
  5415.  Specify startup values such as a default partition, startup selection time, 
  5416.   or mode for the Boot Manager menu. 
  5417.  Remove a partition from the Boot Manager menu. 
  5418.  Delete a primary partition or logical drive. 
  5419.  Set a primary partition as installable. 
  5420.  Specify a primary partition as being startable. 
  5421.  Exit FDISKPM. 
  5422.  
  5423. Note that a hard disk and partition must be selected before these operations 
  5424. can be performed. 
  5425.  
  5426. Setting a Partition Installable The FDISKPM Set Installable menu option is used 
  5427.                to set the selected partition as the target for continuing the 
  5428.                OS/2 installation, or as a target to install another operating 
  5429.                system.  When a partition is set installable, the installable 
  5430.                indicator will be displayed in the Status column. 
  5431.  
  5432. Creating and Deleting a Partition The FDISKPM Create menu option is used to 
  5433.                create logical drives in primary or extended partitions on the 
  5434.                selected physical drive.  In addition, the user may do the 
  5435.                following: 
  5436.  
  5437.     Create multiple primary partitions (up to four for each physical drive). 
  5438.  
  5439.     Place the partitions in relation to the beginning or end of each free area 
  5440.      on the physical drive. 
  5441.  
  5442.     Assign extended partition space as each logical drive is created.  This 
  5443.      provides flexibility for later assignment of free space.  For example, if 
  5444.      free space exists between a primary and extended partition, it may 
  5445.      subsequently be allocated to another primary partition or for expanding 
  5446.      the extended partition. 
  5447.  
  5448.                The FDISKPM Delete menu option is used to delete primary or 
  5449.                extended partitions on the selected physical drive. 
  5450.  
  5451.                Warning:  All data in such a partition is lost after saving 
  5452.                          changes on exiting FDISK. 
  5453.  
  5454. Making a partition Bootable The Add to Boot Manager menu  option is used to 
  5455.                name the partition and add it to the Boot Manager menu at 
  5456.                startup. When Bootable appears in the Status column, the 
  5457.                partition will be displayed. To remove the partition so that it 
  5458.                is not displayed on the Boot Manager menu, select Remove from 
  5459.                Boot Manager menu. 
  5460.  
  5461. Assign Primary Partition The Assign x: partition option is used to specify the 
  5462.                accessibility of primary partitions.  Because only one primary 
  5463.                partition for each hard disk can be active (accessible) at a 
  5464.                time, other primary partitions are effectively hidden 
  5465.                (inaccessible).  This feature exists for primary partitions 
  5466.                only.  All logical drives are accessible. 
  5467.  
  5468. Making a partition Startable Use Make startable to make a primary partition 
  5469.                that you have highlighted on the FDISKPM window the one that 
  5470.                will be activated each time you start the system.  To have Boot 
  5471.                Manager support active and have the Boot Manager menu displayed 
  5472.                when the system is started, the Boot Manager partition must be 
  5473.                set as startable. To deactivate Boot Manager support so that the 
  5474.                Boot Manager menu is not displayed, set another primary 
  5475.                partition as startable, that is, the partition that you want 
  5476.                started when the system is turned on.  Only one primary 
  5477.                partition is startable at a time. 
  5478.  
  5479. Partition Names Partition names are important especially in the event of a 
  5480.                hardware reconfiguration such as adding other physical disks to 
  5481.                the system.  The names assigned to partitions will not change 
  5482.                and still identify the same area on the disk, unlike the drive 
  5483.                letters which can change if your system is reconfigured.  Names 
  5484.                are up to eight characters in length and are case sensitive. Use 
  5485.                the Change partition name to rename any bootable partitions. 
  5486.  
  5487. Setting Startup Values The FDISKPM Set startup values is used to specify the 
  5488.                startup values for the partitions on the system.  The values are 
  5489.                for the following: 
  5490.  
  5491.     A default partition to be started automatically without being selected 
  5492.      from the Boot Manager menu. 
  5493.  
  5494.     A startup selection time allowing you to specify the amount of time you 
  5495.      want the menu to be displayed before the default partition is started 
  5496.      automatically. 
  5497.  
  5498.     A mode for the menu allowing you to indicate how much information about 
  5499.      the partitions you want displayed on it. 
  5500.  
  5501.  
  5502. ΓòÉΓòÉΓòÉ 17.2.3. FDISK Program ΓòÉΓòÉΓòÉ
  5503.  
  5504. The full-screen version of FDISK is used during installation of the operating 
  5505. system.  It provides users with the same functions as the FDISKPM version.  The 
  5506. full-screen version looks and acts in much the same way as FDISKPM, but does 
  5507. not support a mouse. The FDISK full-screen interface is shown in Figure "FDISK 
  5508. Utility (in Full-Screen Mode)". 
  5509.  
  5510. In order to enable the initial installation environment where Presentation 
  5511. Manager facilities are not available, the FDISK program provides a command line 
  5512. interface with similar capabilities to those provided by the FDISKPM program. 
  5513. When combined with the setboot command line utility, the FDISK command line 
  5514. interface also allows modification of logical drive environments and changes to 
  5515. Boot Manager values via batch files or remote command line interfaces such as 
  5516. DCAF, for use in unattended environments. 
  5517.  
  5518. The following syntax shows how to use the FDISK command: 
  5519.  
  5520. <Drive:><path> FDISK parameter:value </option:value>
  5521.  
  5522. The PARAMETERS:VALUE  specified in the FDISK command may be one of the 
  5523. following: 
  5524.  
  5525. /QUERY         Displays a list of all partitions and free space on the hard 
  5526.                disks of the system.  To display a list of all partitions and 
  5527.                free space on the hard disks of the system, type: 
  5528.                FDISK /QUERY 
  5529.  
  5530. /CREATE:name   Creates a primary partition or logical drive in an extended 
  5531.                partition.  You can specify an optional name for the created 
  5532.                partition.  You must specify the type of partition being created 
  5533.                by using the /VTYPE:n option where n = 1 for a primary partition 
  5534.                and 2 for a logical drive in an extended partition.  To create a 
  5535.                logical drive in an extended partition on disk 1 with the name 
  5536.                OS2FAT, type: FDISK /CREATE:OS2FAT /VTYPE:2 /DISK:1 
  5537.  
  5538. /DELETE        Deletes a logical drive or primary partition.  This parameter 
  5539.                must be used with one or more options.  You can use /DELETE:all 
  5540.                to delete all logical drives on a disk.  If you use /DELETE:all, 
  5541.                however, you must specify the disk using the /DISK option.  To 
  5542.                delete a logical drive with the name OS2FAT, type: 
  5543.                FDISK /DELETE /NAME:OS2FAT 
  5544.  
  5545. /SETNAME:name  Specifies names for primary partitions or logical drives and 
  5546.                makes them bootable from the Boot Manager.  If the name is left 
  5547.                blank, the boot name is removed and the partition will not be 
  5548.                bootable from the Boot Manager menu.  To specify the name DOS4.0 
  5549.                of a primary partition, type: 
  5550.                FDISK /SETNAME:DOS4.0 
  5551.  
  5552. /SETACCESS     Sets a primary DOS partition as accessible.  Once a primary DOS 
  5553.                partition has been set as accessible, all other primary DOS 
  5554.                partitions on the same drive are inaccessible.  If there are two 
  5555.                primary DOS partitions on a hard disk, specifying this parameter 
  5556.                with no options makes the previously inaccessible partition 
  5557.                accessible and changes the previously accessible partition to 
  5558.                inaccessible.  To specify a primary DOS partition as accessible 
  5559.                type: 
  5560.                FDISK /SETACCESS 
  5561.  
  5562. /STARTABLE     Specifies a partition as startable.  To specify a partition as 
  5563.                startable, type: 
  5564.                FDISK /STARTABLE 
  5565.  
  5566. /FILE:filename Processes all FDISK commands in the specified file allowing the 
  5567.                batching of FDISK commands.  You must have commas separating the 
  5568.                arguments of each command in the file and the commands are 
  5569.                processed just once.  For example, the file MYFILE contains the 
  5570.                following commands: 
  5571.  
  5572.                                 /query
  5573.                                 /create:OS2,/vtype:1,/disk:1,/name:01000030,/size:20
  5574.                                 /startable,/name:OS2
  5575.                                 /query,/name:OS2
  5576.  
  5577.                The processing of these commands is as follows: 
  5578.  
  5579.    Command 1: displays a list of all partitions and unused space on all hard 
  5580.    disks. 
  5581.    Command 2: creates a primary partition on disk 1 with a size of 20MB in the 
  5582.    free space alias 01000030 and assigns it a boot name of OS2. 
  5583.    Command 3: sets the partition named OS2 to be the startable partition. 
  5584.    Command 4: displays the partition information of the partition named OS2. To 
  5585.    process FDISK commands in the file MYFILE, type: 
  5586.    FDISK /FILE:myfile 
  5587.  
  5588. OPTIONS  limit the actions of the FDISK command and parameters.  The valid 
  5589. options and their associated values are: 
  5590.  
  5591. /NAME:name     Indicates the name of a partition.  A name can be up to eight 
  5592.                characters in length and is case-sensitive.  The /NAME option 
  5593.                can be used with all FDISK parameters except /FILE. 
  5594.  
  5595.                Note:   During a QUERY operation, a temporary name is assigned 
  5596.                to every partition and free space that does not have a boot name 
  5597.                assigned. This name is not set as the partition name, but is 
  5598.                only used as a temporary identifier for the user. Because they 
  5599.                will not have a visual representation of the FDISK screen, these 
  5600.                temporary names can be used in place of real names for the NAME 
  5601.                option. To delete a partition named dos, type: 
  5602.                FDISK /DELETE /NAME:dos 
  5603.  
  5604. /DISK:n        Specifies the number of the hard disk that you want to work with 
  5605.                using the FDISK command and parameters.  The /DISK option can be 
  5606.                used with all FDISK parameters except /FILE.  To display all 
  5607.                partitions on drive 2, type: 
  5608.                FDISK /QUERY /DISK:2 
  5609.  
  5610. /FSTYPE:x      Specifies the file system type of the partition.  The type 
  5611.                x=DOS, FAT, IFS, Free, Hnn, or other. "Hnn" is the hex value 
  5612.                (nn) of the partition system ID value. 
  5613.  
  5614.                The /FSTYPE option can be used with all FDISK parameters except 
  5615.                /FILE and /SETACCESS. To display a partition with a FAT file 
  5616.                system, type: 
  5617.                FDISK /QUERY /FSTYPE:FAT 
  5618.  
  5619. /START:m       Specifies the partition starting location. Specify  m=t or m=b, 
  5620.                where t=top of the partition and b=bottom of the partition. The 
  5621.                /START option can be used with all FDISK parameters except 
  5622.                /FILE. To create a primary partition starting at the top of the 
  5623.                partition, type: 
  5624.                FDISK /CREATE /START:t 
  5625.  
  5626. /SIZE:m        Specifies the size of the partition where m is the size in MB. 
  5627.                The /SIZE option can be used with all FDISK parameters except 
  5628.                /FILE. To create a primary partition with a size of 8MB, type: 
  5629.                FDISK /CREATE /SIZE:8 
  5630.  
  5631. /VTYPE:n       Specifies the type of the partition.  The value of n can be as 
  5632.                follows: 
  5633.  
  5634.    0 Space is not usable 
  5635.    1 Primary partition (not shared) 
  5636.    2 Logical drive (shared in an extended partition) 
  5637.    3 Free space that can be used to create a primary or extended partition. 
  5638.  
  5639.                The /VTYPE option can be used with all FDISK parameters except 
  5640.                /FILE, /SETACCESS, and /STARTABLE. 
  5641.                To display unusable space on a disk, type: 
  5642.                FDISK /QUERY /VTYPE:0 
  5643.                To specify a primary partition to be displayed, type: 
  5644.                FDISK /QUERY /VTYPE:1 
  5645.                To specify a logical drive in an extended partition to be 
  5646.                displayed, type: 
  5647.                FDISK /QUERY /VTYPE:2 
  5648.                To display free space that can be used to create a primary or 
  5649.                extended partition, type: 
  5650.                FDISK /QUERY /VTYPE:3 
  5651.  
  5652. /BOOTABLE:s    Indicates the bootable status of partitions; s=0 for partitions 
  5653.                that are not bootable; s=1 for partitions that are bootable. 
  5654.                The /BOOTABLE option can be used with all FDISK parameters 
  5655.                except /FILE. To display all partitions that are bootable from 
  5656.                the Boot Manager menu, type: 
  5657.                FDISK /QUERY /BOOTABLE:1 
  5658.  
  5659. /BOOTMGR       Specifies an action for the Boot Manager partition. To create 
  5660.                the Boot Manager partition, type: 
  5661.                FDISK  /CREATE /BOOTMGR 
  5662.  
  5663.  
  5664. ΓòÉΓòÉΓòÉ 17.3. SETBOOT Utility ΓòÉΓòÉΓòÉ
  5665.  
  5666. The SETBOOT utility provides a command line interface which enables the user to 
  5667. configure the parameters associated with the Boot Manager environment. 
  5668.  
  5669. Invoking the SETBOOT utility is achieved using the following command: 
  5670.  
  5671. <Drive:><path> SETBOOT parameter <:value>
  5672.  
  5673. where parameter:value is one of the following: 
  5674.  
  5675. /IBD:X    Restarts the system from the specified logical drive, X, without 
  5676.           going through the Boot Manager menu. The parameter X is the drive 
  5677.           letter of a startable partition. If Boot Manager is not present then 
  5678.           only drive C can be specified.  For example, to reboot the system 
  5679.           immediately from drive D without going through Boot Manager type: 
  5680.           SETBOOT /IBD:D 
  5681.  
  5682. /T:x      Sets the time-out value of the timer for the Boot Manager selection 
  5683.           menu.  The specified value of x may be 0 to 999 or NO.  A specified 
  5684.           value of nnn is the time in seconds that the Boot Manager selection 
  5685.           menu will remain displayed before automatically starting the default 
  5686.           logical drive. A specified value of 0 seconds bypasses the Boot 
  5687.           Manager selection menu entirely, booting the default system without 
  5688.           any intervention.  When the time-out value is NO, the timer is 
  5689.           disabled, leaving the Boot Manager selection menu displayed until the 
  5690.           user makes a selection. 
  5691.  
  5692. /M:m      Sets the mode for the Boot Manager selection menu: 
  5693.  
  5694.     m = n sets the mode to display only the boot names of the logical drives 
  5695.      marked bootable. This is the default mode. 
  5696.     m = a (advanced mode) sets the mode to display additional information such 
  5697.      as physical drive, file system type, etc. 
  5698.  
  5699. /Q        Queries the current Boot Manager environment.  Returns the default 
  5700.           volume boot names, time-out value, mode, and unattended operation 
  5701.           logical drive assignments. 
  5702.  
  5703. /B        Performs an shutdown and then reboots the system, booting to the 
  5704.           system set to the marked index value at the time of boot. 
  5705.  
  5706.           Note:   This is not the complete system shutdown which can be 
  5707.           performed via the Workplace Shell's desktop context menu. All it does 
  5708.           is basically flushing all file system buffers and close all currently 
  5709.           open files. PM Applications will not receive any message, they will 
  5710.           just be cut off, where ever they were left. 
  5711.  
  5712. /X:x      This is an index which indicates the logical drive to Boot Manager 
  5713.           from which the system is to be started: 
  5714.  
  5715.     A value of 0 sets Boot Manager to attended mode operation and provides for 
  5716.      a default system selection. 
  5717.  
  5718.     A value of 1 to 3 puts Boot Manager in an unattended operation mode, in 
  5719.      which case all attended mode functions are bypassed, including the 
  5720.      selection menu. This is provided as a mechanism that unattended operation 
  5721.      can use to implement a fallback boot sequence.  For example, if an 
  5722.      operating system fails to access a program to set the index, the 
  5723.      subsequent boot will attempt to start the next fallback system (probably a 
  5724.      more trusted system) and so on. 
  5725.  
  5726.           Boot Manager will start the system from the logical drive 
  5727.           corresponding to the index and then, before exiting, will decrement 
  5728.           the value by 1 so long as the value is greater than 1.  If the value 
  5729.           is not set by SETBOOT before the next boot, Boot Manager will start 
  5730.           the system from a different logical drive. 
  5731.  
  5732. /N:name   Sets the partition or logical drive specified by the boot name and 
  5733.           its corresponding index value as the operating system to be started. 
  5734.           Up to four pair-combinations can be given, one for each index value, 
  5735.           0 to 3. A boot name is case-sensitive, and if it contains blanks, the 
  5736.           /N:name pair must be enclosed in quotation marks. 
  5737.  
  5738.           The following shows the values for N: 
  5739.  
  5740.    N = 0 assigns the specified boot name as the default operating system. 
  5741.    N = 1 to 3 specifies the boot name to be started when the corresponding 
  5742.    index is chosen to start. 
  5743.  
  5744.           To specify the logical drive with the boot name MYSYSTEM as the 
  5745.           default operating system to be started type: 
  5746.           SETBOOT /0:MYSYSTEM 
  5747.  
  5748. SETBOOT will provide a return code and the requested information.  The 
  5749. information is output to STDOUT and can be piped and redirected.  Return codes 
  5750. are 0 for successful operation and 1 for unsuccessful operation. 
  5751.  
  5752.  
  5753. ΓòÉΓòÉΓòÉ 17.4. Selecting an Operating System ΓòÉΓòÉΓòÉ
  5754.  
  5755. The selection of the logical drive from which the system is to be started is 
  5756. performed at IPL time.  The user is presented with a panel containing a list of 
  5757. selectable logical drives. The user may explicitly select a logical drive, or 
  5758. may allow the selection timer to expire and have Boot Manager  start the system 
  5759. from the default logical drive without further intervention. 
  5760.  
  5761. If the time-out value was set to zero using the SETBOOT utility or 
  5762. FDISK/FDISKPM, the selection menu is circumvented and Boot Manager immediately 
  5763. starts the system from the default logical drive. 
  5764.  
  5765. If the time-out value is other than zero, the selection menu is displayed as 
  5766. shown in Figure "Boot Manager Selection Menu". 
  5767.  
  5768. If no default logical drive was specified, then the last system booted becomes 
  5769. the default. 
  5770.  
  5771. The up/down cursor keys are used to select a particular logical drive.  By 
  5772. default, the cursor is located at the current default logical drive.  If more 
  5773. logical drives are configured in a workstation environment than lines are 
  5774. available on the screen to display them, a scroll bar will appear in the 
  5775. selection screen indicating to the user whether more logical drives are 
  5776. available for display. 
  5777.  
  5778. The selection menu displays the current time-out value, and the boot name of 
  5779. the current default logical drive. In order to allow the user to suspend or 
  5780. resume the timer while the selection menu is displayed, the Esc key may be used 
  5781. in toggle mode.  The current status of the timer is displayed 
  5782. (enabled/disabled) and the Esc key will toggle a status switch. 
  5783.  
  5784. The selection menu shown in Figure "Boot Manager Selection Menu" is the 
  5785. standard mode normally seen at power-on or IPL time.  Only the boot names of 
  5786. selectable logical drivers are displayed; no additional information about the 
  5787. type of logical drive and physical location is shown in order to keep the 
  5788. standard user interface simple and straightforward. 
  5789.  
  5790. However, in order to accommodate advanced users and system administrators who 
  5791. wish to see more details about the available logical drives, an advanced mode 
  5792. menu is available.  This advanced mode menu can be activated via an option in 
  5793. FDISK, FDISKPM or via the SETBOOT utility. 
  5794.  
  5795. The advanced mode selection menu shows not only the boot names of the logical 
  5796. drives, but will also indicate the physical disk upon which the logical drive 
  5797. resides, the type of partition (primary/extended), the file system for which 
  5798. the logical drive was formatted, and the accessibility of the logical drive. 
  5799. The advanced mode selection menu is shown in Figure "Boot Manager Selection 
  5800. Menu - Advanced Mode". 
  5801.  
  5802. Note that the third column displays the partition type for a logical drive boot 
  5803. name. Logical indicates that the drive resides in an extended partition. 
  5804.  
  5805. The fifth column displays the accessibility of the logical drive.  Hidden means 
  5806. the system will not have access to this volume;  however, if a hidden boot name 
  5807. is selected as the logical drive from which to start the system, Boot Manager 
  5808. will "unhide" it.  Boot Manager will automatically hide any other primaries on 
  5809. that physical drive, since only one primary partition may be active at any 
  5810. time. 
  5811.  
  5812. Note:   Only primary partitions can be marked as hidden, extended logical 
  5813. drives (partitions) are always accessible. 
  5814.  
  5815.  
  5816. ΓòÉΓòÉΓòÉ 17.5. Sharing Partitions between Operating Systems ΓòÉΓòÉΓòÉ
  5817.  
  5818. Boot Manager allows for both primary and extended partitions on a single 
  5819. physical drive.  Only one primary partition may be active at a time.  However, 
  5820. the extended partition will always be active, regardless of which primary 
  5821. partition is active.  Logical drives in an extended partition may therefore be 
  5822. accessed by multiple operating systems started from primary partitions or from 
  5823. logical drives in the extended partition.  This access is dependent on the 
  5824. operating system supporting the format of the extended partition. 
  5825.  
  5826. Table "Partition Format Accessibility" illustrates some of the dependencies 
  5827. between operating systems and extended partitions. 
  5828.  
  5829. Note that it is not possible for an operating system loaded from a primary 
  5830. partition to access any other primary partition on that hardfile;  only the 
  5831. logical drive on the operating system's own primary partition and those on 
  5832. extended partitions may be accessed. 
  5833.  
  5834. Where it is desirable to have a common set of application or data files which 
  5835. may be accessed by different operating systems, a workable strategy is to 
  5836. locate only those files which are specific to the operating system on the 
  5837. appropriate primary partition, while locating common application and data files 
  5838. on logical drives in extended partitions.  This implies that the primary 
  5839. partitions should be created to be comfortably large enough to accommodate the 
  5840. desired configuration of the operating system concerned, but no larger. 
  5841.  
  5842. Since the amount of disk space required to configure any operating system to 
  5843. meet particular needs will vary widely with those needs, readers should consult 
  5844. the installation and configuration instructions for the operating system 
  5845. concerned, in order to determine a reasonable partition size. 
  5846.  
  5847. When setting up a complex set of operating systems and extended partitions, 
  5848. readers should carefully consider the implications of logical drive letters 
  5849. that each operating system will automatically assign to all logical drives 
  5850. visible to the operating system.  This especially applies to applications which 
  5851. reference other applications or data located on different logical drives.  The 
  5852. logical drive letters may not be consistent between operating systems; for 
  5853. example, a logical partition formatted for HPFS will be completely invisible to 
  5854. DOS 3.3, but visible though not accessible to DOS 4.0 (CSD UR31300).  This may 
  5855. result in different logical drive letters being assigned to other logical 
  5856. drives, depending upon which operating system is currently active in the 
  5857. machine, which in turn holds implications for the configuration of applications 
  5858. and the design of batch files. 
  5859.  
  5860.  
  5861. ΓòÉΓòÉΓòÉ 17.6. AIX Considerations ΓòÉΓòÉΓòÉ
  5862.  
  5863. It is possible to install AIX, OS/2 and DOS in different partitions on the same 
  5864. disk and use Boot Manager to switch between the different operating systems. 
  5865. There are some things, however, to be aware of: 
  5866.  
  5867.  1. When AIX installs it creates two partitions on the disk.  The first 
  5868.     partition which is 1MB in size contains the MBR for AIX.  The second 
  5869.     partition contains several AIX minidisks.  The AIX partitions cannot be 
  5870.     created using either the DOS or OS/2 FDISK programs, but are created by the 
  5871.     AIX install process. 
  5872.  
  5873.  2. The order that AIX, OS/2 or DOS are installed is not important.  If 
  5874.     installing AIX first, remember to leave sufficient free space available in 
  5875.     which to create partitions for OS/2 or DOS. If installing OS/2 or DOS 
  5876.     first, when running FDISK, do not create partitions across the entire disk. 
  5877.     Also only allocate the Boot Manager partition and one other, thus leaving 
  5878.     two available for AIX. 
  5879.  
  5880.  3. The OS/2 V2.0 FDISK and FDISKPM programs will recognize the AIX partitions. 
  5881.     Use FDISK or FDISKPM to make the smaller AIX partition bootable.  If AIX is 
  5882.     installed second, it will be necessary to shutdown AIX and to boot from the 
  5883.     OS/2 install diskettes, escape out of the install process and run FDISK 
  5884.     from the full-screen command prompt to make Boot Manager startable and the 
  5885.     smaller AIX partition bootable. 
  5886.  
  5887.  4. It is possible to install AIX on the second disk of a two-disk system. 
  5888.     However AIX will still create a partition with its MBR on the first disk. 
  5889.     This partition should be marked startable.  On the second disk it also 
  5890.     creates a partition to contain the MBR as well as the partition for the AIX 
  5891.     minidisks. 
  5892.  
  5893.  
  5894. ΓòÉΓòÉΓòÉ 17.7. Operating System Restrictions ΓòÉΓòÉΓòÉ
  5895.  
  5896. Several restrictions apply to the manner in which various versions of operating 
  5897. systems may be installed under Boot Manager.  These include: 
  5898.  
  5899.  Only DOS Versions 3.2 and above are supported by Boot Manager. 
  5900.  
  5901.  All supported versions of DOS must be installed on a primary partition on the 
  5902.   first drive and therefore, end up working on the C: drive only. 
  5903.  
  5904.  DOS Versions 3.2 and 3.3 must be installed in a partition that falls wholly 
  5905.   within the first 32MB of a fixed disk. 
  5906.  
  5907.  OS/2 Version 1.3 and earlier versions may only be installed on a primary 
  5908.   partition on the first drive and therefore, end up working on the C: drive 
  5909.   only. 
  5910.  
  5911. Notes: 
  5912.  
  5913.  1. An operating system may NOT store its own information in the Multi-Boot 
  5914.     Block or in the Master Boot Record on the physical drive.  Any such 
  5915.     information must be held within the logical disks owned by that operating 
  5916.     system.  Operating systems which do not obey this rule may not function 
  5917.     correctly in the Boot Manager environment, and will compromise disk 
  5918.     integrity. 
  5919.  
  5920.  2. Other operating systems may leave their partition startable following 
  5921.     installation.  The user would have to use their FDISK program or boot the 
  5922.     OS/2 V2.0  installation diskette to mark the Boot Manager partition as 
  5923.     startable again to enable the Boot Manager menu at startup.  See also Boot 
  5924.     Manager Installation. 
  5925.  
  5926.  
  5927. ΓòÉΓòÉΓòÉ 17.8. Summary ΓòÉΓòÉΓòÉ
  5928.  
  5929. Boot Manager provides the capability to install and run multiple operating 
  5930. systems concurrently in the same machine.  The user may select the desired 
  5931. operating system at system power-on or at IPL-time, using a selection menu 
  5932. provided by Boot Manager. 
  5933.  
  5934. Operating systems reside on logical drives in both primary and extended fixed 
  5935. disk partitions.  Partitions are created and manipulated using the FDISK, 
  5936. FDISKPM, and SETBOOT utilities provided with OS/2 Version 2.0. 
  5937.  
  5938. Operating systems may share applications and data files, provided that the disk 
  5939. formats supported  by each operating system are compatible.  In order to be 
  5940. shared, such files must reside on logical drives in extended fixed disk 
  5941. partitions, or on physically separate disks. 
  5942.  
  5943.  
  5944. ΓòÉΓòÉΓòÉ 18. National Language Considerations ΓòÉΓòÉΓòÉ
  5945.  
  5946. OS/2 Version 2.0 provides support for additional national languages over and 
  5947. above those supported by OS/2 Version 1.3.  The discussion in this chapter will 
  5948. concentrate on the new languages supported, and will not cover the languages 
  5949. that were already supported in OS/2 Version 1.3. 
  5950.  
  5951.  
  5952. ΓòÉΓòÉΓòÉ 18.1. Single-Byte Languages ΓòÉΓòÉΓòÉ
  5953.  
  5954. New single-byte codepage support is added in OS/2 Version 2.0 for the following 
  5955. countries: 
  5956.  
  5957.  Iceland 
  5958.  
  5959.  Latin (Group 2) countries: 
  5960.  
  5961.    - Czechoslovakia 
  5962.    - Hungary 
  5963.    - Poland 
  5964.    - Yugoslavia 
  5965.  
  5966.  Turkey. 
  5967.  
  5968. Czechoslovakia uses two common national languages: Czech and Slovak.  Support 
  5969. is provided for both these languages by providing two keyboard layouts: a 
  5970. primary keyboard layout for Czech/Czech, and a secondary keyboard for 
  5971. Czech/Slovak.  This is similar to the method used to support countries such as 
  5972. the United Kingdom and France where more than one keyboard layout is in common 
  5973. use. 
  5974.  
  5975.  
  5976. ΓòÉΓòÉΓòÉ 18.1.1. Iceland ΓòÉΓòÉΓòÉ
  5977.  
  5978. OS/2 Version 2.0 provides the following support for Iceland: 
  5979.  
  5980.  Country code: 354 
  5981.  Keyboard layout: 197 
  5982.  Primary codepage: 850 
  5983.  Secondary codepage: 861. 
  5984.  
  5985.  
  5986. ΓòÉΓòÉΓòÉ 18.1.2. Czechoslovakia ΓòÉΓòÉΓòÉ
  5987.  
  5988. OS/2 Version 2.0 provides the following support for Czechoslovakia: 
  5989.  
  5990.  Country code: 42 
  5991.  Keyboard layout: 243 (Czech) or 245 (Slovak) 
  5992.  Primary codepage: 852 
  5993.  Secondary codepage: 850. 
  5994.  
  5995.  
  5996. ΓòÉΓòÉΓòÉ 18.1.3. Hungary ΓòÉΓòÉΓòÉ
  5997.  
  5998. OS/2 Version 2.0 provides the following support for Hungary: 
  5999.  
  6000.  Country code: 36 
  6001.  Keyboard layout: 208 
  6002.  Primary codepage: 852 
  6003.  Secondary codepage: 850. 
  6004.  
  6005.  
  6006. ΓòÉΓòÉΓòÉ 18.1.4. Poland ΓòÉΓòÉΓòÉ
  6007.  
  6008. OS/2 Version 2.0 provides the following support for Poland: 
  6009.  
  6010.  Country code: 48 
  6011.  Keyboard layout: 214 
  6012.  Primary codepage: 852 
  6013.  Secondary codepage: 850. 
  6014.  
  6015.  
  6016. ΓòÉΓòÉΓòÉ 18.1.5. Yugoslavia ΓòÉΓòÉΓòÉ
  6017.  
  6018. OS/2 Version 2.0 provides the following support for Yugoslavia: 
  6019.  
  6020.  Country code: 38 
  6021.  Keyboard layout: 234 
  6022.  Primary codepage: 852 
  6023.  Secondary codepage: 850. 
  6024.  
  6025.  
  6026. ΓòÉΓòÉΓòÉ 18.1.6. Turkey ΓòÉΓòÉΓòÉ
  6027.  
  6028. OS/2 Version 2.0 provides the following support for Turkey: 
  6029.  
  6030.  Country code: 90 
  6031.  Keyboard layout: 179 
  6032.  Primary codepage: 857 
  6033.  Secondary codepage: 850. 
  6034.  
  6035.  
  6036. ΓòÉΓòÉΓòÉ 18.2. Double-Byte Languages ΓòÉΓòÉΓòÉ
  6037.  
  6038. OS/2 Version 2.0 provides additional support for double-byte character sets, 
  6039. with four new SAA codepages supported.  These are: 
  6040.  
  6041.  942 - Japanese 
  6042.  944 - Korean 
  6043.  946 - People's Republic of China 
  6044.  948 - Taiwanese. 
  6045.  
  6046. This support is in addition to the previously supported codepages 932, 934, 
  6047. 936, and 938. 
  6048.  
  6049. Double-byte codepages may only be used on hardware which supports the use of 
  6050. double-byte character sets, such as the IBM PS/55 family, and with the Asian 
  6051. version of OS/2. 
  6052.  
  6053.  
  6054. ΓòÉΓòÉΓòÉ 18.3. Bidirectional Languages ΓòÉΓòÉΓòÉ
  6055.  
  6056. Support is provided in OS/2 Version 2.0 for national languages such as Hebrew 
  6057. and Arabic, which require video display output and printer output to be 
  6058. presented for reading from left-to-right or right-to-left, and for the nesting 
  6059. of phrases in either direction.  This bidirectional support is used in 
  6060. conjunction with the Hebrew and Arabic codepages, and uses a bidirectional 
  6061. video device handler (VDH) and a bidirectional printer monitor.  This VDH is 
  6062. chained to the device-specific VDH and handles all the bidirectional aspects of 
  6063. the video output. 
  6064.  
  6065. This support is only available for full-screen screen groups. 
  6066.  
  6067. The bidirectional language support provided in OS/2 Version 2.0 will support 
  6068. those countries with country codes 785 (Arabic) and 972 (Hebrew), and which use 
  6069. either codepages 864 (Arabic) or 862 (Hebrew) as the primary codepage. These 
  6070. countries may also use either codepage 437 or 850 as a secondary codepage. 
  6071.  
  6072. A number of function calls are provided to allow querying and setting of 
  6073. bidirectional screen group attributes and the manipulation of character strings 
  6074. from within applications.  This enables the development of bidirectional aware 
  6075. applications. 
  6076.  
  6077.  
  6078. ΓòÉΓòÉΓòÉ 18.3.1. Installation ΓòÉΓòÉΓòÉ
  6079.  
  6080. The OS/2 Version 2.0 installation program allows installation of bidirectional 
  6081. support for Arabic and Hebrew countries in a similar manner to other supported 
  6082. countries.  The following configuration commands are affected: 
  6083.  
  6084.  COUNTRY 
  6085.  CODEPAGE 
  6086.  DEVINFO 
  6087.  RUN 
  6088.  SET. 
  6089.  
  6090. Note that the bidirectional support will not become active at installation 
  6091. time; it requires an IPL of the system in order to load the correct drivers and 
  6092. the device monitors. 
  6093.  
  6094. Arabic 
  6095.  
  6096. The following commands are used in CONFIG.SYS to support those countries using 
  6097. the Arabic language: 
  6098.  
  6099. COUNTRY=785,C:\OS2\SYSTEM\COUNTRY.SYS
  6100. CODEPAGE=864,437
  6101. DEVINFO=KBD,AR,C:\OS2\KEYBOARD.DCP
  6102. RUN=C:\OS2\SYSTEM\BDPRTM.EXE
  6103.  
  6104. For each SET VIO_xxx=DEVICE(BVHxxx), the BDBVH driver is appended after the 
  6105. name of the device-specific video handler. For example when installing support 
  6106. for a VGA display, the SET=VIO_VGA line will be: 
  6107.  
  6108. SET VIO_VGA=DEVICE(BVHVGA,BDBVH)
  6109.  
  6110. Please refer to OS/2 Version 2.0 - Volume 5:  Print Subsystem, GG24-3775 for 
  6111. details of using the DEVINFO statement to prepare a printer which supports the 
  6112. Arabic codepage, to use the codepage and any specific fonts associated with the 
  6113. codepage. 
  6114.  
  6115. Hebrew 
  6116.  
  6117. The following commands are used in CONFIG.SYS to support those countries using 
  6118. the Hebrew language: 
  6119.  
  6120. COUNTRY=972,C:\OS2\SYSTEM\COUNTRY.SYS
  6121. CODEPAGE=862,437     (or CODEPAGE=862,850)
  6122. RUN=C:\OS2\SYSTEM\BDPRTM.EXE
  6123.  
  6124. For each SET VIO_xxx=DEVICE(BVHxxx), the BDBVH driver is appended after the 
  6125. name of the device specific video handler. For example when installing support 
  6126. for a VGA display, the SET=VIO_VGA line will be: 
  6127.  
  6128. SET VIO_VGA=DEVICE(BVHVGA,BDBVH)
  6129.  
  6130. Please refer to OS/2 Version 2.0 - Volume 5:  Print Subsystem, GG24-3775 for 
  6131. details of using the DEVINFO statement to prepare a printer which supports the 
  6132. Hebrew codepage, to use the codepage and any specific fonts associated with the 
  6133. codepage. 
  6134.  
  6135.  
  6136. ΓòÉΓòÉΓòÉ 18.3.2. Programming Interface ΓòÉΓòÉΓòÉ
  6137.  
  6138. The following 16-bit functions are provided for application developers to use 
  6139. the bidirectional language support provided in OS/2 Version 2.0: 
  6140.  
  6141.  NlsQueryBidiAtt() returns the current bidirectional attributes that are in 
  6142.   effect for the current screen group. 
  6143.  
  6144.  NlsSetBidiAtt() sets specific values in the bidirectional control blocks (per 
  6145.   screen group). 
  6146.  
  6147.  NlsShapeBidiString() shapes or reshapes an Arabic string of specified length. 
  6148.  
  6149.  NlsEditshape() reshapes an Arabic character (typically in an input or editing 
  6150.   sequence) based on the two preceding characters, or reshapes the current and 
  6151.   surrounding characters after an editing function has been carried out. 
  6152.  
  6153.  NlsInverseString() inverts the sequence of characters in a specific string. 
  6154.  
  6155.  NlsConvertBidiNumerics() converts numerics in a string to Arabic character 
  6156.   codes. 
  6157.  
  6158.  NlsConvertBidiString() converts a Bidi string conforming to a certain set of 
  6159.   bidirectional attributes, to a form which conforms to a different set of 
  6160.   bidirectional attributes. 
  6161.  
  6162.  NlsSetBidiPrint() associates a given set of Bidi attributes with a particular 
  6163.   print file. 
  6164.  
  6165.  
  6166. ΓòÉΓòÉΓòÉ 18.3.3. Bidirectional User Interface ΓòÉΓòÉΓòÉ
  6167.  
  6168. The following keyboard key combinations are supported in a full-screen screen 
  6169. group in a bidirectional support enabled system: 
  6170.  
  6171.  National-Language Layer (Alt+Right Shift) switches the keyboard to its 
  6172.   national language mode. Typed keys produce NL characters. 
  6173.  
  6174.  Latin Layer (Alt+Left Shift) switches the keyboard to its Latin language 
  6175.   mode. Typed keys produce Latin characters. 
  6176.  
  6177.  Screen Reverse (Alt+Newline) switches the orientation of the screen. Screen 
  6178.   maybe either in Left-to-Right or Right-to-Left orientation. 
  6179.  
  6180.  Field Reverse (Alt+NumLock) temporarily switches the direction of the cursor 
  6181.   within a line or field. 
  6182.  
  6183.  PUSH (Shift+NumLock) temporarily switches the direction of the cursor within 
  6184.   a line or field. Characters are PUSHed (as in a pocket calculator) in the 
  6185.   direction which is opposite to the screen orientation. 
  6186.  
  6187.  End Push (Shift+NumPad /) ends PUSH mode. 
  6188.  
  6189.  AutoPush (Alt+NumPad /) Toggle key that enables automatic activation and 
  6190.   deactivation of PUSH mode, based on the keys that are typed on the keyboard. 
  6191.  
  6192.  Bidi Status (Alt+ScrollLock) activates a pop-up window that displays the 
  6193.   bidirectional settings for the current screen group. The user is able to 
  6194.   change these settings by manipulating fields in the pop-up window. 
  6195.  
  6196. The following are Arabic-specific keyboard functions. 
  6197.  
  6198.  AutoShape/Base (Alt+NumPad 4) toggles the keyboard between automatically 
  6199.   (context dependent) shaped characters and base shapes. 
  6200.  
  6201.  Shape Isolated (Alt+NumPad 2) typed characters are in isolated shape. 
  6202.  
  6203.  Shape Initial (Alt+NumPad 1) typed characters are in initial shape. 
  6204.  
  6205.  Shape Middle (Alt+NumPad 7) typed characters are in middle shape. 
  6206.  
  6207.  Shape Final (Alt+NumPad 8) typed characters are in final shape. 
  6208.  
  6209.  
  6210. ΓòÉΓòÉΓòÉ 18.4. Message Files ΓòÉΓòÉΓòÉ
  6211.  
  6212. Previous versions of OS/2 supported only a single codepage for message files 
  6213. used by the system and by applications within the system.  This created a 
  6214. problem where a process used a codepage other than the system's primary 
  6215. codepage, since messages appeared using the primary codepage rather than the 
  6216. codepage specific to that process.  OS/2 Version 2.0 resolves this problem by 
  6217. allowing multiple codepages in a single message file, and allowing a message to 
  6218. be retrieved by a process using the codepage currently used by that process. 
  6219. This level of support has resulted in changes in the following areas: 
  6220.  
  6221.  The message file structure is modified to include codepage and language 
  6222.   identification. 
  6223.  
  6224.  The MKMSGF utility is enhanced to create multiple codepage message files. 
  6225.  
  6226.  The MSGBIND utility is enhanced to allow the binding of messages for multiple 
  6227.   codepages to a single application program. 
  6228.  
  6229.  The DosGetMessage() function call in MSG.DLL is enhanced to retrieve messages 
  6230.   based on the current codepage of a process. 
  6231.  
  6232.  A new DosQueryMessageCp() function is added to MSG.DLL to retrieve the list 
  6233.   of codepage and language identifiers present in the application's message 
  6234.   file. 
  6235.  
  6236. Using this support, an application may query the current codepage for its 
  6237. parent process using the DosQueryCp() function, ensure that codepage is 
  6238. supported by the application's message file by issuing a DosQueryMessageCp() 
  6239. call, and then issue DosGetMessage() calls specifying the appropriate codepage 
  6240. for the message to be retrieved.  For most applications, it is recommended that 
  6241. the multinational codepage 850 be used where support for multiple national 
  6242. languages is required. 
  6243.  
  6244.  
  6245. ΓòÉΓòÉΓòÉ 18.5. Information Presentation Facility ΓòÉΓòÉΓòÉ
  6246.  
  6247. Table "IPF NLS Language Files" shows the language files used by the Information 
  6248. Presentation Facility (IPF), in order to provide national language support. 
  6249.  
  6250. These files are installed as part of the IBM Developer's Toolkit for OS/2 2.0, 
  6251. and are used during execution of the IPF compiler.  The compiler requires a 
  6252. symbol file APSYMBOL.APS to be available.  When using DBCS languages, the 
  6253. default symbol file must be overwritten with a symbol file appropriate for the 
  6254. language being used.  See IBM OS/2 Version 2.0 Information Presentation 
  6255. Reference for details. 
  6256.  
  6257.  
  6258. ΓòÉΓòÉΓòÉ 18.6. Supported Countries ΓòÉΓòÉΓòÉ
  6259.  
  6260. The supported countries and codepages are shown in Table "NLS Country Codes and 
  6261. Codepages". 
  6262.  
  6263.  
  6264. ΓòÉΓòÉΓòÉ 18.7. Summary ΓòÉΓòÉΓòÉ
  6265.  
  6266. OS/2 Version 2.0 has national language support for twenty-two languages: 
  6267.  
  6268.  Arabic 
  6269.  Canadian French 
  6270.  Czech (Czech) 
  6271.  Czech (Slovak) 
  6272.  Danish 
  6273.  Dutch 
  6274.  Finnish 
  6275.  French 
  6276.  German 
  6277.  Hebrew 
  6278.  Hungarian 
  6279.  Icelandic 
  6280.  Italian 
  6281.  Norwegian 
  6282.  Polish 
  6283.  Portuguese 
  6284.  Spanish 
  6285.  Swedish 
  6286.  Turkish 
  6287.  United Kingdom English 
  6288.  United States/Universal English 
  6289.  Yugoslavian. 
  6290.  
  6291. OS/2 Version 2.0 provides support for all countries supported by OS/2 Version 
  6292. 1.3, with additional single-byte and double-byte national languages supported. 
  6293. Where a number of the newly supported countries use more than one common 
  6294. language, these languages are supported by OS/2 Version 2.0 as part of the 
  6295. national language support for that country. 
  6296.  
  6297. OS/2 Version 2.0 provides support for message files which use multiple 
  6298. codepages.  This allows an application to select messages from the file using 
  6299. the current codepage for the application's parent process, thereby enabling 
  6300. more comprehensive national language support by applications. 
  6301.  
  6302. OS/2 Version 2.0 also provides support for bidirectional languages such as 
  6303. Arabic and Hebrew, in conjunction with the national language codepages for 
  6304. these languages, and keyboard and printer monitors implemented by the operating 
  6305. system.  In addition, OS/2 Version 2.0 provides enabling support for those 
  6306. countries using bidirectional alphabets such as Arabic and Hebrew. 
  6307.  
  6308.  
  6309. ΓòÉΓòÉΓòÉ 19. Intel 80386 Architecture ΓòÉΓòÉΓòÉ
  6310.  
  6311. The Intel 80386 is a powerful 32-bit microprocessor and is the first hardware 
  6312. platform on which OS/2 Version 2.0 has been implemented. The 80386 incorporates 
  6313. multitasking support, sophisticated memory management, pipelined architecture, 
  6314. address translation caching, and a high-speed bus interface, all combined 
  6315. within the processor chip.  While the 80386 represents a significant 
  6316. improvement over previous generations of Intel microprocessors, it retains 
  6317. software compatibility with older 16-bit microprocessors such as the 8086 and 
  6318. 80286 families. 
  6319.  
  6320. The capacity of the 80386 processor is significant.  Some figures are presented 
  6321. below, in comparison with 80286 processors: 
  6322.  
  6323.  4, 5, or 6 million instructions per second (corresponding to clock speeds of 
  6324.   16, 20, and 25 MHz). 
  6325.  
  6326.  4 gigabyte physical address space, compared with the maximum of 16 megabytes 
  6327.   available on the 80286. 
  6328.  
  6329.   Note:   The 80386SX is an exception as it still is limited to a maximum of 
  6330.   16MB of physical memory. Internally the 80386SX is a full 32-bit processor 
  6331.   but externally it has only a 16-bit data bus and a 24-bit address bus. 
  6332.  
  6333.  64 terabyte virtual address space, compared with the 1 gigabyte available on 
  6334.   the 80286. 
  6335.  
  6336.  Ability to handle memory objects from 1 byte to 4 gigabytes in size, compared 
  6337.   to segments of 16 bytes to 64 kilobytes on the 80286. 
  6338.  
  6339.  Paged memory management using 4 kilobyte pages, compared to the 80286 which 
  6340.   offered only segmented memory management. 
  6341.  
  6342. This chapter provides an overview of the 80386 processor architecture, in order 
  6343. to serve as a base for understanding the changes made in OS/2 Version 2.0. 
  6344. More detailed information about the 80386 can be found in: 
  6345.  
  6346.  Intel 80386 Hardware Reference Manual (ISBN 1-55512-069-5) 
  6347.  
  6348.  Intel 80386SX Hardware Reference Manual (ISBN 1-55512-105-5) 
  6349.  
  6350.  Intel 386 DX Programmer's Guide (ISBN 1-55512-082-2) 
  6351.  
  6352.  IBM PS/2 Model 80 Technical Reference (IBM P/N 84X1508). 
  6353.  
  6354.  
  6355. ΓòÉΓòÉΓòÉ 19.1. Physical Characteristics ΓòÉΓòÉΓòÉ
  6356.  
  6357. The 80386 processor consists of six dedicated units: 
  6358.  
  6359.  Bus Interface Unit 
  6360.  Code Prefetch Unit 
  6361.  Instruction Decode Unit 
  6362.  Execution Unit 
  6363.  Segmentation Unit 
  6364.  Paging Unit. 
  6365.  
  6366. These individual units are connected by 32-bit buses and operate in parallel to 
  6367. provide a six-stage pipelined execution of instructions. This implies that up 
  6368. to six different instructions may be held concurrently within the chip, at 
  6369. different stages of execution.  To further improve performance, the 80386 uses 
  6370. on-chip caching and implements sophisticated memory management and bit 
  6371. manipulation (such as a 64-bit barrel shifter) in hardware. 
  6372.  
  6373. The 80386 chip contains eight 32-bit general registers.  To provide 
  6374. compatibility with the 8086 and 80286 processors, the 80386 provides the 
  6375. capability to use the lower-order 16 bits of these registers to represent the 
  6376. 16-bit registers used in these preceding processors.  This is illustrated in 
  6377. Figure "80386 General, Segment, and Status Registers". 
  6378.  
  6379. Programs running in virtual 8086 mode may utilize the full register set of the 
  6380. 80386 (all 32-bit registers including the new FS, GS, debug, control, and test 
  6381. registers).  The programs can also use instructions with 32-bit operands by 
  6382. overriding the operand size by including an operand size prefix on the 
  6383. instruction. 
  6384.  
  6385. The 80386 also provides six 16-bit segment registers, which are used to contain 
  6386. segment selectors, thus providing support for the same segmented memory model 
  6387. used in the 80286 processor.  Note that the FS and GS segment registers are new 
  6388. in the 80386. 
  6389.  
  6390. The instruction pointer (EIP) register and the flags (EFLAGS) register are both 
  6391. 32-bit registers. 
  6392.  
  6393. Applications written for the 80286 run unmodified on the 80386.  This is 
  6394. because the 80286 instructions, addresses, limits, segment types, etc., are a 
  6395. subset of those available in 80386, and run in 16-bit mode automatically.  The 
  6396. 80386 handles this very simply; if the upper word (16 bits) of a memory 
  6397. reference is zero, then that reference must be an 80286 reference. 
  6398.  
  6399. The registers described above are available to application programmers, either 
  6400. directly using assembly language or indirectly through the use of higher-level 
  6401. programming languages.  The 80386 processor provides a number of additional 
  6402. registers which are available for use by the operating system.  These registers 
  6403. are protected and are not accessible by application programs: 
  6404.  
  6405.  The 80386 provides four registers, which contain pointers to data structures 
  6406.   used to implement the segmented memory model: 
  6407.  
  6408.    - GDTR (global descriptor table register) 
  6409.    - LDTR (local descriptor table register) 
  6410.    - IDTR (interrupt descriptor table register) 
  6411.    - TR (task register). 
  6412.  
  6413.  Four control registers (CR0 to CR3) are used to hold pointers to data 
  6414.   structures used by the paged memory model and for status information.  These 
  6415.   registers are new in the 80386 processor, since previous processors did not 
  6416.   support the paged memory model. 
  6417.  
  6418.  Eight debug registers (DR0 to DR7) are provided to aid in real-time system 
  6419.   and application debugging.  These registers are also new in the 80386. 
  6420.  
  6421.  Two test registers (TR6 and TR7) are provided to allow for verification of 
  6422.   the integrity of the translation lookaside buffer hardware used by the 
  6423.   processor's paging subsystem. 
  6424.  
  6425.  
  6426. ΓòÉΓòÉΓòÉ 19.2. Memory Addressing ΓòÉΓòÉΓòÉ
  6427.  
  6428. The 80386 processor, like its predecessor the 80286, can operate in two 
  6429. addressing modes: real mode or protected mode. The memory addressing schemes 
  6430. used in each of these modes are described in the following sections. 
  6431.  
  6432.  
  6433. ΓòÉΓòÉΓòÉ 19.2.1. Real Mode ΓòÉΓòÉΓòÉ
  6434.  
  6435. When the 80386 is powered up or re-initialized via a hardware reset, the 
  6436. processor is set into real mode.  In real mode, the 80386 effectively operates 
  6437. as a 16-bit processor. While in real mode the 80386 is emulating an 8086 
  6438. processor.  Program addresses correspond directly to physical memory addresses. 
  6439. Memory is addressed using the segmented memory model only (paging is not 
  6440. supported), and the system's physical address space is limited to 1MB of real 
  6441. memory. Virtual memory is not supported in real mode. 
  6442.  
  6443. While running in real mode, the Intel 80386 does not implement any memory 
  6444. protection scheme.  Real mode is not suitable for running multiple applications 
  6445. concurrently.  When more than one program is loaded at a time, there is the 
  6446. possibility of one program accessing another program's memory.  Also there is 
  6447. no protection for the operating system code, and application programs can 
  6448. overwrite operating system code and data. 
  6449.  
  6450. Segment registers are used to supply the base address for each type of memory 
  6451. segment (DS - data segment, CS - code segment, SS - stack segment and ES - 
  6452. extra segment). Figure "Real Mode Addressing" shows how a segment is addressed 
  6453. in real mode. 
  6454.  
  6455. Each memory reference consists of a 16-bit segment address and a 16-bit offset. 
  6456. The processor automatically adds four binary zeros to the segment selector 
  6457. value (equivalent to multiplying by 16) to obtain a segment base address in 
  6458. memory.  Thus, a segment may start on any 16-byte boundary within the 1MB 
  6459. physical address space. 
  6460.  
  6461. The required memory location within the segment is determined by adding the 
  6462. offset to the segment base address.  Since the offset is 16 bits in length, the 
  6463. maximum offset (and therefore the maximum size of a segment) is 64KB. 
  6464.  
  6465.  
  6466. ΓòÉΓòÉΓòÉ 19.2.2. Protected Mode (Segmented Memory Model) ΓòÉΓòÉΓòÉ
  6467.  
  6468. When the 80386 is switched to protected mode by a software command, the full 
  6469. 32-bit capabilities of the processor are enabled, and the system's physical 
  6470. address space is increased to 4GB.  Since virtual memory support is enabled in 
  6471. protected mode, the virtual address space visible to an application increases 
  6472. to a theoretical maximum of 64 terabytes. 
  6473.  
  6474. Note:   In OS/2 Version 2.0, the process address space is limited to 512MB in 
  6475.         order to reserve memory for operating system use and to retain full 
  6476.         compatibility with applications written for previous versions of OS/2, 
  6477.         which used 16-bit addressing. 
  6478.  
  6479. Each process occupies a separate logical address space, and the 80386 provides 
  6480. full memory protection between the address spaces of different processes, 
  6481. thereby preventing an application from inadvertently accessing and/or 
  6482. corrupting memory used by another application.  Note, however, that under OS/2 
  6483. Version 2.0, multiple threads may be created within a single process, and 
  6484. dispatched independently by the operating system. These threads share a common 
  6485. address space, and it is therefore the responsibility of the application 
  6486. developer to ensure correct behavior of and synchronization between multiple 
  6487. threads within a single process. 
  6488.  
  6489. In protected mode, the 16-bit segment registers are used in conjunction with a 
  6490. 32-bit offset to give a 48-bit selector:offset pointer.  The segment registers 
  6491. no longer contain the segment base address; rather, they contain an index into 
  6492. a descriptor table. The entries in the descriptor table each point to the start 
  6493. of a segment in physical memory. 
  6494.  
  6495. Of the 16 bits which make up the segment selector, two bits are used to specify 
  6496. the privilege level of the segment, and one bit is used to select between the 
  6497. global descriptor table (GDT) and a local descriptor table (LDT). The GDT is 
  6498. used by the operating system or privileged software to maintain control over 
  6499. all segments within the system.  A unique LDT is maintained for each process 
  6500. and used to control only the memory segments used by that process.  In this 
  6501. way, each process is prevented from accessing the memory used by another 
  6502. process. The remaining 13 bits are used as the index into the appropriate 
  6503. descriptor table. A logical address which consists of a selector and offset is 
  6504. converted into a 32-bit linear address by extracting the segment base address 
  6505. from the descriptor table by using the selector as the index, then adding the 
  6506. offset to the base address.  With paging disabled, the linear address equates 
  6507. the physical memory address. This address translation operation is shown in 
  6508. Figure "Protected Mode Addressing - without Paging". The virtual address space, 
  6509. which can consist of up to 16,383 segments of 4GB each, is thus mapped to the 
  6510. physical 4GB address space.  The descriptor also contains access information 
  6511. for the segment along with the segment size.  The access information and 
  6512. segment size is used by the processor to implement memory protection. 
  6513.  
  6514. The maximum allowable value for the offset, and thus the maximum size of a 
  6515. segment, is defined by two things.  Each entry in a descriptor table contains a 
  6516. 20-bit limit field.  These 20 bits allow a maximum segment size of 1MB, using 
  6517. the byte as the unit of size. 
  6518.  
  6519. However, the descriptor table entry also contains a granularity bit, which 
  6520. specifies that either the byte or the page may be used as the unit of size in 
  6521. the limit field.  When using page granularity, the 20 bits in the limit field 
  6522. represent a multiple of 4KB, allowing a segment size of 4KB to 4GB. 
  6523.  
  6524.  
  6525. ΓòÉΓòÉΓòÉ 19.2.3. Protected Mode (Flat Memory Model) ΓòÉΓòÉΓòÉ
  6526.  
  6527. The 80386 is able to address up to 4GB in a single segment. This is a large 
  6528. address space. It may, therefore, be desirable not to use the segmented memory 
  6529. model, but simply to map the entire system memory as a single linear address 
  6530. range.  While the 80386 does not have a mode bit for disabling segmentation, 
  6531. the same effect can be achieved by mapping the stack, code, and data spaces to 
  6532. the same range of linear addresses.  When this is done, the 32-bit offsets used 
  6533. by 80386 memory references can cover the entire linear address space. 
  6534.  
  6535. OS/2 Version 2.0 uses this technique to implement a flat addressing model.  The 
  6536. operating system internally creates a single code segment and a single data 
  6537. segment, with the base address of each segment selector set to zero, and a 
  6538. segment size of 4GB.  This segment selector is loaded into the CS, DS, ES, FS, 
  6539. GS, and SS registers; hence these registers all point to the same memory range. 
  6540. The selectors are allocated within the GDT.  Offsets within the segment are 
  6541. actually offsets within the 4GB global address space, and are therefore 
  6542. equivalent to linear memory addresses. 
  6543.  
  6544. The advantage of using such a technique is that it greatly simplifies memory 
  6545. management within an application, since the application developer no longer 
  6546. need be concerned with the internal implementation of data structures as 
  6547. segments with a defined maximum size.  The use of a flat memory model also 
  6548. facilitates migration of the operating system and application code to other 
  6549. hardware platforms, since the code is not explicitly designed around the 
  6550. segmented memory model.  Application performance is also improved since there 
  6551. is no longer the need for continually changing the contents of segment 
  6552. registers. All address references are near references as with a 32-bit offset, 
  6553. you can access the entire address space. 
  6554.  
  6555.  
  6556. ΓòÉΓòÉΓòÉ 19.3. Paging ΓòÉΓòÉΓòÉ
  6557.  
  6558. In addition to the segmented memory management offered on the earlier 80286 
  6559. processors, the 80386 provides a paged memory model. This is an optional 
  6560. function of the 80386, and there are no direct performance implications of an 
  6561. operating system choosing not to use paged memory.  However, the paged memory 
  6562. model provides significant performance benefits when running large applications 
  6563. which make extensive use of virtual memory. 
  6564.  
  6565. Under previous versions of OS/2, the smallest unit of memory (for memory 
  6566. management purposes) was the segment, since the operating system was designed 
  6567. to execute on the 80286 processor and use the segmented memory model.  With the 
  6568. 80286, segments may vary in size between 16 bytes and 64KB; there is therefore 
  6569. a danger of having a large amount of free memory which is fragmented into 
  6570. small, discontiguous units. 
  6571.  
  6572. Previous versions of OS/2 managed this by moving segments within real storage 
  6573. to create a larger free space, and by swapping unused segments to disk until 
  6574. they are required.  This entailed a high degree of overhead for the operating 
  6575. system.  With an 80386 processor, however, segments may be up to 4GB in size, 
  6576. and the overhead could potentially result in an unacceptable performance 
  6577. impact, particularly for applications with very large segments.  Also there is 
  6578. the problem of having sufficient physical memory to load a complete segment, 
  6579. when the segment is very large. 
  6580.  
  6581. In order to avoid this situation, the 80386 processor provides a paged memory 
  6582. model, implemented in hardware through a dedicated paging unit included on the 
  6583. processor chip. A page is a 4KB unit of contiguous memory, and replaces the 
  6584. segment as the unit of granularity for memory management, including swapping to 
  6585. and from disk.  Note that paging is available in protected mode, in conjunction 
  6586. with both the segmented and flat memory models. 
  6587.  
  6588. Using the paged memory model, an application makes a memory reference in the 
  6589. normal way, using either the segmented memory model or the flat memory model. 
  6590. The segmentation unit in the processor automatically resolves the reference 
  6591. into a 32-bit linear address.  However, this linear address does not represent 
  6592. a physical address, but is made up as follows: 
  6593.  
  6594.  The high-order 10 bits of the field are used as an index into a page 
  6595.   directory table.  The entry in this table in turn refers to the base address 
  6596.   of a page table. 
  6597.  
  6598.  The next 10 bits of the field are used as an index into the page table 
  6599.   referred to by the page directory entry.  The entry in the page table 
  6600.   provides the physical base address of a 4KB page. 
  6601.  
  6602.  The lower-order 12 bits of the field are used as an offset within the page 
  6603.   referred to by the page table entry. 
  6604.  
  6605. OS/2 Version 2.0 maintains a single page directory for the entire system, but a 
  6606. separate set of page directory entries for each process present in the system. 
  6607. The physical address of the page directory is held in the CR3 control register. 
  6608. This is known as the page directory base register (PDBR) in OS/2 Version 2.0. 
  6609. When a task switch takes place, the page directory entries, for the process 
  6610. being scheduled, are copied into the page directory. 
  6611.  
  6612. Figure "Protected Mode Addressing - with Paging" 
  6613.  
  6614. Both the page directory and page tables contain 32-bit page specifiers.  The 
  6615. page directory and page tables are themselves contained within single pages, 
  6616. and may therefore contain a maximum of 1024 entries.  Each page directory can 
  6617. hence access up to 4GB of storage, which is the maximum physical address space 
  6618. of the 80386. 
  6619.  
  6620. Pages may be shared between processes by defining them in the page tables of 
  6621. more than one process.  Note that this is done at the page table level rather 
  6622. than the page directory level, in order to share only the individual pages 
  6623. required. 
  6624.  
  6625. In order to further reduce the overhead involved in looking up page references, 
  6626. the 80386 also provides a hardware-based address caching mechanism for paging 
  6627. information.  This is known as the translation lookaside buffer (TLB).  The TLB 
  6628. contains the physical addresses for the 32 most recently used pages, and 
  6629. therefore allows very fast access to these pages since it is no longer 
  6630. necessary to read entries from the page directory and a page table, which are 
  6631. held in system memory. Use of the TLB is handled entirely within the paging 
  6632. unit, and is not visible to software.  The operating system must, however, 
  6633. ensure that the buffer is flushed whenever the PDBR is updated or an entry in 
  6634. either the page directory or a page table is changed.  This ensures that the 
  6635. TLB contents are kept in step with the operating system maintained tables. 
  6636.  
  6637.  
  6638. ΓòÉΓòÉΓòÉ 19.4. Task Switching ΓòÉΓòÉΓòÉ
  6639.  
  6640. A significant function of the 80386 processor is its ability to support a 
  6641. multitasking environment.  While much of the multitasking support in the 80386 
  6642. is similar to that provided in the previous 80286 family, multitasking will be 
  6643. discussed here for those who may not be familiar with its implementation. 
  6644.  
  6645. In a multitasking system, when one task is suspended and control is passed to 
  6646. another, the processor state must be stored so that when the suspended task 
  6647. regains control, it may resume normal operation where it left off. 
  6648.  
  6649. The 80386 processor architecture defines a special type of memory structure 
  6650. known as a Task State Segment (TSS).  The processor uses a specific fixed 
  6651. format to store task-related control information in the TSS, in order to 
  6652. provide high-performance task-switching operations with complete isolation 
  6653. between tasks.  A separate TSS is maintained for each task in the system.  Each 
  6654. TSS contains: 
  6655.  
  6656.  General registers (EAX, ECX, EDX, EBX, ESP, EBP, ESI, and EDI) 
  6657.  
  6658.  Segment registers (ES, CS, SS, DS, FS, and GS) 
  6659.  
  6660.  Flags register (EFLAGS) 
  6661.  
  6662.  Instruction pointer (EIP) 
  6663.  
  6664.  Selector for the TSS of the previous task 
  6665.  
  6666.  Selector for the task's LDT (static) 
  6667.  
  6668.  Logical addresses of the stacks for privilege levels 0, 1, and 2 
  6669.  
  6670.  The T-bit (debug trap bit) 
  6671.  
  6672.  Base address for the I/O permission bit map. 
  6673.  
  6674. A special segment descriptor is used for each TSS, and appears only in the 
  6675. system's Global Descriptor Table (GDT), since TSSs are not available to 
  6676. applications.  The Task Register always contains a pointer to the TSS for the 
  6677. current task. 
  6678.  
  6679. Task switching may occur as the result of either an interrupt or of executing 
  6680. an instruction that explicitly transfers control.  A task switch may be 
  6681. achieved in one of four ways: 
  6682.  
  6683.  The current task executes a JMP or CALL to a TSS descriptor 
  6684.  
  6685.  The current task executes a JMP or CALL to a task gate (a special type of 
  6686.   segment descriptor) 
  6687.  
  6688.  An interrupt or exception indexes a task gate in the IDT (Interrupt 
  6689.   Descriptor Table) 
  6690.  
  6691.  The current task executes an IRET instruction with the NT (next task) flag 
  6692.   set.  The selector for the previous task is always stored in the current TSS, 
  6693.   thus providing the means to return control to the previous task. 
  6694.  
  6695. During the task switch operation, the processor saves the contents of the 
  6696. current registers in the TSS of the current task.  The selector of the next TSS 
  6697. is then loaded into the Task Register.  This selector references an entry in 
  6698. the GDT, which contains the physical address of the TSS.  The values in the TSS 
  6699. are then loaded into the processor's registers, and control information is 
  6700. loaded into the segment registers from the GDT and the process's LDT.  The 
  6701. processor is then ready to continue execution of the new task. 
  6702.  
  6703. To create a new task, the operating system initializes a TSS to the appropriate 
  6704. initial values.  The operating system then determines when to start the task, 
  6705. and accomplishes this by simply switching from the current task to the new one. 
  6706.  
  6707. OS/2 V2.0 only makes minimal use of the TSS mechanism.  The use of the flat 
  6708. memory model and the way in which OS/2 V2.0 implements paging makes a large 
  6709. part of the data stored in the TSS redundant.  Consequently OS/2 V2.0 
  6710. implements its own task switching model which optimizes switches between 
  6711. threads in the same or different processes.  Also allocating a TSS for each 
  6712. thread in the system would use a large amount of storage.  OS/2 V2.0 uses a 
  6713. single TSS for effecting transitions between the different privilege levels, at 
  6714. which tasks present in the system run. Privilege levels are described in 
  6715. Privilege Levels. 
  6716.  
  6717.  
  6718. ΓòÉΓòÉΓòÉ 19.5. Protection ΓòÉΓòÉΓòÉ
  6719.  
  6720. The 80386 processor implements five different types of protection for tasks 
  6721. executing within the system.  These are: 
  6722.  
  6723.  Type checking 
  6724.  
  6725.  Limit checking 
  6726.  
  6727.  Privilege levels 
  6728.  
  6729.  Restriction of procedure entry points 
  6730.  
  6731.  Restriction of instruction set. 
  6732.  
  6733. Each instruction and memory reference is checked by the hardware to ensure 
  6734. compliance with the protection rules prior to execution.  For memory 
  6735. references, checking is performed during the address translation process, and 
  6736. is applied to both segmented and paged memory models. Protection parameters are 
  6737. stored in the segment descriptors or in the Page Directory and Page Table 
  6738. entries. 
  6739.  
  6740.  
  6741. ΓòÉΓòÉΓòÉ 19.5.1. Type Checking ΓòÉΓòÉΓòÉ
  6742.  
  6743. With each descriptor, there is a type field which is used to distinguish 
  6744. between the different descriptor formats.  This field also specifies the 
  6745. intended use of a segment.  For example, the allowable types for data segments 
  6746. are: 
  6747.  
  6748.  Read-Only 
  6749.  Read/Write 
  6750.  
  6751. and for code segments: 
  6752.  
  6753.  Execute-Only 
  6754.  Execute/Read. 
  6755.  
  6756. The type field, therefore, ensures that segments are only used in ways for 
  6757. which they are intended.  For example: 
  6758.  
  6759.  The code segment (CS) register may only be loaded with the selector of an 
  6760.   executable segment. 
  6761.  
  6762.  Selectors of executable segments that are not defined as readable cannot be 
  6763.   loaded into a data segment (DS, ES, FS, and GS) registers. 
  6764.  
  6765.  No instruction may write into an executable segment. 
  6766.  
  6767.  No instruction may write into a data segment unless that segment is defined 
  6768.   as Read/Write. 
  6769.  
  6770.  No instruction may read an executable segment unless that segment is defined 
  6771.   as Execute/Read. 
  6772.  
  6773. So far this discussion applies to segment level checking. When paging is 
  6774. enabled, there is also checking done at the page level.  Pages may be of two 
  6775. types: 
  6776.  
  6777.  1. Read-only access 
  6778.  
  6779.  2. Read/write access. 
  6780.  
  6781. Segment protection is evaluated first, then page protection is checked. It is 
  6782. possible to have a large segment which is both readable and writable and to 
  6783. have pages within it which are only readable.  At the page level, the 
  6784. execute-only attribute does not exist. 
  6785.  
  6786.  
  6787. ΓòÉΓòÉΓòÉ 19.5.2. Limit Checking ΓòÉΓòÉΓòÉ
  6788.  
  6789. The limit field in each segment descriptor is used by the processor to prevent 
  6790. a program addressing memory outside the segment through the use of an overly 
  6791. large offset value.  During address translation, the offset value specified in 
  6792. the memory reference is compared with the limit field, and an exception is 
  6793. generated if the offset is larger than the limit for that segment.  The limit 
  6794. field in general prevents errors in one program from corrupting other programs' 
  6795. code or data areas. 
  6796.  
  6797.  
  6798. ΓòÉΓòÉΓòÉ 19.5.3. Privilege Levels ΓòÉΓòÉΓòÉ
  6799.  
  6800. The 80386 implements a four-level protection mechanism.  Level 0 is the most 
  6801. privileged, and level 3 is the least privileged.  The privilege level is 
  6802. assigned on a segment basis, and therefore applies to both code and data.  The 
  6803. four levels may be visualized as concentric "rings", with the most privileged 
  6804. segments in the center. 
  6805.  
  6806. Figure "80386 Ring-Oriented Privilege Scheme" 
  6807.  
  6808. All code and data segments in the system are assigned a privilege, which is 
  6809. stored in the segment descriptor.  At any one moment, a task executes only on 
  6810. one of the four rings: 
  6811.  
  6812. Ring 0    This is the most privileged type of segment, and code executing in 
  6813.           this ring may use all protected mode processor instructions.  This 
  6814.           ring is used by those routines in an operating system which are 
  6815.           essential for resource allocation and control.  This part of the 
  6816.           system is often referred to as the kernel or nucleus. 
  6817.  
  6818. Ring 1    This is the second most privileged ring and is normally used for the 
  6819.           remainder of the operating system routines and for the input/output 
  6820.           support routines.  Note that ring 1 is not used by OS/2 Version 2.0. 
  6821.  
  6822. Ring 2    This ring is typically used as the application services level.  It 
  6823.           should be used for routines that do not belong to the operating 
  6824.           system, but should still be protected from user code.  Communications 
  6825.           support and database management programs are good examples. 
  6826.  
  6827. Ring 3    This is the least privileged ring and is typically assigned to user 
  6828.           application code and data. 
  6829.  
  6830. A task executing in one ring cannot access data in a more privileged ring (for 
  6831. example, ring 3 cannot access data at ring 1), nor can it invoke a procedure in 
  6832. a less privileged ring (for example, ring 1 cannot invoke ring 3).  Thus, both 
  6833. access to data and transfer of control are restricted in appropriate ways.  The 
  6834. processor interprets the protection parameters and automatically performs all 
  6835. the checking necessary to implement this protection. 
  6836.  
  6837. Although at the segment level there are these four levels of privilege, at the 
  6838. page level there are only two privilege levels: 
  6839.  
  6840.  1. Supervisor level, for the operating system, privileged programs, such as 
  6841.     device drivers, and system data including page tables 
  6842.  
  6843.  2. User level for application code and data. 
  6844.  
  6845. The privilege levels used for segmentation are mapped into the page level 
  6846. privilege levels.  Tasks running in ring 0, 1 or 2 are all assumed to at 
  6847. supervisor privilege level. 
  6848.  
  6849.  
  6850. ΓòÉΓòÉΓòÉ 19.5.4. Restriction of Procedure Entry Points ΓòÉΓòÉΓòÉ
  6851.  
  6852. To achieve transfer of control between procedures on different privilege 
  6853. levels, a special descriptor type called a gate is provided.  Programs wishing 
  6854. to transfer control call the gate by specifying the segment base address of the 
  6855. gate, rather than transferring control directly to the required procedure. 
  6856. Under OS/2 Version 2.0, where a single segment is used to implement the flat 
  6857. memory model, the gate is called by specifying its offset within the process 
  6858. address space. 
  6859.  
  6860. The four types of gates are CALL gates, TASK gates, INTR (Interrupt) gates, and 
  6861. TRAP gates.  The routine invoked when the gate is called simply redirects 
  6862. control to a new address which contains the privileged routine to be executed. 
  6863.  
  6864. From the program's point of view, this is no different from transferring 
  6865. control to another code segment, since the calling instruction simply regards 
  6866. the gate as another procedure.  However, it effectively isolates the calling 
  6867. procedure from the called procedure, and since only the entry point address of 
  6868. the gate is supplied in the calling instruction, the calling procedure has no 
  6869. access to any point other than the defined entry point of the called procedure. 
  6870.  
  6871. Calls are verified to ensure that they satisfy two conditions: 
  6872.  
  6873.  1. The call must enter the called procedure at the beginning of that 
  6874.     procedure; this is normally ensured by the gate descriptor itself, which 
  6875.     supplies the necessary offset to the entry point. 
  6876.  
  6877.  2. The privilege level of the called procedure must be the same as that of the 
  6878.     gate descriptor. 
  6879.  
  6880.  
  6881. ΓòÉΓòÉΓòÉ 19.5.5. Reserved Instructions ΓòÉΓòÉΓòÉ
  6882.  
  6883. Certain processor instructions are reserved for execution only by the operating 
  6884. system, and may therefore execute only at privilege level zero.  Such 
  6885. instructions include HLT (Halt Processor), LGDT (Load GDT), and LTR (Load Task 
  6886. Register). 
  6887.  
  6888. In addition, some I/O instructions are restricted: 
  6889.  
  6890.  1. The IOPL field in the EFLAGS register defines whether or not the current 
  6891.     task has the right to use I/O-related instructions 
  6892.  
  6893.  2. The I/O Permission Bit Map in the TSS determines whether the current task 
  6894.     may use ports in the I/O address space. 
  6895.  
  6896.  
  6897. ΓòÉΓòÉΓòÉ 19.6. Interrupts ΓòÉΓòÉΓòÉ
  6898.  
  6899. When the processor is running in protected mode, interrupts are not vectored 
  6900. from the base of memory.  Instead, each interrupt has a code which is used as 
  6901. an index into an Interrupt Descriptor Table (IDT), the base address of which is 
  6902. contained in the Interrupt Descriptor Table Register.  There may be up to 256 
  6903. interrupt and exception codes, generated by devices or by software. 
  6904.  
  6905. At system initialization, the IDT is loaded into memory by the operating 
  6906. system, and its location is stored in the IDT register.  Each descriptor in the 
  6907. IDT specifies the address of the interrupt handler routine, which will service 
  6908. interrupts with that code. 
  6909.  
  6910. There are three types of gate descriptors in the IDT: 
  6911.  
  6912.  Interrupt gate descriptors 
  6913.  
  6914.  Trap gate descriptors 
  6915.  
  6916.  Task gate descriptors. 
  6917.  
  6918. For interrupt and trap gates, the descriptor in the IDT contains the selector 
  6919. of the gate, and therefore points indirectly to a procedure that will execute 
  6920. within the current task, since the selector within the gate procedure points 
  6921. directly to an executable segment descriptor in the GDT or the current LDT. 
  6922. This takes place exactly as if the 80386 were calling a procedure within the 
  6923. current application. 
  6924.  
  6925. For the task gate, however, the selector within the gate points to a TSS 
  6926. descriptor in the GDT.  Invoking the task gate, therefore, causes a task switch 
  6927. to occur.  There are certain advantages to the use of a task gate, since it 
  6928. allows a program to pass control to a higher privilege level, and the 
  6929. application may therefore invoke operating system routines to process 
  6930. interrupts and exceptions.  In addition, the new task may be given its own LDT 
  6931. to prevent it from accessing memory used by the current task, and the TSS of 
  6932. the current task is automatically saved. 
  6933.  
  6934. However, there are also performance implications in using task switching. 
  6935. Interrupt handling through task switching requires approximately 15 
  6936. microseconds on a 20 MHz 80386, while switching to a procedure within the 
  6937. current task takes about 3.6 microseconds.  But, the advantages of having the 
  6938. operating system manage exceptions (smaller application code,  greater 
  6939. portability, standard exception handling) usually outweigh the slight 
  6940. performance penalty. 
  6941.  
  6942.  
  6943. ΓòÉΓòÉΓòÉ 19.7. Input/Output Processing ΓòÉΓòÉΓòÉ
  6944.  
  6945. I/O addressing on the 80386 may be performed either by issuing specific I/O 
  6946. instructions to the I/O address space, or issuing general-purpose memory 
  6947. manipulation instructions to memory-mapped I/O. 
  6948.  
  6949. The I/O address space is separate from the linear physical memory and the I/O 
  6950. instructions do not go through the segmentation or paging hardware.  The I/O 
  6951. address space is 64KB in size.  It may be mapped in various ways, for instance: 
  6952. 64KB of individually addressable 8-bit ports, 32KB of 16-bit ports, 16KB of 
  6953. 32-bit ports, or any combination of the above up to the maximum allowed 64KB. 
  6954. The processor can transfer 32 bits of data at a time to a device located in the 
  6955. I/O address space, using the IN, OUT, INS, and OUTS commands. 
  6956.  
  6957. The I/O address space has two protection mechanisms: 
  6958.  
  6959.  1. The I/O privilege Level (IOPL) field in the EFLAGS register controls access 
  6960.     to the I/O instructions. 
  6961.  
  6962.     The IN, INS, OUT, OUTS, CLI, and STI instructions are only allowed to 
  6963.     execute if the CPL (Current Privilege Level in the CS descriptor for the 
  6964.     active task) is less than or equal to the value of the IOPL field. 
  6965.  
  6966.     Only system code (privilege level 0) can change the IOPL value. 
  6967.  
  6968.  2. The I/O permission bit map in the active TSS controls access to individual 
  6969.     ports in the I/O address space. 
  6970.  
  6971.     There is one bit for each 8-bit port in the I/O address space, which means 
  6972.     that the I/O permission bit map could be up to 64 kilobits (8KB).  If a 
  6973.     task references an I/O port and the corresponding bit is on, the processor 
  6974.     signals a general protection exception.  The exception can then be handled 
  6975.     by the system software to initiate an exception handling procedure within 
  6976.     the current task, or to initiate a new task, which will redirect the I/O. 
  6977.  
  6978.     By changing bits in the I/O permission bit map of different tasks' TSSs, an 
  6979.     operating system can allocate ports to tasks and avoid having two tasks use 
  6980.     the same port concurrently. 
  6981.  
  6982.  
  6983. ΓòÉΓòÉΓòÉ 19.8. Virtual 8086 Mode ΓòÉΓòÉΓòÉ
  6984.  
  6985. The 80386 processor supports concurrent execution of one or more 8086 programs 
  6986. within the protected mode environment.  There is no longer a need for the 
  6987. processor to switch back to real mode in order to simulate an 8086 machine. 
  6988.  
  6989. An 8086 program runs in protected mode as part of a virtual 8086 task.  Virtual 
  6990. 8086 tasks are able to take advantage of the 80386 hardware support for 
  6991. multitasking, offered in protected mode. Virtual 8086 tasks may execute 
  6992. concurrently with one another and with other protected mode tasks in the 
  6993. system. 
  6994.  
  6995. The purpose of the virtual 8086 task is to form a virtual machine for running 
  6996. programs written for  the 8086 processor.  A complete virtual machine consists 
  6997. of the 80386 processor support, plus additional support from operating system 
  6998. software: 
  6999.  
  7000.  The hardware provides a set of virtual registers (implemented through the 
  7001.   TSS), a virtual memory space (the first 1MB of the 32-bit linear address 
  7002.   space) and directly executes all instructions that deal with these registers 
  7003.   and with this address space. 
  7004.  
  7005.   While running in virtual-8086 mode the processor does not treat the contents 
  7006.   of the segment as an index into a descriptor table, but the linear address is 
  7007.   formed in exactly in the same way as it is done by the 8086 processor.  With 
  7008.   paging, enabled the address is then mapped to a physical address by the 
  7009.   address translation hardware.  When paging is not being used, the linear 
  7010.   address is the physical address.  This means that when there is a requirement 
  7011.   for multiple virtual-8086 tasks, paging must enabled. Figure "Virtual 8086 
  7012.   Environment - Memory Management" shows the way in which the memory used by 
  7013.   virtual 8086 machines is mapped into the system's physical address space. 
  7014.  
  7015.  The operating system software controls the external interfaces of the virtual 
  7016.   machine (I/O, interrupts, and exceptions).  In the case of I/O, the operating 
  7017.   system can choose either to emulate I/O instructions or to let the hardware 
  7018.   execute them directly. 
  7019.  
  7020. Virtual 8086 tasks execute at privilege level 3 (lowest) and are subject to all 
  7021. of the protection checks defined in protected mode, thereby preventing an 
  7022. ill-behaved application from accessing and potentially corrupting memory used 
  7023. by other tasks in the system. 
  7024.  
  7025. All I/O is normally handled through the I/O permission map in the 80386 TSS for 
  7026. both virtual 8086 applications and other protected mode applications.  This 
  7027. means that any call to I/O services generates an exception which is trapped by 
  7028. the 80386 and may then be handled by the operating system.  Any unauthorized 
  7029. calls may be trapped within the operating system, thus preventing an 
  7030. ill-behaved application from "hanging" the system. 
  7031.  
  7032. In addition, the 80386 paging hardware allows virtual 8086 tasks to share 
  7033. segments. 
  7034.  
  7035.  
  7036. ΓòÉΓòÉΓòÉ 19.9. Numeric Coprocessor Utilization ΓòÉΓòÉΓòÉ
  7037.  
  7038. The 80386 processor may operate in conjunction with, and utilize the features 
  7039. of either the Intel 80287 or 80387 numeric coprocessors.  When the system is 
  7040. initialized, the presence of a numeric coprocessor, and its type if present, is 
  7041. checked by the 80386.  If an 80287 coprocessor is detected, the 80386 
  7042. automatically converts all memory transfers to 16-bit format. If an 80387 is 
  7043. detected, it is used in 32-bit mode, thereby utilizing the full potential of 
  7044. both the 80386 and 80387. 
  7045.  
  7046. Note:   IBM does not support or recommend the use of 80287 numeric coprocessors 
  7047.         in 80386-based systems.  For a list of supported numeric coprocessors 
  7048.         for each system unit, readers should refer to the appropriate IBM 
  7049.         Product Announcement for that system unit. 
  7050.  
  7051.  
  7052. ΓòÉΓòÉΓòÉ 19.10. Multi-Processing ΓòÉΓòÉΓòÉ
  7053.  
  7054. The 80386 supports the Intel 80287 and 80387 numeric coprocessors. Support is 
  7055. also provided within the instruction set for multiple 80386 processors within 
  7056. the same system, sharing memory and other resources. This support is provided 
  7057. through the LOCK prefix instruction.  When specified in conjunction with 
  7058. another instruction, the LOCK prefix instruction ensures that the locking 
  7059. processor has exclusive use of the requested resource. 
  7060.  
  7061. Only a few 80386 instructions can be used with the LOCK prefix instruction.  It 
  7062. is typically used to prefix instructions like BTC (Bit Test and Complement) 
  7063. where it locks the area of memory defined by the destination operand for as 
  7064. many cycles as necessary to update the entire operand. 
  7065.  
  7066. In several instances, the processor itself automatically locks activities on 
  7067. the data bus.  For example, when acknowledging interrupts, switching tasks, 
  7068. loading descriptors from the LDT to the segment selector, and updating the page 
  7069. table ACCESS and DIRTY bits, the required memory pages are locked since these 
  7070. are highly critical operations. 
  7071.  
  7072. The 80386 includes on-chip memory caching to improve performance. The processor 
  7073. must therefore allow for the case where data in shared memory is modified and 
  7074. where that data is currently recorded in a cache on another processor.  In such 
  7075. situations, the 80386 employs an interprocessor interrupt to let other 
  7076. processors know when such a change has been made. 
  7077.  
  7078. This is normally done by using one of the physical address pins on the chip, 
  7079. and having the receiving processor implement a task switch when it receives 
  7080. this signal.  The task switch clears the system registers, reloads the new 
  7081. descriptors and invalidates the memory cache in the processor. 
  7082.  
  7083. Note that by changing the function of one of the addressing pins, however, the 
  7084. physical addressing capability of the processor is reduced to 2GB. 
  7085.  
  7086.  
  7087. ΓòÉΓòÉΓòÉ 19.11. The Intel 80486 Processor ΓòÉΓòÉΓòÉ
  7088.  
  7089. Some of the most recent PS/2 machines use the latest Intel microprocessor, the 
  7090. 80486.  The 80486 offers more processing power and also some functional 
  7091. extensions over the 80386.  The 80486 microprocessor subsystem has the 
  7092. following characteristics: 
  7093.  
  7094.  32-bit addressing 
  7095.  
  7096.  32-bit data interface 
  7097.  
  7098.  Extensive instruction set, including string I/O 
  7099.  
  7100.  Hardware fixed-point multiply and divide 
  7101.  
  7102.  Three operating modes: 
  7103.  
  7104.    - Real address mode 
  7105.    - Protected virtual address mode 
  7106.    - Virtual 8086 mode 
  7107.  
  7108.  4GB physical address space 
  7109.  
  7110.  Eight general-purpose 32-bit registers 
  7111.  
  7112.  64TB virtual address space 
  7113.  
  7114.  Internal 8KB, set-associative instruction cache with controller 
  7115.  
  7116.  Internal 80387 numeric coprocessor. 
  7117.  
  7118.   Note:   The 80486SX is an exception, since it does not provide a built-in 
  7119.   80387 numeric coprocessor 
  7120.  
  7121. The 80486 microprocessor is compatible with the 80386 in the following areas: 
  7122.  
  7123.  Real address mode 
  7124.  
  7125.  Protected virtual address mode 
  7126.  
  7127.  Virtual 8086 mode 
  7128.  
  7129.  80386 paging mechanism 
  7130.  
  7131.  All published 80386 instructions 
  7132.  
  7133.  All published 80387 instructions. 
  7134.  
  7135. The major differences between the 80386 and 80486 processors are in the 
  7136. execution speed of instructions, and the fact that the 80486 has six new 
  7137. processor instructions to control the operation of the internal 8KB instruction 
  7138. cache. 
  7139.  
  7140. In addition, the 80486 processor performs certain operations in a different 
  7141. manner.  For example, flushing the transaction lookaside buffer in an 80386 
  7142. processor may only be done for the entire TLB in a single operation.  The 80486 
  7143. provides a facility for selectively flushing the TLB. 
  7144.  
  7145.  
  7146. ΓòÉΓòÉΓòÉ 20. Micro Channel Architecture and SCSI ΓòÉΓòÉΓòÉ
  7147.  
  7148. This section of the document explains the basic principles of the IBM Micro 
  7149. Channel architecture and its usage. The principles of the Small Computer 
  7150. Systems Interface (SCSI) protocol for I/O device communication are also covered 
  7151. in this section of the document. This information is presented in order to 
  7152. provide the reader with a better understanding of the way that this technology 
  7153. is utilized by OS/2 Version 2.0. 
  7154.  
  7155.  
  7156. ΓòÉΓòÉΓòÉ 20.1. Micro Channel Architecture ΓòÉΓòÉΓòÉ
  7157.  
  7158. In "conventional" personal computer architectures such as the original IBM PC 
  7159. and PC AT, the system bus formed the data path, by which hardware components 
  7160. exchanged information with one another. The bus operated under the direct 
  7161. control of the system's main processor, and could handle only a single task at 
  7162. any time. 
  7163.  
  7164. The Micro Channel architecture defines a set of specifications for a high-speed 
  7165. data "highway" connecting the system processor or processors, memory, I/O 
  7166. devices, and hardware adapters. The main feature that distinguishes the Micro 
  7167. Channel from the older PC bus is that the system processor does not have 
  7168. exclusive control of it but other processors and intelligent adapter cards, 
  7169. which are connected to the channel, can take charge of it and initiate data 
  7170. transfers across it. The mechanism, by which control of the Micro Channel is 
  7171. shared amongst the competing subsystems, is known as arbitration. The Micro 
  7172. Channel consists of a number of buses, controlled by the bus arbitration unit, 
  7173. which operate independently of the system's main processor. The main components 
  7174. of the Micro Channel are: 
  7175.  
  7176.  Arbitration Bus 
  7177.  
  7178.   The arbitration bus and its associated signals are used by the bus 
  7179.   arbitration unit to prioritize and resolve up to 16 concurrent requests by 
  7180.   intelligent devices (known as masters) for control of the channel. The system 
  7181.   processor has the lowest priority level, leaving 15 levels available for 
  7182.   other processors and intelligent devices in the system. Although the system 
  7183.   processor is defined to have the lowest priority level, it always "owns" the 
  7184.   channel whenever the channel is not being used by another device. The 
  7185.   arbitration unit resolves contending requests, and selects one device as the 
  7186.   temporary owner of the channel; this device is then known as the controlling 
  7187.   master. The controlling master may then perform a single data transfer or if 
  7188.   the channel had been requested in "burst mode", multiple data transfers. For 
  7189.   "burst transfers", the controlling master owns the channel until the transfer 
  7190.   is complete or another arbitration participant requests ownership of the 
  7191.   channel. In such cases the controlling master must relinquish ownership of 
  7192.   the channel within 7.8 microseconds. 
  7193.  
  7194.   The arbitration controller has a fairness algorithm built into it to ensure 
  7195.   that subsystems with high priority do not monopolize the channel at the 
  7196.   expense of lower priority subsystems. There is also a feature known as 
  7197.   pre-emption, which allows a subsystem with an urgent requirement to request 
  7198.   and be given control of the channel even though another subsystem is 
  7199.   currently using it. 
  7200.  
  7201.  Address Bus 
  7202.  
  7203.   The address bus and its associated signals are used by the controlling master 
  7204.   to select a slave to be the source or target for a data transfer. The Micro 
  7205.   Channel addressing consists of two separate address spaces: 
  7206.  
  7207.    - The I/O address space consists of 64KB (65535) I/O addresses. 16 lines of 
  7208.      the address bus plus the state of certain associated control signals 
  7209.      signifies the I/O port to be read or written. 
  7210.  
  7211.    - The memory address space may be as large as 4GB (4,294,967,296 bytes) for 
  7212.      a machine capable of 32-bit addressing. Only PS/2 Models 90 and 95 are 
  7213.      currently capable of 32-bit addressing. All other system units in the PS/2 
  7214.      range use 24-bit addressing, which allows addresses up to 16MB (16,777,216 
  7215.      bytes). 
  7216.  
  7217.  Data Bus 
  7218.  
  7219.   The data bus is used to transfer 8, 16, 24, or 32 bits of data between two 
  7220.   masters or between a master and a slave.  The associated control signals 
  7221.   indicate the width and direction (read or write) of the transfer. 
  7222.  
  7223. The Micro Channel architecture defines the physical properties of the circuits 
  7224. and all the timings and signal sequences of signals on these circuits. 
  7225.  
  7226. The Micro Channel architecture is extensible in that it has been possible to 
  7227. include new features in the architecture while maintaining compatibility with 
  7228. existing devices. All Micro Channel devices are expected to support certain 
  7229. basic functions. Mechanisms are provided which allow a device that supports an 
  7230. optional feature to communicate its capability to a partner device, with which 
  7231. it is exchanging data. If both devices support the feature then it is enabled 
  7232. for the data transfer operation, if appropriate. If one device supports a 
  7233. feature and the other device does not, they may still communicate with one 
  7234. another. Obviously that feature cannot be used during the data transfer 
  7235. operation. 
  7236.  
  7237.  
  7238. ΓòÉΓòÉΓòÉ 20.2. Micro Channel Participants ΓòÉΓòÉΓòÉ
  7239.  
  7240. There are two basic types of devices, which may exist on and communicate via 
  7241. the Micro Channel: 
  7242.  
  7243.  A master is an intelligent device, which may contend for control of the 
  7244.   channel. 
  7245.  
  7246.  A slave is a unintelligent device, which merely acts as the source or target 
  7247.   of a data transfer, in conjunction with a master. 
  7248.  
  7249. Figure "Micro Channel Participants and Data Transfer Paths" shows the 
  7250. interaction between masters and slaves over the Micro Channel. The master 
  7251. devices are of three kinds: 
  7252.  
  7253.  The system master is the processor provided with the system hardware, and is 
  7254.   thus also known as the system processor. The system master assumes ownership 
  7255.   of the channel when no other master has arbitrated for and won control of it. 
  7256.   The system master is, therefore, also known as the default master. 
  7257.  
  7258.  The DMA controller is typically provided on the system board.  It supports 
  7259.   multiple independent DMA channels, each allowing the attachment of a DMA 
  7260.   slave. Each DMA slave is allocated its own dedicated channel. The DMA 
  7261.   controller manages the transfer of data between a DMA slave and a memory 
  7262.   slave, and supports burst mode data transfer if the DMA slave requests it. 
  7263.   The DMA controller does not arbitrate for the channel, but requires the DMA 
  7264.   slave to do the arbitration.  Once this is done, the data transfer is 
  7265.   completed independently of the system processor. 
  7266.  
  7267.  The bus master is an intelligent device or adapter on the Micro Channel and 
  7268.   is typically an advanced adapter, which functions as a subsystem within the 
  7269.   system. It arbitrates for the channel and manages the data transfer to or 
  7270.   from an I/O slave or a memory slave. The bus master is described further in 
  7271.   Bus Master Adapters. 
  7272.  
  7273. Slave devices on the Micro Channel may be of three kinds: 
  7274.  
  7275.  The I/O slave is selected via its address in the I/O address space. The 
  7276.   system processor or a bus master is required to actually perform the data 
  7277.   transfer. 
  7278.  
  7279.  The memory slave is selected via its address in the memory address space. Any 
  7280.   master may perform the data transfer. The memory may reside on the system 
  7281.   board or on an adapter on the Micro Channel. It can also be non-system memory 
  7282.   (such as memory-mapped I/O) on an adapter, used for communication of 
  7283.   information between the system and the adapter. 
  7284.  
  7285.  The DMA I/O slave contends for control of the Micro Channel on behalf of the 
  7286.   DMA controller, and is thus an exception to the normal rule that slaves do 
  7287.   not contend for control of the Micro Channel. It relies on the DMA controller 
  7288.   to be the controlling master and manage the data transfer between the DMA 
  7289.   slave and memory slave. 
  7290.  
  7291.  
  7292. ΓòÉΓòÉΓòÉ 20.2.1. Bus Master Adapters ΓòÉΓòÉΓòÉ
  7293.  
  7294. The use of bus master adapters avoids the need for the system processor to 
  7295. become involved in data transfers between adapters in the system. For example, 
  7296. a bus master LAN adapter may interact with the disk subsystem to service I/O 
  7297. requests on a LAN server, while the system processor continues to process other 
  7298. work. 
  7299.  
  7300. Bus master adapters provide advantages over other "intelligent" adapters such 
  7301. as DMA adapters, since a bus master is typically directly involved in the data 
  7302. transfer (as either source or destination) and thus requires only a single 
  7303. operation to transfer the data, while a DMA adapter requires two (one read and 
  7304. one write). In addition, the DMA controller used in current IBM PS/2 system 
  7305. units is only capable of 24-bit addressing, while bus master adapters, such as 
  7306. the SCSI adapters, utilize the full 32-bits available on the address bus on the 
  7307. PS/2 models 90 and 95. 
  7308.  
  7309. A bus master may randomly address memory and memory-mapped I/O devices. This 
  7310. makes it ideal for paged environments and enables the bus master to execute 
  7311. chains of work, addressing different memory areas and devices without support 
  7312. from the system processor. The bus master adapter is regarded as a subsystem 
  7313. and can work completely asynchronously to the system processor and other bus 
  7314. masters. Where necessary a bus master may communicate directly with another bus 
  7315. master. 
  7316.  
  7317.  
  7318. ΓòÉΓòÉΓòÉ 20.2.2. DMA Adapters ΓòÉΓòÉΓòÉ
  7319.  
  7320. The DMA adapter frees the processor from having to move data between an adapter 
  7321. and system memory. The DMA slave adapter arbitrates for control of the MCA. 
  7322. Once control is given, the DMA controller uses the DMA channel allocated to the 
  7323. DMA slave adapter to transfer the data. 
  7324.  
  7325. The Micro Channel supports up to 15 DMA units, which may use the burst mode 
  7326. data transfer capability of the Micro Channel. The DMA controller implemented 
  7327. in current PS/2 machines supports transfers of up to 64KB segments of 
  7328. contiguous data and is able to address 16MB of memory. In the case of systems 
  7329. that have more than 16MB of memory, DMA transfers can only take place to memory 
  7330. locations below the 16MB line. 
  7331.  
  7332. The major limitation is that the data must be contiguous.  For a system using 
  7333. paged memory (with 4KB pages) this introduces an overhead through the need to 
  7334. reserve contiguous blocks of memory. This makes the system DMA controller best 
  7335. suited for records shorter than or equal to the page size. 
  7336.  
  7337.  
  7338. ΓòÉΓòÉΓòÉ 20.2.3. Simple Adapters ΓòÉΓòÉΓòÉ
  7339.  
  7340. Simple adapters are totally dependent on support from the main processor or 
  7341. another master. This approach to adapter design was common in single task 
  7342. systems, when the processor was dedicated to one adapter function at a time. In 
  7343. such cases, the most economic approach is to use the minimum of logic on the 
  7344. adapter card, and depend on software support. Adapters, which use these 
  7345. techniques, are: 
  7346.  
  7347.  Polled adapters 
  7348.  
  7349.   With polled adapters, the processor must periodically request information, or 
  7350.   poll, the adapter registers for status of the attached device.  This can 
  7351.   consume much of the processor's power. 
  7352.  
  7353.  Interrupt per character adapters 
  7354.  
  7355.   With these adapters, the processor is free to perform other duties until an 
  7356.   interrupt is received from the adapter.  The overhead of servicing the 
  7357.   interrupt is several hundred instructions to save and restore the 
  7358.   environment. 
  7359.  
  7360.   Devices with high data transfer rates (for example, fast communication 
  7361.   adapters) cause high interrupt rates and the overhead could then use up much 
  7362.   of the available processor power. This is even more of an issue in a 
  7363.   multitasking environment where the situation is more complex and the overhead 
  7364.   for interrupt processing is typically higher. 
  7365.  
  7366.  Memory mapped adapters 
  7367.  
  7368.   This type of adapter shares a segment of memory (on the adapter) and if 
  7369.   combined with the use of interrupts, can be much more efficient than the 
  7370.   interrupt per character type.  However, the adapter is still dependent on the 
  7371.   processor to move data between the adapter's storage and a dynamically 
  7372.   allocated buffer in system memory.  With the arbitration overhead and large 
  7373.   amounts of data (for example, bitmaps for a graphics adapter), this may be a 
  7374.   burden on the processor. 
  7375.  
  7376.   The biggest disadvantage with this type of adapter is that there is a limited 
  7377.   number of fixed assignments for shared I/O memory.  This limits the number of 
  7378.   possible configurations and designs. 
  7379.  
  7380.  
  7381. ΓòÉΓòÉΓòÉ 20.3. Data Transfer Modes ΓòÉΓòÉΓòÉ
  7382.  
  7383. The attainable speed of data transfer between two participants on the IBM Micro 
  7384. Channel is affected by a number of factors: 
  7385.  
  7386.  Time required to gain control over the channel (arbitration) 
  7387.  Time required for each data transfer 
  7388.  Capability to perform burst mode transfers 
  7389.  The width of the data path (8, 16, 32, or more bits) 
  7390.  Type of transfer cycle used (basic or matched-memory cycle). 
  7391.  
  7392. The arbitration cycle required to gain control over the Micro Channel takes a 
  7393. minimum of 300 ns. After that time, the device can use the channel until the 
  7394. transfer is completed or a pre-empt signal is raised by another device. During 
  7395. the time a device controls the channel, it can move data on the channel by 
  7396. placing an address on the address bus and data on the data bus. The capacities 
  7397. of different devices on the Micro Channel, in their current PS/2 
  7398. implementation, are shown in Table "Data and Address Bus Widths for Micro 
  7399. Channel Participants". 
  7400.  
  7401.  
  7402. ΓòÉΓòÉΓòÉ 20.3.1. Basic Data Transfer Mode ΓòÉΓòÉΓòÉ
  7403.  
  7404. The basic transfer cycle on the Micro Channel is a minimum of 200 ns (100 ns 
  7405. for the address and 100 ns for the data which results in five million basic 
  7406. transfer cycles per second for a device running in burst mode. As shown in 
  7407. Figure "Basic Data Transfer Mode", a data transfer operation is done in two 
  7408. steps. First the address for the transfer (either I/O adapter or memory 
  7409. location) is selected, then up to four bytes of data is moved across the data 
  7410. buffer. 
  7411.  
  7412. Depending of the width of the data path (8, 16, or 32 bits) the instantaneous 
  7413. data transfer rate on the channel would be 5, 10, or 20MB per second. 
  7414.  
  7415. The matched-memory extension is a modification to the basic data transfer mode, 
  7416. which can improve the data transfer capabilities between the system master and 
  7417. channel-attached memory. When supported, it allows the basic transfer cycle of 
  7418. 200 ns to be reduced. 
  7419.  
  7420. The DMA controller on the system board requires two basic transfer cycles to 
  7421. move either 8 bits or 16 bits of data.  It moves the data from the originator 
  7422. to a buffer in the DMA controller and then to the target device or memory 
  7423. location.  Because two cycles are used per 8 or 16 bits of data, the data 
  7424. transfer rate for DMA controllers is 2.5MB or 5MB per second. 
  7425.  
  7426.  
  7427. ΓòÉΓòÉΓòÉ 20.3.2. Streaming Data Mode ΓòÉΓòÉΓòÉ
  7428.  
  7429. For blocks of sequential data transferred over the Micro Channel, it should not 
  7430. be necessary to specify the address information more than once. Both the source 
  7431. and destination devices should update the address for each cycle by the size of 
  7432. the transferred data. This technique is supported by the Micro Channel and is 
  7433. known as streaming data mode (or streaming data procedure). Using streaming 
  7434. data mode with 32-bit transfer, the effective transfer rate is 40MB per second. 
  7435. The usage of the address and data buses during a data transfer using streaming 
  7436. data procedure is shown in Figure "Streaming Data Mode". 
  7437.  
  7438.  
  7439. ΓòÉΓòÉΓòÉ 20.3.3. Multiplexed Streaming Data Mode ΓòÉΓòÉΓòÉ
  7440.  
  7441. When the Micro Channel is running in streaming data mode, the 32 address lines 
  7442. are only used during the first cycle of the transfer. These address lines are 
  7443. therefore available for transfer of an additional four bytes during each 
  7444. following cycle. This mode is called multiplexed streaming data mode and gives 
  7445. an effective width of 64 bits (8 bytes) for each cycle. The resulting effective 
  7446. data rate is 80MB per second. This is shown in Figure "Multiplexed Streaming 
  7447. Data Mode". 
  7448.  
  7449. IBM has also disclosed that upcoming generations of Micro Channel systems may 
  7450. implement a faster basic transfer cycle of 100 ns rather than the current 200 
  7451. ns. With the current cycle the Micro Channel is able to transfer sequential 
  7452. blocks of data with transfer rates of 20, 40, and 80MB per second. Systems 
  7453. implementing the faster transfer cycle would be able to reach transfer speeds 
  7454. of up to 160MB per second. These rates are essential for advanced function bus 
  7455. masters, which must move large blocks of sequential data. 
  7456.  
  7457.  
  7458. ΓòÉΓòÉΓòÉ 20.4. Data Integrity and Exception Handling ΓòÉΓòÉΓòÉ
  7459.  
  7460. There are two things that can go wrong while transferring data across the 
  7461. channel: 
  7462.  
  7463.  1. Data can be corrupted 
  7464.  2. Execution of an instruction can fail. 
  7465.  
  7466. We therefore need mechanisms to report the occurrence of an error. 
  7467.  
  7468.  
  7469. ΓòÉΓòÉΓòÉ 20.4.1. Parity Checking ΓòÉΓòÉΓòÉ
  7470.  
  7471. When data is stored in memory or on any external device, the integrity of the 
  7472. data is typically ensured by having some sort of checking information stored 
  7473. with the data. Using this information, lost or incorrect bits may be detected 
  7474. and in certain cases corrected (on advanced memory systems and I/O adapters). 
  7475. The buses that comprise the Micro Channel are normally regarded as extremely 
  7476. safe conduits of information and are therefore not usually checked. While the 
  7477. chance of an error on the buses is very small, a missing or extra bit could 
  7478. still be induced by: 
  7479.  
  7480.  Electromagnetic interference 
  7481.  Power distribution disturbances (poor decoupling of logic spikes) 
  7482.  Adapter cards not following timing rules properly. 
  7483.  
  7484. To improve the integrity of the buses, the Micro Channel architecture supports 
  7485. address parity and data parity as an option for devices that are able to handle 
  7486. this function. 
  7487.  
  7488. Odd parity is used and is implemented by using formerly reserved lines as new 
  7489. address and data parity lines. To indicate that parity is used/checked two new 
  7490. control lines are defined: APAREN (Address Parity Enabled) and DPAREN (Data 
  7491. Parity Enabled). 
  7492.  
  7493. If a master addresses a slave with APAREN enabled, the slave will answer only 
  7494. if the parity is correct. If not, the bus master suspends the operation and 
  7495. sets an internal error flag. 
  7496.  
  7497. During write operations from a bus master to a slave device, the slave is 
  7498. responsible for the parity checking if the DPAREN line is active. The slave 
  7499. should then indicate bad parity by activating the CHCK (Channel Check) signal. 
  7500. If a bus master detects a parity error during a read operation with the DPAREN 
  7501. line activated (by the slave), it is expected to suspend the operation and set 
  7502. an internal error flag. 
  7503.  
  7504. Address parity and data parity are both optional and can be used independently 
  7505. of each other.  Devices that use the parity checking and devices that do not 
  7506. are permitted to coexist in the same Micro Channel system. 
  7507.  
  7508.  
  7509. ΓòÉΓòÉΓòÉ 20.4.2. Synchronous Exception Signaling ΓòÉΓòÉΓòÉ
  7510.  
  7511. The Micro Channel architecture provides for exception signaling using the CHCK 
  7512. signal. Initial use of the CHCK signal in the PS/2 line of products was 
  7513. asynchronous. With the new advanced uses of the Micro Channel and bus master 
  7514. adapters, which are able to execute multiple I/O-operations in burst mode, 
  7515. synchronous exception handling is needed in order to correctly associate an 
  7516. exception with the command that caused it. 
  7517.  
  7518. The synchronous exception support within the Micro Channel architecture 
  7519. provides for activation of the CHCK signal in the same bus cycle that caused 
  7520. the exception. This simplifies the exception handling and provides increased 
  7521. system data integrity. 
  7522.  
  7523.  
  7524. ΓòÉΓòÉΓòÉ 20.5. IBM SCSI Implementation ΓòÉΓòÉΓòÉ
  7525.  
  7526. In this section we give a brief description of the Small Computer Systems 
  7527. Interface (SCSI) and describe the currently available IBM PS/2 SCSI adapters. 
  7528. We also look at the support in OS/2 V2.0 for the IBM SCSI adapters. 
  7529.  
  7530.  
  7531. ΓòÉΓòÉΓòÉ 20.5.1. What is SCSI? ΓòÉΓòÉΓòÉ
  7532.  
  7533. SCSI is a standard interface bus, through which computers may communicate with 
  7534. devices such as fixed disks, CD-ROMs, printers, plotters, scanners, etc. The 
  7535. standard is fully described in ANSI standard X3.131-1986. 
  7536.  
  7537. SCSI is a bus level interface, as compared to interfaces such as ESDI and 
  7538. ST-506, which are device level interfaces. With a bus level interface all the 
  7539. circuitry required to control the device is built into the device itself. This 
  7540. is the reason it is possible to attach different device types to a SCSI bus. 
  7541.  
  7542. Up to eight SCSI devices can be attached to a single SCSI bus. The first of 
  7543. these devices is normally the SCSI attachment adapter, which would be installed 
  7544. in the PS/2 system unit and act as a bridge between the system unit bus (the 
  7545. Micro Channel) and the SCSI bus. A further seven SCSI devices can then be 
  7546. connected by means of the SCSI bus cable. Each of these physical devices can 
  7547. support up to eight logical devices. Each device attached to the SCSI bus has a 
  7548. device ID that is in the range 0 - 7. The attachment feature is usually given 
  7549. the ID of 7 making it the highest priority device on the bus. Figure "SCSI 
  7550. Subsystem Block Diagram" shows this diagrammatically. 
  7551.  
  7552. SCSI supports features such as arbitration and disconnect/reconnect allowing 
  7553. several devices to operate concurrently and to share the bus. Data transfer 
  7554. across the SCSI can either be asynchronous or synchronous. Asynchronous data 
  7555. transfer requires that each byte sent across the bus be acknowledged before the 
  7556. next byte is transferred. When using synchronous mode, each byte of data must 
  7557. still be acknowledged but multiple bytes may be sent before any 
  7558. acknowledgements have been received. 
  7559.  
  7560. The cable connecting the SCSI devices may be up to 20 feet (6 meters) in 
  7561. length, and carries 8-bit parallel data with a transfer rate of 5MB per second. 
  7562.  
  7563.  
  7564. ΓòÉΓòÉΓòÉ 20.5.2. IBM SCSI Adapters ΓòÉΓòÉΓòÉ
  7565.  
  7566. IBM currently has available two SCSI adapters, which can be used in Micro 
  7567. Channel based PS/2s: 
  7568.  
  7569.  The IBM 16-bit SCSI adapter 
  7570.  
  7571.   This bus master adapter has a: 
  7572.  
  7573.    - 16-bit data capability 
  7574.    - 32-bit address capability. 
  7575.  
  7576.  The IBM 32-bit SCSI adapter with cache 
  7577.  
  7578.   This is also a bus master adapter, which features: 
  7579.  
  7580.    - 32-bit data capability 
  7581.    - 32-bit address capability 
  7582.    - 512KB on-board cache. 
  7583.  
  7584. Up to four adapters may be installed in a PS/2 system at the same time. The two 
  7585. IBM adapters support the following common features: 
  7586.  
  7587.  The attachment of mixed SCSI device types that support the SCSI Common 
  7588.   Command Set (CCS). 
  7589.  
  7590.  Up to seven physical SCSI devices. Each physical device can support eight 
  7591.   logical devices, giving a total of 56 devices per adapter (SCSI bus). 
  7592.  
  7593.  Overlapped command processing for up to 15 devices. 
  7594.  
  7595.  A data transfer rate of up to 5MB per second from the adapter to a device on 
  7596.   the SCSI bus. 
  7597.  
  7598.  A data transfer rate of up to 16.6MB per second from the adapter to the 
  7599.   system (8.3MB per second for the 16-bit version). 
  7600.  
  7601. SCSI devices can be attached to the IBM SCSI adapters both internally and 
  7602. externally. The adapters have two interface connectors. A connector on the top 
  7603. edge of the card allows the attachment of devices mounted internally in the 
  7604. system unit. There is a second connector on the end of the card, to which the 
  7605. external connection cable attaches. 
  7606.  
  7607.  
  7608. ΓòÉΓòÉΓòÉ 20.5.3. Adapter Components ΓòÉΓòÉΓòÉ
  7609.  
  7610. The different parts of the adapters are illustrated in Figure "Adapter 
  7611. Component Block Diagram", and are described below: 
  7612.  
  7613.  Local microprocessor, RAM and ROM 
  7614.  
  7615.   An Intel 80188 microprocessor controls the operation of the adapter. It 
  7616.   translates commands received from the system into a series of operations to 
  7617.   implement the desired results. The processor also manages the intelligent 
  7618.   buffer, controls data transfers to and from the system, controls the SCSI 
  7619.   bus, and handles error detection/recovery. 
  7620.  
  7621.   The program code that controls the processor is stored in a local read-only 
  7622.   memory (ROM) module. There is also a Random Access Memory (RAM) module 
  7623.   available for storage of work information. 
  7624.  
  7625.  System interface controls 
  7626.  
  7627.   The system interface controls provide command and interrupt registers that 
  7628.   allow the processor to receive commands from the system and to interrupt the 
  7629.   system when a command is complete. 
  7630.  
  7631.  SCSI bus control 
  7632.  
  7633.   The SCSI bus control chip is an electronic circuit module used by the 
  7634.   processor to control the SCSI bus.  It is used to transmit commands, receive 
  7635.   status information and transfer data between the adapter card and attached 
  7636.   SCSI devices. It also provides the following functions: 
  7637.  
  7638.    - SCSI bus arbitration 
  7639.    - SCSI device selection/reselection 
  7640.    - SCSI phase change detection 
  7641.    - SCSI bus parity generation/checking 
  7642.    - Diagnostics and self-testing capabilities. 
  7643.  
  7644.  Intelligent buffer 
  7645.  
  7646.   This buffer is a 512KB parity-checked RAM module, and is only available on 
  7647.   the 32-bit high-performance version of the SCSI adapter. This buffer has two 
  7648.   basic functions: 
  7649.  
  7650.     1. It serves as a prefetch cache and keeps frequently used or prefetched 
  7651.        SCSI device data available for immediate transfer to the system without 
  7652.        the normal device-dependent physical access delay. 
  7653.     2. It buffers the SCSI device data until it can be transferred to the 
  7654.        system RAM via DMA. This allows the SCSI bus data transfer to be 
  7655.        asynchronous to the Micro Channel data transfer, permitting interleaving 
  7656.        of transfer operations, and providing enhanced performance. 
  7657.  
  7658.  Buffer and data flow controls 
  7659.  
  7660.   This circuit module manages the flow of parallel data between the SCSI bus, 
  7661.   the intelligent buffer, and the Micro Channel. The circuit is controlled by 
  7662.   the processor and can perform all transfers simultaneously. It supports 
  7663.   32-bit to 16-bit conversion, burst mode DMA, odd byte/word transfers and 
  7664.   parity generation/checking of the buffer data. 
  7665.  
  7666.  SCSI BIOS 
  7667.  
  7668.   The SCSI BIOS consists of a set of ROM modules, which contain the basic 
  7669.   input/output support code for the adapter. It provides both the compatibility 
  7670.   (CBIOS) and advanced (ABIOS) support for any attached SCSI fixed disk. The 
  7671.   BIOS ROM is completely independent from the processor's ROM on the adapter. 
  7672.   BIOS is discussed further in SCSI BIOS. 
  7673.  
  7674.  
  7675. ΓòÉΓòÉΓòÉ 20.5.4. SCSI BIOS ΓòÉΓòÉΓòÉ
  7676.  
  7677. As mentioned above, the SCSI adapters contain ROM modules with the 
  7678. compatibility BIOS (CBIOS), the advanced BIOS (ABIOS), and the power-on self 
  7679. test (POST) routines for the SCSI subsystem. Each of these BIOS functions is 
  7680. explained in the following sections. 
  7681.  
  7682. Compatibility BIOS (CBIOS) 
  7683.  
  7684. The CBIOS interface supports SCSI device and adapter functions for the single 
  7685. tasking environment, as implemented by PC DOS. The SCSI CBIOS intercepts and 
  7686. replaces parts of the Interrupt 13h (fixed disk) and Interrupt 15h (system 
  7687. services) functions. See Figure "SCSI BIOS Interface Block Diagram" for a 
  7688. functional overview of the BIOS interface. It also adds the new Interrupt 4Bh 
  7689. (advanced services) support to provide a generic interface to SCSI devices 
  7690. other than disk drives. This new interface uses the carry flag and the AH 
  7691. register to report status information. 
  7692.  
  7693. The CBIOS interface makes it possible for programs in a DOS environment to use 
  7694. both SCSI and other types of disks via INT 13h, with the help of new device 
  7695. drivers and INT 4Bh services. The CBIOS interface also supports other types of 
  7696. SCSI devices. 
  7697.  
  7698. Advanced BIOS (ABIOS) 
  7699.  
  7700. The ABIOS interface shown in Figure "SCSI BIOS Interface Block Diagram" 
  7701. provides new and enhanced device ID 02h (fixed disk) support. ABIOS used by 
  7702. operating systems such as OS/2 V2.0, which use the protected mode of the Intel 
  7703. microprocessors. The enhanced functions enable support of both SCSI and other 
  7704. types of disk without an upgrade of operating system software. The new 
  7705. functions enable a more effective use of SCSI disk devices by operating systems 
  7706. through new and enhanced device drivers. The new ABIOS functions are: 
  7707.  
  7708.  0Dh - Enable Intelligent Buffer 
  7709.  
  7710.  0Eh - Disable Intelligent Buffer 
  7711.  
  7712.   These two functions enable or disable the intelligent buffer capability for 
  7713.   all subsequent commands to this device. If the function is not supported, an 
  7714.   error code is returned. 
  7715.  
  7716.  0Fh - Return Intelligent Buffer Status 
  7717.  
  7718.   Returns the status of the intelligent buffer.  Status may be enabled, 
  7719.   disabled or not supported. 
  7720.  
  7721.  10h - Set DMA Pacing Factor 
  7722.  
  7723.   This function programs the adapter with the supplied pacing value. The value 
  7724.   specifies what percentage (25% to 100%) of the DMA transfer bandwidth the 
  7725.   adapter is allowed to use.  All devices on the adapter are affected. 
  7726.  
  7727.  11h - Return DMA Pacing Factor 
  7728.  
  7729.   This function returns the current pacing factor for the adapter. 
  7730.  
  7731.  12h - Transfer SCB. 
  7732.  
  7733.   This function programs the adapter to process a Subsystem Control Block 
  7734.   (SCB). SCBs are described further in Subsystem Control Block Architecture. 
  7735.  
  7736. Power-On Self Test (POST) 
  7737.  
  7738. The POST routines will automatically configure the SCSI subsystem at power-on 
  7739. and system reset.  The SCSI subsystem supports the coexistence of other types 
  7740. of fixed-disk adapters, and if more than one SCSI adapter is installed in a 
  7741. system, the BIOS ROM modules on the extra adapters will be disabled by the POST 
  7742. routines. 
  7743.  
  7744. POST will also issue the Inquiry command to all 56 possible combinations of 
  7745. physical unit number/logical unit number (PUN/LUN), until 15 logical devices 
  7746. (logical device IDs 0 to 14) are assigned. The SCSI adapter is logical device 
  7747. 15. 
  7748.  
  7749.  
  7750. ΓòÉΓòÉΓòÉ 20.5.5. Support for Generic SCSI Functions ΓòÉΓòÉΓòÉ
  7751.  
  7752. The SCSI ABIOS provides support for two new device types: 
  7753.  
  7754.  Device ID 17h - SCSI Adapter support 
  7755.  
  7756.   Functions for this device ID control the SCSI adapter, and some of them also 
  7757.   affect all devices attached to the adapter. 
  7758.  
  7759.  Device ID 18h - SCSI Peripheral Type support. 
  7760.  
  7761.   Functions for this device ID control the devices attached to the SCSI 
  7762.   adapter. Some functions affect all devices attached to the adapter, and 
  7763.   others are used to control a specific device via its logical ID. 
  7764.  
  7765. These device types are intended for access to SCSI devices other than disk 
  7766. drives. Examples of these generic types are CD-ROMs, tape devices and 
  7767. communication devices, all of which may theoretically use the SCSI bus, 
  7768. provided the device is designed to do so. 
  7769.  
  7770. The logical IDs for a particular peripheral type are allocated/deallocated to 
  7771. specific SCSI devices on demand via the allocate and deallocate function. 
  7772. Through the allocate function the device driver specifies a SCSI peripheral 
  7773. type, a removable media indicator and a relative unit number. If the device 
  7774. exists and is unallocated, ABIOS assigns that device to the logical ID. The 
  7775. controlling program can then use the logical ID to make requests through the 
  7776. SCSI adapter. 
  7777.  
  7778.  
  7779. ΓòÉΓòÉΓòÉ 20.6. Subsystem Control Block Architecture ΓòÉΓòÉΓòÉ
  7780.  
  7781. The bus master in Micro Channel-based systems is capable of transferring data 
  7782. on the system channel without intervention from the system controller. 
  7783. Typically the system processor issues a request to the bus master. The bus 
  7784. master then takes charge and controls all further operations required to 
  7785. complete the request. The operations might be: 
  7786.  
  7787.  Issuing control commands to physical devices attached to the bus master 
  7788.  Data transfers to or from the physical device 
  7789.  Data transfer across the Micro Channel to or from system memory 
  7790.  Handling exception conditions 
  7791.  Notifying the system processor of completion of the operation. 
  7792.  
  7793. To utilize the power of the bus master we need an effective method of 
  7794. communicating control instructions to it. 
  7795.  
  7796. The Subsystem Control Block (SCB) architecture defines logical protocols and 
  7797. services needed to transfer commands, data, and status information between the 
  7798. system processor and a bus master adapter and between two bus master adapters. 
  7799. The term subsystem is used since the advanced function adapters are much more 
  7800. than simple interfaces to peripheral devices. These adapters typically have 
  7801. some intelligence built into them in the form of local processing power and can 
  7802. be regarded as "systems within a system". 
  7803.  
  7804. The SCB architecture provides a powerful means of communication between device 
  7805. drivers running in the system processor and I/O processors that are capable of 
  7806. operation independently from the system processor. The architecture defines a 
  7807. control block structure for use between functional entities in a base system 
  7808. processor and functional entities in advanced function adapters. Entities are 
  7809. defined as either client or server. Client entities make requests of server 
  7810. entities. The architecture also defines the way that control blocks are passed 
  7811. between entities in the system processor and entities in the feature adapters, 
  7812. or between entities in two adapters (peer-to-peer communication). 
  7813.  
  7814. The SCB architecture sees the system unit and each adapter logically structured 
  7815. into three levels: 
  7816.  
  7817.  The physical level handles the transfer of the control information and data 
  7818.   across the Micro Channel. It accesses either the MCA-defined I/O address 
  7819.   space or memory address space. 
  7820.  
  7821.  The delivery level is an interface between the physical level and the 
  7822.   processing level. It uses the services provided by the physical level to 
  7823.   transfer requests and replies between processing level entities. 
  7824.  
  7825.  At the processing level we have the client and server entities. The client 
  7826.   builds and sends requests to the server and the client receives replies in 
  7827.   response. 
  7828.  
  7829. We will now discuss the SCB architecture and the manner, in which it is 
  7830. implemented in the IBM SCSI adapters. 
  7831.  
  7832.  
  7833. ΓòÉΓòÉΓòÉ 20.6.1. I/O Port Definitions ΓòÉΓòÉΓòÉ
  7834.  
  7835. To control an advanced function bus master adapter, the SCB architecture 
  7836. defines a set of I/O ports. These ports are assigned as a sequence of register 
  7837. addresses in the I/O address space. Since multiple adapters of the same or 
  7838. different types may be used in the system, the base address for the I/O space 
  7839. of each adapter must be defined during system setup. The IBM SCSI adapters 
  7840. support eight address ranges. However, ABIOS supports only four. The ports used 
  7841. by the IBM SCSI adapters are shown indexed from the base address in Figure "IBM 
  7842. SCSI Adapter I/O Ports". The IBM SCSI adapter implements a subset of the ports 
  7843. defined in the SCB architecture. 
  7844.  
  7845. The following are general descriptions of the I/O space control ports: 
  7846.  
  7847.  Request Ports 
  7848.  
  7849.   There are four types of request ports associated with sending requests to a 
  7850.   device. The first of these is the Command Interface Port (CIP), which 
  7851.   consists of four 8-bit read/write registers used to transfer either a 32-bit 
  7852.   immediate command or a Subsystem Control Block address from the system to the 
  7853.   adapter. The immediate commands are typically device-directed and 
  7854.   control-oriented. 
  7855.  
  7856.   The second is the Attention Port (AP). This is an 8-bit read/write register 
  7857.   used by the system to request an adapter operation. The register contains two 
  7858.   pieces of information. The high-order four bits define the operation request 
  7859.   code and the low-order four bits define the logical device that should be 
  7860.   selected for the operation. 
  7861.  
  7862.   The third, the Interrupt Status Port (ISP), is an 8-bit read-only register 
  7863.   used by the subsystem adapter to return command completion information, if 
  7864.   allowed by the interrupt-enable bit in the Subsystem Control Port. The 
  7865.   adapter stores the logical device ID in the four low-order bits and an 
  7866.   interrupt ID in the high-order bits. A hardware interrupt is then generated. 
  7867.  
  7868.   The fourth port is the Command Busy/Status Port (CB/SP). It is an 8-bit 
  7869.   read-only register that is used by the adapter to serialize access to the 
  7870.   shared logic of the control block delivery service. It contains the following 
  7871.   indicators: 
  7872.  
  7873.    - Busy - indicates that the adapter is busy (using the shared logic). 
  7874.      Commands submitted while the busy indicator is on are ignored by the 
  7875.      feature adapter. 
  7876.    - Interrupt Valid - indicates that the content of the ISP (Interrupt Status 
  7877.      Port) is valid, and that the feature adapter has requested an interrupt on 
  7878.      behalf of one of its entities. This indicator will be set even if 
  7879.      interrupts are not allowed by the system and will be reset by the EOI (End 
  7880.      Of Interrupt) request. This allows an adapter to operate without 
  7881.      presenting hardware interrupts to the system. 
  7882.    - Reject - indicates that the feature adapter has rejected a request. A 
  7883.      Reset Reject request is needed to clear the reject signal and allow the 
  7884.      adapter to resume accepting requests. 
  7885.    - Status - three bit indicator giving the reason for rejection. 
  7886.  
  7887.  Subsystem Control Port 
  7888.  
  7889.   The Subsystem Control Port (SCP) is an 8-bit read/write register used for 
  7890.   direct hardware control of the subsystem adapter. This type of control cannot 
  7891.   typically be handled by requests to the adapter management via immediate 
  7892.   commands through the Command Interface Port (CIP). The SCP contains the 
  7893.   following control indicators: 
  7894.  
  7895.    - Enable interrupt - indicates that interrupts to the system unit should be 
  7896.      enabled or disabled for all devices attached to the adapter. 
  7897.    - Enable DMA - indicates that DMA operations should be enabled or disabled 
  7898.      for the subsystem. 
  7899.    - Reset reject - indicates that a reset of the reject state for the 
  7900.      subsystem should be performed (see Reject under the description of Command 
  7901.      Busy/Status Port above). 
  7902.    - Hardware reset - indicates that a controlled reset of the adapter and 
  7903.      attached devices should be performed. 
  7904.  
  7905.  
  7906. ΓòÉΓòÉΓòÉ 20.6.2. Delivery Service Structure ΓòÉΓòÉΓòÉ
  7907.  
  7908. The SCB architecture defines a structure that supports the physical delivery of 
  7909. control information between multiple entities (requesting or serving functions) 
  7910. executing in a base system processor and one or more peer entities executing in 
  7911. an advanced function adapters. Some entities may act as clients (requesters) 
  7912. while others act as servers. The entities build the control block structure, 
  7913. and the control block delivery service is used by one entity in either a system 
  7914. unit or feature adapter to communicate control block information to another 
  7915. entity. 
  7916.  
  7917. Based upon the information within a control block, data may also be 
  7918. communicated between the two entities. The communication of data is referred to 
  7919. as data delivery. The delivery of data is separate from the delivery of command 
  7920. and control information and the individual entities are responsible for 
  7921. requesting the transfer of the data. 
  7922.  
  7923. In the simplest case, the control block delivery service may be viewed as 
  7924. supporting communication between client entities located in the system unit and 
  7925. server entities located in an adapter. 
  7926.  
  7927.  
  7928. ΓòÉΓòÉΓòÉ 20.6.3. Delivery Service Facilities ΓòÉΓòÉΓòÉ
  7929.  
  7930. The SCB architecture defines two forms of control block delivery, known as 
  7931. locate mode and move mode. As the IBM SCSI adapters use locate mode delivery 
  7932. only this mode will be described. The following section provide an overview of 
  7933. the services, functions and protocols defined for locate mode and a brief 
  7934. description of their underlying control structures. 
  7935.  
  7936. Locate Mode 
  7937.  
  7938. Locate mode is generally used for traditional I/O protocols where there is a 
  7939. single system unit that requests a feature adapter to perform work on its 
  7940. behalf. The format of the control structure in locate mode is relatively fixed. 
  7941. The structure allows various command, status, and indirect list control blocks, 
  7942. connected with pointers, to represent a request from a client to a server. 
  7943. Figure "Overview of Delivery Support" shows an overview of the control block 
  7944. and data delivery support. 
  7945.  
  7946. The delivery support delivers one request at a time. A control block request is 
  7947. initiated by the client, which passes the physical address of the control block 
  7948. to the server through a command register (port) in I/O. The I/O space ports are 
  7949. described in I/O Port Definitions. 
  7950.  
  7951. Locate mode provides: 
  7952.  
  7953.  Requests to Devices 
  7954.  
  7955.   To use a device, a client sends requests in the form of control blocks to the 
  7956.   device ID that represents the device and receives replies from it for each 
  7957.   such request. 
  7958.  
  7959.  Support for Multiple Devices per Adapter 
  7960.  
  7961.   Adapters may provide support for multiple devices. For example, multiple I/O 
  7962.   devices may be connected to a single SCSI adapter. The delivery support 
  7963.   enables the delivery of requests to specific devices through the use of 
  7964.   unique device identification numbers. 
  7965.  
  7966.  Adapter Management 
  7967.  
  7968.   To be able to manage the adapter and deliver device/resource control 
  7969.   information to it, the adapter's unit manager is assigned device ID 0. It 
  7970.   receives all adapter unit management information. 
  7971.  
  7972.  Command and Data Chaining and Detailed Status 
  7973.  
  7974.   The control structure defined for locate mode provides for: 
  7975.  
  7976.    - Immediate command type requests 
  7977.    - Requests that contain one command control and status block 
  7978.    - Requests made up of multiple chained command control blocks. 
  7979.  
  7980.   Command blocks may point to data directly or via an indirect address list. 
  7981.   Figure "Locate Mode Control Block Delivery Structure" shows a sample request 
  7982.   control structure consisting of two command control blocks (command 
  7983.   chaining). The first control block uses an indirect list control block to 
  7984.   reference multiple buffers (data chaining). The second control block has a 
  7985.   direct pointer to a single buffer. The pointer to the first control block is 
  7986.   communicated via the shared I/O address space. 
  7987.  
  7988.  Use of DMA 
  7989.  
  7990.   In locate mode, both the control block structure for a request and the data 
  7991.   associated with the request are transferred between the system unit and the 
  7992.   adapter using DMA. This DMA operation is managed by the adapter's delivery 
  7993.   support. The IBM SCSI adapters have a DMA with a 32-bit addressing 
  7994.   capability, hence they are not limited by the fact that the DMA in the IBM 
  7995.   PS/2 system units currently only supports 24-bit addressing. 
  7996.  
  7997.  Interrupts 
  7998.  
  7999.   The delivery service allows the client to define when and under what 
  8000.   conditions interrupts should be generated. Generally, a single interrupt is 
  8001.   generated for each completed request. When a request contains a chain of 
  8002.   control blocks, additional interrupts may be requested for synchronization at 
  8003.   intermediate points within the request. 
  8004.  
  8005. There are three different control block structures used by locate mode 
  8006. requests: 
  8007.  
  8008.  Command Control Blocks 
  8009.  
  8010.   The base command control block is a variable length structure created and 
  8011.   maintained in shared memory by the client in the system unit. It is used to 
  8012.   convey requests to a subsystem or device in an adapter. These requests are 
  8013.   used to direct the operation of the subsystem or device. In Figure "SCB 
  8014.   Structure Used by the IBM SCSI Adapter" we show the structure of the command 
  8015.   control block as used by the IBM SCSI adapters. 
  8016.  
  8017.   The command word specifies the operation to be executed, for example read or 
  8018.   write.  The enable word controls optional features to be used during the 
  8019.   operation, for example whether the system buffer address points to actual 
  8020.   data or is an indirect reference. 
  8021.  
  8022.   The OS/2 V2.0 disk device driver builds the SCB and other control blocks 
  8023.   required. It then calls the ABIOS transfer SCB function to initiate the 
  8024.   operation. ABIOS uses the adapter's I/O ports to pass the SCB address. The 
  8025.   adapter then uses its DMA controller to read the SCB into private memory on 
  8026.   the adapter where it decodes it and initiates the required operation. Data is 
  8027.   read from or written to system memory using the adapters DMA controller. 
  8028.  
  8029.   The IBM SCSI adapters support chaining of SCBs.  The adapter then uses the 
  8030.   chain address to find the next SCB in a chain. All SCBs in a chain must be 
  8031.   for the same device.  SCBs are executed in the order that they are chained 
  8032.   in.  The device driver will try to sort the SCBs into an order that will 
  8033.   minimize head movement unless requested not to.  Where the order of execution 
  8034.   is critical (for example, paging might require that certain writes be done 
  8035.   before reads) this optimization will be disabled. 
  8036.  
  8037.   A single IBM SCSI adapter can overlap processing of one command for up to 15 
  8038.   attached devices. 
  8039.  
  8040.  Indirect Address Lists 
  8041.  
  8042.   An indirect address list is a variable length list containing address-count 
  8043.   pairs, and is used to support data chaining. The location of the indirect 
  8044.   list control block and its length are specified by the System Buffer Address 
  8045.   and System Buffer Byte Count fields in the command control block. 
  8046.  
  8047.   Each entry in the list is 8 bytes (4 byte address and 4 byte length). 
  8048.  
  8049.   The IBM SCSI adapters use the indirect address list structure for specifying 
  8050.   scatter/gather lists. The layout of a scatter/gather list is shown in Figure 
  8051.   "IBM SCSI Adapter Scatter/Gather List". When passing a memory address to an 
  8052.   adapter, the actual physical address at which the data is located must be 
  8053.   used. Because of the mapping of virtual memory to pages in the physical 
  8054.   address space, a data buffer could be split across multiple discontiguous 
  8055.   pages. This means that a single logical disk I/O operation could require 
  8056.   several physical operations. The scatter/gather list allows one I/O 
  8057.   operations to access data in more than one physical memory location. Each 
  8058.   entry in the list specifies a physical memory address and a data length. 
  8059.  
  8060.   During a write to disk, data is then gathered from different memory locations 
  8061.   and written to a contiguous block on disk. During a read from disk, data can 
  8062.   be scattered to different locations in system memory. The IBM SCSI adapters 
  8063.   support scatter/gather lists with up to 16 entries. 
  8064.  
  8065.   When coupled with the ability to chain SCBs together, scatter/gather lists 
  8066.   form an efficient mechanism for communicating paging I/O operations. By being 
  8067.   able to chain SCBs together, both reads and writes can be specified in a 
  8068.   single call from the paging subsystem to the file system. Scatter/gather 
  8069.   lists allow multiple page reads or writes for a single SCB. 
  8070.  
  8071.  Termination Status Control Blocks 
  8072.  
  8073.   In addition to the status indication in the ISP (Interrupt Status Port), the 
  8074.   SCB architecture allows status information to be reported for each command. 
  8075.   This information can be reported in a termination status block, which is 
  8076.   connected to each command control block. The adapter writes request 
  8077.   completion status or termination status into this control block. The layout 
  8078.   of the termination status block used by the IBM SCSI adapters is shown in 
  8079.   Figure "IBM SCSI Adapter Termination Status Block". 
  8080.  
  8081.  
  8082. ΓòÉΓòÉΓòÉ 20.6.4. Additional Information ΓòÉΓòÉΓòÉ
  8083.  
  8084. More detailed information about the SCSI adapters can be found in the 
  8085. Personal System/2 Micro Channel SCSI Adapter Technical Reference (S68X-2397-00) 
  8086. or the Personal System/2 Micro Channel SCSI Adapter with Cache Technical 
  8087. Reference (S68X-2365-00). 
  8088.  
  8089. The SCSI BIOS information can be found in the Supplement for the Personal 
  8090. System/2 and Personal Computer BIOS Interface Technical Reference, December 
  8091. 1989 (S15F-2161-00). 
  8092.  
  8093.  
  8094. ΓòÉΓòÉΓòÉ 21. Lab Session - 32-Bit Memory Model ΓòÉΓòÉΓòÉ
  8095.  
  8096. This lab session provides practical experience with the 32-bit flat memory 
  8097. model implemented under OS/2 Version 2.0, and demonstrates some of the new 
  8098. memory management facilities that were introduced in OS/2 Version 2.0. The 
  8099. exercise shows the way in which OS/2 Version 2.0 memory management differs from 
  8100. the memory management in previous releases.  A look is also taken at 
  8101. enhancements made in the area of thread processing. 
  8102.  
  8103.  
  8104. ΓòÉΓòÉΓòÉ 21.1. Objectives ΓòÉΓòÉΓòÉ
  8105.  
  8106. Subjects which will be covered in this lab session are: 
  8107.  
  8108.  1. Memory allocation using the DosAllocMem() function 
  8109.  
  8110.  2. Page granularity in memory allocation 
  8111.  
  8112.  3. The general protection exception error message 
  8113.  
  8114.  4. The guard page fault exception error message 
  8115.  
  8116.  5. The new SWAPPER.DAT functionality 
  8117.  
  8118.  6. Starting multiple DOS sessions 
  8119.  
  8120.  7. Starting multiple threads. 
  8121.  
  8122. Software required to do these exercises: 
  8123.  
  8124.  OS/2 Version 2.0 
  8125.  
  8126.  C Set/2 
  8127.  
  8128.  IBM Developer's Toolkit for OS/2 2.0 
  8129.  
  8130.  
  8131. ΓòÉΓòÉΓòÉ 21.2. Exercise 1 - Memory Allocation ΓòÉΓòÉΓòÉ
  8132.  
  8133. This exercise focuses on the DosAllocMem() function and its usage.  The sample 
  8134. program used in the exercise allocates and uses memory in order to illustrate 
  8135. the new memory allocation mechanism, particularly with regard to paged memory. 
  8136.  
  8137. In this exercise, the student is required to run the program: 
  8138.  
  8139.              MEMLAB1.EXE
  8140.  
  8141. This program does the following: 
  8142.  
  8143.  1. Asks for an amount of memory to be allocated, in integer-sized (4 byte) 
  8144.     units. 
  8145.  2. Allocates and commits the requested amount of memory. 
  8146.  3. Asks for the amount of memory to be used for read/write operations. The 
  8147.     amount of memory to be used is specified as the number of integers to be 
  8148.     written then read. 
  8149.  4. Performs writes to fill the requested amount of memory. 
  8150.  5. Checks whether the written values are correct. 
  8151.  6. Frees the allocated memory. 
  8152.  7. At initiation the program registers two termination routines: 
  8153.  
  8154.     a) An abnormal termination routine, to which general protection exceptions 
  8155.        will be routed. 
  8156.  
  8157.     b) A termination routine, which is called when the program exits normally. 
  8158.  
  8159.     These routines are used to print out the program status at termination and 
  8160.     to pinpoint where a general protection exception occurred.  Note that C 
  8161.     Set/2 routines are used to register the exception handler. 
  8162.     DosSetExceptionHandler() could also have been used. 
  8163.  
  8164. The program will be executed three times during the course of the exercise. The 
  8165. program listing is shown in Source Code MEMLAB1.C. 
  8166.  
  8167.  
  8168. ΓòÉΓòÉΓòÉ 21.2.1. Step 1 - Normal Memory Allocation ΓòÉΓòÉΓòÉ
  8169.  
  8170. Execute the program MEMLAB1.EXE, and instruct the program to perform the 
  8171. following: 
  8172.  
  8173.  Allocate one integer. 
  8174.  
  8175.  Specify 200 integers for read/write. 
  8176.  
  8177. The program should execute without error.  Given that more memory has been 
  8178. accessed during the write operation than was originally allocated, explain how 
  8179. this is possible. 
  8180.  
  8181.  
  8182. ΓòÉΓòÉΓòÉ 21.2.2. Step 2 - Memory Protection Violation ΓòÉΓòÉΓòÉ
  8183.  
  8184. Execute the program MEMLAB1.EXE, and instruct the program to perform the 
  8185. following: 
  8186.  
  8187.  Allocate one integer. 
  8188.  
  8189.  Specify 1200 integers for read/write. 
  8190.  
  8191. In this step, the program should terminate with an error.  Note the system 
  8192. error message, and the memory location where the error occurred.  Given that 
  8193. each integer is a double word (4 bytes), explain why the error occurred. 
  8194.  
  8195.  
  8196. ΓòÉΓòÉΓòÉ 21.2.3. Step 3 - Large Memory Allocation ΓòÉΓòÉΓòÉ
  8197.  
  8198. Execute the program MEMLAB1.EXE, and instruct the program to perform the 
  8199. following: 
  8200.  
  8201.  Allocate 1048576 integers (4MB). 
  8202.  
  8203.  Use 67584 integers (254KB) for read/write. 
  8204.  
  8205. Note:   This will take some time to complete. Please be patient. 
  8206.  
  8207. Check the program code to see how the memory allocation is done.  Explain why 
  8208. this method works for all sizes of memory allocation.  Compare this to the OS/2 
  8209. V 1.x memory allocation scheme. 
  8210.  
  8211. If you are able to do the exercise  Please do so now. If not, refer to the 
  8212.                                     following explanation. 
  8213.  
  8214. If the program does not work, check for the free disk size on the logical drive 
  8215. where the SWAPPER.DAT file is located.  Erase excess files and rerun the 
  8216. program.  Contact your instructor for further assistance. 
  8217.  
  8218.  
  8219. ΓòÉΓòÉΓòÉ 21.3. Expected Results from Exercise 1 ΓòÉΓòÉΓòÉ
  8220.  
  8221. After successfully completing the exercise, you will have tried a number of 
  8222. memory allocation options available using the DosAllocMem() function.  The 
  8223. results from each step are explained below. 
  8224.  
  8225.  
  8226. ΓòÉΓòÉΓòÉ 21.3.1. Step 1 ΓòÉΓòÉΓòÉ
  8227.  
  8228. You will notice that the operating system always allocates at least 4KB (1 
  8229. page) of memory, even although only 1 byte may be specified in the allocation 
  8230. request.  This is because all memory management in OS/2 Version 2.0 is handled 
  8231. on a per-page basis, using the flat memory model.  The page is the lowest level 
  8232. of granularity in OS/2 Version 2.0; this differs from previous versions of 
  8233. OS/2, which had a byte-level granularity. 
  8234.  
  8235. This principle applies to all memory protection and memory access types (read, 
  8236. write, etc.).  This allows a programmer to use more memory for read/write than 
  8237. is actually requested in an allocation request as shown in step 1, provided 
  8238. that memory is within the physical page boundary. 
  8239.  
  8240.  
  8241. ΓòÉΓòÉΓòÉ 21.3.2. Step 2 ΓòÉΓòÉΓòÉ
  8242.  
  8243. In step 2, a general protection exception occurs when attempting to access 1200 
  8244. integers for read/write.  Since each addressable memory location is a double 
  8245. word (4 bytes), there are a maximum of 1024 addressable locations in a single 
  8246. page.  Attempting to access 1200 integers resulted in a general protection 
  8247. exception when the 1025th location was accessed. 
  8248.  
  8249. Should the program have done a second DosAllocMem, the page following the page 
  8250. containing the memory object used in the exercise would have also been valid in 
  8251. the process address space.  The protection exception would then not have been 
  8252. generated.  32-bit programs see the process address as a single segment. 
  8253.  
  8254.  
  8255. ΓòÉΓòÉΓòÉ 21.3.3. Step 3 ΓòÉΓòÉΓòÉ
  8256.  
  8257. The flat memory model allows a programmer to address any location within a 
  8258. memory object on a contiguous basis.  The DosAllocMem() function returns a 
  8259. 32-bit memory address, and not a segment selector as in previous versions of 
  8260. OS/2; hence, the programmer does not have to consider the 64KB segment boundary 
  8261. limitation.  This allows the programmer to allocate a memory object of an 
  8262. arbitrary size up to 512MB (the process space address limit). 
  8263.  
  8264.  
  8265. ΓòÉΓòÉΓòÉ 21.3.4. Source Code MEMLAB1.C ΓòÉΓòÉΓòÉ
  8266.  
  8267. /**********************************************************/
  8268. /**********************************************************/
  8269. /***                                                    ***/
  8270. /***  Program name: MEMLAB1.EXE                         ***/
  8271. /***                                                    ***/
  8272. /***  Created     : 7. May 1990                         ***/
  8273. /***                                                    ***/
  8274. /***  Author      : Bo Falkenberg                       ***/
  8275. /***                                                    ***/
  8276. /***  Revised     : February, 1992 by Darryl Frost      ***/
  8277. /***                                                    ***/
  8278. /***  Purpose     : To demonstrate the use of the new   ***/
  8279. /***                DosAllocMem API, and the handling   ***/
  8280. /***                of General Protection Exceptions.   ***/
  8281. /***                                                    ***/
  8282. /***  Compile     : icc /W2 memlab1.c;                  ***/
  8283. /***                                                    ***/
  8284. /***  Execute     : memlab1 (No command line parameters)***/
  8285. /***                                                    ***/
  8286. /***  Input param : 1. Memory to allocate               ***/
  8287. /***                2. Memory to use for read/write     ***/
  8288. /***                                                    ***/
  8289. /**********************************************************/
  8290. /**********************************************************/
  8291.  
  8292.  
  8293.  
  8294. /**********************************************************/
  8295. /***  DEFINES                                           ***/
  8296. /**********************************************************/
  8297. #define INCL_DOSMEMMGR
  8298.  
  8299. /**********************************************************/
  8300. /***  INCLUDE                                           ***/
  8301. /**********************************************************/
  8302. #include <os2.h>
  8303. #include <stdio.h>
  8304. #include <stdlib.h>
  8305. #include <signal.h>
  8306.  
  8307. /***      GLOBAL VARIABLES                              ***/
  8308. ULONG     ulLoop;     /* loop variable                    */
  8309.  
  8310. /***      FUNCTION PROTOTYPES                           ***/
  8311. void main(int argc, char *argv[], char *envp[]);
  8312. void traphandler(int sig);
  8313. void normalexit(void);
  8314.  
  8315. /***  MAIN PROGRAM                                      ***/
  8316. void main(int argc, char *argv[], char *envp[])
  8317. {                        /*******************************************/
  8318.    PULONG    pulBlock;   /* pointer to the starting memory location */
  8319.    ULONG     ulErr;      /* error variable                          */
  8320.    ULONG     ulAmount;   /* amount of memory to be allocated        */
  8321.                          /*             (long integers)             */
  8322.    ULONG     ulBytes;    /* amount of memory to be allocated (bytes)*/
  8323.    ULONG     ulUse;      /* amount of memory to be used             */
  8324.                          /*             (long integers)             */
  8325.    BOOL      OK = TRUE;  /* memory check indicator                  */
  8326.                          /*******************************************/
  8327.    setbuf(stdout, NULL);
  8328. /* Register an exception handler for memory exception     */
  8329.    if (signal(SIGSEGV, traphandler) != SIG_ERR)
  8330.       printf("\nSignal Handler registered for memory exceptions\n");
  8331. /* Register an exit routine for normal exits */
  8332.    if (atexit(normalexit) == 0)
  8333.       printf("\nExit handler for normal termination registered\n");
  8334. /* Read parameters: 1. Memory to allocate    */
  8335. /*                  2. Memory to use         */
  8336. /* Both parameters as number of long integers*/
  8337.    printf("\nFor how many long integers should memory be allocated : ");
  8338.    scanf("%u", &ulAmount);
  8339. /* Determine number of bytes to allocate     */
  8340.    ulBytes = ulAmount * sizeof(ULONG);
  8341.    printf("\nHow long integers should be written into this memory : ");
  8342.    scanf("%u", &ulUse);
  8343. /* Allocate the memory                       */
  8344.    ulErr = DosAllocMem ( (PPVOID)&pulBlock, ulBytes,
  8345.                          PAG_COMMIT | PAG_READ | PAG_WRITE);
  8346.    if (!ulErr)
  8347.    {
  8348. /* Insert values into ulUse memory           */
  8349.       printf("\nInserting integers into memory\n");
  8350.       for (ulLoop = 0; ulLoop < ulUse; ulLoop++)
  8351.       {
  8352.          *(pulBlock + ulLoop) = '\xAB';
  8353.       } /* endfor */
  8354. /* Read the memory to check that it is OK    */
  8355.       for (ulLoop = 0; ulLoop < ulUse; ulLoop++)
  8356.       {
  8357.          if (*(pulBlock + ulLoop) != '\xAB')
  8358.          {
  8359.             printf("\nError in byte %u\n", ulLoop);
  8360.             OK = FALSE;
  8361.          } /* endif */
  8362.       } /* endfor */
  8363.  
  8364.       if (OK)
  8365.       {
  8366.          printf("\nAll memory checked out OK\n");
  8367.       } /* endif */
  8368.  
  8369. /* Free the memory                           */
  8370.       ulErr = DosFreeMem (pulBlock);
  8371.       if (ulErr != 0)
  8372.       {
  8373.         printf("\nError in freeing : code %u\n", ulErr);
  8374.       } /* endif */
  8375.    } else
  8376.    {
  8377.      printf("\nError in allocation : code %u\n", ulErr);
  8378.    } /* endif */
  8379.  
  8380. }
  8381. /* ABNORMAL TERMINATION HANDLER              */
  8382. void traphandler (int sig)
  8383. {
  8384.      printf("\nA General Protection Exception was detecting writing to"
  8385.             " position %u\n", ulLoop+1);
  8386. }
  8387. /* NORMAL TERMINATION ROUTINE                */
  8388. void normalexit(void)
  8389. {
  8390.      printf("\n%u integers successfully inserted into memory\n", ulLoop);
  8391. }
  8392.  
  8393.  
  8394. ΓòÉΓòÉΓòÉ 21.4. Exercise 2 - Memory Protection ΓòÉΓòÉΓòÉ
  8395.  
  8396. This exercise demonstrates the different memory attributes used for different 
  8397. types of memory access, and the resulting impact on the allowed usage of memory 
  8398. (read or write).  The access types used in this lab exercise are READ, WRITE, 
  8399. and EXECUTE. The effect of not committing pages and accessing a guarded page is 
  8400. also shown. 
  8401.  
  8402. In this exercise, the student is required to run the program: 
  8403.  
  8404.                MEMLAB2.EXE
  8405.  
  8406. This program does the following: 
  8407.  
  8408.  1. Asks for the amount of memory to be allocated 
  8409.  
  8410.  2. Asks for the type of allocation: 
  8411.  
  8412.     PAG_COMMIT and PAG_READ 
  8413.  
  8414.     PAG_COMMIT and PAG_WRITE 
  8415.  
  8416.     PAG_COMMIT and PAG_EXECUTE 
  8417.  
  8418.     PAG_COMMIT and PAG_GUARD and PAG_WRITE 
  8419.  
  8420.     PAG_WRITE 
  8421.  
  8422.  3. Asks whether to READ or WRITE to this memory 
  8423.  
  8424.  4. Allocates the memory with the requested attributes and either reads from or 
  8425.     writes to this memory. 
  8426.  
  8427. The program listing is shown in Source Code MEMLAB2.C. 
  8428.  
  8429. This program should be run a number of times during the course of the exercise, 
  8430. trying the different attributes and reading from/writing to the memory 
  8431. allocated. 
  8432.  
  8433. If you are able to do the exercise  Please do so now.  If not, refer to the 
  8434.                                     following explanation. 
  8435.  
  8436.  
  8437. ΓòÉΓòÉΓòÉ 21.5. Expected Results from Exercise 2 ΓòÉΓòÉΓòÉ
  8438.  
  8439. After successfully completing the exercise, you will see the following results: 
  8440.  
  8441.  1. Allocation type PAG_COMMIT and PAG_READ: 
  8442.  
  8443.     Read request is OK. 
  8444.     Write request fails with a general protection exception. 
  8445.  
  8446.  2. Allocation type PAG_COMMIT and PAG_WRITE: 
  8447.  
  8448.     Read request is OK. 
  8449.     Write request is OK. 
  8450.  
  8451.  3. Allocation type PAG_COMMIT and PAG_EXECUTE: 
  8452.  
  8453.     Read request is OK. 
  8454.     Write request fails with a general protection exception. 
  8455.  
  8456.  4. Allocation type PAG_COMMIT and PAG_GUARD and PAG_WRITE: 
  8457.  
  8458.     Both read and write requests fail with a guard page exception. 
  8459.  
  8460.  5. Allocation type PAG_WRITE: 
  8461.  
  8462.     Both read and write requests fail with a general protection exception. 
  8463.  
  8464. The behavior seen in cases 1, 2 and 3 occurs because the 80386 processor does 
  8465. not distinguish between READ and EXECUTE access.  Furthermore, READ or EXECUTE 
  8466. access is allowed even for memory objects specified with WRITE access.  This is 
  8467. because WRITE access implies both READ and EXECUTE access.  However, WRITE 
  8468. access must be specified in order for the application to write into a memory 
  8469. object. 
  8470.  
  8471. In case 4, because the guard page bit is set, a guard page fault will always 
  8472. occur when accessing the page.  You also should have seen a second message, 
  8473. "Exception occurred handling a prior exception ". This occurs when the default 
  8474. guard page exception handler is invoked and tries to treat the area as a stack. 
  8475.  
  8476. In case 5, because the memory allocated was not committed, no physical space 
  8477. was reserved. Whenever accessing any of this memory a general protection 
  8478. exception is always raised. 
  8479.  
  8480.  
  8481. ΓòÉΓòÉΓòÉ 21.5.1. Source Code MEMLAB2.C ΓòÉΓòÉΓòÉ
  8482.  
  8483. /**********************************************************/
  8484. /**********************************************************/
  8485. /***                                                    ***/
  8486. /***  Program name: MEMLAB2.EXE                         ***/
  8487. /***                                                    ***/
  8488. /***  Created     : 7. May 1990                         ***/
  8489. /***                                                    ***/
  8490. /***  Author      : Bo Falkenberg                       ***/
  8491. /***                                                    ***/
  8492. /***  Revised     : February, 1992 by Darryl Frost      ***/
  8493. /***                                                    ***/
  8494. /***  Purpose     : To demonstrate the different types  ***/
  8495. /***                of memory allocation.               ***/
  8496. /***                                                    ***/
  8497. /***  Compile     : icc /W2 memlab2.c                   ***/
  8498. /***                                                    ***/
  8499. /***  Execute     : memlab2 (no command line parameters)***/
  8500. /***                                                    ***/
  8501. /***  Input param : 1. Amount of memory in KB           ***/
  8502. /***                2. Type of memory allocation.       ***/
  8503. /***                3. Type of memory usage             ***/
  8504. /***                                                    ***/
  8505. /**********************************************************/
  8506. /**********************************************************/
  8507.  
  8508. /**********************************************************/
  8509. /***  DEFINES                                           ***/
  8510. /**********************************************************/
  8511. #define INCL_DOSMEMMGR
  8512.  
  8513. /**********************************************************/
  8514. /***  INCLUDE                                           ***/
  8515. /**********************************************************/
  8516. #include <os2.h>
  8517. #include <stdio.h>
  8518. #include <stdlib.h>
  8519.  
  8520. /**********************************************************/
  8521. /***  FUNCTION PROTOTYPES                               ***/
  8522. /**********************************************************/
  8523. void main(int argc, char *argv[], char *envp[]);
  8524.  
  8525. /**********************************************************/
  8526. /***  MAIN PROGRAM                                      ***/
  8527. /**********************************************************/
  8528. void main(int argc, char *argv[], char *envp[])
  8529. {                        /*******************************************/
  8530.    PULONG pulBlock;      /* pointer to the starting memory location */
  8531.    ULONG ulErr;          /* error variable                          */
  8532.    ULONG ulLoop;         /* loop variable                           */
  8533.    ULONG ulAmount;       /* amount of memory to be allocated        */
  8534.    ULONG ulSelection;    /* input selection                         */
  8535.    char cLetter;         /* input char                              */
  8536.    BOOL OK = TRUE;       /* memory check indicator                  */
  8537.                          /*******************************************/
  8538.  
  8539.    setbuf(stdout, NULL);
  8540.  
  8541. /* Read the parameters                                */
  8542. /*     1. Amount of memory in KBytes to be allocated  */
  8543. /*     2. Combination of allocation flags             */
  8544. /*     3. Whether data should read from or written    */
  8545. /*        the memory.                                 */
  8546.    printf("How much memory (in KB) do you want to allocate : ");
  8547.    scanf("%u", &ulAmount);
  8548.    ulAmount = ulAmount * 1024;
  8549.  
  8550.    printf("\nWhat type of memory allocation do you want: \n");
  8551.    printf("  1. PAG_COMMIT and PAG_READ\n");
  8552.    printf("  2. PAG_COMMIT and PAG_WRITE\n");
  8553.    printf("  3. PAG_COMMIT and PAG_EXECUTE\n");
  8554.    printf("  4. PAG_COMMIT and PAG_GUARD and PAG_WRITE\n");
  8555.    printf("  5. PAG_WRITE\n");
  8556.    printf("Enter your selection (1, 2, 3, 4 or 5 ) : ");
  8557.    scanf("%u", &ulSelection);
  8558.  
  8559.    printf("\nDo you want to Read or Write in the memory (R/W) : ");
  8560.    fflush(stdin);
  8561.    scanf("%c", &cLetter);
  8562. /* Allocate the memory                                */
  8563.    switch (ulSelection)
  8564.    {
  8565.       case 1:
  8566.          ulErr = DosAllocMem ((PPVOID)&pulBlock, ulAmount,
  8567.                                PAG_COMMIT | PAG_READ);
  8568.          break;
  8569.       case 2:
  8570.          ulErr = DosAllocMem ((PPVOID)&pulBlock, ulAmount,
  8571.                                PAG_COMMIT | PAG_WRITE);
  8572.          break;
  8573.       case 3:
  8574.          ulErr = DosAllocMem ((PPVOID)&pulBlock, ulAmount,
  8575.                                PAG_COMMIT | PAG_EXECUTE);
  8576.          break;
  8577.       case 4:
  8578.          ulErr = DosAllocMem ((PPVOID)&pulBlock, ulAmount,
  8579.                                PAG_COMMIT | PAG_GUARD | PAG_WRITE);
  8580.          break;
  8581.       case 5:
  8582.          ulErr = DosAllocMem ((PPVOID)&pulBlock, ulAmount,
  8583.                                PAG_WRITE);
  8584.          break;
  8585.       default:
  8586.          printf("\nYou made a WRONG selection !!!\n");
  8587.          exit (0);
  8588.    } /* endswitch */
  8589.  
  8590.    if (ulErr != 0) {
  8591.      printf("Error in allocation : code %u\n", ulErr);
  8592.      exit(1);
  8593.    } /* endif */
  8594.  
  8595.    if (cLetter == 'W' || cLetter == 'w')
  8596.    {
  8597. /* insert data into allocated memory */
  8598.       printf("\nWriting...\n");
  8599.       for (ulLoop = 0; ulLoop < ulAmount/4; ulLoop++)
  8600.       {
  8601.          *(pulBlock + ulLoop) = 7;
  8602.       } /* endfor */
  8603.    } else
  8604.    {
  8605. /* read data from allocated memory */
  8606.       printf("\nReading...\n");
  8607.       for (ulLoop = 0; ulLoop < ulAmount/4; ulLoop++)
  8608.       {
  8609.          if (*(pulBlock + ulLoop) != 7)
  8610.          {
  8611.             OK = FALSE;
  8612.          } /* endif */
  8613.       } /* endfor */
  8614.    } /* endif */
  8615.  
  8616.    ulErr = DosFreeMem (pulBlock);
  8617.    if (ulErr != 0)
  8618.    {
  8619.      printf("\nError in freeing : code %u\n", ulErr);
  8620.    } /* endif */
  8621. }
  8622.  
  8623.  
  8624. ΓòÉΓòÉΓòÉ 21.6. Exercise 3 - Multiple DOS Sessions ΓòÉΓòÉΓòÉ
  8625.  
  8626. This exercise demonstrates how an OS/2 protected mode program may start a DOS 
  8627. program in a virtual DOS machine.  Furthermore, the growth of the swap file is 
  8628. shown, as well as the decrease in the size of the swap file after termination 
  8629. of the OS/2 program. 
  8630.  
  8631. The program used in this exercise makes use of the DosStartSession() function. 
  8632.  
  8633. In this exercise, the student is required to run the memory lab program: 
  8634.  
  8635.       MEMLAB3.EXE
  8636.  
  8637. Syntax: MEMLAB3 <no. of DOS sessions>
  8638.  
  8639. The steps in the program are as follows: 
  8640.  
  8641.  1. If a parameter is passed to the program, it will use this as the number of 
  8642.     DOS sessions to start. If no parameter is provided, four DOS sessions are 
  8643.     started. 
  8644.  
  8645.  2. The program reads a file named: MEMLAB3.PRO. 
  8646.  
  8647.     A sample MEMLAB3.PRO is shown in Sample Input File for MEMLAB3.EXE. 
  8648.  
  8649.     The file must be created using an ASCII editor such as the OS/2 V2.0 System 
  8650.     Editor and consists of three lines as follows: 
  8651.  
  8652.     a) The full path and file name of the swap file. 
  8653.     b) The name of the DOS program to be executed in each of the started 
  8654.        sessions. 
  8655.  
  8656.        In the example this is EDLIN.COM. 
  8657.     c) The parameter string which is to be passed to the DOS program. 
  8658.  
  8659.        If no parameters are to be passed, an empty line must still appear in 
  8660.        the file.  In the example this is AUTOEXEC.BAT 
  8661.  
  8662.  3. The program starts the specified number of DOS sessions, if possible, with 
  8663.     the current system resources.  Before starting any sessions, the program 
  8664.     displays the size of the swap file.  After each session is started the new 
  8665.     size of the swap file is displayed. 
  8666.  
  8667.  4. When the requested number of DOS sessions is started or the system 
  8668.     resources are exhausted, the program will wait for a keystroke in order to 
  8669.     terminate. 
  8670.  
  8671.  5. When the keystroke is received by the program all the DOS sessions are 
  8672.     terminated.  After terminating each session the swap file size is 
  8673.     displayed.  The program continues to monitor and display the swap file 
  8674.     every 10 seconds until it remains unchanged for a period of 100 seconds. 
  8675.  
  8676. The program listing is shown in Source Code MEMLAB3.C. 
  8677.  
  8678. You should perform the following steps: 
  8679.  
  8680.  1. Although MEMLAB3 does give information about the swap file size, you may 
  8681.     also want to use the SWAPSIZE program which is described in Program to 
  8682.     Display Swap File Size to monitor the changes in the size of SWAPPER.DAT. 
  8683.     If so start this program now. 
  8684.  
  8685.  2. Run the MEMLAB3 program and notice how the swap file size increases as the 
  8686.     sessions are started. 
  8687.  
  8688.  3. Terminate the program and watch the decrease in size of the swap file over 
  8689.     time. 
  8690.  
  8691. Note the 512KB steps in which the swap file size increases and decreases. 
  8692.  
  8693. If you are able to do the exercise  Please do so now. If not, refer to the 
  8694.                                     following explanation. 
  8695.  
  8696.  
  8697. ΓòÉΓòÉΓòÉ 21.7. Expected Results from Exercise 3 ΓòÉΓòÉΓòÉ
  8698.  
  8699. After successfully completing the exercise, you should see the following 
  8700. results: 
  8701.  
  8702.  The increase or decrease in the size of the swap file will always be in 
  8703.   multiples of 512KB. 
  8704.  
  8705.  If a large number of DOS sessions is specified, and a CPU-bound DOS program 
  8706.   is started in each session, a heavy system load can be observed.  This is 
  8707.   because the DOS programs continue to execute even when in background. The 
  8708.   system usage can be monitored using the PULSE application which can be found 
  8709.   in the Productivity folder of the OS/2 System Folder which appears on the 
  8710.   OS/2 Desktop. 
  8711.  
  8712. If the time is available, you may wish to experiment by starting sessions with 
  8713. a type other than DOS full screen. MEMLAB3 will accept a second parameter which 
  8714. is then used as the SessionType parameter when calling the DosStartSession 
  8715. function. 
  8716.  
  8717. Syntax: MEMLAB3 <no of sessions> <SessionType>
  8718.  
  8719. Session type may be any one of the values accepted by DosStartSession. 
  8720.  
  8721. SessionType              Type of Session 
  8722.  
  8723. 1                        OS/2 Full Screen 
  8724.  
  8725. 2                        OS/2 Windowed 
  8726.  
  8727. 3                        Presentation Manager 
  8728.  
  8729. 4                        DOS Full Screen 
  8730.  
  8731. 7                        DOS Windowed 
  8732.  
  8733. Edit the MEMLAB3.PRO file to change the name of the program to be started and 
  8734. the parameters with which it must be started. Issue the command to start 
  8735. MEMLAB3 specifying both the number of sessions to start and the session type to 
  8736. be started. 
  8737.  
  8738.  
  8739. ΓòÉΓòÉΓòÉ 21.7.1. Source Code MEMLAB3.C ΓòÉΓòÉΓòÉ
  8740.  
  8741. /**********************************************************/
  8742. /**********************************************************/
  8743. /***                                                    ***/
  8744. /***  Program name: MEMLAB3.EXE                         ***/
  8745. /***                                                    ***/
  8746. /***  Created     : 7 May, 1990                         ***/
  8747. /***                                                    ***/
  8748. /***  Author      : Bo Falkenberg                       ***/
  8749. /***                                                    ***/
  8750. /***  Revised     : February, 1992 by Darryl Frost      ***/
  8751. /***                                                    ***/
  8752. /***  Purpose     : To demonstrate multiple sessions    ***/
  8753. /***                started from a OS/2 program, and    ***/
  8754. /***                to show how the size of the swap    ***/
  8755. /***                file varies as the sessions are     ***/
  8756. /***                started and what happens to the swap***/
  8757. /***                file after the sessions are stopped.***/
  8758. /***                                                    ***/
  8759. /***  Compile     : icc /O+ /W2 memlab3.c               ***/
  8760. /***                                                    ***/
  8761. /***  Execute     : memlab3 n x                         ***/
  8762. /***                where n = the number of sessions    ***/
  8763. /***                to be started. If nothing is        ***/
  8764. /***                entered 4 sessions will be started. ***/
  8765. /***                x is the type of sessions to start. ***/
  8766. /***                By default x is equal to 4, which   ***/
  8767. /***                means full screen DOS sessions will ***/
  8768. /***                be started. x can be any of the     ***/
  8769. /***                SessionType values recognized by    ***/
  8770. /***                DosStartSession.                    ***/
  8771. /***                                                    ***/
  8772. /***  File input  : Reads file MEMLAB3.PRO which must be***/
  8773. /***                setup using an editor such as the   ***/
  8774. /***                OS/2 System Editor. The file        ***/
  8775. /***                contains three lines. The first     ***/
  8776. /***                line contains the name of the swap  ***/
  8777. /***                file including its full path. The   ***/
  8778. /***                next line contains the name of the  ***/
  8779. /***                program which is to be executed in  ***/
  8780. /***                the sessions. The path used to      ***/
  8781. /***                find the program must be included.  ***/
  8782. /***                The last line  contains the         ***/
  8783. /***                parameter string which is to be     ***/
  8784. /***                passed to the program at start-up.  ***/
  8785. /***                                                    ***/
  8786. /**********************************************************/
  8787. /**********************************************************/
  8788.  
  8789. /**********************************************************/
  8790. /***  DEFINES                                           ***/
  8791. /**********************************************************/
  8792.  #define INCL_DOS
  8793.  #define LENGTH       sizeof(buffer)
  8794.                            /* DosFindFirst returned buffer
  8795.                               size */
  8796.  #define TIMEINTERVAL 10   /* Seconds to wait when checking
  8797.                               swap file size */
  8798.  #define MAXLOOP      10   /* No of intervals with same
  8799.                               swap file size after which
  8800.                               program in terminated */
  8801.  #define NOSESS       4    /* No of Sessions to start */
  8802.  #define DOS_FULL_SCREEN 4 /* Default Session Type    */
  8803.  
  8804. /**********************************************************/
  8805. /***  INCLUDE                                           ***/
  8806. /**********************************************************/
  8807.  #include        <os2.h>
  8808.  #include        <stdio.h>
  8809.  #include        <string.h>
  8810.  #include        <stdlib.h>
  8811.  
  8812. /**********************************************************/
  8813. /***  GLOBAL VARIABLES                                  ***/
  8814. /**********************************************************/
  8815.  ULONG            SessID;      /* Session ID (returned)   */
  8816.  PID              DOSpid;      /* Process ID (returned)   */
  8817.  USHORT           rc = 0;      /* return code             */
  8818.  USHORT           frc = 0;     /* file return code        */
  8819.  struct _STARTDATA StartData;  /* start program structure */
  8820.  struct _FILEFINDBUF buffer;   /* file information struct */
  8821.  char szFname[64];
  8822.  char szProgname[64];
  8823.  char szProginp[64];
  8824.  FILE *fptr;
  8825.  PULONG pStartedSessID;
  8826.  ULONG *p;
  8827.  
  8828. /**********************************************************/
  8829. /***  FUNCTION PROTOTYPES                               ***/
  8830. /**********************************************************/
  8831.  
  8832. void main(int argc, char *argv[], char *envp[]);
  8833. void printtrouble(void);
  8834. ULONG GetSwapperSize();
  8835.  
  8836. /**********************************************************/
  8837. /***  MAIN PROGRAM                                      ***/
  8838. /**********************************************************/
  8839.  
  8840. void main(int argc, char *argv[], char *envp[])
  8841. {
  8842.    int radix = 10;
  8843.    int loop;
  8844.    int no_of_SESS;
  8845.    int sesstype;
  8846.    char Related;
  8847.    unsigned char *Title1;
  8848.    unsigned char *Title2;
  8849.    char chloop1[30];
  8850.    char chloop2[30];
  8851.    char *dummy1;
  8852.    char *dummy2;
  8853.    char *pchrc;
  8854.    ULONG sLen;
  8855.    ULONG fsize;
  8856.    ULONG ulrc;
  8857.    ULONG ulTargetOption;
  8858.    ULONG ulSessid;
  8859.    ULONG ulTimeInterval = TIMEINTERVAL * 1000;
  8860.    ULONG elapsed;
  8861.    ULONG loopflag;
  8862.    ULONG timecount;
  8863.    ULONG samecount;
  8864.    ULONG savesize;
  8865.  
  8866. /* Default no of sessions to start                        */
  8867.    no_of_SESS = NOSESS;
  8868.    sesstype = DOS_FULL_SCREEN;
  8869.  
  8870. /* Get arguments from the command line, if present        */
  8871.    if (argc >= 2)
  8872.    {
  8873. /* Number of sessions to start                            */
  8874.       no_of_SESS = atoi (argv[1]);
  8875.    }
  8876.  
  8877.    if (argc >= 3)
  8878.    {
  8879. /* Session type                                           */
  8880.       sesstype = atoi (argv[2]);
  8881.    }
  8882.  
  8883. /* Read parameters from MEMLAB3.PRO file                  */
  8884.    fptr = fopen("memlab3.pro", "r");
  8885.    if (fptr == (FILE *)NULL)
  8886.    {
  8887.       printf("\nFile MEMLAB3.PRO cannot be found\n");
  8888.       return;
  8889.    }
  8890. /* line 1 : swapper file path and filename                */
  8891.    pchrc = fgets(szFname, sizeof(szFname)-1, fptr);
  8892.    if (pchrc == (char *)NULL)
  8893.    {
  8894.       printtrouble();
  8895.       return;
  8896.    }
  8897.    szFname[strlen(szFname)-1] = '\0';
  8898. /* line 2 : name of program to start in the sessions  */
  8899.    pchrc = fgets(szProgname, sizeof(szProgname)-1, fptr);
  8900.    if (pchrc == (char *)NULL)
  8901.    {
  8902.       printtrouble();
  8903.       return;
  8904.    }
  8905.    szProgname[strlen(szProgname)-1] = '\0';
  8906. /* line 3 : parameters to be passed to the program        */
  8907.    pchrc = fgets(szProginp, sizeof(szProginp)-1, fptr);
  8908.    if (pchrc == (char *)NULL)
  8909.    {
  8910.       printtrouble();
  8911.       return;
  8912.    }
  8913.    sLen = strlen(szProginp);
  8914.    szProginp[sLen-1] = '\0';
  8915.  
  8916. /* Set up parameter block for DosStartSession             */
  8917.    StartData.PgmName = szProgname;
  8918.    StartData.PgmInputs = szProginp;
  8919.    StartData.Length = 32;
  8920.    StartData.FgBg = 1;
  8921.  
  8922.    StartData.Related = 1; /* related to parent */
  8923.  
  8924.    StartData.TermQ = NULL;
  8925.    StartData.InheritOpt = 0;
  8926.    StartData.Environment = 0;
  8927.    StartData.PgmControl = SSF_CONTROL_MINIMIZE; /* Start Minimized */
  8928.    loop = 0;
  8929.    rc = 0;
  8930.  
  8931. /* Allocate memory to save IDs of started sessions        */
  8932.    sLen = no_of_SESS * sizeof(ULONG);
  8933.    frc = DosAllocMem ((PPVOID)&pStartedSessID, sLen,
  8934.                       PAG_WRITE | PAG_READ | PAG_COMMIT );
  8935.    if (frc != 0)
  8936.    {
  8937.       printf("Memory Allocation Failure, return code %u\n",frc);
  8938.       exit (1);
  8939.    }
  8940.    p = pStartedSessID;
  8941.  
  8942.    /* Keep starting sessions, until an error occurs       */
  8943.    /* or the requested number of sessions is reached.     */
  8944.    /* Save the IDs of the started sessions.               */
  8945.    /* Display the size of the swap file before starting   */
  8946.    /* any sessions and after each session is started.     */
  8947.  
  8948.    printf("Program MEMLAB3 is executing\n");
  8949.    printf("%u sessions will be started\n", no_of_SESS);
  8950.    fsize = GetSwapperSize();
  8951.    printf("Size of SWAPPER.DAT is now %u KB\n", fsize);
  8952.    while (!rc && loop < no_of_SESS)
  8953.    {
  8954.       loop++;
  8955.       StartData.SessionType = sesstype; /* session type       */
  8956.                                  /* make the program title    */
  8957.       Title1 = ". SESS\n\0";      /* with a session number */
  8958.       dummy1 = _itoa(loop,  chloop1, radix);
  8959.       strcat (dummy1, Title1);
  8960.       StartData.PgmTitle = dummy1;
  8961.  
  8962.       rc = DosStartSession(&StartData, &SessID, &DOSpid);
  8963.       if (rc == 0)
  8964.       {
  8965.          printf("Session no %u is started; Session ID: %u\n",
  8966.                 loop, SessID);
  8967.          fsize = GetSwapperSize();
  8968.          printf("Size of SWAPPER.DAT is now %u KB\n", fsize);
  8969.          *p++ = SessID;
  8970.        } else
  8971.        {
  8972.          printf("An error occurred starting Session no %u\n", loop);
  8973.          printf("Return code from DosStartSession = %u\n", rc);
  8974.          loop = no_of_SESS;
  8975.        } /* endif */
  8976.    } /* endwhile */
  8977.  
  8978. /* Wait for a key on the keyboard to be depressed, then   */
  8979. /* terminate the sessions. Display the swap file size */
  8980. /* after each session is terminated.                      */
  8981.    printf("Press <Enter> to terminate the Sessions...");
  8982.    fflush(stdout);
  8983.    loop = getchar();  /*wait for input */
  8984.    p = pStartedSessID;
  8985.    for (loop = 1; loop <= no_of_SESS; loop++)
  8986.    {
  8987.       ulSessid = *p++;
  8988.       ulTargetOption = 0;
  8989.       ulrc = DosStopSession (ulTargetOption, ulSessid);
  8990.       if (ulrc == 0)
  8991.       {
  8992.          printf("Session with ID %u has been stopped\n", ulSessid);
  8993.  
  8994.          fsize = GetSwapperSize();
  8995.          printf("Size of SWAPPER.DAT is now %u KB\n", fsize);
  8996.       }
  8997.    }
  8998.  
  8999. /* Monitor the swap file size and display it at intervals */
  9000. /* of TIMEINTERVAL seconds. When the size has remained    */
  9001. /* constant for TIMEINTERVAL * MAXLOOP seconds, terminate */
  9002. /* the program.                                           */
  9003.    loopflag = TRUE;
  9004.    savesize = fsize;
  9005.    timecount = 1;
  9006.    while (loopflag)
  9007.    {
  9008.       ulrc = DosSleep(ulTimeInterval);
  9009.       elapsed = timecount * TIMEINTERVAL;
  9010.       printf("Elapsed time since closing DOS sessions is %u seconds\n",
  9011.              elapsed);
  9012.       fsize = GetSwapperSize();
  9013.       printf("Size of SWAPPER.DAT is now %u KB\n", fsize);
  9014.       timecount++;
  9015.       samecount++;
  9016.       if ( fsize != savesize)
  9017.       {
  9018.          savesize = fsize;
  9019.          samecount = 0;
  9020.       }
  9021.       if (samecount == MAXLOOP - 1)
  9022.       {
  9023.          elapsed = MAXLOOP * TIMEINTERVAL;
  9024.          printf("No change in SWAPPER.DAT size for %u seconds\n"
  9025.                 "Program in terminating\n",elapsed);
  9026.          loopflag = FALSE;
  9027.       }
  9028.  
  9029.    }
  9030.    exit(0);
  9031. }
  9032.  
  9033. /* Function to report errors with MEMLAB3.PRO             */
  9034. void printtrouble(void)
  9035. {
  9036.    printf("\nSorry, trouble reading MEMLAB3.PRO\n");
  9037.    fclose(fptr);
  9038.    return;
  9039. }
  9040.  
  9041. /* Function which returns swap file size in KB            */
  9042. ULONG GetSwapperSize ()
  9043. {
  9044.    HDIR fhandle;
  9045.    unsigned LONG count;
  9046.    int fsize;
  9047.  
  9048.    count = 1;
  9049.    fhandle = 0xFFFF;
  9050.    frc = DosFindFirst (szFname, &fhandle, 0, &buffer, LENGTH,
  9051.                        &count, 1L);
  9052.    if (frc != 0)
  9053.    {
  9054.       fflush(stdout);
  9055.       printf("File error :%u\n", frc);
  9056.       exit(0);
  9057.    } /* endif */
  9058.    fsize = buffer.cbFileAlloc / 1024;  /* in KBytes */
  9059.    DosFindClose (fhandle);
  9060.    return(fsize);
  9061. }
  9062.  
  9063.  
  9064. ΓòÉΓòÉΓòÉ 21.7.2. Sample Input File for MEMLAB3.EXE ΓòÉΓòÉΓòÉ
  9065.  
  9066. The file, MEMLAB3.PRO, must appear in a directory accessible to MEMLAB3.EXE 
  9067. when it is executed. 
  9068.  
  9069. C:\OS2\SYSTEM\swapper.dat
  9070. C:\os2\mdos\edlin.com
  9071. C:\autoexec.bat
  9072.  
  9073.  
  9074. ΓòÉΓòÉΓòÉ 21.8. Exercise 4 - Multiple Threads ΓòÉΓòÉΓòÉ
  9075.  
  9076. This exercise demonstrates that an OS/2 program can start a very large number 
  9077. of threads (up to a maximum of 4096, minus those threads the system has already 
  9078. started). The program makes use of C Set/2 _beginthread function. 
  9079.  
  9080. In this exercise, the student is required to run the memory lab program: 
  9081.  
  9082.            MEMLAB4.exe
  9083.  
  9084. Syntax: MEMLAB4 <number of threads>
  9085.  
  9086. If number of threads is not entered, ten (10) is assumed. 
  9087.  
  9088. This program does the following: 
  9089.  
  9090.  1. Starts the specified number of threads. 
  9091.  
  9092.     Each thread is very simple; it merely issues a DosSleep() function call and 
  9093.     an occasional write to screen.  This is in order that all threads may start 
  9094.     within a reasonable time frame. 
  9095.  
  9096.     For practical reasons, do not try to start more than 200 threads. 
  9097.  
  9098.  2. When all the threads are started, the program waits for keyboard input. 
  9099.  
  9100.     At this time we suggest you issue the PSTAT command from an OS/2 Command 
  9101.     Prompt.  Use the "\C" option.  This displays a list of all processes and 
  9102.     threads open in the system. You can also see the number of threads in use 
  9103.     for system functions. 
  9104.  
  9105.  3. When the program receives a keystroke, it sets a flag to request the 
  9106.     threads to terminate.  When all started threads have terminated, the 
  9107.     program exits. 
  9108.  
  9109. The program listing is shown in Source Code MEMLAB4.C. 
  9110.  
  9111. If you are able to do the exercise  Please do so now. If not, refer to the 
  9112.                                     following explanation. 
  9113.  
  9114. The following error message may be generated: 
  9115.  
  9116. DosCreateThread error = 164. 
  9117.  
  9118. This typically occurs when the maximum allowed number of threads specified in 
  9119. CONFIG.SYS is less than the number of threads requested. 
  9120.  
  9121. Note:   Remember that the specified number of threads in the CONFIG.SYS file 
  9122. includes threads used by the operating system.  This amounts to approximately 
  9123. 22 threads. 
  9124.  
  9125. If the required number of threads cannot be started, check the CONFIG.SYS file. 
  9126. This file contains a specification for the maximum number of threads allowed in 
  9127. the system.  Increase the threads command to: THREADS = 4095, and re-IPL the 
  9128. system. 
  9129.  
  9130.  
  9131. ΓòÉΓòÉΓòÉ 21.9. Expected Results From Exercise 4 ΓòÉΓòÉΓòÉ
  9132.  
  9133. After successfully completing the exercise, you will observe the following 
  9134. results: 
  9135.  
  9136.  The number of threads per process is not limited to 53 as in previous 
  9137.   versions of OS/2. 
  9138.  
  9139.  The maximum number of threads system wide is increased to 4096 threads. 
  9140.  
  9141.  
  9142. ΓòÉΓòÉΓòÉ 21.9.1. Source Code MEMLAB4.C ΓòÉΓòÉΓòÉ
  9143.  
  9144. /**********************************************************/
  9145. /**********************************************************/
  9146. /***                                                    ***/
  9147. /***  Program name: MEMLAB4.EXE                         ***/
  9148. /***                                                    ***/
  9149. /***  Created     : 7 May, 1990                         ***/
  9150. /***                                                    ***/
  9151. /***  Author      : Bo Falkenberg                       ***/
  9152. /***                                                    ***/
  9153. /***  Revised     : February, 1992 by Darryl Frost      ***/
  9154. /***                                                    ***/
  9155. /***  Purpose     : To demonstrate the new system       ***/
  9156. /***                limit for the number of threads     ***/
  9157. /***                per process in OS/2 2.0 and the     ***/
  9158. /***                effect of thread creation on the    ***/
  9159. /***                growth of SWAPPER.DAT.              ***/
  9160. /***                                                    ***/
  9161. /***  Compile     : icc /W2 /Gm+ memlab4.c              ***/
  9162. /***                                                    ***/
  9163. /***  Execute     : memlab4 n f                         ***/
  9164. /***                where n is the number of secondary  ***/
  9165. /***                threads the program must create,    ***/
  9166. /***                and f if present and 0 (zero) causes***/
  9167. /***                the created threads to terminate    ***/
  9168. /***                after 40 seconds else the threads   ***/
  9169. /***                after 40 seconds enter a wait and   ***/
  9170. /***                print loop. The wait time is        ***/
  9171. /***                randomly determined. If n is not    ***/
  9172. /***                specified 10 is assumed.
  9173. /***                                                    ***/
  9174. /**********************************************************/
  9175. /**********************************************************/
  9176.  
  9177.  
  9178.  
  9179. /**********************************************************/
  9180. /***  DEFINES                                           ***/
  9181. /**********************************************************/
  9182. #define INCL_DOS
  9183. #define INCL_DOSPROCESS
  9184.  
  9185.  
  9186. /**********************************************************/
  9187. /***  INCLUDE                                           ***/
  9188. /**********************************************************/
  9189. #include <os2.h>
  9190. #include <stdio.h>
  9191. #include <stdlib.h>
  9192.  
  9193. void _Optlink NewThread( PVOID pThreadArg ); /* procedure declaration */
  9194.  
  9195. BOOL loopflag = TRUE;
  9196. int threadcount = 0;
  9197.  
  9198. /**********************************************************/
  9199. /***  MAIN PROGRAM                                      ***/
  9200. /**********************************************************/
  9201. main( int argc, char *argv[], char *envp[] )
  9202. {                                         /*************************/
  9203.   TID       ThreadID;                     /* thread identification */
  9204.   ULONG     ulThreadArg;                  /* thread arguments      */
  9205.   ULONG     ulThreadFlags;                /* thread flags          */
  9206.   ULONG     ulStack_size;                 /* thread stack size     */
  9207.   int       no_of_threads;                /* number of threads     */
  9208.   int       i;                            /* loop variable         */
  9209.                                           /*************************/
  9210.  
  9211.   ulThreadFlags = 0;          /* start thread immediately   */
  9212.   ulStack_size  = 1024;       /* give stack size in bytes   */
  9213.   ulThreadArg   = 1;
  9214.  
  9215.    if (argc < 2)
  9216.       {
  9217.          no_of_threads = 10;
  9218.       } else
  9219.       {
  9220.          no_of_threads    = atoi(argv[1]);
  9221.       }
  9222.   if (argc > 2)
  9223.   {
  9224.      if (*argv[2]=='0')
  9225.         loopflag = FALSE;
  9226.   }
  9227.  
  9228.   for (i = 1; i < no_of_threads+1; i++)
  9229.   {
  9230.     if ( ( ThreadID = _beginthread( NewThread, NULL, ulStack_size, (PVOID)i ) ) == -1 )
  9231.     {
  9232.       printf("_beginthread error\n");
  9233.       exit (1);
  9234.     }
  9235.     printf("Thread number %d created\n",i);
  9236.   }
  9237.  
  9238.   printf("To end the program press <CR> \n");
  9239.   getchar();
  9240.   loopflag = FALSE;
  9241.   printf("MEMLAB4 terminating\n");
  9242. /* Wait for all the threads to stop */
  9243.   while (TRUE)
  9244.   {
  9245.      DosSleep(1000);
  9246.      DosEnterCritSec();
  9247.      if(threadcount == 0){
  9248.         DosExitCritSec();
  9249.         printf("All threads stopped, program is terminated\n");
  9250.         exit (1);
  9251.      }
  9252.      DosExitCritSec();
  9253.   }
  9254. }
  9255.  
  9256. /**********************************************************/
  9257. /***  THREAD                                            ***/
  9258. /**********************************************************/
  9259. void NewThread( PVOID pThreadArg )
  9260.    {
  9261.    ULONG ulThreadArg = ( ULONG )pThreadArg;
  9262.  
  9263.    DosEnterCritSec();
  9264.    threadcount++;
  9265.    DosExitCritSec();
  9266.  
  9267.    printf( "Thread %u has started\n", ulThreadArg );
  9268.    srand( (int)ulThreadArg); /* seed random generator */
  9269.    DosSleep ( 40000 );       /* 40 SEC. sleep interval */
  9270.  
  9271.    while (loopflag)
  9272.       {
  9273.       printf("Thread %d just woke up\n", ulThreadArg);
  9274.       DosSleep ( rand() ); /* random sleep interval */
  9275.       }
  9276.  
  9277.    DosEnterCritSec();
  9278.    threadcount--;
  9279.    DosExitCritSec();
  9280.    }
  9281.  
  9282.  
  9283. ΓòÉΓòÉΓòÉ 21.10. Program to Display Swap File Size ΓòÉΓòÉΓòÉ
  9284.  
  9285. Listed below is a small program, SWAPSIZE, which may be used to monitor the 
  9286. size of SWAPPER.DAT. The size is displayed in a PM window. The size of 
  9287. SWAPPER.DAT is queried every 10 seconds and the display updated when the size 
  9288. changes. The sampling interval can be changed to either 30 seconds or 60 
  9289. seconds by selecting the Interval action bar. By default the program assumes 
  9290. the swap file to be C:\OS2\SYSTEM\SWAPPER.DAT. If this is not the case then 
  9291. when executing SWAPSIZE a command line parameter must be included which gives 
  9292. the full path and file name of the swap file. 
  9293.  
  9294.  
  9295. ΓòÉΓòÉΓòÉ 21.10.1. Source Code SWAPSIZE.C ΓòÉΓòÉΓòÉ
  9296.  
  9297. /**********************************************************/
  9298. /**********************************************************/
  9299. /***                                                    ***/
  9300. /***  Program name: SWAPSIZE.EXE                        ***/
  9301. /***                                                    ***/
  9302. /***  Created     : February, 1992                      ***/
  9303. /***                                                    ***/
  9304. /***  Revised     :                                     ***/
  9305. /***                                                    ***/
  9306. /***  Author      : Darryl Frost                        ***/
  9307. /***                                                    ***/
  9308. /***  Purpose     : To be used with the Lab Session     ***/
  9309. /***                Examples given in Appendix C of the ***/
  9310. /***                OS/2 Version 2.0 Volume 1: Control  ***/
  9311. /***                Program Document no GG24-3730.      ***/
  9312. /***                This program interrogates and       ***/
  9313. /***                displays the size of the            ***/
  9314. /***                SWAPPER.DAT at regular intervals    ***/
  9315. /***                in a PM window. The interval is     ***/
  9316. /***                initially set to 10 seconds. This   ***/
  9317. /***                may be changed to 30 seconds or     ***/
  9318. /***                60 seconds by selecting the         ***/
  9319. /***                Interval action bar.                ***/
  9320. /***                                                    ***/
  9321. /***  Parameter   : If the path of SWAPPER.DAT is other ***/
  9322. /***                than C:\OS2\SYSTEM, the full path   ***/
  9323. /***                and file name of the swapper file   ***/
  9324. /***                must be the first parameter passed  ***/
  9325. /***                to the progam when it is started.   ***/
  9326. /***                                                    ***/
  9327. /**********************************************************/
  9328. /**********************************************************/
  9329. #define INCL_WIN
  9330. #define INCL_GPI
  9331.  
  9332. #include <os2.h>                        /* PM header file               */
  9333. #include <string.h>
  9334. #include <stdlib.h>
  9335. #include "swapsize.h"                   /* Resource symbolic identifiers*/
  9336.  
  9337. #define STRINGLENGTH 20                 /* Length of string             */
  9338.  
  9339. /************************************************************************/
  9340. /* Function prototypes                                                  */
  9341. /************************************************************************/
  9342. INT main(int argc, char *argv[], char *envp[] );
  9343. VOID AbortSS(HWND hwndFrame,HWND hwndClient);
  9344. MRESULT EXPENTRY SSWindowProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
  9345. ULONG GetSwapperSize (void);
  9346.                                         /* Define parameters by type    */
  9347. HAB  hab;                               /* PM anchor block handle       */
  9348. HWND hwndClient=0L;                     /* Client area window handle    */
  9349. HWND hwndFrame=0L;                      /* Frame window handle          */
  9350. CHAR *szString;                         /* procedure.                   */
  9351. PSZ  pszErrMsg;
  9352. char szFname[64] = "C:\\OS2\\SYSTEM\\SWAPPER.DAT";
  9353. ULONG swapsize;
  9354. ULONG oldswapsize;
  9355. ULONG timerinterval = 10 * 1000;
  9356. ULONG idTimer = 1;
  9357.  
  9358. /******************************************************************************/
  9359. /*                                                                            */
  9360. /* MAIN initializes the process for OS/2 PM services, and processes the       */
  9361. /* application message queue until a WM_QUIT message is received. It          */
  9362. /* then destroys all OS/2 PM resources and terminates.                        */
  9363. /*                                                                            */
  9364. /******************************************************************************/
  9365. INT main (int argc, char *argv[], char *envp[])
  9366. {
  9367.   HMQ  hmq;                             /* Message queue handle         */
  9368.   QMSG qmsg;                            /* Message from message queue   */
  9369.   ULONG flCreate;                       /* Window creation control flags*/
  9370.  
  9371.   if ( argc >= 2 ) {
  9372.      strcpy( szFname, argv[1] );
  9373.   }
  9374.  
  9375.   if ((hab = WinInitialize(0)) == 0L) /* Initialize PM     */
  9376.      AbortSS(hwndFrame, hwndClient); /* Terminate the application    */
  9377.  
  9378.   if ((hmq = WinCreateMsgQueue( hab, 0 )) == 0L)/* Create a msg queue */
  9379.      AbortSS(hwndFrame, hwndClient); /* Terminate the application    */
  9380.  
  9381.   if (!WinRegisterClass(                /* Register window class        */
  9382.      hab,                               /* Anchor block handle          */
  9383.      (PSZ)"SSWindow",                   /* Window class name            */
  9384.      (PFNWP)SSWindowProc,               /* Address of window procedure  */
  9385.      CS_SIZEREDRAW,                     /* Class style                  */
  9386.      0                                  /* No extra window words        */
  9387.      ))
  9388.      AbortSS(hwndFrame, hwndClient); /* Terminate the application    */
  9389.  
  9390.    flCreate = FCF_STANDARD &            /* Set frame control flags to   */
  9391.              ~FCF_SHELLPOSITION &       /* standard except for shell    */
  9392.              ~FCF_ACCELTABLE;           /* positioning.                 */
  9393.  
  9394.   if ((hwndFrame = WinCreateStdWindow(
  9395.                HWND_DESKTOP,            /* Desktop window is parent     */
  9396.                0,                       /* STD. window styles           */
  9397.                &flCreate,               /* Frame control flag           */
  9398.                "SSWindow",              /* Client window class name     */
  9399.                "",                      /* Window text                  */
  9400.                0,                       /* No special class style       */
  9401.                (HMODULE)0L,             /* Resource is in .EXE file     */
  9402.                ID_WINDOW,               /* Frame window identifier      */
  9403.                &hwndClient              /* Client window handle         */
  9404.                )) == 0L)
  9405.      AbortSS(hwndFrame, hwndClient); /* Terminate the application    */
  9406.  
  9407.   WinSetWindowText(hwndFrame, "Swapper Size");
  9408.  
  9409.   if (!WinSetWindowPos( hwndFrame,      /* Shows and activates frame    */
  9410.                    HWND_TOP,            /* window at position 100, 100, */
  9411.                    100, 100, 180, 100,  /* and size 180, 100.           */
  9412.                    SWP_SIZE | SWP_MOVE | SWP_ACTIVATE | SWP_SHOW
  9413.                  ))
  9414.      AbortSS(hwndFrame, hwndClient); /* Terminate the application    */
  9415.  
  9416. /************************************************************************/
  9417. /* Get and dispatch messages from the application message queue         */
  9418. /* until WinGetMsg returns FALSE, indicating a WM_QUIT message.         */
  9419. /************************************************************************/
  9420.  
  9421.   while( WinGetMsg( hab, &qmsg, 0L, 0, 0 ) )
  9422.     WinDispatchMsg( hab, &qmsg );
  9423.   WinDestroyWindow(hwndFrame);           /* Tidy up...                   */
  9424.   WinDestroyMsgQueue( hmq );             /* Tidy up...                   */
  9425.   WinTerminate( hab );                   /* Terminate the application    */
  9426. } /* End of main */
  9427.  
  9428. /******************************************************************************/
  9429. /*                                                                            */
  9430. /*  SSWINDOWPROC is the window procedure which continuously monitors the size */
  9431. /*  of the swap file and displays the size in the client area.                */
  9432. /*                                                                            */
  9433. /******************************************************************************/
  9434. MRESULT EXPENTRY SSWindowProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
  9435. {
  9436.  
  9437.   switch( msg )
  9438.   {
  9439.     case WM_CREATE:
  9440.       swapsize = GetSwapperSize();
  9441.  
  9442.       oldswapsize = swapsize;
  9443.       WinStartTimer(hab, hwnd, idTimer, timerinterval);
  9444.       break;
  9445.  
  9446.     case WM_COMMAND:
  9447.       {
  9448.       USHORT command;                   /* WM_COMMAND command value     */
  9449.       command = SHORT1FROMMP(mp1);      /* Extract the command value    */
  9450.       switch (command)
  9451.       {
  9452.         case ID_10SECS:
  9453.           timerinterval = 10 * 1000;
  9454.           WinCheckMenuItem(WinWindowFromID(hwndFrame,FID_MENU),
  9455.                            ID_10SECS, TRUE);
  9456.           WinCheckMenuItem(WinWindowFromID(hwndFrame,FID_MENU),
  9457.                            ID_30SECS, FALSE);
  9458.           WinCheckMenuItem(WinWindowFromID(hwndFrame,FID_MENU),
  9459.                            ID_60SECS, FALSE);
  9460.           WinStartTimer(hab, hwnd, idTimer, timerinterval);
  9461.           break;
  9462.         case ID_30SECS:
  9463.           timerinterval = 30 * 1000;
  9464.           WinCheckMenuItem(WinWindowFromID(hwndFrame,FID_MENU),
  9465.                            ID_10SECS, FALSE);
  9466.           WinCheckMenuItem(WinWindowFromID(hwndFrame,FID_MENU),
  9467.                            ID_30SECS, TRUE);
  9468.           WinCheckMenuItem(WinWindowFromID(hwndFrame,FID_MENU),
  9469.                            ID_60SECS, FALSE);
  9470.           WinStartTimer(hab, hwnd, idTimer, timerinterval);
  9471.           break;
  9472.         case ID_60SECS:
  9473.           timerinterval = 60 * 1000;
  9474.           WinCheckMenuItem(WinWindowFromID(hwndFrame,FID_MENU),
  9475.                            ID_10SECS, FALSE);
  9476.           WinCheckMenuItem(WinWindowFromID(hwndFrame,FID_MENU),
  9477.                            ID_30SECS, FALSE);
  9478.           WinCheckMenuItem(WinWindowFromID(hwndFrame,FID_MENU),
  9479.                            ID_60SECS, TRUE);
  9480.           WinStartTimer(hab, hwnd, idTimer, timerinterval);
  9481.           break;
  9482.         default:
  9483.           return WinDefWindowProc( hwnd, msg, mp1, mp2 );
  9484.       }
  9485.       break;
  9486.       }
  9487.    case WM_TIMER:
  9488.       swapsize = GetSwapperSize();
  9489.       if (swapsize==0) {
  9490.          WinMessageBox(HWND_DESKTOP,         /* Parent window is desk top */
  9491.             hwndFrame,            /* Owner window is our frame */
  9492.             "Cannot locate the Swapper File, Check your parameter.",
  9493.             "Error Msg",          /* Title bar message         */
  9494.             MSGBOXID,             /* Message identifier        */
  9495.             MB_MOVEABLE | MB_CUACRITICAL | MB_CANCEL ); /* Flags */
  9496.          WinPostMsg( hwnd, WM_CLOSE, (MPARAM)0,(MPARAM)0 );
  9497.       }
  9498.       if (swapsize != oldswapsize)
  9499.       {
  9500.          oldswapsize = swapsize;
  9501.          WinInvalidateRect( hwnd, (PRECTL)NULL, FALSE);
  9502.       }
  9503.       break;
  9504.     case WM_ERASEBACKGROUND:
  9505.       /******************************************************************/
  9506.       /* Return TRUE to request PM to paint the window background       */
  9507.       /* in SYSCLR_WINDOW.                                              */
  9508.       /******************************************************************/
  9509.       return (MRESULT)( TRUE );
  9510.     case WM_PAINT:
  9511.       /******************************************************************/
  9512.       /* Window contents are drawn here in WM_PAINT processing.         */
  9513.       /******************************************************************/
  9514.       {
  9515.       HPS    hps;                       /* Presentation Space handle    */
  9516.       RECTL  rc;                        /* Rectangle coordinates        */
  9517.       POINTL pt;                        /* String screen coordinates    */
  9518.                                         /* Create a presentation space  */
  9519.       char   buffer[STRINGLENGTH];
  9520.       char   temp[STRINGLENGTH];
  9521.       int len;
  9522.  
  9523.       hps = WinBeginPaint( hwnd, 0L, &rc );
  9524.       pt.x = 50; pt.y = 20;             /* Set the text coordinates,    */
  9525.       GpiSetColor( hps, CLR_NEUTRAL );         /* colour of the text,   */
  9526.       GpiSetBackColor( hps, CLR_BACKGROUND );  /* its background and    */
  9527.       GpiSetBackMix( hps, BM_OVERPAINT );      /* how it mixes,         */
  9528.                                                /* and draw the string...*/
  9529.       WinFillRect( hps, &rc, CLR_BACKGROUND );
  9530.       szString = _ltoa (swapsize, buffer, 10);
  9531.       if ((len=strlen(buffer)) > 3) {
  9532.          memcpy(temp, buffer, len+1);
  9533.          memcpy(buffer, temp, len-3);
  9534.          buffer[len-3] = ' ';
  9535.          strcpy(&buffer[len-2], &temp[len-3]);
  9536.          }
  9537.  
  9538.       strcat( szString, " KB");
  9539.       GpiCharStringAt( hps, &pt, (LONG)strlen( szString ), szString );
  9540.       WinEndPaint( hps );                      /* Drawing is complete   */
  9541.       break;
  9542.       }
  9543.     case WM_CLOSE:
  9544.       /******************************************************************/
  9545.       /* This is the place to put your termination routines             */
  9546.       /******************************************************************/
  9547.       WinStopTimer( hab, hwnd, idTimer);
  9548.       WinPostMsg( hwnd, WM_QUIT, (MPARAM)0,(MPARAM)0 );/* Cause termination*/
  9549.       break;
  9550.     default:
  9551.       /******************************************************************/
  9552.       /* Everything else comes here.  This call MUST exist              */
  9553.       /* in your window procedure.                                      */
  9554.       /******************************************************************/
  9555.  
  9556.       return WinDefWindowProc( hwnd, msg, mp1, mp2 );
  9557.   }
  9558.   return (MRESULT)FALSE;
  9559. } /* End of MyWindowProc */
  9560.  
  9561. /**************************************************************************/
  9562. /* AbortSS    -- report an error returned from an API service.            */
  9563. /*                                                                        */
  9564. /* The error message is displayed using a message box and the program     */
  9565. /* exit will be affected with the error status of 1.                      */
  9566. /**************************************************************************/
  9567. VOID AbortSS(HWND hwndFrame,HWND hwndClient)
  9568. {
  9569. PERRINFO  pErrInfoBlk;
  9570. PSZ       pszOffSet;
  9571. void      stdprint(void);
  9572.  
  9573.       DosBeep(100,10);
  9574.       if ((pErrInfoBlk = WinGetErrorInfo(hab)) != (PERRINFO)NULL)
  9575.       {
  9576.       pszOffSet = ((PSZ)pErrInfoBlk) + pErrInfoBlk->offaoffszMsg;
  9577.       pszErrMsg = ((PSZ)pErrInfoBlk) + *((PSHORT)pszOffSet);
  9578.       if((INT)hwndFrame && (INT)hwndClient)
  9579.          WinMessageBox(HWND_DESKTOP,         /* Parent window is desk top */
  9580.                        hwndFrame,            /* Owner window is our frame */
  9581.                        (PSZ)pszErrMsg,       /* PMWIN Error message       */
  9582.                        "Error Msg",          /* Title bar message         */
  9583.                        MSGBOXID,             /* Message identifier        */
  9584.                        MB_MOVEABLE | MB_CUACRITICAL | MB_CANCEL ); /* Flags */
  9585.       WinFreeErrorInfo(pErrInfoBlk);
  9586.       }
  9587.       WinPostMsg(hwndClient, WM_QUIT, (MPARAM)0, (MPARAM)0);
  9588. } /* End of AbortSS */
  9589. /* Function which returns swap file size in KB            */
  9590. ULONG GetSwapperSize ()
  9591. {
  9592.    HDIR fhandle;
  9593.    unsigned LONG count;
  9594.    int fsize;
  9595.    USHORT frc;
  9596.    FILEFINDBUF buffer;   /* file information struct */
  9597.  
  9598.    count = 1;
  9599.    fhandle = 0xFFFF;
  9600.    frc = DosFindFirst
  9601.      (szFname, &fhandle, 0, &buffer, sizeof(buffer),                       &count, 1L);
  9602.    if (frc != 0){
  9603.       return(0L);
  9604.    } /* endif */
  9605.    fsize = buffer.cbFileAlloc / 1024;  /* in KBytes */
  9606.    DosFindClose (fhandle);
  9607.    return((ULONG)fsize);
  9608. }
  9609.  
  9610.  
  9611. ΓòÉΓòÉΓòÉ 21.10.2. Include File SWAPSIZE.H ΓòÉΓòÉΓòÉ
  9612.  
  9613. #pragma linkage (main,optlink)
  9614. #define MSGBOXID    1001
  9615.  
  9616. #define ID_WINDOW   256
  9617.  
  9618. #define ID_INTERVAL  257
  9619. #define ID_10SECS  258
  9620. #define ID_30SECS  259
  9621. #define ID_60SECS  260
  9622.  
  9623.  
  9624. ΓòÉΓòÉΓòÉ 21.10.3. Resource File Source SWAPSIZE.RC ΓòÉΓòÉΓòÉ
  9625.  
  9626. #include <os2.h>
  9627. #include "swapsize.h"
  9628.  
  9629. ICON    ID_WINDOW swapsize.ico
  9630.  
  9631. MENU    ID_WINDOW PRELOAD
  9632. BEGIN
  9633.   SUBMENU "~Interval", ID_INTERVAL  BEGIN
  9634.     MENUITEM "10 Seconds", ID_10SECS, MIS_TEXT ,MIA_CHECKED
  9635.     MENUITEM "30 Seconds", ID_30SECS, MIS_TEXT
  9636.     MENUITEM "60 Seconds", ID_60SECS, MIS_TEXT
  9637.   END
  9638. END
  9639.  
  9640.  
  9641. ΓòÉΓòÉΓòÉ 21.10.4. MAKE File SWAPSIZE.MAK ΓòÉΓòÉΓòÉ
  9642.  
  9643. #=================================================================
  9644. #
  9645. #   Sample application makefile,common definitions for the IBM C
  9646. #   compiler environment
  9647. #=================================================================
  9648. #=================================================================
  9649. # Default compilation macros for sample programs
  9650. #
  9651. # Compile switchs  that are enabled
  9652. # /c      compile don't link
  9653. # /Gm+    use the multi-threaded libraries
  9654. # /ss     allow  "//" for comment lines
  9655. # /Ms     use the system calling convention and not optilink as
  9656. #         the default
  9657. # /Gd-    Disable optimization
  9658. # /Se     allow cset  extensions
  9659. #
  9660. #      accordingly.
  9661. #
  9662.  
  9663. CC         = icc /c /Gd- /Se /Re /ss /Ms /Gm+
  9664.  
  9665.  
  9666. AFLAGS  = /Mx -t -z
  9667. ASM     = ml /c /Zm
  9668. LFLAGS   = /NOE /NOD /ALIGN:16 /EXEPACK /M /De
  9669. LINK    = LINK386  $(LFLAGS)
  9670. LIBS    = DDE4MBS + OS2386
  9671. STLIBS  = DDE4SBS + OS2386
  9672. MTLIBS  = DDE4MBS + DDE4MBM  + os2386
  9673. DLLLIBS = DDE4NBS + os2386
  9674. VLIBS   = DDE4SBS + vdh + os2386
  9675.  
  9676. .c.lst:
  9677.     $(CC) -Fc$*.lst -Fo$*.obj $*.c
  9678.  
  9679. .c.obj:
  9680.     $(CC) -Fo$*.obj $*.c
  9681.  
  9682. .rc.res:
  9683.         rc -r -p -x $*.rc
  9684.  
  9685. HEADERS = swapsize.h
  9686.  
  9687. #-----------------------------------------------------------------
  9688. #   A list of all of the object files
  9689. #-----------------------------------------------------------------
  9690. ALL_OBJ1 = swapsize.obj
  9691.  
  9692.  
  9693. all: swapsize.exe
  9694.  
  9695.  
  9696. swapsize.l: swapsize.mak
  9697.     echo $(ALL_OBJ1)            > swapsize.l
  9698.     echo swapsize.exe           >> swapsize.l
  9699.     echo swapsize.map           >> swapsize.l
  9700.     echo $(LIBS)                >> swapsize.l
  9701.     echo swapsize.def           >> swapsize.l
  9702.  
  9703.  
  9704.  
  9705.  
  9706. swapsize.res: swapsize.rc swapsize.ico swapsize.h
  9707.  
  9708. swapsize.obj: swapsize.c $(HEADERS)
  9709.  
  9710. swapsize.exe: $(ALL_OBJ1)  swapsize.def swapsize.l swapsize.res
  9711.     $(LINK) @swapsize.l
  9712.     rc swapsize.res swapsize.exe
  9713.  
  9714.  
  9715. ΓòÉΓòÉΓòÉ 21.10.5. Module Definition File SWAPSIZE.DEF ΓòÉΓòÉΓòÉ
  9716.  
  9717. NAME    SWAPSIZE WINDOWAPI
  9718.  
  9719. DESCRIPTION 'OS/2 2.0 Control Program Labs SWAPSIZE Program'
  9720.  
  9721. STUB    'OS2STUB.EXE'
  9722.  
  9723. DATA    MULTIPLE
  9724.  
  9725. STACKSIZE   8192
  9726. HEAPSIZE    4096
  9727.  
  9728. PROTMODE
  9729.  
  9730.  
  9731. ΓòÉΓòÉΓòÉ 21.10.6. Linkage Parameters SWAPSIZE.L ΓòÉΓòÉΓòÉ
  9732.  
  9733. swapsize.obj
  9734. swapsize.exe
  9735. swapsize.map
  9736. DDE4MBS + OS2386
  9737. swapsize.def
  9738.  
  9739.  
  9740. ΓòÉΓòÉΓòÉ 22. Glossary ΓòÉΓòÉΓòÉ
  9741.  
  9742.  
  9743. ΓòÉΓòÉΓòÉ 22.1. address conversion ΓòÉΓòÉΓòÉ
  9744.  
  9745. address conversion 
  9746.  
  9747. The process of converting a 0:32 memory reference to the 16:16 addressing 
  9748. scheme, and vice versa. 
  9749.  
  9750.  
  9751. ΓòÉΓòÉΓòÉ 22.2. address translation ΓòÉΓòÉΓòÉ
  9752.  
  9753. address translation 
  9754.  
  9755. (1) The process of resolving a 0:32 memory reference into a physical memory 
  9756. address.  When using the paged memory option in the 80386 processor, a memory 
  9757. pointer passed by an application consists of Page Directory and Page Table 
  9758. entries, and an offset within a physical page.  This is resolved by the 
  9759. processor into a 32-bit physical memory address.  The validity and legality of 
  9760. the memory reference is also checked during the translation process, and a 
  9761. general protection exception is generated if necessary. 
  9762.  
  9763. (2) The process of resolving a 16:16 memory reference into a physical memory 
  9764. address using a process's local descriptor table.  The validity and legality of 
  9765. the memory reference is also checked during the translation process, and a 
  9766. general protection exception is generated if necessary. 
  9767.  
  9768.  
  9769. ΓòÉΓòÉΓòÉ 22.3. alias ΓòÉΓòÉΓòÉ
  9770.  
  9771. alias 
  9772.  
  9773. Term used in the 80386 segmented memory model, to refer to the case where two 
  9774. different addresses reference the same physical memory location; the location 
  9775. is said to be aliased.  This technique is used when sharing memory between 
  9776. processes, and when mapping memory references between 16:16 and 0:32 addressing 
  9777. schemes. 
  9778.  
  9779.  
  9780. ΓòÉΓòÉΓòÉ 22.4. ANSI ΓòÉΓòÉΓòÉ
  9781.  
  9782. ANSI 
  9783.  
  9784. American National Standards Institute; U.S.-based organization which defines 
  9785. standards for computing devices, protocols, programming languages etc. 
  9786.  
  9787.  
  9788. ΓòÉΓòÉΓòÉ 22.5. API ΓòÉΓòÉΓòÉ
  9789.  
  9790. API 
  9791.  
  9792. Application Programming Interface; term used to describe the set of functions 
  9793. by which an application may gain access to operating system services. 
  9794.  
  9795.  
  9796. ΓòÉΓòÉΓòÉ 22.6. arena ΓòÉΓòÉΓòÉ
  9797.  
  9798. arena 
  9799.  
  9800. Refers to a contiguous subset of the processor's virtual address space.  In 
  9801. OS/2 V2.0, arenas are used to manage regions of the linear address space. 
  9802.  
  9803.  
  9804. ΓòÉΓòÉΓòÉ 22.7. Bidi ΓòÉΓòÉΓòÉ
  9805.  
  9806. Bidi 
  9807.  
  9808. Bidirectional; term used to describe support for national languages such as 
  9809. Arabic and Hebrew, which use bidirectional character sets. 
  9810.  
  9811.  
  9812. ΓòÉΓòÉΓòÉ 22.8. BIOS ΓòÉΓòÉΓòÉ
  9813.  
  9814. BIOS 
  9815.  
  9816. Basic Input/Output System; code which controls the interface between a system 
  9817. and its attached devices, at the hardware level. 
  9818.  
  9819.  
  9820. ΓòÉΓòÉΓòÉ 22.9. bit ΓòÉΓòÉΓòÉ
  9821.  
  9822. bit 
  9823.  
  9824. A binary digit, which may be either zero or one.  Bits are represented within a 
  9825. computing device by the presence or absence of an electrical or magnetic pulse 
  9826. at a particular point, indicating a one or a zero respectively. 
  9827.  
  9828.  
  9829. ΓòÉΓòÉΓòÉ 22.10. Boot Manager ΓòÉΓòÉΓòÉ
  9830.  
  9831. Boot Manager 
  9832.  
  9833. Feature of OS/2 Version 2.0 which allows multiple partitions to exist on fixed 
  9834. disks in the same machine, with a separate operating system on each partition. 
  9835. At boot time, the user may select the desired operating system with which to 
  9836. start the machine. 
  9837.  
  9838.  
  9839. ΓòÉΓòÉΓòÉ 22.11. boot name ΓòÉΓòÉΓòÉ
  9840.  
  9841. boot name 
  9842.  
  9843. A name used to refer to a selectable logical drive under Boot Manager, from 
  9844. which an operating system may be started. 
  9845.  
  9846.  
  9847. ΓòÉΓòÉΓòÉ 22.12. byte ΓòÉΓòÉΓòÉ
  9848.  
  9849. byte 
  9850.  
  9851. A logical data unit composed of eight binary digits (bits). 
  9852.  
  9853.  
  9854. ΓòÉΓòÉΓòÉ 22.13. cdecl ΓòÉΓòÉΓòÉ
  9855.  
  9856. cdecl 
  9857.  
  9858. Keyword used in C programming, which causes the compiler to generate object 
  9859. code for a function or subroutine, such that parameters are placed on the stack 
  9860. in right-to-left order, and the calling routine clears the stack after control 
  9861. returns from a called function or subroutine.  This is the default for C 
  9862. programs.  Contrast this with the pascal keyword. 
  9863.  
  9864.  
  9865. ΓòÉΓòÉΓòÉ 22.14. CD-ROM ΓòÉΓòÉΓòÉ
  9866.  
  9867. CD-ROM 
  9868.  
  9869. Compact Disk Read-Only Memory; technology where data is stored on an optical 
  9870. disk for reading by a computer system equipped with an appropriate reading 
  9871. device.  CD-ROM storage media may not be updated by the computer system, 
  9872. although certain implementations allow the media to be erased and rewritten. 
  9873.  
  9874.  
  9875. ΓòÉΓòÉΓòÉ 22.15. compatibility region ΓòÉΓòÉΓòÉ
  9876.  
  9877. compatibility region 
  9878.  
  9879. In the OS/2 Version 2.0 flat memory model, the address region below 512MB, 
  9880. which may be addressed by a 16-bit application using the 16:16 addressing 
  9881. scheme and tiled local descriptor tables.  Under OS/2 Version 2.0, this region 
  9882. is equivalent in size to the process address space. 
  9883.  
  9884.  
  9885. ΓòÉΓòÉΓòÉ 22.16. compatibility region mapping algorithm ΓòÉΓòÉΓòÉ
  9886.  
  9887. compatibility region mapping algorithm 
  9888.  
  9889. Algorithm used in thunks to convert 16:16 memory references to the 0:32 
  9890. addressing scheme and vice versa. 
  9891.  
  9892.  
  9893. ΓòÉΓòÉΓòÉ 22.17. CRMA ΓòÉΓòÉΓòÉ
  9894.  
  9895. CRMA 
  9896.  
  9897. See compatibility region mapping algorithm. 
  9898.  
  9899.  
  9900. ΓòÉΓòÉΓòÉ 22.18. DDE ΓòÉΓòÉΓòÉ
  9901.  
  9902. DDE 
  9903.  
  9904. Dynamic Data Exchange; interprocess communication protocol used by applications 
  9905. to define dynamic links.  Information updated in one application is 
  9906. automatically reflected in other applications linked to the first application 
  9907. via DDE. 
  9908.  
  9909.  
  9910. ΓòÉΓòÉΓòÉ 22.19. debugging ΓòÉΓòÉΓòÉ
  9911.  
  9912. debugging 
  9913.  
  9914. The process of removing "bugs" or errors from application code. 
  9915.  
  9916.  
  9917. ΓòÉΓòÉΓòÉ 22.20. device driver ΓòÉΓòÉΓòÉ
  9918.  
  9919. device driver 
  9920.  
  9921. Code which handles the translation of generic device commands into specific 
  9922. commands for the required physical device and vice versa, allowing operating 
  9923. system interaction with physical devices attached to the system. 
  9924.  
  9925.  
  9926. ΓòÉΓòÉΓòÉ 22.21. DLL ΓòÉΓòÉΓòÉ
  9927.  
  9928. DLL 
  9929.  
  9930. Dynamic Link Library; application module containing routines and/or resources, 
  9931. which is dynamically linked with its parent application at load time or runtime 
  9932. rather than during the linkage editing process. The use of DLLs enables 
  9933. decoupling of application routines and resources from the parent program, 
  9934. enhancing code independence, facilitating maintenance and reducing resident 
  9935. memory consumption. 
  9936.  
  9937.  
  9938. ΓòÉΓòÉΓòÉ 22.22. DMA ΓòÉΓòÉΓòÉ
  9939.  
  9940. DMA 
  9941.  
  9942. Direct Memory Addressing; technique by which transfers to and from system 
  9943. memory are made by an independent control chip rather than by the system's main 
  9944. processor, thereby resulting in improved overall performance. 
  9945.  
  9946.  
  9947. ΓòÉΓòÉΓòÉ 22.23. DOS ΓòÉΓòÉΓòÉ
  9948.  
  9949. DOS 
  9950.  
  9951. Disk Operating System; generally used in reference to IBM PC DOS, the 
  9952. single-tasking 16-bit real-mode operating system designed for Intel 8086 
  9953. processors, and developed by Microsoft Corporation as MS DOS in the early 
  9954. 1980s.  IBM subsequently licensed MS DOS for use on IBM Personal Computer and 
  9955. Personal System/2 machines, and has since undertaken joint development of later 
  9956. versions of the operating system in conjunction with Microsoft. 
  9957.  
  9958.  
  9959. ΓòÉΓòÉΓòÉ 22.24. DosDebug() ΓòÉΓòÉΓòÉ
  9960.  
  9961. DosDebug() 
  9962.  
  9963. Function provided within the application programming interface under OS/2 
  9964. Version 2.0, which enables access to the debugging functions provided by the 
  9965. operating system. 
  9966.  
  9967.  
  9968. ΓòÉΓòÉΓòÉ 22.25. DOS Settings ΓòÉΓòÉΓòÉ
  9969.  
  9970. DOS Settings 
  9971.  
  9972. Function provided by the Multiple Virtual DOS Machines component of OS/2 
  9973. Version 2.0 which allows a user to customize the behavior of a virtual DOS 
  9974. machine to suit the application running in that virtual DOS machine. Settings 
  9975. may be configured once by the user and saved, or applications may provide their 
  9976. own configuration information which is used by the virtual DOS machine upon 
  9977. startup. 
  9978.  
  9979.  
  9980. ΓòÉΓòÉΓòÉ 22.26. drag and drop ΓòÉΓòÉΓòÉ
  9981.  
  9982. drag and drop 
  9983.  
  9984. User interface technique whereby application functions are initiated by the 
  9985. user manipulating objects, represented by icons, on the Presentation Manager or 
  9986. Workplace Shell desktop.  The user typically initiates an action by selecting 
  9987. an icon, pressing and holding down a mouse button while "dragging" the icon 
  9988. over another object's icon on the desktop.  The user then "drops" the icon over 
  9989. the target object by releasing the mouse button. 
  9990.  
  9991.  
  9992. ΓòÉΓòÉΓòÉ 22.27. ESDI ΓòÉΓòÉΓòÉ
  9993.  
  9994. ESDI 
  9995.  
  9996. Enhanced Small Device Interface; physical access protocol used by many computer 
  9997. storage devices, particularly fixed disk devices. 
  9998.  
  9999.  
  10000. ΓòÉΓòÉΓòÉ 22.28. extended attributes ΓòÉΓòÉΓòÉ
  10001.  
  10002. extended attributes 
  10003.  
  10004. Information which may be associated with a file under OS/2 Version 1.2 or above 
  10005. (including Version 2.0), to indicate various properties of that file.  Extended 
  10006. attributes are available with both the FAT and HPFS file systems.  An 
  10007. application may define extended attributes for files which it creates, and may 
  10008. update the extended attributes of files upon which it operates.  A number of 
  10009. standard extended attributes are defined by the operating system for 
  10010. commonly-used information. Extended attributes and their uses are described in 
  10011. the IBM OS/2 Version 2.0 Control Program Reference. 
  10012.  
  10013.  
  10014. ΓòÉΓòÉΓòÉ 22.29. extended partition ΓòÉΓòÉΓòÉ
  10015.  
  10016. extended partition 
  10017.  
  10018. In the context of Boot Manager, a fixed disk partition which contains one or 
  10019. more logical drives, and on which certain operating systems such as OS/2 
  10020. Version 2.0 may be installed.  An extended partition and its logical drives are 
  10021. visible to the operating system at all times, regardless of which primary 
  10022. partition is currently active.  Hence extended partitions are useful for the 
  10023. storage of programs and data which must be shared between multiple operating 
  10024. systems in an OS/2 Version 2.0 Boot Manager environment. 
  10025.  
  10026.  
  10027. ΓòÉΓòÉΓòÉ 22.30. far ΓòÉΓòÉΓòÉ
  10028.  
  10029. far 
  10030.  
  10031. Term used to describe a memory reference in the 16:16 addressing scheme, where 
  10032. the memory location to be referenced is outside the current memory segment. 
  10033. Contrast with near memory references. 
  10034.  
  10035.  
  10036. ΓòÉΓòÉΓòÉ 22.31. FAT ΓòÉΓòÉΓòÉ
  10037.  
  10038. FAT 
  10039.  
  10040. File Allocation Table; term used to describe the file system implemented by DOS 
  10041. and OS/2.  This file system uses a file allocation table to contain the 
  10042. physical sector addresses of all files on the disk.  The FAT file system is 
  10043. supported by OS/2 Version 2.0, along with the newer HPFS and other installable 
  10044. file systems. 
  10045.  
  10046.  
  10047. ΓòÉΓòÉΓòÉ 22.32. flat memory model ΓòÉΓòÉΓòÉ
  10048.  
  10049. flat memory model 
  10050.  
  10051. Conceptual view of real memory implemented by OS/2 Version 2.0, where the 
  10052. operating system regards memory as a single linear address range of up to 4GB. 
  10053.  
  10054.  
  10055. ΓòÉΓòÉΓòÉ 22.33. free swap frame linked list ΓòÉΓòÉΓòÉ
  10056.  
  10057. free swap frame linked list 
  10058.  
  10059. Linked list in memory which contains unused page frames from the swap frame 
  10060. array.  These frames may be used by the operating system to store references to 
  10061. new pages which must be swapped to disk.  The linked list improves performance 
  10062. by avoiding the need to search the swap frame array for a free swap frame. 
  10063.  
  10064.  
  10065. ΓòÉΓòÉΓòÉ 22.34. FSD ΓòÉΓòÉΓòÉ
  10066.  
  10067. FSD 
  10068.  
  10069. File System Driver; code within the operating system which supports the 
  10070. implementation of a particular file system such as FAT or HPFS. 
  10071.  
  10072.  
  10073. ΓòÉΓòÉΓòÉ 22.35. gate ΓòÉΓòÉΓòÉ
  10074.  
  10075. gate 
  10076.  
  10077. Specialized form of segment base address in memory, to which control is passed 
  10078. by an application when that application requires the execution of code which 
  10079. must run at a different privilege level.  The gate routine then redirects 
  10080. control to the appropriate routine to perform the function.  The use of gates 
  10081. insulates the calling application from the called routine, thereby providing 
  10082. greater protection. 
  10083.  
  10084.  
  10085. ΓòÉΓòÉΓòÉ 22.36. GB ΓòÉΓòÉΓòÉ
  10086.  
  10087. GB 
  10088.  
  10089. Gigabyte; 1024 megabytes, or 1024 x 1024 x 1024 bytes. 
  10090.  
  10091.  
  10092. ΓòÉΓòÉΓòÉ 22.37. GDT ΓòÉΓòÉΓòÉ
  10093.  
  10094. GDT 
  10095.  
  10096. See global descriptor table. 
  10097.  
  10098.  
  10099. ΓòÉΓòÉΓòÉ 22.38. general protection exception ΓòÉΓòÉΓòÉ
  10100.  
  10101. general protection exception 
  10102.  
  10103. Operating system error which occurs when an application attempts to access 
  10104. memory in a page which has not been allocated to that process. OS/2 Version 2.0 
  10105. allows an application to trap a general protection exception using an exception 
  10106. handler registered with the operating system.  If an exception handler is not 
  10107. registered, the operating system will terminate the application as a result of 
  10108. a general protection exception.  Also known as a Trap 000D. 
  10109.  
  10110.  
  10111. ΓòÉΓòÉΓòÉ 22.39. global descriptor table ΓòÉΓòÉΓòÉ
  10112.  
  10113. global descriptor table 
  10114.  
  10115. Table in memory used under the segmented memory model, to store the segment 
  10116. base addresses of all memory segments in the system.  This table is used by the 
  10117. operating system when allocating and controlling memory, and is not available 
  10118. to processes executing in the system. 
  10119.  
  10120.  
  10121. ΓòÉΓòÉΓòÉ 22.40. guard page ΓòÉΓòÉΓòÉ
  10122.  
  10123. guard page 
  10124.  
  10125. Page within a memory object, for which the PAG_GUARD attribute has been 
  10126. specified.  Any attempt by the application to reference memory within the guard 
  10127. page results in a guard page exception. 
  10128.  
  10129.  
  10130. ΓòÉΓòÉΓòÉ 22.41. guard page exception ΓòÉΓòÉΓòÉ
  10131.  
  10132. guard page exception 
  10133.  
  10134. Operating system warning condition which occurs when an application accesses 
  10135. memory within a page which has been declared as a guard page. This exception 
  10136. may be trapped using an exception handler registered by the application in 
  10137. order to handle such occurrences.  The typical processing performed by the 
  10138. exception handler is to commit more memory within the memory object.  If an 
  10139. exception handler is not registered, the operating system's default handler 
  10140. commits the next available page within the memory object and sets its attribute 
  10141. to PAG_GUARD. 
  10142.  
  10143.  
  10144. ΓòÉΓòÉΓòÉ 22.42. guard page technique ΓòÉΓòÉΓòÉ
  10145.  
  10146. guard page technique 
  10147.  
  10148. Technique by which the size of a memory object is progressively increased 
  10149. during application execution, by using guard pages and trapping the resulting 
  10150. guard page exceptions in order to commit additional pages of memory. 
  10151.  
  10152.  
  10153. ΓòÉΓòÉΓòÉ 22.43. HPFS ΓòÉΓòÉΓòÉ
  10154.  
  10155. HPFS 
  10156.  
  10157. High Performance File System; file system first implemented under OS/2 Version 
  10158. 1.2, offering enhanced performance over the original FAT file system 
  10159. implemented in DOS and prior versions of OS/2.  HPFS is an optional 
  10160. installation item under OS/2 Version 2.0; the FAT system may also be used to 
  10161. retain compatibility with DOS. 
  10162.  
  10163.  
  10164. ΓòÉΓòÉΓòÉ 22.44. IDT ΓòÉΓòÉΓòÉ
  10165.  
  10166. IDT 
  10167.  
  10168. See interrupt descriptor table. 
  10169.  
  10170.  
  10171. ΓòÉΓòÉΓòÉ 22.45. IFS ΓòÉΓòÉΓòÉ
  10172.  
  10173. IFS 
  10174.  
  10175. See Installable File System. 
  10176.  
  10177.  
  10178. ΓòÉΓòÉΓòÉ 22.46. Information Presentation Facility ΓòÉΓòÉΓòÉ
  10179.  
  10180. Information Presentation Facility 
  10181.  
  10182. The Information Presentation Facility is a tool that enables you to create 
  10183. online information, to specify how it will appear on the screen, to connect 
  10184. various parts of the information and to provide help information that can be 
  10185. requested by the user. 
  10186.  
  10187.  
  10188. ΓòÉΓòÉΓòÉ 22.47. interrupt ΓòÉΓòÉΓòÉ
  10189.  
  10190. interrupt 
  10191.  
  10192. An electrical signal generated by a device or adapter within the system, to 
  10193. inform the operating system that an event, such as the completion of an I/O 
  10194. operation, has occurred.  The operating system then processes the interrupt by 
  10195. passing control to a particular piece of code which handles the appropriate 
  10196. action in response to the event indicated. 
  10197.  
  10198.  
  10199. ΓòÉΓòÉΓòÉ 22.48. Installable File System ΓòÉΓòÉΓòÉ
  10200.  
  10201. Installable File System 
  10202.  
  10203. An installable file system is a file system that is loaded by the operating 
  10204. system during system initialization, because the user has included statements 
  10205. in the CONFIG.SYS to request installation of the file system. 
  10206.  
  10207.  
  10208. ΓòÉΓòÉΓòÉ 22.49. interrupt descriptor table ΓòÉΓòÉΓòÉ
  10209.  
  10210. interrupt descriptor table 
  10211.  
  10212. Table in memory which contains the addresses of processing routines for all 
  10213. defined interrupt levels in the system.  When a device signals an interrupt to 
  10214. the operating system, the interrupt contains a code which is used as an index 
  10215. into the interrupt descriptor table. 
  10216.  
  10217.  
  10218. ΓòÉΓòÉΓòÉ 22.50. I/O ΓòÉΓòÉΓòÉ
  10219.  
  10220. I/O 
  10221.  
  10222. Input/output; term used to collectively describe the techniques and devices 
  10223. through which a computer system interfaces with storage devices, external 
  10224. systems and the user. 
  10225.  
  10226.  
  10227. ΓòÉΓòÉΓòÉ 22.51. IOPL ΓòÉΓòÉΓòÉ
  10228.  
  10229. IOPL 
  10230.  
  10231. Input Output Privilege Level; term used in Intel 80x86 processor terminology to 
  10232. refer to tasks executing at privilege level 2, which have the authority to 
  10233. directly access physical I/O devices. 
  10234.  
  10235.  
  10236. ΓòÉΓòÉΓòÉ 22.52. IPF ΓòÉΓòÉΓòÉ
  10237.  
  10238. IPF 
  10239.  
  10240. See Information Presentation Facility. 
  10241.  
  10242.  
  10243. ΓòÉΓòÉΓòÉ 22.53. KB ΓòÉΓòÉΓòÉ
  10244.  
  10245. KB 
  10246.  
  10247. Kilobyte; 1024 bytes. 
  10248.  
  10249.  
  10250. ΓòÉΓòÉΓòÉ 22.54. LDT ΓòÉΓòÉΓòÉ
  10251.  
  10252. LDT 
  10253.  
  10254. See local descriptor table. 
  10255.  
  10256.  
  10257. ΓòÉΓòÉΓòÉ 22.55. local descriptor table ΓòÉΓòÉΓòÉ
  10258.  
  10259. local descriptor table 
  10260.  
  10261. Table in memory used under the segmented memory model, to store the segment 
  10262. base addresses for memory segments used by the current process. 
  10263.  
  10264.  
  10265. ΓòÉΓòÉΓòÉ 22.56. logical drive ΓòÉΓòÉΓòÉ
  10266.  
  10267. logical drive 
  10268.  
  10269. In the context of Boot Manager, a subdivision of a fixed disk partition, which 
  10270. is regarded by an operating system as a logical entity.  Logical drives are 
  10271. typically accessed using logical drive letters (for example, "C").  Logical 
  10272. drives are used to store operating system code, programs and data files.  A 
  10273. primary partition may only contain a single logical drive, while an extended 
  10274. partition may contain multiple logical drives. 
  10275.  
  10276.  
  10277. ΓòÉΓòÉΓòÉ 22.57. MB ΓòÉΓòÉΓòÉ
  10278.  
  10279. MB 
  10280.  
  10281. Megabyte; 1024 kilobytes, or 1024 x 1024 bytes. 
  10282.  
  10283.  
  10284. ΓòÉΓòÉΓòÉ 22.58. MBB ΓòÉΓòÉΓòÉ
  10285.  
  10286. MBB 
  10287.  
  10288. Multi-Boot Block; 16KB area at the start of a physical disk drive (immediately 
  10289. after the MBR), which contains code and data for use by Boot Manager.  The MBB 
  10290. is located outside any logical drive, and is not normally accessible by an 
  10291. operating system or application. 
  10292.  
  10293.  
  10294. ΓòÉΓòÉΓòÉ 22.59. MBR ΓòÉΓòÉΓòÉ
  10295.  
  10296. MBR 
  10297.  
  10298. Master Boot Record; the first sector or sectors of a physical disk drive, used 
  10299. to contain partition information and code which accesses the operating system 
  10300. boot record in the active partition.  In a Boot Manager environment, the MBR 
  10301. does not access the operating system boot record, but instead accesses an entry 
  10302. point in the MBB, in order to load Boot Manager. 
  10303.  
  10304.  
  10305. ΓòÉΓòÉΓòÉ 22.60. memory object ΓòÉΓòÉΓòÉ
  10306.  
  10307. memory object 
  10308.  
  10309. Logical unit of memory requested by an application, which forms the granular 
  10310. unit of memory manipulation from the application viewpoint. A memory object may 
  10311. be up to 512MB in size under OS/2 Version 2.0. 
  10312.  
  10313.  
  10314. ΓòÉΓòÉΓòÉ 22.61. mixed model programming ΓòÉΓòÉΓòÉ
  10315.  
  10316. mixed model programming. 
  10317.  
  10318. Technique of combining 16-bit and 32-bit modules and resources within the same 
  10319. application under OS/2 Version 2.0.  Mixed model programming requires some 
  10320. special considerations when passing control between 16-bit and 32-bit modules 
  10321. and resources. 
  10322.  
  10323.  
  10324. ΓòÉΓòÉΓòÉ 22.62. Multiple Virtual DOS Machines ΓòÉΓòÉΓòÉ
  10325.  
  10326. Multiple Virtual DOS Machines 
  10327.  
  10328. Feature of OS/2 Version 2.0 which enables multiple DOS applications to execute 
  10329. concurrently in full-screen or windowed mode under OS/2 Version 2.0, in 
  10330. conjunction with other 16-bit or 32-bit applications, with full pre-emptive 
  10331. multitasking and memory protection between tasks.  See also virtual DOS 
  10332. machine. 
  10333.  
  10334.  
  10335. ΓòÉΓòÉΓòÉ 22.63. multiplexed streaming data mode ΓòÉΓòÉΓòÉ
  10336.  
  10337. multiplexed streaming data mode 
  10338.  
  10339. Mode of operation for 32-bit Micro Channel machines, whereby the streaming data 
  10340. mode is extended by using the 32 address lines, unused in transfer cycles after 
  10341. the first, for the transfer of data.  This mode effectively provides a 64-bit 
  10342. data path, resulting in faster memory transfers. 
  10343.  
  10344.  
  10345. ΓòÉΓòÉΓòÉ 22.64. MVDM ΓòÉΓòÉΓòÉ
  10346.  
  10347. MVDM 
  10348.  
  10349. See Multiple Virtual DOS Machines. 
  10350.  
  10351.  
  10352. ΓòÉΓòÉΓòÉ 22.65. near ΓòÉΓòÉΓòÉ
  10353.  
  10354. near 
  10355.  
  10356. Term used to describe a memory reference in the 16:16 addressing scheme, where 
  10357. the memory location to be referenced is within the current memory segment.  In 
  10358. the 0:32 addressing scheme, all memory references are effectively near 
  10359. references.  Contrast with far memory references. 
  10360.  
  10361.  
  10362. ΓòÉΓòÉΓòÉ 22.66. NPX ΓòÉΓòÉΓòÉ
  10363.  
  10364. NPX 
  10365.  
  10366. Numeric Processor Extension; term used in reference to the exception condition 
  10367. generated by the 80386 processor when an application issues a numeric 
  10368. coprocessor instruction in a machine with no coprocessor installed.  Note that 
  10369. OS/2 Version 2.0 will trap the NPX exception and emulate the numeric 
  10370. coprocessor function within the operating system, returning the result to the 
  10371. application exactly as if a physical coprocessor were installed. 
  10372.  
  10373.  
  10374. ΓòÉΓòÉΓòÉ 22.67. NULL ΓòÉΓòÉΓòÉ
  10375.  
  10376. NULL 
  10377.  
  10378. A binary zero.  In C programming terms, NULL is typically used to refer to a 
  10379. pointer which is set to the binary zero value. 
  10380.  
  10381.  
  10382. ΓòÉΓòÉΓòÉ 22.68. page ΓòÉΓòÉΓòÉ
  10383.  
  10384. page 
  10385.  
  10386. Granular unit for memory management using the 80386 and 80486 processors.  A 
  10387. page is a 4KB contiguous unit of memory, which the processor manipulates as a 
  10388. single entity for the purpose of memory manipulation and swapping. 
  10389.  
  10390.  
  10391. ΓòÉΓòÉΓòÉ 22.69. page ager ΓòÉΓòÉΓòÉ
  10392.  
  10393. page ager 
  10394.  
  10395. Component of the operating system which, when the number of free memory pages 
  10396. drops below a threshold level, begins to take pages which have not recently 
  10397. been accessed and change them to the idle state. Such pages may then be swapped 
  10398. out to disk if required. 
  10399.  
  10400.  
  10401. ΓòÉΓòÉΓòÉ 22.70. page directory ΓòÉΓòÉΓòÉ
  10402.  
  10403. page directory 
  10404.  
  10405. Table used by OS/2 Version 2.0 to manage storage of pages in physical memory. 
  10406. One page directory exists for each process in the system, and contains entries 
  10407. which point to page tables, which in turn contain the physical page addresses. 
  10408.  
  10409.  
  10410. ΓòÉΓòÉΓòÉ 22.71. page directory base address ΓòÉΓòÉΓòÉ
  10411.  
  10412. page directory base address 
  10413.  
  10414. Memory address of the page directory for the current process;  stored in the 
  10415. page directory base register. 
  10416.  
  10417.  
  10418. ΓòÉΓòÉΓòÉ 22.72. page directory base register ΓòÉΓòÉΓòÉ
  10419.  
  10420. page directory base register 
  10421.  
  10422. Control register used to store the base address of the page directory for the 
  10423. current process.  The page directory base register is stored in the process's 
  10424. task state segment when a task switch occurs. 
  10425.  
  10426.  
  10427. ΓòÉΓòÉΓòÉ 22.73. page fault exception ΓòÉΓòÉΓòÉ
  10428.  
  10429. page fault exception 
  10430.  
  10431. Operating system error which occurs when an application attempts to access 
  10432. memory which has been allocated but not committed.  This exception may be 
  10433. trapped by an application using an exception handler registered with the 
  10434. operating system.  If an exception handler is not registered, the operating 
  10435. system's default handler will terminate the application as a result of a page 
  10436. fault exception.  Also known as a Trap 000E. 
  10437.  
  10438.  
  10439. ΓòÉΓòÉΓòÉ 22.74. page frame ΓòÉΓòÉΓòÉ
  10440.  
  10441. page frame 
  10442.  
  10443. Data structure maintained by the operating system to store information 
  10444. concerning a physical page in memory.  Page frames may be free, idle, or 
  10445. in-use. 
  10446.  
  10447.  
  10448. ΓòÉΓòÉΓòÉ 22.75. page offset ΓòÉΓòÉΓòÉ
  10449.  
  10450. page offset 
  10451.  
  10452. 12-bit field used to specify the offset of a required memory location, within a 
  10453. physical page in real memory. 
  10454.  
  10455.  
  10456. ΓòÉΓòÉΓòÉ 22.76. page table ΓòÉΓòÉΓòÉ
  10457.  
  10458. page table 
  10459.  
  10460. Table used by OS/2 Version 2.0 to manage storage of pages in physical memory. 
  10461. Multiple page tables exist for each process in the system, and are referenced 
  10462. by the process's page directory.  Each entry in the page table contains control 
  10463. information for a single physical page. 
  10464.  
  10465.  
  10466. ΓòÉΓòÉΓòÉ 22.77. partition ΓòÉΓòÉΓòÉ
  10467.  
  10468. partition 
  10469.  
  10470. An area of a fixed disk.  A partition is composed of one or more logical 
  10471. drives, and is used to store the operating system code, programs and data 
  10472. files.  A partition may be a primary partition or an extended partition. 
  10473.  
  10474.  
  10475. ΓòÉΓòÉΓòÉ 22.78. pascal ΓòÉΓòÉΓòÉ
  10476.  
  10477. pascal 
  10478.  
  10479. Keyword used in C programming, which causes the compiler to generate object 
  10480. code for a function or subroutine, such that parameters are placed on the stack 
  10481. in left-to-right order, and the stack is cleared by the called routine when 
  10482. control is passed from one routine to another.  Originally introduced by 
  10483. Microsoft with early versions of Microsoft Windows, when this convention saved 
  10484. several hundred bytes of system memory.  Contrast this with the cdecl keyword. 
  10485.  
  10486.  
  10487. ΓòÉΓòÉΓòÉ 22.79. PDBR ΓòÉΓòÉΓòÉ
  10488.  
  10489. PDBR 
  10490.  
  10491. See page directory base register. 
  10492.  
  10493.  
  10494. ΓòÉΓòÉΓòÉ 22.80. PIB ΓòÉΓòÉΓòÉ
  10495.  
  10496. PIB 
  10497.  
  10498. Process Information Block; data structure used to store process-specific 
  10499. control information.  This structure may be accessed by an application using 
  10500. the DosGetInfoBlocks() function.  See also TIB. 
  10501.  
  10502.  
  10503. ΓòÉΓòÉΓòÉ 22.81. PIC ΓòÉΓòÉΓòÉ
  10504.  
  10505. PIC 
  10506.  
  10507. Programmable Interrupt Controller; component of the 80386 processor complex 
  10508. which handles interrupts generated by devices within the system. 
  10509.  
  10510.  
  10511. ΓòÉΓòÉΓòÉ 22.82. POST ΓòÉΓòÉΓòÉ
  10512.  
  10513. POST 
  10514.  
  10515. Power-On Self-Test; code typically stored on ROM (although the IBM PS/2 Model 
  10516. 90 and 95 allow POST code to be stored on fixed disk) which is invoked when a 
  10517. machine is powered on, in order to test the hardware. 
  10518.  
  10519.  
  10520. ΓòÉΓòÉΓòÉ 22.83. primary partition ΓòÉΓòÉΓòÉ
  10521.  
  10522. primary partition 
  10523.  
  10524. In the context of Boot Manager, a fixed disk partition which contains a single 
  10525. logical drive, and on which an operating system may be installed.  Only one 
  10526. primary partition may be active (visible) on a fixed disk at any one time; 
  10527. other primary partitions are hidden from the operating system.  Operating 
  10528. systems such as DOS and OS/2 Version 1.x require a primary partition for their 
  10529. installation; OS/2 Version 2.0 may be installed on a primary partition or an 
  10530. extended partition. 
  10531.  
  10532.  
  10533. ΓòÉΓòÉΓòÉ 22.84. privilege level ΓòÉΓòÉΓòÉ
  10534.  
  10535. privilege level 
  10536.  
  10537. In the context of the Intel 80386 processor architecture, the level of 
  10538. authority at which a task executes.  There are four available privilege levels; 
  10539. under OS/2 Version 2.0, Level 0 is used for operating system kernel code; Level 
  10540. 1 is not used; Level 2 is used for applications which directly address I/O 
  10541. devices (such as communications applications); Level 3 is used for general 
  10542. application code. 
  10543.  
  10544.  
  10545. ΓòÉΓòÉΓòÉ 22.85. process address space ΓòÉΓòÉΓòÉ
  10546.  
  10547. process address space 
  10548.  
  10549. Region of memory addressable by a single process under OS/2 Version 2.0; each 
  10550. process address space may be up to 512MB in size. 
  10551.  
  10552.  
  10553. ΓòÉΓòÉΓòÉ 22.86. protected mode ΓòÉΓòÉΓòÉ
  10554.  
  10555. protected mode 
  10556.  
  10557. Mode of operation for the Intel 80286 and 80386/80486 processors, whereby the 
  10558. address space is expanded to 16MB (80286) or 4GB (80386/80486), and memory 
  10559. references are translated via segment selector and offset, enabling full memory 
  10560. protection between processes executing in the system.  With the 80386/80486, 
  10561. paging is available in protected mode. 
  10562.  
  10563.  
  10564. ΓòÉΓòÉΓòÉ 22.87. RAM ΓòÉΓòÉΓòÉ
  10565.  
  10566. RAM 
  10567.  
  10568. Random Access Memory; term used to describe memory which may be dynamically 
  10569. read and written by a processor or other device during system operations.  RAM 
  10570. is typically used to store program instructions and data which not being 
  10571. operated upon by the processor at the current moment in time, but which are 
  10572. required for the logical unit of work currently being carried out. 
  10573.  
  10574.  
  10575. ΓòÉΓòÉΓòÉ 22.88. real mode ΓòÉΓòÉΓòÉ
  10576.  
  10577. real mode 
  10578.  
  10579. Default mode of operation for the Intel 80286 and 80386 processors, and the 
  10580. only mode of operation for the 8086 processor.  In real mode, the processor 
  10581. acts as a 16-bit device, its physical memory address space is limited to 1MB, 
  10582. and memory references translate directly to physical addresses.  With the 
  10583. 80386, paging is not supported in real mode. 
  10584.  
  10585.  
  10586. ΓòÉΓòÉΓòÉ 22.89. ROM ΓòÉΓòÉΓòÉ
  10587.  
  10588. ROM 
  10589.  
  10590. Read-Only Memory; term used to describe memory which may be read, but not 
  10591. written to, during system operations.  ROM is typically used to store basic 
  10592. hardware initialization instructions, BIOS or self-testing code, which is 
  10593. required to be available prior to accessing the disk subsystem. 
  10594.  
  10595.  
  10596. ΓòÉΓòÉΓòÉ 22.90. SCB ΓòÉΓòÉΓòÉ
  10597.  
  10598. SCB 
  10599.  
  10600. Subsystem Control Block; data structure used at the hardware level to 
  10601. communicate between devices in a computer system.  The structure of SCBs is 
  10602. defined by the Subsystem Control Block Architecture. 
  10603.  
  10604.  
  10605. ΓòÉΓòÉΓòÉ 22.91. SCSI ΓòÉΓòÉΓòÉ
  10606.  
  10607. SCSI 
  10608.  
  10609. Small Computer Systems Interface; interface standard defined by ANSI SCSI 
  10610. standard X3.131-1986, which defines a bus architecture and communication 
  10611. protocols for interaction of up to eight computing devices. 
  10612.  
  10613.  
  10614. ΓòÉΓòÉΓòÉ 22.92. segment ΓòÉΓòÉΓòÉ
  10615.  
  10616. segment 
  10617.  
  10618. Unit of memory addressable by the Intel 80x86 processors.  With the 8086 and 
  10619. 80286 processors, a segment may be from 16 bytes to 64KB in size.  With the 
  10620. 80386 and 80486 processors, a segment may be up to 4GB in size. 
  10621.  
  10622.  
  10623. ΓòÉΓòÉΓòÉ 22.93. segment selector ΓòÉΓòÉΓòÉ
  10624.  
  10625. segment selector 
  10626.  
  10627. Field which specifies the base address of a memory segment when using the 
  10628. segmented memory model.  The selector is 16 bits in length on an 80286 
  10629. processor, and 32 bits in length on an 80386 or 80486 processor. 
  10630.  
  10631.  
  10632. ΓòÉΓòÉΓòÉ 22.94. semaphore ΓòÉΓòÉΓòÉ
  10633.  
  10634. semaphore 
  10635.  
  10636. Construct used under OS/2 Version 2.0. and previous versions of OS/2 to enable 
  10637. synchronization between processes and between threads in the same process. 
  10638. OS/2 Version 2.0 provides enhanced semaphore facilities over previous versions. 
  10639.  
  10640.  
  10641. ΓòÉΓòÉΓòÉ 22.95. service layer ΓòÉΓòÉΓòÉ
  10642.  
  10643. service layer 
  10644.  
  10645. Executable code which performs the operating system function requested by an 
  10646. application using an API. 
  10647.  
  10648.  
  10649. ΓòÉΓòÉΓòÉ 22.96. signal ΓòÉΓòÉΓòÉ
  10650.  
  10651. signal 
  10652.  
  10653. An event occurring within the operating system which will affect the execution 
  10654. of the current process; for example, the user may hit the Ctrl+Break key 
  10655. combination, which would result in a signal being generated, instructing the 
  10656. operating system to terminate the current process.  Signals typically override 
  10657. the dispatching algorithms of the operating system. 
  10658.  
  10659.  
  10660. ΓòÉΓòÉΓòÉ 22.97. sparse object ΓòÉΓòÉΓòÉ
  10661.  
  10662. sparse object 
  10663.  
  10664. Memory object for which a linear address range has been reserved, but for which 
  10665. no physical memory has yet been committed.  This capability is used to reserve 
  10666. storage in the process address space for use by an application, without causing 
  10667. an adverse impact on system performance by requesting large amounts of physical 
  10668. memory. 
  10669.  
  10670.  
  10671. ΓòÉΓòÉΓòÉ 22.98. streaming data mode ΓòÉΓòÉΓòÉ
  10672.  
  10673. streaming data mode 
  10674.  
  10675. Mode of operation for memory transfer on a Micro Channel machine, which allows 
  10676. the transfer of multiple contiguous blocks of data without the necessity to 
  10677. explicitly specify the address of each block. This allows faster transfer 
  10678. operations.  See also multiplexed streaming data mode. 
  10679.  
  10680.  
  10681. ΓòÉΓòÉΓòÉ 22.99. system region ΓòÉΓòÉΓòÉ
  10682.  
  10683. system region 
  10684.  
  10685. In the OS/2 Version 2.0 flat memory model, the address region above 512MB, 
  10686. which is reserved for operating system use.  See also process address space. 
  10687.  
  10688.  
  10689. ΓòÉΓòÉΓòÉ 22.100. TCB ΓòÉΓòÉΓòÉ
  10690.  
  10691. TCB 
  10692.  
  10693. Thread control block; data structure used by OS/2 to store control information 
  10694. relating to threads in the system. 
  10695.  
  10696.  
  10697. ΓòÉΓòÉΓòÉ 22.101. TIB ΓòÉΓòÉΓòÉ
  10698.  
  10699. TIB 
  10700.  
  10701. Thread information block; data structure used to store thread-specific control 
  10702. information.  This structure may be accessed by an application using the 
  10703. DosGetInfoBlocks() function.  See also PIB. 
  10704.  
  10705.  
  10706. ΓòÉΓòÉΓòÉ 22.102. thunk ΓòÉΓòÉΓòÉ
  10707.  
  10708. thunk 
  10709.  
  10710. Term used to describe a routine which performs conversion of 16:16 memory 
  10711. references to the 0:32 addressing scheme, and vice versa. 
  10712.  
  10713.  
  10714. ΓòÉΓòÉΓòÉ 22.103. tiled local descriptor table ΓòÉΓòÉΓòÉ
  10715.  
  10716. tiled local descriptor table 
  10717.  
  10718. Form of local descriptor table used by 16-bit applications running in the 
  10719. 16/32-bit region under OS/2 Version 2.0, in order to allow access to the 512MB 
  10720. process address space using the 16:16 addressing scheme. 
  10721.  
  10722.  
  10723. ΓòÉΓòÉΓòÉ 22.104. transaction lookaside buffer ΓòÉΓòÉΓòÉ
  10724.  
  10725. transaction lookaside buffer 
  10726.  
  10727. Caching buffer used by the 80386 processor to store the physical addresses of 
  10728. most-recently used pages, in order to improve performance by avoiding the need 
  10729. to reference page directories and page tables to determine the physical memory 
  10730. address. 
  10731.  
  10732.  
  10733. ΓòÉΓòÉΓòÉ 22.105. trap 000D ΓòÉΓòÉΓòÉ
  10734.  
  10735. trap 000D 
  10736.  
  10737. See general protection exception. 
  10738.  
  10739.  
  10740. ΓòÉΓòÉΓòÉ 22.106. trap 000E ΓòÉΓòÉΓòÉ
  10741.  
  10742. trap 000E 
  10743.  
  10744. See page fault exception. 
  10745.  
  10746.  
  10747. ΓòÉΓòÉΓòÉ 22.107. task state segment ΓòÉΓòÉΓòÉ
  10748.  
  10749. task state segment 
  10750.  
  10751. Structure used to store the control information for a system task when a task 
  10752. switch occurs.  When the task becomes active once again, registers and other 
  10753. control information are loaded from the TSS. 
  10754.  
  10755.  
  10756. ΓòÉΓòÉΓòÉ 22.108. TSS ΓòÉΓòÉΓòÉ
  10757.  
  10758. TSS 
  10759.  
  10760. See task state segment. 
  10761.  
  10762.  
  10763. ΓòÉΓòÉΓòÉ 22.109. virtual device driver ΓòÉΓòÉΓòÉ
  10764.  
  10765. virtual device driver 
  10766.  
  10767. Form of device driver used by DOS applications executing in a DOS virtual 
  10768. machine, in order to access devices which must be shared with other processes 
  10769. in the system, such as the screen or mouse.  The virtual device driver maps DOS 
  10770. device commands to the normal (physical) device driver under OS/2 Version 2.0. 
  10771.  
  10772.  
  10773. ΓòÉΓòÉΓòÉ 22.110. virtual page structure ΓòÉΓòÉΓòÉ
  10774.  
  10775. virtual page structure 
  10776.  
  10777. Data structure maintained for each committed page in the system.  The virtual 
  10778. page structure is referenced by the Page Table Entry for the page, and contains 
  10779. information including the location of the physical page frame if the page is in 
  10780. memory, or its location within the swap file if the page is swapped out. 
  10781.  
  10782.  
  10783. ΓòÉΓòÉΓòÉ 22.111. virtual DOS machine ΓòÉΓòÉΓòÉ
  10784.  
  10785. virtual DOS machine 
  10786.  
  10787. A protected mode process under OS/2 Version 2.0 which emulates a DOS operating 
  10788. system environment, such that DOS applications executing within the virtual 
  10789. machine operate exactly as if they were running under DOS. DOS virtual machines 
  10790. support both text and graphics applications. Virtual DOS machines make use of 
  10791. the virtual 8086 mode of the 80386 and 80486 processors. 
  10792.  
  10793.  
  10794. ΓòÉΓòÉΓòÉ 22.112. virtual machine ΓòÉΓòÉΓòÉ
  10795.  
  10796. virtual machine 
  10797.  
  10798. See virtual DOS machine. 
  10799.  
  10800.  
  10801. ΓòÉΓòÉΓòÉ 22.113. virtual 8086 mode ΓòÉΓòÉΓòÉ
  10802.  
  10803. virtual 8086 mode 
  10804.  
  10805. Mode of operation of the Intel 80386 and 80486 processors, which allows the 
  10806. processor to execute multiple concurrent tasks with each regarding the 
  10807. processor as its own distinct 8086 processor.  This mode of operation provides 
  10808. full pre-emptive multitasking and full memory protection between the virtual 
  10809. 8086 tasks. 
  10810.  
  10811.  
  10812. ΓòÉΓòÉΓòÉ 22.114. Workplace Shell ΓòÉΓòÉΓòÉ
  10813.  
  10814. Workplace Shell 
  10815.  
  10816. Standard user interface component of OS/2 Version 2.0 that provides an 
  10817. object-oriented interface for the end user.  The implementation of the 
  10818. Workplace Shell is based upon the system object model. 
  10819.  
  10820.  
  10821. ΓòÉΓòÉΓòÉ 22.115. 0:32 ΓòÉΓòÉΓòÉ
  10822.  
  10823. 0:32 
  10824.  
  10825. Term used to describe the addressing scheme used for the 32-bit flat memory 
  10826. model, where a memory address is expressed as a 32-bit offset within the linear 
  10827. address range. 
  10828.  
  10829.  
  10830. ΓòÉΓòÉΓòÉ 22.116. 16:16 ΓòÉΓòÉΓòÉ
  10831.  
  10832. 16:16 
  10833.  
  10834. Term used to describe the addressing scheme used for the 16-bit segmented 
  10835. memory model, where a memory address is expressed as a 16-bit segment selector, 
  10836. and a 16-bit offset within that segment. 
  10837.  
  10838.  
  10839. ΓòÉΓòÉΓòÉ 22.117. 16-bit ΓòÉΓòÉΓòÉ
  10840.  
  10841. 16-bit 
  10842.  
  10843. Term used to describe an application which uses the 16:16 addressing scheme 
  10844. implemented under DOS and previous versions of OS/2.  In fact, such 
  10845. applications use a 24-bit address since the segment selector and offset are 
  10846. normally overlapped.  Such applications typically use the 16-bit instruction 
  10847. set implemented under the Intel 80286 processor. 
  10848.  
  10849.  
  10850. ΓòÉΓòÉΓòÉ 22.118. 16/32-bit region ΓòÉΓòÉΓòÉ
  10851.  
  10852. 16/32-bit region 
  10853.  
  10854. See compatibility region. 
  10855.  
  10856.  
  10857. ΓòÉΓòÉΓòÉ 22.119. 32-bit ΓòÉΓòÉΓòÉ
  10858.  
  10859. 32-bit 
  10860.  
  10861. Term used to describe an application which uses the 0:32 addressing scheme 
  10862. implemented under OS/2 Version 2.0.  Such applications may make full use of the 
  10863. 80386 instruction set. 
  10864.  
  10865.  
  10866. ΓòÉΓòÉΓòÉ 22.120. 80386 ΓòÉΓòÉΓòÉ
  10867.  
  10868. 80386 
  10869.  
  10870. Intel 80386 microprocessor; the 32-bit processor upon which the OS/2 Version 
  10871. 2.0 operating system is based. 
  10872.  
  10873.  
  10874. ΓòÉΓòÉΓòÉ 22.121. 80486 ΓòÉΓòÉΓòÉ
  10875.  
  10876. 80486 
  10877.  
  10878. Intel 80486 microprocessor; a 32-bit processor which implements a superset of 
  10879. the 80386 processor instruction set. 
  10880.  
  10881.  
  10882. ΓòÉΓòÉΓòÉ 22.122. _far16 ΓòÉΓòÉΓòÉ
  10883.  
  10884. _far16 
  10885.  
  10886. Keyword used in C programming language to indicate that conversion to 16-bit 
  10887. internal representation is required during compilation.