Download presentation
Presentation is loading. Please wait.
Published byKathleen Wiggins Modified over 9 years ago
1
Structuring OS Aspects how do small aspects compose? Yvonne Coady, Gregor Kiczales, Mike Feeley, Norm Hutchinson, Joon Suan Ong University of British Columbia Software Modularity Group
2
UBC - Software Modularity Group2 overview subset of prefetching in FreeBSD –3 small prefetching aspects –260 lines over 5 files AspectC – based on AspectJ –calls, before, after, around –cflow how do these small aspects compose? –operations –interfaces –state
3
UBC - Software Modularity Group3 prefetching many execution paths lead to disk DISK Normal page fault Sequential page fault Sequential file read VM layer FFS layer VFS layer Block layer file system read paths page fault paths
4
UBC - Software Modularity Group4 prefetching for normal page fault vm_fault vm_pager_getpages vnode_pager_getpages ffs_getpages ffs_valid ufs_bmap ffs_calc_size … … VM layer FFS layer bread ffs_read … vn_read bio_wait … VFS layer Block layer … … check and de-allocate after plan and allocate pages before 2 cflows 4 advice normal page fault prefetching
5
UBC - Software Modularity Group5 prefetching for file system read vm_fault vm_pager_getpages vnode_pager_getpages ffs_getpages ffs_valid ufs_bmap ffs_calc_size … … VM layer FFS layer bread ffs_read vn_read bio_wait … VFS layer Block layer … … detect sequential before asynch prefetch before … 2 cflows 2 advice sequential file read prefetching
6
UBC - Software Modularity Group6 prefetching for sequential page fault vm_fault vm_pager_getpages vnode_pager_getpages ffs_getpages ffs_valid ufs_bmap ffs_calc_size … … VM layer FFS layer bread ffs_read vn_read bio_wait … VFS layer Block layer … detect sequential asynch prefetch … plan & allocate sequence of pages before increase request around fill allocated page sequence after … (1 cflow + 2 cflows) 3 advice (+ 2 advice) sequential page fault prefetching
7
UBC - Software Modularity Group7 prefetching aspects operations –coordination between layers –planning phase, fetching phase interfaces –advice attaches to function boundaries on an execution path –path-specific customizations state –access behaviour: normal or sequential –declared or detected
8
UBC - Software Modularity Group8 composition issues shared operations –aspects can share subpaths –“interposition” shared interfaces –aspects can share attach points in an execution path –“pointcut interfaces” shared state –aspects can share state – eg. tracking behaviour –shared access to global system state –“scope”
9
UBC - Software Modularity Group9 page fault read normalsequentialsequential planpredict detect allocate fetch check asynch de-alloc buffer synchfill allocated operations are not local to one aspect operations
10
UBC - Software Modularity Group10 interfaces page fault read normalsequentialsequential plan cflow (calls (vm_f(..)) && before (calls (vnode_p(..)){…} fetch cflow (calls (ffs_read(..) && before (calls (bio_w(..)){…} pointcuts are not local to one aspect
11
UBC - Software Modularity Group11 state page fault read normalsequentialsequential plandeclared behaviour observed behaviour fetch ----- global system state: memory ---- state is not local to one aspect
12
UBC - Software Modularity Group12 summary several small but related prefetching aspects –provide path-specific customizations –share important substructure when composing aspects along execution paths, we need to think in terms of –interposition –pointcut interfaces –scope requires principled sharing of operations, interfaces and state between small aspects
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.