How the OS determines what the device should get the data?

0 like 0 dislike
5 views
That's working processes and the data necessary to it from the address 0x01(for example). He looks in and sees MMU physical address. And then what? As it determines is it in RAM or is it swap space?

Thanks for the reply.
by | 5 views

3 Answers

0 like 0 dislike
I have not read about the architecture of the hardware, but on your toes can explain.
Memory is divided into pages.
Page dispatched on the subject of obsolescence.
If the memory page have not appealed, it becomes a candidate for eviction in the swap.
If the processes do not have enough RAM for a maneuver, page-candidates fly in the swap, accordingly, they are marked as superseded.
If some process need to get the data from the addresses, calculates which page the address belongs.
If the page is evicted, then taking steps to get her back in the RAM.
by
0 like 0 dislike
It has long since been implemented in hardware. So 40 years probably.

Simply accesses the data.
If the data is really there (a memory page is marked as flushed to disk), the CPU automatically energizes the exception and control is transferred to that part of the OS that is responsible for paging data from disk into RAM.
by
0 like 0 dislike
Any process in protected mode the CPU has its own addressing and generally knows nothing about any MMU, in the case when there is a PageFault - the OS just loads the data from the swap in the address space of the process. Read more the process and options described in Tannebaum.
by

Related questions

0 like 0 dislike
3 answers
0 like 0 dislike
5 answers
0 like 0 dislike
5 answers
0 like 0 dislike
5 answers
0 like 0 dislike
5 answers
110,608 questions
257,186 answers
0 comments
33,949 users