Write a program to demonstrate the memory leak problem, Operating System

Assignment Help:
Write a program (with the programming language and on the platform of your choice) to demonstrate the memory leak problem (see https://en.wikipedia.org/wiki/Memory_leak for details on what the memory leak problem is). The full program and the program outputs should be included at the end of the report as an appendix.
If you write the program on a platform which has built-in garbage collection mechanism, special care has to be taken to introduce the memory leak problem.
Execute the program until it cannot proceed anymore. You may have to allocate big chunks of memory iteratively to reach to this point quickly. This is even more so if you are running the program on a 64-bit operating system. Based on your observation and your understanding of the principles of a paging memory management system, answer the following questions:
A. How much memory has the program used when reaching the point where it cannot proceed anymore? What is the physical (32-bit or 64-bit) and logical address space of the computer you run this application on? What is the size of the physical memory (RAM) of the computer you run this application on?
B. What type of memory, virtual or physical, is exhausted when there is a memory leak problem with a process?
C. When a process that has a memory leak problem cannot proceed anymore, does it prevent any other program from starting/running due to lack of memory? Does it slow down the whole system?
D. On a platform which has built-in garbage collection mechanism, e.g., .NET and JVM, to a large extent, the memory leak problem can be avoided. Why?

Related Discussions:- Write a program to demonstrate the memory leak problem

Demand-paging system, Consider a demand-paging system with the following ti...

Consider a demand-paging system with the following time-measured utilizations: CPU utilization: 10%, Paging disk: 98%, Other I/O devices: 5%. What does this imply? How to improv

What is the use of FIFOs in client-server applications, What is the use of ...

What is the use of FIFOs in client-server applications

Explain time-sharing environment, In a multiprogramming and time-sharing en...

In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in various security problems. a

Explain hashed page table method, Hashed page table method A general ap...

Hashed page table method A general approach for managing address spaces larger than 32 bits is to use a hashed page table with the hash values being the virtual-page number.

Problem of unbalanced loads, Present your own fully documented and tested p...

Present your own fully documented and tested programming example illustrating the problem of unbalanced loads. Describe the use of OpenMP's scheduler as a means of mitigating this

List two types of system directories, List two types of system directories ...

List two types of system directories A) Device directory:- Describing physical properties of files. B) File directory :- Giving logical properties of the files.

List the coffmans conditions that lead to a deadlock, List the Coffman's co...

List the Coffman's conditions that lead to a deadlock. Mutual Exclusion : Only one process might be use a critical resource at a time. Hold & Wait: A process may be alloc

Typical virtual memory layout, Using pages makes it easier to manage the wh...

Using pages makes it easier to manage the whole memory, avoiding excessive fragmentation and waste. As an analogy, think of Tetris, but with only square blocks: it is relatively ea

What are the various available scheme in ipc, Several schemes available are...

Several schemes available are as follows: Pipes : One-way communication process through which different process can interact. The problem is that the two processes could have

Explain the sequence of messages in rpc mechanism, Q. Once more considering...

Q. Once more considering the RPC mechanism consider the exactly once semantic. Does the algorithm for implementing this semantic implement correctly even if the ACK message back to

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