1 / 13

A Study of Cloning in the Linux SCSI Drivers

A Study of Cloning in the Linux SCSI Drivers. Wei Wang, Michael W. Godfrey Software Architecture Group David R. Cheriton School of Computer Science University of Waterloo, Canada {w65wang,migod}@ uwaterloo.ca. Yet another clone case study?. Why study Linux SCSI drivers?.

biana
Download Presentation

A Study of Cloning in the Linux SCSI Drivers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Study of Cloning in the Linux SCSI Drivers Wei Wang, Michael W. Godfrey Software Architecture Group David R. Cheriton School of Computer Science University of Waterloo, Canada {w65wang,migod}@uwaterloo.ca

  2. Yet another clone case study?

  3. Why study Linux SCSI drivers? • Big, real, 16 years of history • A large collection of components that do roughly the same thing • 96 hardware-specific low-level drivers • We know there are clones!

  4. “I should also mention the driver written by Hamish Macdonald for the Amiga A 2091 card.[…] It gives me a good initial understanding of the proper way to run a WD33C93 chip and I ended up stealing lots of code from it.” Extract from /driver/scsi/in2000.c

  5. A Three-level Design in SCSI Drivers Top Level Generic driver Generic driver for tapes Generic driver for disks Mid Level Interfaces to the kernel Lower Level Concrete driver #1 Concrete driver #2 Concrete driver #3

  6. Quick results (Read the paper!) • Most clones are contributed by concrete drivers • Clone coverage rate of lower-level is much higher than mid- and upper-level • Average lifetime of clone traces among three levels are similar

  7. Does the presence of cloning have predictive power? • Can we use cloning to predict hardware similarity?

  8. Matching Bus Type Dependency Three steps: • Extract bus type dependency info from config files • Convert each logical expression into DNF formula • Perform matching

  9. Build the clone-based model For a pair of conceptual drivers in a clone relationship, do they have compatible bus type dependency? File level in2000.c wd33c9c.c Clone relationship between two files IN 2000 driver Amiga A 2091 driver Conceptual driver level ISA && SCSI PCI && SCSI

  10. Results

  11. Discussion • Cloning is a strong indicator of hardware bus similarity for SCSI cards • A model relying solely on syntactical analysis works better than a domain knowledge-based model • Cloning can suggest high-level similarity • Can we use cloning analysis to predict similarity in other features or other systems?

  12. Questions • New areas of leveraging clone detection besides “refactor them immediately”? • Software quality assessment • Clone management • License pollution

  13. A Study of Cloning in the Linux SCSI Drivers Wei Wang, Michael W. Godfrey Software Architecture Group David R. Cheriton School of Computer Science University of Waterloo, Canada {w65wang,migod}@uwaterloo.ca

More Related