İplik Davranışlarının İlgiye Yönelik Programlama Yaklaşımı Kullanılarak Metrik Tabanlı Analizi
İplik Davranışlarının İlgiye Yönelik Programlama Yaklaşımı Kullanılarak Metrik Tabanlı Analizi
Dosyalar
Tarih
2011-02-16
Yazarlar
Alan, Oral
Süreli Yayın başlığı
Süreli Yayın ISSN
Cilt Başlığı
Yayınevi
Fen Bilimleri Enstitüsü
Institute of Science and Technology
Institute of Science and Technology
Özet
Çok iplikli uygulamalarda başarım sorunları genel olarak iplik davranışlarıyla ilgilidir. Düşük başarımın nedenlerini saptamak için iplik karakteristiğinde ya da kaynak kullanımında uygun değişiklikleri yapmak üzere çalışma zamanlı olarak iplik davranışları gözlemlenmeli ve bilgi toplanmalıdır. Çok iplikli programlar geliştirilirken en önemli sorunlardan birisi iplikler gerçek sistem üzerinde koşana dek iplik davranışlarının tahmin edilememesi ve ipliklerin çalışma zamanlı davranışları hakkında detaylı bilginin toplanamamasıdır. Analiz edilen karmaşık sistem hakkında zaman ve olay bilgisi toplanabilirse metrik tabanlı yaklaşımlar karmaşık sistem hakkında yararlı bilgiler sağlamakta ve iplik davranışlarını gösteren kullanılabilir metrikler hesaplanabilmektedir. Bu çalışma çok iplikli programların davranışlarını analiz edebilmek için hassas zaman ve iplik durum bilgisine dayanan metrikleri kullanan bir yaklaşım sunmakta ve ilgiye yönelik programlama tekniğinin iplik izlemedeki verimliliğini analiz etmektedir. Bu amaçla iplik izleme için ilgiye yönelik programlamayı kullanan Java ilgiye yönelik iplik izleyici (JİYİPİZ) geliştirilmiştir. Hassas zaman bilgisi toplamak üzere Java doğal arayüzünü kullanan bir teknik sunulmuştur. Doğal yordam çağrıları aracılığıyla işlemcinin anlık darbe sayaç bilgisi alınmış ve zaman hesaplamasında kullanılmıştır. Çalışmanın sonuç kısmında JİYİPİZ iyi bilinen üretici-tüketici problemi üzerinde ve Apache Tomcat veb sunucusunda sınanmış ve önerilen metriklerin ne kadar faydalı olduğu tartışılmıştır. Ayrıca JİYİPİZ yaygın kullanılan diğer izleyicilerle karşılaştırılmış ve izleme yükü kıyaslanmıştır. Elde edilen sonuçlara göre ilgiye yönelik programlama ile geliştirilmiş bir izleme uygulamasının Java platformunda iplikleri izlemek için kullanılabileceği ve metrik tabanlı yaklaşımın iplik davranışlarını anlamada faydalı olduğu sonucuna varılmıştır.
Performance concerns in a multi-threaded application naturally lead to issues related to thread behavior. To diagnose the cause of poor performance, one needs to observe thread behavior and gather information as the program executes in order to determine modifications in thread characteristics or resources that would result in better performance. One of the most important problems in developing multi-threaded programs is that the behavior of threads on a real system cannot be predicted until they are run, and detailed information about the runtime behavior of threads is usually not available. If time and event information can be collected, metrics-based approaches can present useful information about the complex system being analyzed, and useful metrics that represent the behavior of threads can be calculated. This thesis presents an approach based on accurate time and thread state information to analyze the behavior of multi- threaded applications using metrics and analyzes the efficiency of usage of aspect oriented programming technique for thread profiling. For this purpose, an aspect based thread profiler has been developed, namely Java Aspect Oriented Thread Profiler (JAOTP), which uses aspect oriented programming to profile threads. To deal with the problem of collecting accurate time information, a technique that uses the Java Native Interface (JNI) is applied. Through calls to native methods, information on timing and instantaneous cycle count of a logical processor is retrieved. At the conclusion of the study, JAOTP is tested on a well-known producer-consumer problem and Apache Tomcat web server and the usefulness of the proposed metrics are discussed. In addition, JAOTP is compared with other well-known profilers and the overhead comparison is presented. According to the results obtained, a thread profiler that was implemented using aspect-oriented programming can be used on Java platform and metrics-based approaches are found to be useful in understanding thread behavior.
Performance concerns in a multi-threaded application naturally lead to issues related to thread behavior. To diagnose the cause of poor performance, one needs to observe thread behavior and gather information as the program executes in order to determine modifications in thread characteristics or resources that would result in better performance. One of the most important problems in developing multi-threaded programs is that the behavior of threads on a real system cannot be predicted until they are run, and detailed information about the runtime behavior of threads is usually not available. If time and event information can be collected, metrics-based approaches can present useful information about the complex system being analyzed, and useful metrics that represent the behavior of threads can be calculated. This thesis presents an approach based on accurate time and thread state information to analyze the behavior of multi- threaded applications using metrics and analyzes the efficiency of usage of aspect oriented programming technique for thread profiling. For this purpose, an aspect based thread profiler has been developed, namely Java Aspect Oriented Thread Profiler (JAOTP), which uses aspect oriented programming to profile threads. To deal with the problem of collecting accurate time information, a technique that uses the Java Native Interface (JNI) is applied. Through calls to native methods, information on timing and instantaneous cycle count of a logical processor is retrieved. At the conclusion of the study, JAOTP is tested on a well-known producer-consumer problem and Apache Tomcat web server and the usefulness of the proposed metrics are discussed. In addition, JAOTP is compared with other well-known profilers and the overhead comparison is presented. According to the results obtained, a thread profiler that was implemented using aspect-oriented programming can be used on Java platform and metrics-based approaches are found to be useful in understanding thread behavior.
Açıklama
Tez (Yüksek Lisans) -- İstanbul Teknik Üniversitesi, Fen Bilimleri Enstitüsü, 2011
Thesis (M.Sc.) -- İstanbul Technical University, Institute of Science and Technology, 2011
Thesis (M.Sc.) -- İstanbul Technical University, Institute of Science and Technology, 2011
Anahtar kelimeler
iplikler,
iplik izleme,
ilgiye yönelik programlama,
metrik tabanlı analiz,
dinamik metrikler,
çok iplikli programlar,
threads,
thread profiling,
aspect-oriented programming,
metrics-based analysis,
dynamic metrics,
multithreaded programs