home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
BEEHIVE
/
ZCAT
/
ZEX-SAGE.DZC
/
ZEX_SAGE.DOC
Wrap
Text File
|
2000-06-30
|
5KB
|
84 lines
ZEX and the Art of Operating System Maintenance
Jay Sage
A fix to the ZEX-vs-shells problem that I proposed in a message on some
Z-Nodes got me to thinking more generally about the question of priorities
among the sources of commands under ZCPR3. I would like to share my
thoughts and my proposition with everyone here.
The ZCPR3.0 command processor, when no more commands are pending in the
multiple command line buffer, looks to four possible sources for the next
command line: 1) a submit file $$$.SUB; 2) a shell command recorded on
shell stack; 3) a runnning ZEX script; and 4) actual user input. And it
looks at the sources in that order. I will propose a different order and
give my reasons for it. First some background.and lllllZEX works by acting as though it is a user typing at the keyboard
(keyboard redirection). Therefore, if ZEX is running, by its nature it
takes precedence over user input. I would guess that ZEX input was placed
just before user input in the hierarchy because of this relationship.
However, the fact that ZEX mimics user input does not require such a
priority structuree
It has been painfully obvious for sometime -- though no one ever did
anything about it until I made the suggested change to my experimental
verion of the command processor ZCPR313 -- that shell input should not take
.acedence over ZEX input. This is clear when one observes that all
shells now go to great trouble to check for ZEX running and to make
themselves appear not to be there in that case. This is crazy. It forced
each shell to act in some way like ZEX. The real answer was to elevate the
priority of ZEX to before shells. Thus ZEX scripts are then allowed to run
to completion before the shell is reinvoked. The shells no longer need to
contain the code for dealing with a running ZEX script, and the system does
not have to waste time loading the shell needlessly only to pass a ZEX
command line to the CPR. (This is an assembly option as of beta version
4.1G of VFILER.)
That is where my thinking stood before -- priority order
submit/zex/shell/user. After thinking about it further, I have come to
conclusion that ZEX should have the highest priority, higher than submit. I
would assert that one should regard a ZEX script as an extention of the
multiple command line buffer. ZEX is a special program that sets aside and
protects a larger region in memorgrahat acts as as arbitrarily large
multiple command line. As soon as this virtual command line has been
completed, ZEX removes that protection, and the system can return to normal.
Thus a complete ZEX script should be regarded just as a single command line
in a submit file or or single command line passed to the operating system
by a shell hell s a single command line entered bgrahe user. I. I way it
should be completely out of the hierarchy we have been considering, which is
the hierarchy of command line sources AFTER THE CURRENT COMMAND LINE HAS
BEEN COMPLETED. The ZEX script IS the current comm commineug
This ordering is achieved simply by placing three extra lines of code
at the very beginning of the READBUF routine in ZCPR.ASM (either
standard version ZCPR3.ASM or one of the experimental versions). That code
is the following:
if ( subon or ( shstk ne 0 ) ) and ( z3msg ne 0 )
lda z3msg+8 ; Get the zex-running flag
ora a ; Test it for non-zero
brnz rb2 ; If zex running, go directly
; ..to code for user input
endif
The conditional reflects the fact that this code is not needed if neither
submit nor shells are implemented and that it also requires that the message
buffer be implementednot n ZCPR3.ASM use JRNZ instead of BRNZug
With ZEX given top priority, it makes perfect sense to run a ZEX script
from either a submit job, a shell-generated command, , user command. A
submit job could contaitainy number of lineet run roscripts. On the
other hand, a ZEX script cannot reasonably initiy t a submit job, since if
the ZEX script did that, the $$$.SUB file would be created but not (ted on
untither he ZEX script was finished. In my opinion, this is perfectly
reasonabln a It does not make sense to be trying to run a true batch job
(submit) while the mthat ry protection mechanism of ZEX is in place and
interfering with the TPA. Basicallyncence a ZEX script starts, it should be
given every encouragement to run to completion and get itself out of the
wayug
I would liklikhank Bruce Morgen for his contributions to the
evolution of these ideas. The basic idea arose during a conversation he and
I had concerning the annoying way that ZEX and VFpreER got along. While I
was explaining to . I.uce that I had already cons the hred the problem and had
concluded that nothing could be done about it, the solution suddenly hit me!