Virtual memory management?

Hello, my problem is as follows:

A computer has 4 pages of physical memory with 100 locations each. Virtual memory consists of 12 pages and is mapped to blocks 50, …, 61 of the hard disk.

I'm now supposed to convert certain virtual memory addresses into physical addresses. Can someone show me how to convert the virtual address from, for example, 322?

Thanks

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
3 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Destranix
2 years ago

You have 4 pages of physical memory.

You have 12 virtual pages, which means that 3 pages each must map to the same memory block (how this is done depends on the mapping strategy).

Since you obviously don't calculate in binary (otherwise the size of the memory block would be quite unfavorable and the address strange), I would say that the following mapping should work:

 Virtuelle Seite = Virtuelle Adresse / 100; Offset = Virtuelle Adresse % 100; Physikalische Seite = Virtuelle Seite % 4; Physikalische Adresse = Physikalische Seite * 100 + Offset;

For address 322 this would be the following:

 Virtuelle Seite = 3; Offset = 22; Physikalische Seite = 3; Physikaliche Adresse = 322;

But depending on how the task is to be understood (this is not really clear), something else may of course be required.

Destranix
2 years ago
Reply to  OrclxIce

Dann nimmst du für “Physikalische Seite” oben einfach entsprechend die Seite gemäß der Aufgabenstellung.