home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / multtsk / cpm25d / read-me.txt < prev    next >
Encoding:
Text File  |  1994-04-28  |  16.3 KB  |  458 lines

  1.  
  2.         Product Information: Multitasking Toolkit V2.5 for Turbo Pascal
  3.         ---------------------------------------------------------------
  4.  
  5.  
  6. 1. Contents of this file
  7.  
  8. This file contains the following information about the Multitasking Toolkit 
  9. (CPMULTI). 
  10.  
  11.         1. Contents of this file
  12.         2. Overview
  13.         3. Summary of features
  14.         4. List of routines available
  15.         5. The demo programs (executables and source)
  16.         6. Questions and answers
  17.         7. ORDERING INFORMATION
  18.  
  19. Please note: This demo diskette may be freely copied and distributed in
  20. electronic form (including uploading to "bulletin boards" or other online
  21. services) so long as it is not altered in any way. In addition, this
  22. informational text file may be copied and distributed in printed form so long
  23. as it is not altered.
  24.  
  25.  
  26. 2. Overview
  27.  
  28. The Multitasking Toolkit has been around in several versions since 1988. It 
  29. is used by software houses, major accounts and universities all over the 
  30. world. There are installations today in Germany, the USA, Canada, Austria, 
  31. Switzerland, Hungary, the CSFR, Brazil and the Netherlands.
  32.  
  33. The Multitasking Toolkit consists of several Turbo Pascal units which 
  34. provide the programmer with everything needed to execute any number of 
  35. Pascal procedures in parallel (in a multi-threaded application). The 
  36. available computing power is divided among all competing tasks by a dynamic 
  37. preemptive scheduler. By assigning a task to one of nine priority levels, 
  38. the programmer may prioritize the processes according to their role in the 
  39. application. 
  40.  
  41. The Multitasking Toolkit allows the application to change the minimum size 
  42. of a time-slice (>= 5 milliseconds) and also the range in which the 
  43. scheduler may dynamically adjust timeslices. In this way, high-priority 
  44. tasks can be made to react very quickly to external events, so that the 
  45. toolkit is suited very well to developing device control and data 
  46. communications applications.  
  47.  
  48. Any multitasking application needs a way to synchronize access to resources 
  49. and to exchange data between processes. The Multitasking Toolkit offers 
  50. semaphores, resources, message-passing, pipes and finally, events and 
  51. timers. A basic set of serial comm functions which interface to the 
  52. multitasking toolkit and a character oriented print spooler are provided 
  53. and smoothly integrated into the package. The spooler is fully compatible  
  54. with the PRINTER unit and may therefore be used as a plug-in replacement. 
  55.  
  56. The Multitasking Toolkit is aware of the "DOS reentrance" problem and 
  57. automatically synchronizes access to DOS. Therefore tasks may concurrently 
  58. execute DOS functions without any precautions being taken by the 
  59.  
  60.  
  61. programmer. In addition, one external program (such as COMMAND.COM) may be 
  62. executed in parallel to the Turbo Pascal application. This enables the 
  63. programmer to easily develop a multitasking background application which is 
  64. able to control the foreground task if necessary (inhibit keyboard I/O, 
  65. stuff keys into the keyboard buffer, suspend the foreground process, etc.). 
  66. Tasks may be kept waiting for a hot-key combination to be pressed (like a 
  67. pseudo-TSR). The hot-key task will be activated even if the hot-key is 
  68. pressed in the foreground application.   
  69.  
  70. A separate unit is included in the Multitasking Toolkit to transparently 
  71. synchronize access to the Turbo Pascal heap. This makes writing multi-
  72. tasking applications very easy, especially when using the object-oriented 
  73. language enhancements, because there are no special precautions needed in 
  74. order to prevent heap corruption.
  75.  
  76.  
  77. 3. Summary of features
  78.  
  79.   General:
  80.  
  81.     - Runs on any PC, XT, AT, PS/2 and 100% compatible systems
  82.     - Compatible with DOS 2.11 and above, as well as DR DOS 3.41 and above
  83.     - Supports Turbo Pascal 5.0, 5.5, 6.0, 7.0 and Borland Pascal 7.0 
  84.       (real mode)
  85.     - No runtime-license payments
  86.     - Full source code available
  87.     - Printed documentation
  88.     - Very robust implementation
  89.  
  90.   Kernel:
  91.  
  92.     - Unlimited number of tasks
  93.     - 9 priority levels
  94.     - Priorities may be changed at runtime
  95.     - Compatible to MS-Windows DOS-box
  96.     - Code sharing
  97.     - Preemptive scheduler
  98.     - Programmable timeslice (>= 5 ms)
  99.     - Dynamic adjustment of timeslices
  100.     - Time slicing may be switched off for full application control 
  101.     - Safe to do concurrent DOS I/O (no task switch while any task is    
  102.       executing OS code)
  103.     - Optional "exclusive mode" on a per-task basis (task running in this 
  104.       mode is never preempted)
  105.  
  106.   Task Synchronization and IPC:
  107.  
  108.     - Semaphores
  109.     - Message-passing
  110.     - "Named pipes" (Turbo Pascal TEXT-file driver)
  111.     - Resources
  112.     - Programmable timer
  113.     - Easy-to-use event handling
  114.  
  115.     (continued next page)
  116.  
  117.  
  118.   What else?
  119.  
  120.     - Character-oriented print spooler (LST-device)
  121.     - Interrupt-driven serial I/O-handling
  122.     - Pipe interface to serial I/O-unit (read/write to the port via 
  123.       Read/Write, etc.)
  124.     - Extended keycodes (character, scan-code, shift-status)
  125.     - Full keyboard control
  126.     - Run one external DOS-program as a sub-task
  127.     - Hot-key activation of tasks
  128.  
  129. 4. List of routines available
  130.  
  131.    This is a list of all the procedures and functions in the API of the
  132.    Multitasking Toolkit:
  133.  
  134.     Task management routines
  135.  
  136.        procedure ChangePri(Task:TaskNoType; Pri:Priority);
  137.        function CreateTask(TaskPointer:TaskType; UserData:Pointer;
  138.        procedure Kill(Task:TaskNoType);
  139.        function ReadySuspended(Task:TaskNoType) : Boolean;
  140.        procedure SetPri(Pri:Priority);
  141.        procedure Sleep(Ticks:LongInt);
  142.        procedure SpeedUp(Factor:Word);
  143.        function Suspend(Task:TaskNoType) : Boolean;
  144.        procedure Terminate;
  145.        procedure DoShutdown;
  146.        procedure TimeSlice(Slice, DynQ:Byte);
  147.        procedure Sched;
  148.  
  149.     Misc. synchronization routines
  150.  
  151.        procedure BindCPU;
  152.        function EnterExclusive : Boolean;
  153.        procedure LeaveExclusive;
  154.        procedure ReleaseCPU;
  155.  
  156.     Semaphores
  157.  
  158.        function CreateSem(var SemPtr:Pointer) : SemReturn;
  159.        function RemoveSem(var SemPtr:Pointer) : SemReturn;
  160.        function RemoveSemKill(var SemPtr:Pointer) : SemReturn;
  161.        procedure SemClear(SemPtr:Pointer);
  162.        procedure SemClearWait(SemPtr:Pointer);
  163.        function SemCut(SemPtr:Pointer;Task:TaskNoType) : Boolean;
  164.        procedure SemDiag(SemPtr:Pointer; Txt:String);
  165.        function SemGetSignals(SemPtr:Pointer) : Word;
  166.        procedure SemPaste(SemPtr:Pointer; Task:TaskNoType);
  167.        procedure SemSet(SemPtr:Pointer; Count:Word);
  168.        procedure SemSignal(SemPtr:Pointer);
  169.        function SemSoWaiting(SemPtr:Pointer) : Boolean;
  170.        function SemWaiting(SemPtr:Pointer) : Boolean;
  171.        procedure SemWait(SemPtr:Pointer);
  172.  
  173.  
  174.     Inter-process communication
  175.  
  176.        function Receive(FromTask:TaskNoType; MsgBuff:Pointer;
  177.                                WaitFlag:WaitFlagType) : TaskReturn;
  178.        function ReceivedFrom : TaskNoType;
  179.        function Send(ToTask:TaskNoType; Msg:Pointer; MsgSize:Word;
  180.                            WaitFlag:WaitFlagType) : TaskReturn;
  181.  
  182.     Events
  183.  
  184.        function MemoryEventWait(MemPtr:Pointer) : Boolean;
  185.        function PortEventWait(EPortNo:Word; var ENewValue:Byte) : Boolean;
  186.  
  187.     Timers
  188.  
  189.        function CancelTimer(MemPtr:Pointer) : Boolean;
  190.        function CancelWatchdog(TWatchdog:WatchdogType) : Boolean;
  191.        function QueueTimer(MemPtr:Pointer; Counter:Word) : Boolean;
  192.        function QueueWatchdog(TWatchdog:WatchdogType;
  193.  
  194.     Information and debugging
  195.  
  196.        function GetPID : TaskNoType;
  197.        function GetPri : Priority;
  198.        function GetTaskState(Task:TaskNoType) : TaskStatus;
  199.        function GetTimBusy : BPtr;
  200.        procedure DumpTaskTable;
  201.        function Seconds(Sec:Word) : LongInt;
  202.  
  203.     Resources
  204.  
  205.        function GrantRsc(RscPtr:Pointer) : RscReturn;
  206.        function ReleaseRsc(RscPtr:Pointer) : RscReturn;
  207.        function CreateRsc(var RscPtr:Pointer) : RscReturn;
  208.        function RemoveRsc(RscPtr:Pointer) : RscReturn;
  209.        function RemoveRscKill(RscPtr:Pointer) : RscReturn;
  210.        function RequestRsc(RscPtr:Pointer, WaitFlag:WaitFlagType) : RscReturn;
  211.  
  212.     Pipes
  213.  
  214.        function AssignPipe(var PT:Text; PName:PipeNameType;
  215.                                   PSize:Word; RequestSize:Byte;
  216.                                   AlwaysBlock:WaitFlagType) : Boolean;
  217.        function ExistPipe(PName:PipeNameType) : Boolean;
  218.        function ReadPipeDirect(var PT:Text; var Buf; Count:Word) : Boolean;
  219.        function WritePipeDirect(var PT:Text; var Buf; Count:Word) : Boolean;
  220.  
  221.     Print spooler
  222.  
  223.        procedure CancelPrint;
  224.        function PrintBufferAvail : Word;
  225.        function PrintBufferFilled : Word;
  226.        function PrinterReady : Boolean;
  227.        procedure RestartSpooler(Size:Word);
  228.        function SpoolerBusy : Boolean;
  229.  
  230.  
  231.     Serial communications
  232.  
  233.        function AuxSendTimeout : Boolean;
  234.        procedure CloseAux(Reading:TaskNoType);
  235.        procedure OpenAux(ComPort:ComType; BaudRate:BaudType;
  236.                                     Parity:ParityType;  
  237.                                     Bits:DataBitsType;
  238.                                     Stop:StopBitsType; BufSize:Word);
  239.  
  240.     DOS tasks, popups, and keyboard handling
  241.  
  242.        procedure CallDos(Path, CmdLin:String);
  243.        function DeregisterPopUp(Handle:Byte) : Boolean;
  244.        procedure DisablePopUps;
  245.        procedure EnablePopUps;
  246.        function GetKey : LongInt;
  247.        function LongIntToHex(Value:LongInt) : LongHex;
  248.        procedure KbdAppend(Task:TaskNoType);
  249.        function KbdDisable(Task:TaskNoType) : Boolean;
  250.        procedure StateToTurbo;
  251.  
  252.  
  253. 5. The demo programs
  254.  
  255.    All of these demo programs can be found on the demo diskette both in
  256.    executable form and with full Pascal source code.
  257.  
  258.  
  259.    BEEPER.PAS
  260.  
  261.      This program demonstrates some of the most basic features of the
  262.      CPMulti kernel, including semaphores, code sharing, and priority
  263.      changing.
  264.  
  265.    CALLDOS.PAS
  266.  
  267.      This program demonstrates the capabilities of MTPopup by executing
  268.      COMMAND.COM as a task, giving a DOS shell to the user. Pressing F10
  269.      will show the task status window.
  270.  
  271.    FINDER.PAS
  272.  
  273.      This program searches multiple disks for occurrences of the specified
  274.      filenames. For each search request, a separate process is started.
  275.  
  276.    GLASSTTY.PAS
  277.  
  278.      This is a bare-bones terminal emulator which illustrates the use of
  279.      the CommPipe unit.
  280.  
  281.    KBTEST.PAS
  282.  
  283.      This demo program shows the keyboard-handling capabilities of the 
  284.      MTPopup unit. For each key the user presses, all available information
  285.      is displayed. Pressing Escape will end the program.
  286.  
  287.  
  288.    LSTTEST.PAS
  289.  
  290.      This demo program uses the MTPrint unit to implement a simple print 
  291.      spooler.
  292.  
  293.    MTEST.PAS
  294.  
  295.      This illustrates the most basic use of the message-passing functions
  296.      in the CPMulti kernel.
  297.  
  298.    PHILO.PAS
  299.  
  300.      This is a solution for the classic "Dining Philosophers" problem,
  301.      which deals with resource contention.
  302.  
  303.    PRO_CON.PAS
  304.  
  305.      This illustrates keyboard handling (XON, XOFF) as an instance of the
  306.      producer-consumer problem.
  307.  
  308.    QUETEST.PAS
  309.  
  310.      This demonstrates the Queue unit; it allows the user to enter a list
  311.      of strings into a queue and then delete them selectively.
  312.  
  313.    RSCTEST.PAS
  314.  
  315.      This program shows the basic use of the resource functions in the
  316.      CPMulti kernel.
  317.  
  318.    SPEEDUP.PAS
  319.  
  320.      This program is an illustration of the SpeedUp function.
  321.  
  322.    TASKWIN.PAS
  323.  
  324.      This program demonstrates simple code sharing between concurrent tasks.
  325.  
  326.  
  327.  
  328. 6. Questions and Answers
  329.  
  330.     Why program under DOS anyway, as opposed to a multitasking operating 
  331.     system?
  332.  
  333.         For one thing, the operating system overhead is less. Some vendors
  334.         report that the DOS version of a program can run up to ten times
  335.         faster than the Windows version on the same machine. In many 
  336.         applications, speed is critically important.
  337.  
  338.         For another thing, programming in DOS does not require dealing with
  339.         a complex API such as that of Windows. Programmers who are unfamiliar
  340.         with an event-driven message-passing paradigm often find it difficult
  341.         to program for Windows or OS/2.
  342.  
  343.         Also, it should be noted that Windows 3.1 is a cooperative (not pre-
  344.         emptive) multitasking environment. This disadvantage does not exist
  345.         with the toolkit. To be fair, Windows NT and OS/2 do not have this 
  346.         problem either; but they are still less common than Windows.
  347.  
  348.  
  349.     What versions of Turbo Pascal are supported? 
  350.  
  351.         Versions 5.0, 5.5, 6.0, and 7.0.
  352.     
  353.     What versions of DOS are supported?
  354.  
  355.         PC DOS or MS DOS, versions 2.1 or later; DR DOS, versions 3.41 
  356.         or later. The toolkit has not been tested with Novell DOS 7; it is 
  357.         conceivable that there might be conflicts with the intrinsic multi-
  358.         tasking features of the new operating system.
  359.  
  360.     What are the minimum hardware requirements?
  361.  
  362.         CPMULTI should run on a machine with the 80286 processor or any later
  363.         chip in the family (386, 486, Pentium). There are no specific minimum
  364.         memory requirements.
  365.  
  366.     Is there support for object-oriented programming (OOP)?
  367.  
  368.         CPMULTI applications may use OOP freely, of course. However, there
  369.         is currently no object-oriented version of the application programming
  370.         interface; e.g., there is no "Semaphore" object with its own methods,
  371.         constructor, and destructor.
  372.  
  373.     Does the toolkit support Turbo Vision?
  374.  
  375.         Programs using CPMULTI may make free use of Turbo Vision (provided the
  376.         GrabHeap unit has been included); but there is no explicit interaction
  377.         between TV and CPMULTI.
  378.  
  379.     Are there royalties required for use of the units?
  380.  
  381.         No! The toolkit may be used royalty-free, provided, of course, that
  382.         the individual units comprising CPMULTI are not distributed as units
  383.         or as source, but only as part of the linked .EXE file.
  384.  
  385.  
  386.     Does the toolkit support protected mode (DPMI) programming under
  387.     Borland Pascal 7.0?
  388.  
  389.         Protected mode is not yet supported. Early experiments have
  390.         shown, however that it can be done with major changes in the
  391.         assembly language modules of the kernel. Possible releases
  392.         of the toolkit may contain protecte mode support.
  393.  
  394.     Is the toolkit useful in Windows programming? 
  395.  
  396.         There is no support for Microsoft Windows nor any interaction with
  397.         it. However, applications using CPMULTI will run in a DOS window
  398.         just as they will run under DOS.
  399.  
  400.     What about technical support?
  401.  
  402.         In the past, this has been provided by the author, who may continue
  403.         to do so at his own discretion. In no event will the distributor be
  404.         responsible for technical support.
  405.  
  406.     How can I order CPMULTI?
  407.  
  408.         See the final section below, ORDERING INFORMATION.
  409.  
  410.     How can I contact the author?
  411.  
  412.         The author may be reached at the following address:
  413.  
  414.                 Christian Philipps
  415.                 Software-Technik
  416.                 Duesseldorfer Str. 316
  417.                 D-47447 Moers
  418.                 Germany
  419.  
  420.                 Phone: 0049-2841-35932
  421.                 Internet:   chrispi@sequent.com
  422.                 CompuServe: [100012,1227]
  423.  
  424.  
  425.  
  426. 7. ORDERING INFORMATION
  427.  
  428. CPMULTI may be ordered from the distributor, Hypermetrics, at the following
  429. address:
  430.  
  431.         Hypermetrics
  432.         PO Box 9700 
  433.         Suite 363
  434.         Austin, TX  78766-9700
  435.  
  436.         Phone:      (512) 244-7833  (voice mail, fax)
  437.         Internet:   hal9000@netcom.com
  438.         CompuServe: [71540,3514]
  439.  
  440. Pricing as of January 1, 1994 is as follows:
  441.  
  442.         $ 99 for object code only;
  443.         $299 for the version with full source code.
  444.  
  445.         Add $5 for shipping and handling. 
  446.         Residents of Texas should also add 8% for state sales tax.
  447.  
  448. Payment may be made by check or money order. Purchase orders will be accepted
  449. from corporate or government entities. Note that credit cards cannot be 
  450. accepted.
  451.  
  452. The standard medium is a 3.5" diskette; users requiring 5.25" diskettes should
  453. request that size.
  454.  
  455. Call for site license information or upgrades for registered users of the 
  456. older shareware version.
  457.  
  458.