CISC 322 Software Architecture Lecture 10: Linux Architecture - - PowerPoint PPT Presentation

cisc 322
SMART_READER_LITE
LIVE PREVIEW

CISC 322 Software Architecture Lecture 10: Linux Architecture - - PowerPoint PPT Presentation

CISC 322 Software Architecture Lecture 10: Linux Architecture Emad Shihab Paper by: Ivan T. Bowman, Richard C. Holt and Neil V. Brewster Recap of Last Class Layered Style Virtual Machine Client-Server Architecture Recovery Why


slide-1
SLIDE 1

CISC 322

Software Architecture Lecture 10: Linux Architecture Emad Shihab

Paper by: Ivan T. Bowman, Richard C. Holt and Neil V. Brewster

slide-2
SLIDE 2

Recap of Last Class

■ Layered Style

– Virtual Machine – Client-Server

slide-3
SLIDE 3

Architecture Recovery

■ Why architecture recovery?

– Many existing systems do not have documented architecture – Can help you better understand your system to support maintenance and evolution

slide-4
SLIDE 4

Conceptual vs. Concrete

■ Conceptual architecture:

– shows how developers think about a system

  • Only „meaningful‟ relations

■ Concrete architecture:

– shows the actual relationships in the system

  • Harder to understand
  • Needed to make decisions related to

implementation

slide-5
SLIDE 5

How to Obtain Conceptual Architecture

■ Examining existing documentation

– About related or similar systems – Documentation provided by the project itself – Sometimes more reading is required to iron

  • ut inconsistencies
slide-6
SLIDE 6

Conceptual Architecture

Allocate memory to user processes Support multitasking Access to HW Communication between user processes Access to network devices

slide-7
SLIDE 7

File system conceptual architecture

  • 1. Provide access to

HW devices

  • 2. Support different

file formats and their mapping on physical locations

  • 3. Allow programs to

be stored in several executable formats

slide-8
SLIDE 8

File system conceptual architecture

  • Uses Façade

design pattern

  • Other parts of

kernel use File System through a single interface

  • Minimizes

dependencies

  • Architectural

style?

3 file system implementati

  • ns depend
  • n files

stored on another computer

slide-9
SLIDE 9

Concrete Architecture – Extraction Methodology

  • Determine source code
  • Source code extractor

(cfx) to extract relations

  • E.g. function y calls

function x

  • Extracts functions calls

and variable access relations

  • Control flow and data

flow dependencies

slide-10
SLIDE 10

Concrete Architecture – Extraction Methodology

  • Use grok to determine

relations between files

  • Each file was manually assigned to a

subsystem

  • Used directory structure, file naming, source

code comments documentation, source code (last resort)

  • Used grok to determine subsystem relations
  • Used lsedit to visualize

extracted system architecture

slide-11
SLIDE 11

Concrete Architecture – Hierarchical Decomposition

■ Manually created ■ Source files are assigned to subsystems ■ Subsystems hierarchically assigned to subsystems ■ Used to view relationships between subsystems instead of files

slide-12
SLIDE 12

Concrete Architecture – Hierarchical Decomposition

■ Seven major subsystems from conceptual arch ■ Subsystems had corresponding directories in code implementation ■ Used directory structure, naming convention to assign files to subsystems

slide-13
SLIDE 13

Conceptual vs. Concrete Architecture

Same subsystems, more dependencies (19 vs. 37)

slide-14
SLIDE 14

Why the Extra Dependencies

■ Developers avoid existing interfaces to achieve better efficiency ■ Expediency ■ (Almost) always expect more dependencies in concrete architecture

slide-15
SLIDE 15

File System Concrete Architecture

slide-16
SLIDE 16

File System Concrete Architecture

  • Network interface

depends on logical file systems

  • File systems (NCPFS

and SMBFS) that use the network were implemented by having the Network Interface directly call functions in the implementation of these logical file systems

slide-17
SLIDE 17

File System Concrete Architecture

  • Process Scheduler

depends on Device Driver

  • (printk) in Process

scheduler prints msgs to console. Calls routines implemented in device drivers subsystem

slide-18
SLIDE 18

Lessons Learned

■ Human judgment is needed to determine appropriate hierarchical decomposition ■ Conceptual Architecture shows Control flow in one manner, but concrete showed implementation might use a different mechanism (e.g., network interface) ■ Developers improved system efficiency by bypassing existing interfaces

slide-19
SLIDE 19

Lessons Learned

■ “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.” ■ Concrete architecture should be used to refine conceptual architecture

– Not desirable to add all relations. May hinder understanding

■ Best to develop concrete and conceptual architecture in an iterative manner