Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.vms > #59082

Pointless Nostalgia: System Service Dispatching

Newsgroups comp.os.vms
Date 2016-06-29 02:53 -0700
Message-ID <d52289cd-00cc-4356-a3bd-03b8c574c356@googlegroups.com> (permalink)
Subject Pointless Nostalgia: System Service Dispatching
From lawrencedo99@gmail.com

Show all headers | View raw


This is all water under the bridge now, but I remember something peculiar about the way system services were dispatched on the VAX using the CHMK instruction, particularly.

As I recall from reading the “Internals & Data Structures” manual, each system service was invoked using the “CHMK #<code>” instruction, with a code identifying the system service.

This instruction had to be 4 bytes long. To ensure this (and prevent optimization to short literals by the assembler), the codes were forward-defined in MACRO. This seemed an unnecessarily roundabout way to do things, when you could have just written “CHMK I^#<code>” to force immediate-mode literals.

The other thing was, the CHMx instructions caused traps, not faults. Thus, restartable services (e.g. $HIBER) required the caller’s PC to be backed up by 4 before putting the process on a suitable wait queue. When it was woken up, the CHMK instruction would be automatically re-executed.

This allowed, for example, ASTs to temporarily interrupt a hibernating process, after which the process would return to hibernation, unless a $WAKE had been done in the meantime (perhaps in the AST itself), whereupon the $HIBER call would simply fall through and the process would resume normal execution.

Again, this could have been done a little simpler: why could the CHMx instructions not have triggered a fault (saved PC left pointing at start of instruction) rather than a trap (saved PC pointing at next instruction)? And the saved PSL would have had the FPD bit set. When one of these instructions was executed with FPD set, it would simply fall through as a no-op. Thus, restarting the system service would be as simple as clearing FPD in the saved PSL. The REI would do the rest.

So much more elegant, do you think?

I think the original VAX engineers missed a trick there...

Back to comp.os.vms | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Pointless Nostalgia: System Service Dispatching lawrencedo99@gmail.com - 2016-06-29 02:53 -0700
  Re: Pointless Nostalgia: System Service Dispatching Johnny Billquist <bqt@softjar.se> - 2016-06-29 13:36 +0200
    Re: Pointless Nostalgia: System Service Dispatching lawrencedo99@gmail.com - 2016-06-29 16:05 -0700
      Re: Pointless Nostalgia: System Service Dispatching Johnny Billquist <bqt@softjar.se> - 2016-06-30 14:45 +0200
        Re: Pointless Nostalgia: System Service Dispatching moroney@world.std.spaamtrap.com (Michael Moroney) - 2016-06-30 16:53 +0000
          Re: Pointless Nostalgia: System Service Dispatching lawrencedo99@gmail.com - 2016-06-30 15:32 -0700
        Re: Pointless Nostalgia: System Service Dispatching   VAXman-  @SendSpamHere.ORG - 2016-06-30 16:55 +0000
          Re: Pointless Nostalgia: System Service Dispatching Johnny Billquist <bqt@softjar.se> - 2016-06-30 21:13 +0200
            Re: Pointless Nostalgia: System Service Dispatching   VAXman-  @SendSpamHere.ORG - 2016-06-30 19:52 +0000
              Re: Pointless Nostalgia: System Service Dispatching Johnny Billquist <bqt@softjar.se> - 2016-07-01 14:11 +0200
              Re: Pointless Nostalgia: System Service Dispatching   VAXman-  @SendSpamHere.ORG - 2016-07-01 12:46 +0000
                Re: Pointless Nostalgia: System Service Dispatching Johnny Billquist <bqt@softjar.se> - 2016-07-01 17:40 +0200
                Re: Pointless Nostalgia: System Service Dispatching   VAXman-  @SendSpamHere.ORG - 2016-07-01 16:59 +0000
                Re: Pointless Nostalgia: System Service Dispatching Johnny Billquist <bqt@softjar.se> - 2016-07-01 19:45 +0200
                Re: Pointless Nostalgia: System Service Dispatching   VAXman-  @SendSpamHere.ORG - 2016-07-01 20:01 +0000
                Re: Pointless Nostalgia: System Service Dispatching Johnny Billquist <bqt@softjar.se> - 2016-07-04 12:35 +0200
                Re: Pointless Nostalgia: System Service Dispatching lawrencedo99@gmail.com - 2016-07-01 15:18 -0700
                Re: Pointless Nostalgia: System Service Dispatching   VAXman-  @SendSpamHere.ORG - 2016-07-02 20:02 +0000
                Re: Pointless Nostalgia: System Service Dispatching lawrencedo99@gmail.com - 2016-07-03 14:10 -0700
                Re: Pointless Nostalgia: System Service Dispatching lawrencedo99@gmail.com - 2016-07-04 14:56 -0700
                Re: Pointless Nostalgia: System Service Dispatching   VAXman-  @SendSpamHere.ORG - 2016-07-04 13:25 +0000
                Re: Pointless Nostalgia: System Service Dispatching   VAXman-  @SendSpamHere.ORG - 2016-07-05 00:46 +0000
                Re: Pointless Nostalgia: System Service Dispatching David Froble <davef@tsoft-inc.com> - 2016-07-05 08:43 -0400
                Re: Pointless Nostalgia: System Service Dispatching lawrencedo99@gmail.com - 2016-07-05 15:40 -0700
                Re: Pointless Nostalgia: System Service Dispatching Paul Sture <nospam@sture.ch> - 2016-07-06 07:33 +0200
                Re: Pointless Nostalgia: System Service Dispatching   VAXman-  @SendSpamHere.ORG - 2016-07-06 00:08 +0000
                Re: Pointless Nostalgia: System Service Dispatching David Froble <davef@tsoft-inc.com> - 2016-07-05 22:57 -0400
                Re: Pointless Nostalgia: System Service Dispatching   VAXman-  @SendSpamHere.ORG - 2016-07-06 10:43 +0000
                Re: Pointless Nostalgia: System Service Dispatching Paul Sture <nospam@sture.ch> - 2016-07-05 12:30 +0200
                Re: Pointless Nostalgia: System Service Dispatching   VAXman-  @SendSpamHere.ORG - 2016-07-05 13:00 +0000
                Re: Pointless Nostalgia: System Service Dispatching Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> - 2016-07-06 15:12 +0000
                Re: Pointless Nostalgia: System Service Dispatching Paul Sture <nospam@sture.ch> - 2016-07-06 21:50 +0200
                [OT] Real Genius, was: Re: Pointless Nostalgia: System Service Dispatching Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> - 2016-07-07 19:55 +0000
                Re: [OT] Real Genius, was: Re: Pointless Nostalgia: System Service Dispatching Paul Sture <nospam@sture.ch> - 2016-07-07 22:27 +0200
                Re: Pointless Nostalgia: System Service Dispatching   VAXman-  @SendSpamHere.ORG - 2016-07-06 15:42 +0000

csiph-web