scholarly journals Permchecker: a toolchain for debugging memory managers with typestate

2021 ◽  
Vol 5 (OOPSLA) ◽  
pp. 1-28
Author(s):  
Karl Cronburg ◽  
Samuel Z. Guyer

Dynamic memory managers are a crucial component of almost every modern software system. In addition to implementing efficient allocation and reclamation, memory managers provide the essential abstraction of memory as distinct objects, which underpins the properties of memory safety and type safety. Bugs in memory managers, while not common, are extremely hard to diagnose and fix. One reason is that their implementations often involve tricky pointer calculations, raw memory manipulation, and complex memory state invariants. While these properties are often documented, they are not specified in any precise, machine-checkable form. A second reason is that memory manager bugs can break the client application in bizarre ways that do not immediately implicate the memory manager at all. A third reason is that existing tools for debugging memory errors, such as Memcheck, cannot help because they rely on correct allocation and deallocation information to work. In this paper we present Permchecker, a tool designed specifically to detect and diagnose bugs in memory managers. The key idea in Permchecker is to make the expected structure of the heap explicit by associating typestates with each piece of memory. Typestate captures elements of both type (e.g., page, block, or cell) and state (e.g., allocated, free, or forwarded). Memory manager developers annotate their implementation with information about the expected typestates of memory and how heap operations change those typestates. At runtime, our system tracks the typestates and ensures that each memory access is consistent with the expected typestates. This technique detects errors quickly, before they corrupt the application or the memory manager itself, and it often provides accurate information about the reason for the error. The implementation of Permchecker uses a combination of compile-time annotation and instrumentation, and dynamic binary instrumentation (DBI). Because the overhead of DBI is fairly high, Permchecker is suitable for a testing and debugging setting and not for deployment. It works on a wide variety of existing systems, including explicit malloc/free memory managers and garbage collectors, such as those found in JikesRVM and OpenJDK. Since bugs in these systems are not numerous, we developed a testing methodology in which we automatically inject bugs into the code using bug patterns derived from real bugs. This technique allows us to test Permchecker on hundreds or thousands of buggy variants of the code. We find that Permchecker effectively detects and localizes errors in the vast majority of cases; without it, these bugs result in strange, incorrect behaviors usually long after the actual error occurs.

2014 ◽  
Vol 668-669 ◽  
pp. 1363-1367 ◽  
Author(s):  
Zhi Hong Sun ◽  
Xian Lang Hu

The live migration of virtual machine (VM) is an important technology of cloud computing. Down-time, total migration time and network traffic data are the key measures of performance. Through the analysis of dynamic memory state of a virtual machine migration process, we propose a dirty pages algorithm prediction based on pre-copy to avoid dirty pages re transmission. Experimental results show that, compared with the Xen virtual machine live migration method adopted, our method can at least reduce 15.1% of the total amount of data and 12.2% of the total migration time.


1996 ◽  
Vol 31 (5) ◽  
pp. 44-53 ◽  
Author(s):  
David Evans

Author(s):  
David C. Joy ◽  
Suichu Luo ◽  
John R. Dunlap ◽  
Dick Williams ◽  
Siqi Cao

In Physics, Chemistry, Materials Science, Biology and Medicine, it is very important to have accurate information about the stopping power of various media for electrons, that is the average energy loss per unit pathlength due to inelastic Coulomb collisions with atomic electrons of the specimen along their trajectories. Techniques such as photoemission spectroscopy, Auger electron spectroscopy, and electron energy loss spectroscopy have been used in the measurements of electron-solid interaction. In this paper we present a comprehensive technique which combines experimental and theoretical work to determine the electron stopping power for various materials by electron energy loss spectroscopy (EELS ). As an example, we measured stopping power for Si, C, and their compound SiC. The method, results and discussion are described briefly as below.The stopping power calculation is based on the modified Bethe formula at low energy:where Neff and Ieff are the effective values of the mean ionization potential, and the number of electrons participating in the process respectively. Neff and Ieff can be obtained from the sum rule relations as we discussed before3 using the energy loss function Im(−1/ε).


Author(s):  
Arezki Tagnit-Hamou ◽  
Shondeep L. Sarkar

All the desired properties of cement primarily depend on the physicochemical characteristics of clinker from which the cement is produced. The mineralogical composition of the clinker forms the most important parameter influencing these properties.Optical microscopy provides reasonably accurate information pertaining to the thermal history of the clinker, while XRDA still remains the proven method of phase identification, and bulk chemical composition of the clinker can be readily obtained from XRFA. Nevertheless, all these microanalytical techniques are somewhat limited in their applications, and SEM/EDXA combination fills this gap uniquely by virtue of its high resolution imaging capability and possibility of instantaneous chemical analysis of individual phases.Inhomogeneities and impurities in the raw meal, influence of kiln conditions such as sintering and cooling rate being directly related to the microstructure can be effectively determined by SEM/EDXA. In addition, several physical characteristics of cement, such as rhcology, grindability and hydraulicity also depend on the clinker microstructure.


2009 ◽  
Vol 23 (2) ◽  
pp. 63-76 ◽  
Author(s):  
Silke Paulmann ◽  
Sarah Jessen ◽  
Sonja A. Kotz

The multimodal nature of human communication has been well established. Yet few empirical studies have systematically examined the widely held belief that this form of perception is facilitated in comparison to unimodal or bimodal perception. In the current experiment we first explored the processing of unimodally presented facial expressions. Furthermore, auditory (prosodic and/or lexical-semantic) information was presented together with the visual information to investigate the processing of bimodal (facial and prosodic cues) and multimodal (facial, lexic, and prosodic cues) human communication. Participants engaged in an identity identification task, while event-related potentials (ERPs) were being recorded to examine early processing mechanisms as reflected in the P200 and N300 component. While the former component has repeatedly been linked to physical property stimulus processing, the latter has been linked to more evaluative “meaning-related” processing. A direct relationship between P200 and N300 amplitude and the number of information channels present was found. The multimodal-channel condition elicited the smallest amplitude in the P200 and N300 components, followed by an increased amplitude in each component for the bimodal-channel condition. The largest amplitude was observed for the unimodal condition. These data suggest that multimodal information induces clear facilitation in comparison to unimodal or bimodal information. The advantage of multimodal perception as reflected in the P200 and N300 components may thus reflect one of the mechanisms allowing for fast and accurate information processing in human communication.


Sign in / Sign up

Export Citation Format

Share Document