Diehard allocator - custom allocators, Operating System

Allocators can also be used to avoid problems with unsafe languages. C and C++ are pervasive, with huge amounts of existing code. They are also memory-unsafe languages, in that they allow many errors and security vulnerabilities. Some examples include double free(), invalid free(), uninitialized reads, dangling pointers, and buffer over?ows in both stack and heap buffers.

DieHard is an allocator developed at UMass which provides (or at least improves) soundness for erroneous programs. There are several hardware trends which are occurring: multicore processors are becoming the norm, physical memory is relatively inexpensive, and 64-bit architectures are increasingly common, with huge virtual address spaces. Meanwhile, most programs have trouble making full use of multiple processors. The net result is that there may soon be unused processing power and enormous virtual address spaces.

If you had an in?nite address space, you wouldn't have to worry about freeing objects. That would mostly eliminate the double free(), invalid free(), and dangling pointer bugs. And if your heap objects were in?nitely far apart in memory, you wouldn't need to worry about buffer over?ows in heap objects.

DieHard tries to provide something along these lines, within the constraints of ?nite physical memory. It uses randomized heap allocation, so objects are not necessarily contiguous in virtual memory. Since the address space is actually ?nite, objects won't actually be in?nitely far apart, and buffer overruns might actually cause collisions between heap objects. But this is where the multicore processors come in: With the unused processor cores, run multiple copies of the application, say three copies, each allocating into their own randomized heap. So the heap errors are independent among the three copies of the application. All copies get the same input, and the output is the result of voting among the three copies of the program. If one instance of the application disagrees with the other two, it is killed, since there was likely a collision between heap objects in that one. Similarly, if one instance dies with a segfault or other error, the others remain running.

Surviving copies can be forked to replace copies which were killed off, though this reduces the independence among copies.

Posted Date: 3/13/2013 2:49:51 AM | Location : United States

Related Discussions:- Diehard allocator - custom allocators, Assignment Help, Ask Question on Diehard allocator - custom allocators, Get Answer, Expert's Help, Diehard allocator - custom allocators Discussions

Write discussion on Diehard allocator - custom allocators
Your posts are moderated
Related Questions
Define Latency plus seek time The total time to arrange a disk drive mechanism for a block of data to be read from is its Latency plus seeks time

Sharing segments between processes without requiring the same segment number is possible in a dynamically linked segmentation system. a. Define a system that permits sta

Define deadlock prevention. Deadlock prevention is a set of process for ensuring that at least one of the four essential conditions like mutual exclusion, hold and wait, no pr

Lexical substitution during macro expansion Lexical substitution is employed to produce an assembly statement from a model statement. A model statement contains 3 types of stri

Q. Define Input - Output operations? Serial lines, Disks, tapes and other devices should be communicated with at a very low level. The user require only specify the device and

Explain the Sleep (ms) Function  This call places the current thread in a suspended state for the number of milliseconds passed as the parameter (ms). After that Windows NT wil

expalin about the design issues of network operating system

Processes and Programs Process is a dynamic entity which is a program in execution. A process is a sequence of information executions. Process exists in a limited span of t

Entry-sequenced file organization The records in an entry-sequenced file are store up in the order they are written into the file. New records are for all time appended to

Question 1 Explain the structure of operating system in detail Question 2 Explain the following scheduling algorithm                                     1) First come Firs