程序案例-CISC 322

CISC 322 Software/Game Architecture Module 4: Examples of Architectures (Linux) Ahmed E. Hassan Linux as a Case Study: Its Extracted Software Architecture Paper By: Ivan T. Bowman, Richard C. Holt and Neil V. Brewster Slides By: Jack ZhenMing Jiang Outline l Terminology l Conceptual Architecture l Concrete Architecture l Conclusions 3 Terminology l Conceptual Architecture – How developers think of a system; Relations meaningful to developers – Analogy: Blue Print of the House – By Reviewing Existing Documentation – Essential Relations l Concrete Architecture – Relations that exists in a system – Analogy: Actual Architecture of the House – By Examining the Source Code – Implementation Specific Knowledge 4 The Linux Kernel l Responsible for process, memory, and hardware device management – Different from the Linux System l Linux System: 10 KLOC in 1991 to 1.5 MLOC in 1998 l The studied Linux Kernel is 800 KLOC l Open Source 5 Conceptual Architecture – Top Level 6 Conceptual Architecture – File System 9/6/187 Fa ade Pattern Object Oriented Style 1 Concrete Architecture – Extraction Methodology 9/6/188 Control Flow Data Flow Manually -Group Directory to Subsystems -Naming Conventions Feedback Concrete Architecture – Top Level 9/6/18 Jack ZhenMing Jiang9 Concrete Architecture – File System 9/6/18 Jack ZhenMing Jiang10 Concrete Architecture – File System 9/6/18 Jack ZhenMing Jiang11 1 2 Concrete Architecture – Logical File System 9/6/1812 1 2 Why Conceptual Architecture and Concrete Architecture Not Match l Missing Relations in Conceptual Architecture l More Functionalities – For example, Process Scheduler l Use Different Mechanisms l Improve Efficiency by Bypassing Existing Interfaces l Exist for Developer Expediency – “The read-only stuff doesn’t really belong here, but any other place is probably as bad and I don’t want to create yet another include file.” 13 What To Do Next l Restructure to Remove Unexpected Dependencies – Header Files – Lower Coupling l Refine Conceptual Architecture – Not Hinder System Understanding 14 Conclusions 15 l Conceptual and Concrete Architecture for the Linux Kernel l Similar Work Needs to Be Done for the Firefox Report l Sample Reports: – Conceptual Architecture: http://plg.uwaterloo.ca/~itbowman/CS746G/ a1/ – Concrete Architecture: http://plg.uwaterloo.ca/~itbowman/CS746G/ a2/