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

What is dispatcher? explain, Questiion 1 What is RTOS? What are its requir...

Questiion 1 What is RTOS? What are its requirements? Questiion 2 Explain the structural elements of a real time system mode Questiion 3 What is kernel? Explain abo

What are the typical elements of a process image, What are the typical elem...

What are the typical elements of a process image? User data: Modifiable part of user space. May have program data, user stack area, and programs that might be modified. User

Activities of operating system - memory management, Q. What are the three m...

Q. What are the three main activities of an operating system in regard to memory management? Answer: a. Keep follows of which parts of memory are currently being used and

Essential properties of operating system, Essential Properties of Operating...

Essential Properties of Operating System 1. Batch: Jobs with similar needs are batched together and run through the computer as a group by an operator or automatic job sequen

Operating system as user interface, Q. Operating System as User Interface? ...

Q. Operating System as User Interface? • Every general purpose computer comprises the operating system, hardware, system programs and application programs. The hardware compris

Socket, socket based fortune teller sever.your program should create a serv...

socket based fortune teller sever.your program should create a server that listens to a specific port when a client receives a connection the server should respond with a random fo

How several bits are there in the logical address, Q. Regard as a logical a...

Q. Regard as a logical address space of eight pages of 1024 words every mapped onto a physical memory of 32 frames. a. How several bits are there in the logical address? b. H

Explain beladys anomaly, Explain Belady's Anomaly? Also called FIFO ano...

Explain Belady's Anomaly? Also called FIFO anomaly. Usually, on enhancing the number of frames allocated to a process virtual memory, the process implementation is faster, beca

Basic server model, Suppose we want to program a Web server; we could easil...

Suppose we want to program a Web server; we could easily do so without using concurrency, as follows: while(true) wait connection read from socket and parse url look up url cont

Define a policy for data storage, Produce a referenced four page report whi...

Produce a referenced four page report which describes the possible functionality of the system; similar systems that are out there and different possible approaches to delivering t

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