Embedded Software Engineer Question:

Download Job Interview Questions and Answers PDF

Do you know what is virtual memory?

Embedded Software Engineer Interview Question
Embedded Software Engineer Interview Question

Answer:

Virtual memory is a technique that allows processes to allocate memory in case of physical memory shortage using automatic storage allocation upon a request. The advantage of the virtual memory is that the program can have a larger memory than the physical memory. It allows large virtual memory to be provided when only a smaller physical memory is available. Virtual memory can be implemented using paging.
A paging system is quite similar to a paging system with swapping. When we want to execute a process, we swap it into memory. Here we use a lazy swapper called pager rather than swapping the entire process into memory. When a process is to be swapped in, the pager guesses which pages will be used based on some algorithm, before the process is swapped out again. Instead of swapping whole process, the pager brings only the necessary pages into memory. By that way, it avoids reading in unnecessary memory pages, decreasing the swap time and the amount of physical memory.

Download Embedded Software Engineer Interview Questions And Answers PDF

Previous QuestionNext Question
Tell me what are buses used for communication in embedded system?Tell me why do we need virtual device drivers when we have physical device drivers?