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

Explain message passing system, Message passing system:- The function o...

Message passing system:- The function of message system is to permit processes to communicate with one another without the requirement to resort (option) to shared data. Commun

Execution without entering a deadlock state, Q. Presume that a system is in...

Q. Presume that a system is in an unsafe state. Illustrate that it is possible for the processes to complete their execution without entering a deadlock state. Answer: An unsaf

Explain swapping technique used in pre-3bsd unix systems?, What are the dis...

What are the disadvantages of swapping technique used in pre-3BSD UNIX systems? If there is excessively much memory contention, processes are swapped out until sufficient

Define the term system software, Question: (a) Define the term system ...

Question: (a) Define the term system software and application software, giving an example for each. (b) Draw a diagram to represent the abstract view of a computer system i

Kernel to context switch between kernel level threads, Q. Explain the actio...

Q. Explain the actions taken by a kernel to context switch between kernel level threads. Answer: Context switching among kernel threads classically requires saving the value

Explain the concept of reentrancy, Concept of Reentrancy   It is a ...

Concept of Reentrancy   It is a useful, memory-saving method for multiprogrammed timesharing machines. A Reentrant method is one in which multiple clients can share a singl

Does windows xp offer any user-mode processes, Q. Does Windows XP offer any...

Q. Does Windows XP offer any user-mode processes that enable it to run programs developed for other operating systems? Describe two of these subsystems. Answer: Environmental

What is multiprogramming, Q. What is Multiprogramming? Multiprogrammin...

Q. What is Multiprogramming? Multiprogramming When two or more programs are in memory at the same instance, sharing the processor is referred to multiprogramming opera

Describe the purpose of the checkpoint mechanism, Describe the purpose of t...

Describe the purpose of the checkpoint mechanism. How habitually must checkpoints be performed? Explain how the frequency of checkpoints affects: System performance while no

What is a process, What is a process? A process is a program in impleme...

What is a process? A process is a program in implementation. It is an active entity and it contains the process stack, having temporary data and the data section includes globa

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