home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.14 / text0043.txt < prev    next >
Encoding:
Internet Message Format  |  1989-01-07  |  2.5 KB

  1. From: uunet!csun.edu!csuna!aeusemrs (mike stump)
  2.  
  3. In article <228@longway.TIC.COM> uunet!sugar!peter (Peter da Silva) writes:
  4. >What sorts of approaches have people taken to doing real-time control under
  5. >UNIX? How far apart are the different standards?
  6.  
  7. Below is from the Moderator, I hope.
  8.  
  9. [ All comments I put in as the moderator are marked as from the
  10. moderator, with -mod at the end.  The material you're referring to
  11. (below, starting ``I have this fantasy'') was not so marked, and wasn't
  12. from me:  it came with the submission.  Your submission is also littered
  13. with remarks in square brackets.  I assume you put them there, since I didn't.
  14.  
  15. In general, I would recommend that submittors use parentheses when
  16. they mean parentheses, instead of using brackets.  -mod ]
  17.  
  18. >[I have this fantasy of one day being able to write a program that does
  19. > something like this under UNIX:
  20. >
  21. > comm=open("/dev/tty3a", 2);
  22. > status=open("/dev/tty3b", 2);
  23. >
  24. > memory=open("/usr/scada/mempool", 2);
  25. >
  26. > mempool=map_file(memory, POOLSIZE);
  27. >
  28. > commbit = 1 << (commflag = async_read(comm, commbuf, 1));
  29. > statbit = 1 << (statflag = async_read(status, statbuf, 1));
  30. >
  31. > bits = commbit|statbit;
  32. > while(bits) {
  33. >  flags = async_wait(bits);
  34. >  if(flags&commbit) {
  35. >   bits &= ~commbit;
  36. >   do something with *commbuf;
  37. >   repost read if necessary;
  38. >  }
  39. >  if(flags&statbit) {
  40. >   bits &= ~statbit;
  41. >   do something with *statbuf;
  42. >   repost read if necessary;
  43. >  }
  44. > }
  45. >]
  46.  
  47. I don't offen support, or give hardware advice for systems that run Unix;
  48. but, In partial response to the Moderators comments about RealTime Unix, I
  49. feel I must respond.
  50.  
  51. [ See above about whose remarks you're responding to.  -mod ]
  52.  
  53. Elxsi makes a very interesting computer when it comes to real time;
  54. some of the features include:
  55. being able to lock down physical memory, [Yes, I know everybody can do this,
  56.                       but without kernel hacking?!]
  57. lock down a register set, [can you say fast contex switch]
  58. high priority processes, [can you say preempt the Operating System?]
  59. Timer support to programs, [again, no kernel hacking].
  60.  
  61. And just think, System V, and Berkeley 4.2 run under or was that along with
  62. EMBOS, and EMS, at the same time. (their VMS clone, although some bugs they
  63. don't emulate :-))
  64.  
  65. All on 1-12 CPU machine [yes, it is pretty transparent], with up to two
  66. gigabytes of memory.  And yes, as a matter of fact, I DO have a fully loaded
  67. one in my back bedroom, right next to the 32ton refrigeration unit. :-)
  68.  
  69. And, now to the point, one is able to write the above program with little
  70. difficulty.
  71.  
  72.  
  73. Volume-Number: Volume 14, Number 45
  74.  
  75.