real time usb communication in the quest operating system
play

Real-Time USB Communication in the Quest Operating System Eric - PowerPoint PPT Presentation

Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Real-Time USB Communication in the Quest Operating System Eric Missimer, Ye Li, Richard West Eric Missimer, Ye Li, Richard West Real-Time USB


  1. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Real-Time USB Communication in the Quest Operating System Eric Missimer, Ye Li, Richard West Eric Missimer, Ye Li, Richard West Real-Time USB 1

  2. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Table of contents Contributions 1 USB 2.0 and EHCI Outline 2 USB Scheduling Problem 3 Experimental Evaluation 4 Conclusions 5 Eric Missimer, Ye Li, Richard West Real-Time USB 2

  3. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Quest USB Subsystem Quest: Boston University’s in house operating system Developed for real-time and high-confidence systems Major Contributions: Bandwidth allocation guarantees when opening connections with endpoints Dynamic reordering of transfer requests to avoid unnecessary rejections Real-time guarantees for both asynchronous and periodic transfers Eric Missimer, Ye Li, Richard West Real-Time USB 3

  4. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Motivation - Why USB? Precise timing: 125 µ s time granularity To date, USB 2.0 is the highest bandwidth I/O on SBC (BeagleBoard, PandaBoard, Raspberry Pi) USB 3.0 is just starting to appear on such SBC One common bus for I/O devices and communication Towards a real-time interconnect for distributed embedded systems Eric Missimer, Ye Li, Richard West Real-Time USB 4

  5. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions USB 2.0 Master-Slave Protocol Time is broken up by 125 µ s chunks called micro-frames 8 micro-frames make up one frame (1 millisecond) Transactions cannot cross micro-frames Four types of USB transactions: (1) Bulk and (2) Control - Asynchronous (3) Isochronous and (4) Interrupt - Periodic For each micro-frame at most 80% can be used for periodic transactions Eric Missimer, Ye Li, Richard West Real-Time USB 5

  6. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions USB Transaction Types Endpoint Data Integrity Guaranteed Example Type Ensured Transfer Rate Control Yes No All Devices Bulk Yes No Mass Storage Isochronous No Yes Camera Interrupt Yes Yes Keyboard Eric Missimer, Ye Li, Richard West Real-Time USB 6

  7. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions USB 2.0 Host and Device USB Host: Host controller makes all scheduling decisions More complex circuitry than a device USB Device: Device contains one or more endpoints Each endpoint has a: Number Direction Transaction Type Packet Size Interval (for periodic transactions, × 2 n micro-frames) Eric Missimer, Ye Li, Richard West Real-Time USB 7

  8. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions USB Device Stack Eric Missimer, Ye Li, Richard West Real-Time USB 8

  9. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions EHCI - Enhanced Host Controller Interface Information for performing USB transactions are contained in transaction descriptors (TDs) Handles asynchronous and periodic transactions differently Separate scheduling data structures for each class of transactions Isochronous TDs (iTDs) and Queue Head (QH) plus queue TDs (qTDs) Eric Missimer, Ye Li, Richard West Real-Time USB 9

  10. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions EHCI Scheduling Eric Missimer, Ye Li, Richard West Real-Time USB 10

  11. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Processing TDs At the start of the micro-frame the host controller does the following: Use the frame index register to index into the periodic list Process the iTDs and QHs/qTDs in the periodic list pointed to by the periodic list entry Process the next QH in the asynchronous circular list until the end of the micro-frame Eric Missimer, Ye Li, Richard West Real-Time USB 11

  12. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions EHCI Scheduling: Example Eric Missimer, Ye Li, Richard West Real-Time USB 12

  13. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions EHCI Scheduling: Example Eric Missimer, Ye Li, Richard West Real-Time USB 13

  14. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions EHCI Scheduling: Example Eric Missimer, Ye Li, Richard West Real-Time USB 14

  15. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions EHCI Scheduling: Example Eric Missimer, Ye Li, Richard West Real-Time USB 15

  16. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions EHCI Scheduling: Example Eric Missimer, Ye Li, Richard West Real-Time USB 16

  17. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions EHCI Scheduling: Example Eric Missimer, Ye Li, Richard West Real-Time USB 17

  18. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions EHCI Scheduling: Example Eric Missimer, Ye Li, Richard West Real-Time USB 18

  19. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions EHCI Scheduling: Example Eric Missimer, Ye Li, Richard West Real-Time USB 19

  20. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions EHCI Scheduling: Example Eric Missimer, Ye Li, Richard West Real-Time USB 20

  21. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions USB Scheduling Problem Periodic USB requests can be represented as a tuple ( w i , t i ). w i time to send transaction i t i interval of transaction i Scheduling problem is given a set of tuples { ( w 1 , t 1 ) , ( w 2 , t 2 ) , . . . , ( w n , t n ) } is there an assignment of USB transactions to micro-frames such that no micro-frame is over-committed. If a request is assigned to micro-frame f it is also assigned to micro-frames f + n ∗ t i , n ∈ N Eric Missimer, Ye Li, Richard West Real-Time USB 21

  22. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Scheduling Example Eric Missimer, Ye Li, Richard West Real-Time USB 22

  23. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Scheduling Example Eric Missimer, Ye Li, Richard West Real-Time USB 23

  24. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Scheduling Example Eric Missimer, Ye Li, Richard West Real-Time USB 24

  25. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Invalid Scheduling Example Eric Missimer, Ye Li, Richard West Real-Time USB 25

  26. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Quest USB Scheduling Heuristic that parallels first fit decreasing algorithm for bin-packing and rate monotonic scheduling Sort requests by interval from smallest to largest, breaking ties by sorting transmission delay from largest to smallest Assign sorted requests to first available micro-frame # Failed Schedules 0 1 2 3 4 5 6 7 8 1 to 5 requests 0 0 0 0 0 0 0 0 0 + + + + + + + + + e e e e e e e e e 1 1 1 1 1 1 1 1 1 Intervals: 2, 4, 8, 16 Packet Sizes: 32, 64, . . . , 1024 Quest Quest ≈ 150 , 000 Linux Linux ≈ 95 , 000 , 000 Eric Missimer, Ye Li, Richard West Real-Time USB 26

  27. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Experimental Evaluation Beagleboard: ˚ Angstr¨ om Linux Custom USB-Gadget Device Driver Functionally equivalent Linux and Quest device drivers Eric Missimer, Ye Li, Richard West Real-Time USB 27

  28. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Maximum Throughput 9 isochronous endpoints with an interval of 1 and 9 bulk endpoints, packet size for all is 512-bytes Periodic 60 Asynchronous 50 48.00 47.87 Data Rate (KB/ms) 40 35.99 35.94 30 20 10 0 Linux Quest The design of the Quest USB subsystem is not detrimental to overall throughput Eric Missimer, Ye Li, Richard West Real-Time USB 28

  29. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Bandwidth Allocation Experiment Eric Missimer, Ye Li, Richard West Real-Time USB 29

  30. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Bandwidth Allocation Experiment Eric Missimer, Ye Li, Richard West Real-Time USB 30

  31. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Bandwidth Allocation Experiment Eric Missimer, Ye Li, Richard West Real-Time USB 31

  32. Contributions USB 2.0 and EHCI Outline USB Scheduling Problem Experimental Evaluation Conclusions Bandwidth Allocation Experiment Eric Missimer, Ye Li, Richard West Real-Time USB 32

Recommend


More recommend