home *** CD-ROM | disk | FTP | other *** search
/ Software 2000 / Software 2000 Volume 1 (Disc 1 of 2).iso / utilities / u258.dms / in.adf / UserDocs / Manual_Pages / Resident < prev    next >
Encoding:
Text File  |  1988-02-12  |  5.0 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      Resident(REL2)         ARP User's    Manual        Resident(REL2)
  5.  
  6.  
  7.  
  8.      NAME
  9.       Resident - Add, view or delete resident programs.
  10.  
  11.      SYNOPSIS
  12.       Resident Filename/...    AS/K DEL=Delete/s F=Full/s Q=Quiet/s
  13.  
  14.      DESCRIPTION
  15.       Resident programs are    the fastest loading, most memory
  16.       efficient programs on    the Amiga.  A program which can    run as
  17.       resident will    only have one copy of itself in    memory at one
  18.       time,    no matter how many processes are running its code. The
  19.       Resident command allows you to install, view and remove
  20.       programs from    the resident list.
  21.  
  22.       Resident by itself gives a list of all currently resident
  23.       programs.  If    you specify FULL, then more information    about
  24.       each program is displayed, such as how many users each
  25.       program has, where its code is stored    in memory, and what
  26.       its current checksum is.
  27.  
  28.       You can add programs to the resident list by simply typing
  29.       the names of the disk    files you want to add. Resident    uses
  30.       multiargs, so    there is no limit to the number    of files you
  31.       can add with one command.  Note that you can also specify
  32.       wildcards, if    you do,    Resident will display the name of the
  33.       file it is adding, unless you    also specify the QUIET switch.
  34.  
  35.       All the files    are stored by the last component of their
  36.       name,    no matter what the path    to the file was.  This means
  37.       that occasionally you    may have a name    conflict, since
  38.       Resident only    allows programs    to be added to the list    whose
  39.       names    are different.    To overcome this problem, you can use
  40.       the AS keyword to give the disk file a different resident
  41.       name.     Note that you can only    use one    filename with the AS
  42.       option, and no wildcards are allowed in this case.
  43.  
  44.       You can remove files from the    resident list by typing    their
  45.       names, and specifying    the Delete switch.  Wildcard deletions
  46.       are not currently supported, since it    is fairly unusual to
  47.       remove programs from the resident list.
  48.  
  49.       To actually take advantage of    the Resident programs, you
  50.       should invoke    them with the ARP ARun command,    or with    a
  51.       Shell    that takes advantage of    arp.library's process control
  52.       primitives.  Note that many programs can internally encode
  53.       their    stack size using this feature, and that    can be a large
  54.       memory saver as well.
  55.  
  56.      POSSIBLE PROBLEMS
  57.       Not all programs will    be happy as resident, it is probably
  58.       fair to say that the large majority of commercial and    public
  59.       domain software will not be useable as resident.  All    the
  60.  
  61.  
  62.  
  63.      Page 1                         (printed 2/22/88)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      Resident(REL2)         ARP User's    Manual        Resident(REL2)
  71.  
  72.  
  73.  
  74.       ARP programs,    and some commercial software such as TxED+
  75.       will work beautifully    as Resident.  Hopefully    more software
  76.       developers will take advantage of the    Resident code features
  77.       of ARP, since    it does    provide    a very memory efficient    way to
  78.       run multiple copies of programs, as well as the fastest
  79.       possible load.
  80.  
  81.       In general, if a program does    not work as Resident, the
  82.       resident manager will    be able    to detect it before running
  83.       your program,    and will put up    a requester informing you of
  84.       this fact.  You can simply remember not to make that
  85.       particular program resident in the future.  Even if a
  86.       program returns a checksum error, you    can remove it using
  87.       the Resident DELETE switch to    recover    the memory.
  88.  
  89.      EXAMPLE
  90.       Resident C/Type     ;    make type resident
  91.       ARun Type DOCUMENTS To PRT:
  92.       ARun Type DOCUMENTS TO SER:
  93.       ARun df0:c/Type DOCUMENTS
  94.  
  95.       Note that even the last invocation of    Type, using a full
  96.       pathname, will still result in ARun launching    the resident
  97.       version of the program, rather than using the    disk version,
  98.       since    the resident list is ALWAYS searched first.
  99.  
  100.       The three invocations    of Type    above will use roughly 1/3 the
  101.       memory requirements that the same process using RUN would
  102.       take.     Additionally, since Resident programs can encode
  103.       their    stack size, and    since most users use a very large
  104.       stack    from the CLI, the memory savings can be    even greater.
  105.       Here is a rough calculation:
  106.  
  107.           Three    Type programs executing    at the same time
  108.           having been launched by the RUN command will take
  109.           approximately    3552 bytes for their code (this    is
  110.           based    on the ARP type).  If the user stack is    set at
  111.           10,000 bytes (actually this is a little low),    the
  112.           memory for the stack will be 30,000 bytes.
  113.           Therefore, the total overhead, excluding any
  114.           allocated memory by Type itself, is 30,3552 bytes.
  115.  
  116.           The same example using ARun will only    use 1184 bytes
  117.           of code, approximately, no matter how    many types are
  118.           executing at the same    time.  Furthermore, since the
  119.           stack    size is    defined    inside of the Type program (it
  120.           uses a ResidentProgramTag), the total    stack for
  121.           three    types will be 12000 bytes. So the total    using
  122.           Resident programs and    ARun is    13,184 bytes,
  123.           considerably less than the 30,3552 bytes using Run,
  124.           which    is even    a low estimate.
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                         (printed 2/22/88)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      Resident(REL2)         ARP User's    Manual        Resident(REL2)
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.      Page 3                         (printed 2/22/88)
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.