2009 · 13 citations · 4 references
ComputingComputer ScienceComputer ArchitectureProgramming LanguagesSystems ProgrammingConcurrency ControlObject-oriented ProgrammingAspect-oriented ProgrammingExecution Time AnalysisProducer-consumer BuffersProducer-consumer SynchronizationSynchronizationSynchronization Mechanisms
Producer-Consumer problem is a classical and representative synchronization problem in the field of computer science, which can be implemented by object-oriented programming language. However, the implementation of object-oriented programming often leads to be tangled between functional codes and synchronization codes, which are easy to lead code-scattering and code-tangling. Aspect-oriented programming (AOP) has been proposed as a technique for improving separation of concerns for the final software. This paper aims to resolve concrete aspect and implement the synchronization of producer-consumer based on AOP under two ways: single buffer and multiple buffers, and the execution result shows that AOP can resolve the producer-consumer problem effectively. Furthermore, the execution time of AOP program is shown to contrast with that of object-oriented programming, which shows that AOP can almost get the same execution time with object-oriented programming, while AOP can gain the modularization better than object-oriented programming.
4
Gregor Kiczales, Erik Hilsdale, Jim Hugunin et al. · Communications of the ACM · 2001 · 540 citations · Full text
FlexSync: An aspect-oriented approach to Java synchronization
Charles Zhang · 2009 · 19 citations