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

What is indexed allocation, What is indexed allocation? Every file has ...

What is indexed allocation? Every file has its own block of pointers to the sectors of the file.

Solve a generalized dining philosopher problem, In this project, you will i...

In this project, you will implement the Chandy and Misra's (CM) algorithm using POSIX Threads (Pthreads).   The algorithm  is a distributed algorithm to solve a generalized dining

Explain briefly the working of semaphore with example ?, Explain briefly th...

Explain briefly the working of semaphore with example ? The E.W. Dijkstra (1965) abstracted the key idea of mutual exclusion in his concepts of semaphores. Definition A s

What is the lower bound on the numeral of page faults, Q. Presume that you...

Q. Presume that you have a page-reference string for a process with m frames (initially all empty). The page-reference string has length p along with n distinct page numbers

Define request edge and assignment edge, Define request edge and assignment...

Define request edge and assignment edge. Answer:  A directed edge from process Pi to resource type R j is denoted by Pi->j; it signifies that process Pi requested an instance

Define caching, Define caching. A cache is a region of fast memory that...

Define caching. A cache is a region of fast memory that holds copies of data. Access to the cached copy is well-organized than access to the original. Caching and buffering are

Explain disk scheduling algorithms-shortest seek time first, SSTF (Shortest...

SSTF (Shortest Seek Time First) After a demand go to the closest request in the work queue regardless of direction Decrease total seek time compared to FCFS Disadv

Networking protocols, Modern networks are not implemented as a single piece...

Modern networks are not implemented as a single piece of software; that would render the task of dealing with multiple technologies and manufacturers virtually impossible. The solu

What is an operating system and its type, What is an operating system and w...

What is an operating system and what are the different types of operating systems? Operating System An Operating System or OS is a software program that allows the compute

Bag of tasks, The producer-consumermodel above has a standard human analogy...

The producer-consumermodel above has a standard human analogy of an assembly line. Humans have specialized skills, however, whereas threads running the same program do not need 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