Diehard allocator - custom allocators, Operating System

Assignment Help:

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.


Related Discussions:- Diehard allocator - custom allocators

Hardware and software requirements for virtual memory?, What are the hardwa...

What are the hardware and software requirements for virtual memory? The hardware required for virtual memory is a secondary memory and page table. The page table should have th

Semaphore examples, Ok so i think i got this right by not 100% on this. wha...

Ok so i think i got this right by not 100% on this. what I want to figure out is if there are x visitors that can line up for a ride but only 1 passenger can get on the ride at a t

Different ways in which a thread can be cancelled, What are the different w...

What are the different ways in which a thread can be cancelled? Cancellation of a target thread may happen in two different scenarios: Asynchronous cancellation: One thr

Write a note on deadlocks, Write a note on deadlocks. The proper defini...

Write a note on deadlocks. The proper definition of deadlock A set of processes is deadlocked if every process in the set is waiting for an event that only a proces

What is an effector process, What is an effector process? The effector ...

What is an effector process? The effector process is a method that verifies itself.The effector process exists in particular criteria.

Assembly, Write a program that will input two numbers from the keyboard and...

Write a program that will input two numbers from the keyboard and execute each of the signed and unsigned multiply and divide instructions. For each instruction, the program shoul

What is the use of system programs, Q. What is the use of system programs? ...

Q. What is the use of system programs? Answer: System programs are able to be thought of as bundles of useful system calls. They provide fundamental functionality to users so

Explain about deadlocks, Q. Explain about Deadlocks? Deadlocks for (...

Q. Explain about Deadlocks? Deadlocks for (int i = 0; i // first find a thread that can finish for (int j = 0; j if (!finish[j]) { boolean temp = true; for

Principles of informtiona tecnologu, i need to complete project on lan arch...

i need to complete project on lan architceture RAIDs etc

Build a vigorous distributed system, Q.  To build a vigorous distributed sy...

Q.  To build a vigorous distributed system you must know what kinds of failures can occur. a. List three possible kinds of failure in a distributed system. b. State which of

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd