home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 21677 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  3.0 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!hplabs!ucbvax!ELROS.STG.TRW.COM!powers
  2. From: powers@ELROS.STG.TRW.COM
  3. Newsgroups: comp.os.vms
  4. Subject: RE: "Beat the Buzzer" Game
  5. Message-ID: <00966ea6.2abc2c00.22109@elros.stg.trw.com>
  6. Date: 21 Jan 93 07:50:43 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Distribution: world
  9. Organization: The Internet
  10. Lines: 54
  11.  
  12.  
  13. Ken Bosward (webosk@itwol.bhp.com.au):
  14. > Any ideas for a "beat the buzzer" game to make a training class more
  15. > interesting?  There will be around 8 users in the same group with VT100/220
  16. > terminals and OPER privilege. I have trialled a program using $BRKTHRU to
  17. > send messages to my terminal, which works ok although occasionally some
  18. > messages get lost if they all arrive in quick succession.
  19. >
  20. > I would like ideas to achieve the following:
  21.   ... [stuff deleted] ...
  22. > - ensuring that the first person to press his button really *is* the first
  23. >   to get through to my terminal.
  24. > Are there better methods than using $BRKTHRU (e.g. Common Event Flags and
  25. > Global Sections)?
  26.  
  27. Think about using BRKTHRU in combination with the lock manager (or "lock
  28. management services" -- I'm at home late at night and don't remember the
  29. official name -- it's in the System Services docs).
  30.  
  31. It's been several years since I did programming with locks, so I do not
  32. remember the details, but the basic idea is that the program that a student
  33. would run to ring the bell would grab an exclusive lock on a named resource,
  34. say, "WINNER," then use BRKTHRU to bong the bell, then wait awhile to ensure
  35. that the competing students are foiled, and finally release the lock.
  36. Identical programs run by the losers would fail when they try to lock the
  37. WINNER resource, and could then write a "You lose" message to their terminals
  38. without bonging anything (except themselves or the other losers, depending on
  39. how mean you want to be to the losers).  The neat thing here is that the
  40. programs run by the losers would know that they lost the game internally, and
  41. you could use that knowledge for any purpose, from silence to flames, as you
  42. see fit.
  43.  
  44. This is vintage 1985 knowledge.  Then, anyway, the system services of interest
  45. were ENQ and DEQ.  You may or may not need to install the programs with SYSLCK
  46. privilege, in addition to OPER for BRKTHRU, depending on your circumstances.
  47. Also see the system service GETLKI.  As I recall, the only difficult thing
  48. about ENQ/DEQ in 1985 was getting used to the idea that the lock was on a
  49. name, not a thing.
  50.  
  51. Time check:  It is January 20.  Last time I sent a response to the group,
  52. my post was marooned somewhere (sri.com?) for three days before distribution,
  53. and I was criticised for being out-of-touch with the thread.
  54.  
  55. Apologies for my 1985 recollections, but this is just a suggestion about where
  56. to look for a winner-takes-all enforcer in the system services manual anyway.
  57. Supposing that this post isn't marooned again, someone who has worked with
  58. locks recently might be inspired to post some modern 1993 poop on the subject,
  59. which might be more helpful.
  60.  
  61.       Lester Powers
  62.       powers@elros.stg.trw.com
  63.  
  64.  
  65.