First off, sorry for posting that thread here. It hasn't to do with C programming, but while i was desperately searching for this matter, i came to find one similar question right here, in this sub-forum.
I suppose i could post that in Windows/Linux subforum.
Excuse my ignorance.
I'm currently reading for Operational Systems and i have the following question, which i'm not sure i've found the right answer.
So here we go :
A 32bit Machine uses paging with a page size of 4KB. Each data entry at the page table has 8 Bytes size.
A process has
Code Size : 653789 Bytes
Stack Size : 23934 Bytes
Data Size : 178934 Bytes
How much memory must be provided for the page table if :
a) it is a one level page table
b) it's a 2 level page table, where the first 10bits are used to adress the page table of the highest level (level 1).
Now i think i've found some stuff, but i'm not quite sure.
For a),since the page size is 4KB (2^12), i need to multiply the data entry size with 1024.
But for b :
First i convert the Code,Stack and Data sizes to powers of 2.
So
Code Size = 653,789/1024 = 638,4 = 639KB
Stack Size = 23.3 = 24 KBytes
Data Size = 174,7 = 175 Kbytes
But then i'm not sure of what to do.
Can anyone help please?
(sorry if i used wrong words/terms anywhere. English is not my first language!)
Feel free to correct me if i did anything wrong.