• edited by
948 views

1 Answer

1 1 vote

Static Memory: It is allocated during runtime of a program, once its data type is fixed it cannot be changed, it occupies space in hard disk before runtime, when the program is running one cannot free the memory which is assigned to the variable even if it variable is not used ever. Array is a classic example of static Memory, once we declare an array of a particular size that amount of memory will be reserved and in contagious memory location and that space will be reserved throughout entire run of program 

Dynamic memory: As the name suggests it is dynamic in nature, it can be created, assigned and destroyed at any instance of time, one disadvantage of it is that it assigns random memory location each time for the new variable. At any point, memory assigned to it can be free, the memory assignment is done at runtime. A linked list is a classic example of it one can keep adding nodes in the system.

Position:
Show:

Related questions

0 0 votes
0 0 answers
439
439 views
Sahun asked Apr 25, 2024
439 views
Consider a system with 32 KB of physical memory and the following memory allocation requests from processes:• Process P1 requests 10 KB of memory.• Process P2 reque...
2 2 votes
2 2 answers
2.0k
2.0k views
Dheeraj Varma asked Nov 16, 2021
2,040 views
What is answer for this question and also please explain the approach
0 0 votes
2 2 answers
2.2k
2.2k views
gautamcse27 asked Dec 15, 2016
2,165 views
In a virtual memory system, size of virtual address is 40 bit, size of physical address is 32 bit, page size is 8 kb and size of each page table entry is 40 bit. Assume t...
2 2 votes
2 2 answers
2.3k
2.3k views
priti sharma asked Oct 14, 2015
2,306 views
Consider a system in demand paged enviorment supporting a virtual address of 32bits  with a page size of 4KB, physical adddress is 29 bits . Page fault rate is 2% page fa...