0
Suppose the processor is 32 bit. So each process running on that processor gets 2^32 bits of logical memory.
- If the system is having n processes, is n*2^32 bits allocated on disk? where is it allocated? is it in swap space?
If the page size is 4KB,then total number of pages are 2^32/2^12 = 2^20. is sum of the pages resides on disk and RAM for this process is 2^20? if not, how many of these 2^20 is allocated? 3.
#include <stdio.h> int main(){ printf("Hello World"); }
is this simple process also occupies 2^20 pages on RAM+Disk?
#include <stdio.h> int main(){ int x; scanf("%d",&x); while(x!=0){ malloc(sizeof(int)); x--; } }
How many pages are allocated on disk+RAM initially at the time of loading? is it also 2^20?if not how it grows as each malloc call invoked?
It's virtual memory. You're confusing the address space size and what a running process actually uses. – Daniel B – 2016-06-04T07:57:32.613
Is this another homework question? – DavidPostill – 2016-06-04T18:05:50.073
Welcome to [su]! Please try and ask 1 question at a time (otherwise your question will be closed as too broad). Please read How do I ask a good question? and On-Topic.
– DavidPostill – 2016-06-04T18:06:14.940