home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / tcos / crf / text0000.txt < prev   
Encoding:
Internet Message Format  |  1990-07-28  |  31.8 KB

  1. From: jsh@ico.isc.com (Jeffrey S. Haemer)
  2.  
  3. [ This is the Common Reference Ballot that was referenced by many
  4. balloters in the recent IEEE 1003.4 ballot.  -mod ]
  5.  
  6. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  7. COMMON REFERENCE BALLOT
  8.  
  9. CHAPTER 3. BINARY SEMAPHORES
  10. ----------------------------
  11.  
  12. OBJECTION 1     Chapter 3       Pages 21-41
  13.  
  14. Problem:
  15.  
  16. This synchronization facility precludes the use of mechanisms outside
  17. the kernel (for example, test-and-set) for optimal performance.  On
  18. machines where there is shared memory and a test-and-set instruction,
  19. you would like the synchronization facility to be able to be
  20. implemented completely in shared memory without kernel support.  On
  21. machines without shared memory, there is already existing mechanism
  22. that can be used to construct a binary semaphore facility (for example,
  23. the fcntl locking facility).
  24.  
  25. Action:
  26.  
  27. We believe the binary semaphore facility documented in Chapter 3
  28. appears to add no new functionality that cannot be easily constructed
  29. from existing interfaces and thus should be removed.  The
  30. proposed interface should be replaced with a new facility capable of
  31. being implemented in shared memory, similar to the 1003.4a
  32. synchronization primitives.  Ideally this interface should support
  33. synchronization between threads in a single process and between
  34. processes sharing memory.
  35.  
  36. _________________________________________________________________
  37.  
  38. CHAPTER 4. PROCESS MEMORY LOCKING.
  39. ----------------------------------
  40.  
  41. OBJECTION 2     Chapter 4       Pages 33-41
  42.  
  43. Problem:
  44.  
  45. In the current memory locking proposal, the region locks are almost
  46. impossible to use in a portable way.  The implementation is allowed to
  47. lock and unlock any amount of data surrounding the request (including
  48. the whole process).  Because the call does not return the amount that
  49. was actually locked, an application has no way of finding this
  50. information.  Thus it can issue two lock requests for two disjoint
  51. areas, followed by an unlock of the first area and have no idea how
  52. much is still locked.  It is reasonable for an application to assume
  53. that the second area was still locked.  The current wording however
  54. makes no guarantee of this.
  55.  
  56. A conforming implementation would have to lock some large amount
  57. containing both regions and then to unlock that same amount on the
  58. first unlock.  Thus the second region would no longer be locked.
  59.  
  60. The alternative would be to force all implementations to track the
  61. user's requests and maintain information about each page the user
  62. locked.  This makes things look just like file locking.  The only
  63. difference is that the file address space is represented by a single
  64. kernel data structure (the inode/vnode).  The vm system is composed of
  65. a set of disjoint kernel data structures even for a single thread.  Now
  66. suppose process A and B are sharing the same portion of memory (memory
  67. mapped files), an implementation would have to maintain locking
  68. information on a global system basis to figure out if a page is now
  69. pageable.  Although this would be done at unlock time and not pageout
  70. time, it is still a large set of data structures to maintain.
  71.  
  72. Action:
  73.  
  74. A new interface must be added to determine the locking granularity for that
  75. system.
  76.  
  77. A request to (un)lock a region of memory of a specified address and
  78. size should return the number of bytes actually (un)locked. The number
  79. of bytes will always be a multiple of the granularity for that system.
  80. The starting address of the region actually (un)locked will be at the
  81. immediately preceding granule boundary unless the requested address was
  82. already aligned on a granule boundary. The range actually (un)locked
  83. will always encompass the requested range. If the size requested is 0
  84. then no memory is locked. Whether a  granule is locked or unlocked is
  85. determined by the most recent (un)lock request whose actual range
  86. encompassed that granule.
  87.  
  88. As a consequence of these changes, the type parameter is no longer necessary
  89. to the memlk() call and so should be deleted.
  90.  
  91. _________________________________________________________________
  92.  
  93. CHAPTER 5. SHARED MEMORY
  94. ------------------------
  95.  
  96. OBJECTION 3     Chapter 5       Pages 43-59     Lines 1-550
  97.  
  98. Problem:
  99.  
  100. SVID 3 (System V Release 4.0), OSF AES (OSF/1), Berkeley BSD 4.4, MACH
  101. 2.5, ULTRIX, SunOS, HP/UX, etc, all include an (almost) identical
  102. definition of mmap() based on the current Sun/Berkeley specification.
  103. The implementors and users of these systems all believe there is
  104. considerable demand for a generic file-mapping facility such as mmap()
  105. provides.
  106.  
  107. We believe the rationale on why mmap() was not used to satisfy the
  108. requirement for a shared memory facility to be incorrect, since mmap()
  109. is an existing interface that provides the desired functionality.  We
  110. believe it is better to document the additional "unnecessary
  111. parameters" as constant rather than to define a completely new
  112. interface.
  113.  
  114. We do not believe a standard should depart from existing practice
  115. without sufficient justification.  Based on our comments above, we do
  116. not believe sufficient justification has been given.
  117.  
  118. Action:
  119.  
  120. We believe there are several actions which will resolve these objections.
  121.  
  122.         1. Provide sufficient justification for a different interface.
  123.         2. Adopt the proposal documented in the document "Proposal for Memory
  124.            Mapped Files" submitted by Sol Kavey at the New Orleans to replace
  125.            the existing chapter with the mmap() interface.
  126.         3. Remove this chapter from this ballot and send
  127.            this chapter back to the working group for
  128.            further review.
  129.  
  130. Without at least one of these actions, this ballot remains negative.
  131.  
  132. _________________________________________________________________
  133.  
  134. CHAPTER 7. ASYNCHRONOUS EVENT NOTIFICATION
  135. ------------------------------------------
  136.  
  137. OBJECTION 4     Chapter 7       Pages 83-116
  138.  
  139. Problem:
  140.  
  141. The event mechanism is attempting to solve the following apparent deficiencies
  142. in the signal mechanism:
  143.         1. signals are not queued.
  144.         2. there is no way to distinguish between events which generate the
  145.            same signal.
  146.         3. Additional signal numbers are needed for the user defined evt_raise
  147.            function and to allow user defined signals for the reception of
  148.            asynchronous events such as I/O and timers.
  149.         4. signal delivery cannot be prioritized
  150.         5. It is not possible to synchronously wait for specific signals
  151.  
  152. Investigating the signal interfaces provided by Berkeley and System V,
  153. we believe there are ways to extend the existing signal mechanism to provide
  154. all this functionality without compatibility problems.
  155.  
  156. Action:
  157.  
  158. The chapter should be deleted and replaced with a description of the enhanced
  159. signal mechanism.
  160.  
  161. Addressing each point above:
  162.  
  163.         1. System V already has queued signals. The POSIX signal behavior
  164.            should be similarly strengthened to require queueing for 1003.4
  165.            compliant systems.
  166.  
  167.         2. Both Berkeley and System V allow data to be passed to the handler
  168.            when the signal is delivered via the sigcode parameter. The contents
  169.            of this parameter should be defined to identify the event. For
  170.            example, for timer events the sigcode parameter should contain the
  171.            timer_id and for asynchronous I/O, sigcode should contain the handle.
  172.            POSIX signals should include passing of sigcode parameter for 1003.4.
  173.  
  174.         3. There is no requirement or rationale for evt_raise which is used
  175.            as a mechanism for intra-process data passing especially as there
  176.            are other mechanisms which fill this need.
  177.  
  178.            For the delivery of other asynchronous events, more defined signals
  179.            should be provided.
  180.  
  181.         4. It is already possible to prioritize delivery of signals using the
  182.            signal mask and disciplined programming. The addition of more
  183.            defined signals will give finer grain of control over delivery
  184.            order.
  185.  
  186.         5. An interface similar to the 1003.4a sigwait() function should be
  187.            provided with the possible addition of a timeout parameter.
  188.  
  189. Addressing these points will unify and therefore simplify the
  190. interfaces and solves the problem of defining the interactions between
  191. signals and events, for example it is not possible to atomically mask
  192. events and signals.
  193.  
  194. _________________________________________________________________
  195.  
  196. CHAPTER 8. TIMERS
  197. -----------------
  198.  
  199. COMMENT 1       Chapter 8.4.2.4 Page 123        Line 188
  200.  
  201. Problem:
  202.  
  203. It appears from the description of the error that there is no way for
  204. the process to acquire additional timer resources without first freeing
  205. some of its existing timer resources.  This doesn't appear to be the
  206. situation where EAGAIN has been used in the past.  Is this really the
  207. right error value?
  208.  
  209. _________________________________________________________________
  210.  
  211. OBJECTION 5     Section 8       Page 117-136
  212.  
  213. Problem:
  214.  
  215. Asynchronous event notification is used to deliver the timer completion event.
  216. (Note. See objection Number # relating to Asynchronous Event Notification
  217. chapter requiring event notification to be replaced with enhanced signals.)
  218.  
  219. Action:
  220.  
  221. The proposal for signals (as a replacement for the Asynchronous Event
  222. Notification) requires all references to struct event in the calls and
  223. data structures in this section to be changed to a signal number to be
  224. sent to the requesting process when the timer expires. The timer_id should
  225. be passed to the signal handler in the sigcode parameter. If the signal number
  226. is 0 then no asynchronous event is sent.
  227.  
  228. _________________________________________________________________
  229.  
  230. OBJECTION 6     Section 8.4.4   Page 124,125    Line 228-233,260-264
  231.  
  232. Problem:
  233.  
  234. There is no rationale explaining the difference between
  235. resrel() and resabs().  It isn't clear from the existing descriptions
  236. why the two are necessary.
  237.  
  238. Action:
  239.  
  240. Provide rationale justifying why two interfaces are necessary or merge the two
  241. interfaces into one.
  242.  
  243. _________________________________________________________________
  244.  
  245. CHAPTER 9. IPC
  246. --------------
  247.  
  248. OBJECTION 7     Section 9.3.1   Page 138        Lines 35-39
  249.  
  250. Problem:
  251.  
  252. The sender_t has undefined semantics, and is therefore not
  253. useful.  Since its behavior is not defined, it cannot be used
  254. in a conforming program.
  255.  
  256. Action:
  257.  
  258. Remove all references (definition and uses) to fields with
  259. type sender_t.
  260.  
  261. Rationale:
  262.  
  263. The only information about the sender which would be useful
  264. would be an indication about how to reply to the sender.  In
  265. this framework that would be a pathname; passing a pathname
  266. would be unwieldy and would require all senders to have a
  267. receive queue.  Furthermore, specifying it as pid_t would
  268. be incorrect as per the rationale on page 168-169 lines 1063-
  269. 1079.
  270.  
  271. _________________________________________________________________
  272.  
  273. OBJECTION 8     Section 9.3.1   Page 138        Lines 48
  274.  
  275. Problem:
  276.  
  277. Asynchronous event notification is used to notify the process of
  278. delivery of messages.  (Note. See objection Number # relating to
  279. Asynchronous Event Notification chapter requiring event notification to
  280. be replaced with enhanced signals.)
  281.  
  282. Action:
  283.  
  284. The proposal for signals (as a replacement for the Asynchronous Event
  285. Notification) requires all references to events in the calls and
  286. data structures in this section to be changed to a signal number to be
  287. sent to the requesting process.
  288.  
  289. In particular, replace line 48 with:
  290.  
  291.                 int     msg_signo;
  292.  
  293. The message control block pointer should be passed to the signal
  294. handler in the sigcode parameter. If the signal number is 0 then no
  295. asynchronous event is sent.
  296.  
  297. _________________________________________________________________
  298.  
  299. OBJECTION 9     Section 9.3.1   Page 138, 140   Lines 54-57,103-105
  300.  
  301. Problem:
  302.  
  303. We feel that overloading msg_data with actual message
  304. contents is a small optimization that should not be exposed
  305. at the interface level. It is possible for the implementation
  306. to optimize the transfer of small messages without overloading
  307. this field.  Also, we feel it is a bad idea to use a pointer
  308. to contain data since there is no implied relationship between
  309. the size of a pointer and, say, the size of an integer.
  310.  
  311. Action:
  312.  
  313. Remove the facility for sending data as a (void *).
  314. Delete Lines 103-105 and all references to MSG_OVERRIDE.
  315.  
  316. _________________________________________________________________
  317.  
  318. OBJECTION 10    Section 9.3.1   Page 139, 140   Lines 68, 118-125
  319.  
  320. Comment:
  321.  
  322. The name MQWRAP implies an implementation for throwing away
  323. the oldest message.
  324.  
  325. Action:
  326.  
  327. Change the name to something which doesn't imply the
  328. implementation.  This applies to both MQWRAP and MQNOWRAP.
  329.  
  330. _________________________________________________________________
  331.  
  332. OBJECTION 11    Section 9.3.1   Page 139        Lines 64-67
  333.  
  334. Problem:
  335.  
  336. The distinction between mqrsvmsg and mqmaxmsg is unclear
  337. (and seems unnecessary).  This is also true for mqrsvbytes
  338. and mqmaxbytes.
  339.  
  340. Action:
  341.  
  342. Make mqrsvmsg and mqmaxmsg one field.  Make mqrsvbytes
  343. and mqmaxbytes one field.
  344.  
  345. _________________________________________________________________
  346.  
  347. COMMENT 2       Section 9.3.1   Page 139        Lines 81
  348.  
  349. Comment:
  350.  
  351. The word "overwrite" is incorrect.
  352.  
  353. Action:
  354.  
  355. The word should be "discard."  The word "overwrite" implies
  356. how a message is released.
  357.  
  358. _________________________________________________________________
  359.  
  360. OBJECTION 12    Section 9.3.1   Page 139        Lines 71-72
  361.  
  362. Problem:
  363.  
  364. The mqsendwait and mqrcvwait fields cannot be counted on
  365. to remain fixed between a reading of the fields and any
  366. subsequent action within a program.  Therefore, it's not
  367. clear what use any program could reliably make of this
  368. data.
  369.  
  370. Action:
  371.  
  372. These fields should be removed.
  373.  
  374. _________________________________________________________________
  375.  
  376. OBJECTION 13    Section 9.3.2   Page 139        Lines 92-94
  377.  
  378. Problem:
  379.  
  380. There is no justified requirement or rationale for MQ_PERSIST and we
  381. can see no immediate use for it.  In particular, lines 92-94 can be
  382. removed from the standard.  We agree with the rationale on lines 1129-1131.
  383.  
  384. Action:
  385.  
  386. Remove lines 92-94 and all references to MQ_PERSIST.
  387.  
  388. _________________________________________________________________
  389.  
  390. OBJECTION 14    Section 9.3.2   Page 139-140    Lines 95-97, 101-102
  391.  
  392. Problem:
  393.  
  394. The MSG_COPY and MSG_MOVE flags are unnecessary.   The system
  395. can distinguish between user-allocated and system-allocated
  396. buffers at the time the message is sent.  This information can
  397. be stored in the message control block by msgalloc().
  398.  
  399. Action:
  400.  
  401. Delete these lines (95-97 and 101-102).
  402.  
  403. _________________________________________________________________
  404.  
  405. OBJECTION 15    Section 9.3.2   Page 139-140    Lines 98-100, 109-110, 114-117
  406.  
  407. Problem:
  408.  
  409. The current draft provides two distinct mechanisms in an attempt
  410. to reduce the overhead of copying messages.  Unfortunately,
  411. the application must choose one of these mechanisms, and
  412. there is no portable way to know which is more efficient.
  413. We don't believe that it is necessary or desirable to provide
  414. two different mechanisms.  The MSG_USE facility is the more
  415. complex of the two, since it requires additional synchronization
  416. (to know when to deallocate the buffer).  It also complicates
  417. close of a queue and abnormal process termination.  We believe
  418. it is more desirable to use system-allocated buffers (provided
  419. by msgalloc()) than to use a mechanism requiring the system
  420. to manipulate user-allocated buffers (cross-address space
  421. manipulation).
  422.  
  423. Action:
  424.  
  425. Delete Lines 98-100.  Delete all references to MSG_USE.
  426. Delete all references to MSG_WAIT and MSG_NOWAIT.
  427.  
  428. _________________________________________________________________
  429.  
  430. COMMENT 3       Section 9.4     Page 141        Lines 136
  431.  
  432. Editorial Comment:
  433.  
  434. Change mqsetattr() to mqgetattr().
  435.  
  436. _________________________________________________________________
  437.  
  438. OBJECTION 16    Section 9.4.2   Page 144        Lines 240-245
  439.  
  440. Problem:
  441.  
  442. Behavior described here does not consider the effect of the
  443. MQWRAP flag.
  444.  
  445. Action:
  446.  
  447. Define behavior which does take into account the MQWRAP flag.
  448.  
  449. _________________________________________________________________
  450.  
  451. COMMENT 4       Section 9.4.2   Page 144        Lines 240-245
  452.  
  453. Editorial Comment:
  454.  
  455. This section is worded awkwardly and should be rewritten
  456. to make it clearer.
  457.  
  458. _________________________________________________________________
  459.  
  460. OBJECTION 17    Section 9.4.3   Page 145        Lines 268-270
  461.  
  462. Problem:
  463.  
  464. If our earlier objections on MSG_USE are accepted and MSG_USE
  465. is deleted, there is no problem here.  Otherwise, there should
  466. be an option to allow a closing process to NOT have to wait for
  467. messages marked as MSG_USE to be delivered before the close
  468. system call can complete.  It is not reasonable to force a
  469. real-time process to wait for something when it doesn't need
  470. to.
  471.  
  472. Action:
  473.  
  474. If MSG_USE remains, provide an option to allow a process to
  475. NOT have to wait for messages marked as MSG_USE to be delivered
  476. before the process goes away.
  477.  
  478. _________________________________________________________________
  479.  
  480. OBJECTION 18    Section 9.4.5   Page 147        Lines 324-326
  481.  
  482. Problem:
  483.  
  484. These lines refer to the ability to send a (void *)'s worth
  485. of data, which we have objected to earlier.
  486.  
  487. Action:
  488.  
  489. Replace the sentence on lines 324-326 to say that the msg_data field points to
  490. the message data.
  491.  
  492. _________________________________________________________________
  493.  
  494. OBJECTION 19    Section 9.4.5   Page 147        Lines 332-359
  495.  
  496. Problem:
  497.  
  498. With the removal of MSG_USE, MSG_COPY, and MSG_MOVE, none of
  499. this text is necessary.
  500.  
  501. Action:
  502.  
  503. Behavior when sending messages should be controlled strictly
  504. by the NONBLOCK flag set by fcntl.  This means one of three
  505. things happens when a message is sent:
  506.  
  507.         1. the message is successfully queued (either due to MQWRAP
  508.            or space being available).
  509.         2. the process is blocked waiting for space in the queue,
  510.            to be followed by successful queuing. (due to MQWRAP not being
  511.            set, no space being available and O_NONBLOCK not being specified).
  512.         3. the message is rejected. (due to MQWRAP not being set, no space
  513.            being available and O_NONBLOCK was specified).
  514.  
  515. _________________________________________________________________
  516.  
  517. OBJECTION 20    Section 9.4.6   Page 149-151    Lines 400-472
  518.  
  519. Problem:
  520.  
  521. In our objections on Chapter 7 (Asynchronous Event Notification)
  522. we believe the mechanism proposed by that chapter should be
  523. deleted from the standard.  However, if the mechanism remains,
  524. there are several cases which can occur which are not defined
  525. by the existing draft.  In particular:
  526.  
  527.         1. What happens when multiple processes have requested asynchronous
  528.            notification when a message arrives?  Specifically, if more than
  529.            one process has registered interest in one message, who gets it?
  530.            First one to register, highest priority, or is the order undefined?
  531.  
  532.         2. What happens when there is a mixture of processes synchronously
  533.            waiting for a message and processes having requested
  534.            asynchronous notification of a message arrival, when a
  535.            message arrives.  Specifically, if more than one process has
  536.            expressed interest in one message, who gets it?  Do
  537.            synchronously waiting processes have priority over
  538.            asynchronously notified processes?  Is the first process
  539.            that registers interest (either by waiting or by requesting
  540.            asynchronous notification) the one that gets it, does the
  541.            highest priority process the one, or is the order undefined?
  542.  
  543.         3. Can a process request asynchronous notification and then
  544.            later cancel that request?  There doesn't appear
  545.            to be a mechanism to do this, although clearly the
  546.            kernel needs such a mechanism for processes that
  547.            terminate.
  548.  
  549. Action:
  550.  
  551. Define the behavior (or explicitly indicate it is undefined) when
  552. these situations occur.  Explicitly stating that such behavior
  553. is undefined would seem to violate the initial requirement for
  554. a deterministic data passing method.  It is also acceptable
  555. (and desirable) to remove altogether the ability to receive
  556. messages asynchronously.
  557.  
  558. _________________________________________________________________
  559.  
  560. OBJECTION 21    Section 9.4.11  Page 157-158    Lines 656-680
  561.  
  562. Problem:
  563.  
  564. This operation is inherently unreliable, since the messages which
  565. are enqueued may be received by the receiving process (creating
  566. a race condition).
  567.  
  568. Action:
  569.  
  570. Since there doesn't seem to be any rationale for its inclusion,
  571. either provide rationale for this facility and fix the race
  572. conditions or (more preferably) delete this facility from the
  573. standard.
  574.  
  575. _________________________________________________________________
  576.  
  577. OBJECTION 22    Section 9.4.12  Page 158        Lines 681-702
  578.  
  579. Problem:
  580.  
  581. The mqgetpid facility does not appear to provide any useful function.
  582.  
  583. Action:
  584.  
  585. The rationale on lines 1063-1079 does not appear to justify the
  586. inclusion of such a facility, and, in fact, the rationale appears
  587. to justify its exclusion.  We agree with the rationale.
  588.  
  589. _________________________________________________________________
  590.  
  591. OBJECTION 23    Section 9.4.13,9.4.14   Pages 158-160   Lines 703-759
  592.  
  593. Problem:
  594.  
  595. We have previously objected to sending a pointer's worth of
  596. data when there's no possible way to de-reference the pointer
  597. on the receiving end in any meaningful way.
  598.  
  599. The facilities mqputevt() and mqgetevt() are just another mechanism for
  600. sending a short message but with a separate logical channel in the
  601. queue.  We don't believe another mechanism is necessary.
  602.  
  603. Action:
  604.  
  605. Delete the putevt/getevt facility.
  606.  
  607. _________________________________________________________________
  608.  
  609. OBJECTION 24    Chapter 9       Pages 137-176   Lines 1-1343
  610.  
  611. Problem:
  612.  
  613. The interfaces in this chapter are not based on current practice.
  614.  
  615. Lines 1175-1178 of the rationale seems to assume the only existing
  616. practice worthy of consideration to be BSD or System V.  We believe
  617. there is significant existing practice, in addition to BSD and System
  618. V, that does not appear to have been considered by the working group.
  619. One particular example which comes to mind is MACH IPC.
  620.  
  621. In addition, on Lines 1179-1196 the rationale for a new interface makes
  622. incorrect assumptions about both BSD and System V, and ignores the
  623. existence of several others which implement similar functionality.  In
  624. particular, BSD does provide asynchronous notification of receipt of
  625. message, it does provide the sender of a message (for purposes of
  626. reply), and does allow using pathnames for identifying message queues
  627. (in the local case...the only case considered here).  In addition,
  628. several other IPC interfaces are more general, in that they also
  629. provide support for networked environments, which is being considered
  630. by another IEEE working group.
  631.  
  632. We believe the rationale for a new interface to be invalid,
  633. in that it is based on assumptions about existing interfaces
  634. which are incorrect.
  635.  
  636. Action:
  637.  
  638. The proposed interfaces should replaced with an existing interface,
  639. ideally one that has potential to be used in a distributed environment,
  640. including those in which the filesystems are not shared.
  641.  
  642. _________________________________________________________________
  643.  
  644. OBJECTION 25    Chapter 9       Pages 137-176   Lines 1-1343
  645.  
  646. Overall Action:
  647.  
  648. We believe there are several actions which will resolve
  649. our objections for this chapter.
  650.  
  651.         1. Satisfy all of the above objections.
  652.         2. Substitute the entire chapter with one of
  653.            several existing IPC mechanisms that provides
  654.            the same functionality without the problems
  655.            stated above.
  656.         3. Remove this chapter from this ballot and send
  657.            this chapter back to the working group for
  658.            further review.
  659.  
  660. Without at least one of these actions, this ballot remains
  661. negative.
  662.  
  663. _________________________________________________________________
  664.  
  665. CHAPTER 10. SYNCHRONOUS I/O
  666. ---------------------------
  667.  
  668. OBJECTION 26    Chapter 10.3    Page 178,188    Line 39-40,369-370
  669.  
  670. Problem:
  671.  
  672. The new O_FSYNC option has exactly the same behavior as the  existing System V
  673. O_SYNC. This additional name is unnecessary.
  674.  
  675. Action:
  676.  
  677. The O_FSYNC option should be renamed O_SYNC to correspond to the behavior
  678. as currently defined by System V.
  679.  
  680. _________________________________________________________________
  681.  
  682. OBJECTION 27    Chapter 10.4.5  Page 182-183    Line 148-176
  683.  
  684. Problem:
  685.  
  686. rtfsync() allows the application to distinguish between O_SYNC and O_DSYNC.
  687. Because of the amount of optimization possible this distinction
  688. is at most one write per file transaction, it seems unnecessary to
  689. introduce a new interface for such a trivial optimization.
  690.  
  691. Action:
  692.  
  693. rtfsync() should be removed in favor of the fsync() system call we understand
  694. is being introduced by 1003.1b.  Also the op parameter to afsync() should be
  695. removed for the same reason.
  696.  
  697. _________________________________________________________________
  698.  
  699. OBJECTION 28    Chapter 10.4.6  Page 183-184    Line 177-228
  700.  
  701. Problem:
  702.  
  703. The afsync() call takes a struct aiocb parameter which is part of the
  704. Asynchronous I/O mechanism. (Note. See objection relating to Asynchronous I/O
  705. chapter requiring the aiocb to be replaced by an I/O request handle, a signal
  706. number and an I/O completion record.)
  707.  
  708. Action:
  709.  
  710. The new interface should be
  711.  
  712.         handle = afsync(int filedes, int signal_number);
  713.  
  714. This handle may be used with the completion status function defined in the
  715. Asynchronous I/O chapter ballot objection. The handle returned by this function
  716. should be passed to the signal handler in the sigcode parameter.
  717.  
  718. _________________________________________________________________
  719.  
  720. CHAPTER 11 ASYNCHRONOUS I/O
  721. --------------------------
  722.  
  723. OBJECTION 29 Section 11.4.2.1 and 11.4.3.1 Page 194-196 Lines 111-112,168-169
  724.  
  725. Problem:
  726.  
  727. Some parameters to the functions are on the parameter list and others in a
  728. control block?  It appears there was some attempt to make the parameter list
  729. look like the existing read/write system calls.  While this is somewhat
  730. noble, this obscures the interface.
  731.  
  732. Action:
  733.  
  734. Put all the relevant parameters into a
  735. control block, including the buffer address and the number of bytes to
  736. read/write, with the exception of the file descriptor.
  737.  
  738. _________________________________________________________________
  739.  
  740. OBJECTION 30    Section 11.3.1  Page 192        Lines 28,51-54
  741.  
  742. Problem:
  743.  
  744. Asynchronous event notification is used to deliver the I/O completion event.
  745. (Note. See objection relating to Asynchronous Event Notification chapter
  746. requiring event notification to be replaced with enhanced signals.)
  747.  
  748. Action:
  749.  
  750. The proposal for signals (as a replacement for the Asynchronous Event
  751. Notification) requires all references to struct event in the calls and
  752. data structures in this section to be changed to a signal number to be
  753. sent to the requesting process when the I/O is complete. The Asynchronous I/O
  754. handle should be passed to the signal handler in the sigcode parameter.
  755.  
  756. _________________________________________________________________
  757.  
  758. OBJECTION 31    Section 11      Page 194-202
  759.  
  760. Problem:
  761.  
  762. The address of the control block in the users address space is used as
  763. the ID in subsequent operations (returning status, canceling
  764. operations and determining the event id). This is both unprecedented in
  765. Unix and introduces the following problems;
  766.  
  767.         1. Since the handle is allocated by the user rather than the system,
  768.            handles could be reused before becoming inactive which prevents
  769.            exit() from being able to clean up.
  770.  
  771.         2. If the control block is an automatic variable and the requesting
  772.            function returns, the behavior is undefined. This introduces
  773.            the potential for frequent programming errors such as if the
  774.            caller has no intention of looking at the control block
  775.            again and returns while the system will still write into the
  776.            aiocb later.
  777.  
  778. Action:
  779.  
  780. The aread()/awrite() calls should be modified to return a system
  781. generated handle which can be used in subsequent operations. listio()
  782. should be passed an array of handles to be filled in by the system for
  783. each request. acancel() should accept an array of handles to perform the
  784. operation on.
  785.  
  786. _________________________________________________________________
  787.  
  788. OBJECTION 32    Section 11      Page 194-371
  789.  
  790. Problem:
  791.  
  792. The I/O request information and the completion status have been
  793. combined into one control block. This causes potential problems on a
  794. multiprocessor where the device driver may have to invalidate the cache
  795. on another processor to get a polling user process on that other
  796. processor to read an updated completion code from the in-memory version
  797. of the asynch I/O control block. This operation is frequently very
  798. expensive.
  799.  
  800. Action:
  801.  
  802. Separate the data into a request block and a completion block. The
  803. completion block must contain at least the error number, the number of
  804. bytes actually transferred and the request handle.
  805.  
  806. In order to poll for the status, a new interface must be defined which
  807. accepts the handle and returns the errno and one to return the
  808. completion block once the I/O has completed. This may be the same
  809. interface, eg
  810.  
  811.         errno = get_async_completion_block(handle, &completion_block);
  812.  
  813. This allows a library routine to perform the polling operation, going into
  814. the kernel when cache-invalidates are more expensive than polling
  815. operations, and staying at user-level when cache-invalidates are less
  816. expensive than polling operations.
  817.  
  818. When the I/O is complete and the application is notified via a signal, then
  819. a pointer to the completion record should be passed in the sigcode parameter
  820. to the handler.
  821.  
  822. _________________________________________________________________
  823.  
  824. OBJECTION 33    Section 11.4.5  Page 200-201    Line 307-335
  825.  
  826. Problem:
  827.  
  828. There is no justified requirement or rationale for the acancel() interface and
  829. we can see no immediate use for it.
  830.  
  831. Action:
  832.  
  833. If the existence of such a function can be justified it should be documented.
  834. Otherwise the interface should be removed.
  835.  
  836. _________________________________________________________________
  837.  
  838. OBJECTION 34    Section 11.4.6  Page 201-202    Line 338-371
  839.  
  840. Problem:
  841.  
  842. The iosuspend() facility is unnecessary because the application can
  843. use sigsuspend() to wait for I/O completion events and then can decide
  844. whether the proper subset has been completed.  This is more flexible because
  845. any arbitrary completion predicate can be used, something not supported by
  846. the current iosuspend() facility.
  847.  
  848. Action:
  849.  
  850. Delete iosuspend().
  851.  
  852. _________________________________________________________________
  853.  
  854. CHAPTER 12. REAL-TIME FILES.
  855. ----------------------------
  856.  
  857. OBJECTION 35    Chapter 12      Pages 209-236
  858.  
  859. Problem:
  860.  
  861. We do not believe sufficient justification has been given for the
  862. facilities defined by this chapter.
  863.  
  864. Lines 874-876 state "The actual requirements for
  865. real-time file usage differ from non-real-time usage primarily in the
  866. areas of performance, guaranteed access to resources, and guaranteed
  867. delivery of data to a non-volatile media (that is, not memory).
  868.  
  869. The rationale on lines 854-856 and 857-865 suggest that the proposed
  870. standard does not address the "Performance" and "Guaranteed delivery"
  871. requirements.  Indeed, we agree that these areas are beyond the scope
  872. of a standard.
  873.  
  874. With respect to the requirement for guaranteed access to resources, it
  875. should be noted that many implementations merely pre-write the file,
  876. since this not only guarantees access to resources but in most
  877. implementations is faster as well.
  878.  
  879. As a result, we do not believe there is any demand for a standard which
  880. supports files distinguished as to be used for real-time purposes, and do not
  881. believe this chapter provides one.
  882.  
  883. The current placebuf interface is inadequate because it accepts no file
  884. parameter which allows for differing blocking factors for each device.
  885. Also it cannot provide meaningful alignment information if the
  886. alignment is in increments larger than bufsize and that alignment is an
  887. input parameter and there is no mechanism to portably determine what it
  888. should be.
  889.  
  890. Action:
  891.  
  892. All the facilities in this chapter should be deleted except for those where the
  893. implementation advises the application how to structure I/O requests for
  894. optimal performance. The only valid examples in the current proposal are
  895. block size and buffer alignment.
  896.  
  897. Volume-Number: Volume 19, Number 124
  898.  
  899.