计算机应用与软件
計算機應用與軟件
계산궤응용여연건
COMPUTER APPLICATIONS AND SOFTWARE
2014年
4期
1-6,58
,共7页
李顺%王焘%宋云奎%胡呈炜%张文博
李順%王燾%宋雲奎%鬍呈煒%張文博
리순%왕도%송운규%호정위%장문박
OSGi%软件构件%资源监控%线程跟踪
OSGi%軟件構件%資源鑑控%線程跟蹤
OSGi%연건구건%자원감공%선정근종
OSGi%Software component%Resource monitoring%Thread tracking
面向 OSGi 框架的构件化软件开发方法被广泛应用。现有的 OSGi 构件监控方法仅能够监控动态服务调用所造成的资源消耗,未能考虑静态包引用的情况。针对该问题,提出一种面向方法的 OSGi 构件监控方法。该方法首先对代码进行分析,建立方法与构件间的映射关系,在方法前后插入监控逻辑以标记构件的边界;而后,跟踪线程的跨边界执行,将线程在方法中占用的 CPU 和内存计入对应的构件;同时,通过记录线程在不同构件间的转移,监测构件间的动态调用。实验结果表明,该方法能够以较低的开销准确监控 OSGi 中构件的 CPU 和内存资源消耗,以及构件间的交互行为。
麵嚮 OSGi 框架的構件化軟件開髮方法被廣汎應用。現有的 OSGi 構件鑑控方法僅能夠鑑控動態服務調用所造成的資源消耗,未能攷慮靜態包引用的情況。針對該問題,提齣一種麵嚮方法的 OSGi 構件鑑控方法。該方法首先對代碼進行分析,建立方法與構件間的映射關繫,在方法前後插入鑑控邏輯以標記構件的邊界;而後,跟蹤線程的跨邊界執行,將線程在方法中佔用的 CPU 和內存計入對應的構件;同時,通過記錄線程在不同構件間的轉移,鑑測構件間的動態調用。實驗結果錶明,該方法能夠以較低的開銷準確鑑控 OSGi 中構件的 CPU 和內存資源消耗,以及構件間的交互行為。
면향 OSGi 광가적구건화연건개발방법피엄범응용。현유적 OSGi 구건감공방법부능구감공동태복무조용소조성적자원소모,미능고필정태포인용적정황。침대해문제,제출일충면향방법적 OSGi 구건감공방법。해방법수선대대마진행분석,건립방법여구건간적영사관계,재방법전후삽입감공라집이표기구건적변계;이후,근종선정적과변계집행,장선정재방법중점용적 CPU 화내존계입대응적구건;동시,통과기록선정재불동구건간적전이,감측구건간적동태조용。실험결과표명,해방법능구이교저적개소준학감공 OSGi 중구건적 CPU 화내존자원소모,이급구건간적교호행위。
OSGi framework-oriented componentised software development method is in wide use.Existing OSGi components monitoring methods can only monitor resources consumption caused by dynamic service call,but regardless the static packages importing situation.To address this issue,we propose a method-oriented OSGi component monitoring approach.First of all,this approach sets up the mapping relationship between methods and components by analysing the code,and inserts monitoring logic before and after the methods to mark the boundary of components.After that,the approach tracks the cross-border execution of each thread,adds the CPU time consumed and the memory occupied in methods by the threads to corresponding components.Meanwhile,by recording each thread transfer between components, it monitors the dynamic call between the components.Experimental results demonstrate that this approach is able to accurately monitor CPU and memory consumption of OSGi components and the interaction between the components with lower overhead.