                                       TSK.TXT

                            Task Status Reporting Utility
                      for use with the VCONSOLE Virtual Console
                         and the CSWITCH Multitasking Kernel

           Release 1.0          Printed 18 September 1990            Page 1
          =================================================================

          INTRODUCTION

              This document describes the operation  and use of TSK, a task
          status  reporting  utility for  the  CSWITCH  multitasking kernel
          running with the VCONSOLE virtual console system.

              TSK will not execute directly under DOS. CSWITCH and VCONSOLE
          must be  running in  your machine.  TSK is  invoked directly from
          VCONSOLE and is a transient program.

              The latest release  of VCONSOLE may  be downloaded from SLACC
          STACK  BBS   (314-367-1903).  CSWITCH  may   be  downloaded  from
          Compuserve or SLACC STACK.


          FILES INCLUDED WITH TSK.ZIP

              TSK.EXE             The executable module.
              TSK.TXT             TSK user documentation.
                                  (This document)


          COPYRIGHT

              TSK and VCONSOLE are copyright (c) 1990 by Noel M. Moss.
              CSWITCH is copyright (c) 1990 by Herb Rose.


          WARRANTY

              This software is  distributed as-is, with  no warranty of any
          kind,  expressed or  implied. This  software is  NOT known  to be
          error free. You  (the user) use  this software at  your own risk.
          You (the user) assume  all liability for its  use. You (the user)
          are responsible for any damages or losses, including damage to or
          loss of property and  loss of profits, that  you may incur in the
          use of this program. BE SMART. ALWAYS MAKE BACKUPS OF YOUR FILES.


          FREEWARE DISTRIBUTION

              TSK is distributed as FREEWARE. You may use and distribute it
          freely for personal  use only without any  requirement to pay any
          registration  or licence  fees. For  commercial use,  contact the
          author, Noel Moss.

              1. You may distribute TSK freely on diskette or by
                 uploading it to a BBS. If you distribute TSK, please
                 distribute this ZIP archive intact. Do not modify any of
                 the files.







                                       TSK.TXT

                            Task Status Reporting Utility
                      for use with the VCONSOLE Virtual Console
                         and the CSWITCH Multitasking Kernel

           Release 1.0          Printed 18 September 1990            Page 2
          =================================================================

              2. Copying and distribution fees may not be charged for
                 TSK. This restriction also applies to BBS systems.


          MAINTENANCE

              It is my intention to continue developing the TSK task status
          utility and other programs for use  with CSWITCH. If you find any
          problems  or  if you  have  any suggestions  for  enhancements or
          additional features, please contact:

          by US Mail:   Noel Moss
                        14 North Kingshighway Blvd.
                        St. Louis, MO  63108

          by Email:     User ID: Nmoss      SLACC STACK BBS
                        314-367-1903        (8-N-1, 24 hrs)

                        Compuserve          70120,103

              If you  have or  suspect problems  with CSWITCH,  contact the
          CSWITCH author.


          COMPATIBILITY

              TSK was developed and  tested on a DTK  AT-class clone with a
          monochrome video board. It has also been successfully tested on a
          COMPAQ Deskpro 286 with monochrome video, an IBM 5155 Portable PC
          and an IBM AT with Vega VGA display.


          DESCRIPTION

              TSK  scans the  CSWITCH task  control  block (TCB)  chain and
          displays the status of  all tasks with "live"  tcbs. A "live" tcb
          is one whose STATE word is  not -1, which designates that the tcb
          is not in use.

              When a  "live" tcb is  found, TSK displays  the task's number
          (the offset within the tcb  chain), the task's name (contained in
          the  TCBNAME  field of  the  tcb),  the task's  current  and base
          priorities,  the task's  state flags  (contained in  the TCBFLAGS
          field of the  tcb) and the  task's state (contained  in the STATE
          field of the tcb).












                                       TSK.TXT

                            Task Status Reporting Utility
                      for use with the VCONSOLE Virtual Console
                         and the CSWITCH Multitasking Kernel

           Release 1.0          Printed 18 September 1990            Page 3
          =================================================================

              A sample TSK display is as follows:

          TASK   NAME      BASE_PRI  CURRENT_PRI  FLAGS(binary)  STATE
           0     base task    1          1          0            recv_wait
           1     kernel       3          2          1000         ready
           2     kernel       1          1          1001         suspended
           3     timer        9          6          1000         ready
           4     console 3    5          1          0            recv_wait
           5     console 2    5          1          0            recv_wait
           6     console 1    5          1          0            recv_wait
           7     console 0    5          3          0            ready
           8     qutil   2    5          3          0            recv_wait
           9     tsk          5          3          0            active


          PRIORITIES

              The base and current priorities are  always in the range of 1
          to 10.


          FLAGS (binary)

              The flags bit field is mapped as follows:

          bit 0 (lsb)   When this task is active, do not swap.
          bit 1         This task is in DOS.
          bit 2         This task executes in EMM.
          bit 3 (msb)   This task was created with SPAWN().


          STATE

              Valid task states are as follows:

          active        Currently executing task.
          ready         Task is ready to run.
          sem_wait      Task is waiting for a semaphore to be released
                         by another task.
          sleep         Task is sleeping.
          suspended     Task is suspended. This task won't execute again
                         until is receives a WAKEUP signal.
          recv_wait     Task is waiting to receive a message from a queue.
          stopping      Task is terminating.
          swapped_out   Task is currently swapped out.












                                       TSK.TXT

                            Task Status Reporting Utility
                      for use with the VCONSOLE Virtual Console
                         and the CSWITCH Multitasking Kernel

           Release 1.0          Printed 18 September 1990            Page 4
          =================================================================

          INVOKING TSK

              TSK must be invoked from the VCONSOLE virtual console system.
          It will not execute directly under DOS.

              At any  virtual console  prompt, type  "TSK". TSK  will load,
          display a snapshot of the task status on the invoking console and
          then terminate.

              TSK  may be  invoked  from virtual  console  N and  have it's
          output redirected to  virtual console M by  typing at any virtual
          console  prompt, "TSK  M", where  M  = the  number of  the target
          virtual  console. The  TSK display  will  be directed  to virtual
          console M even if virtual console M is not the currently "active"
          console.










































