Operating System – Minimum Page Framework

What determines the minimum number of page frames that must be allocated to a running process in a virtual memory environment.

I found that the answer to the above question is instructions Geeksforgeeks, but I can’t understand the reason behind it.

Please explain.

Edit:
The problem lies in the following link http://www.geeksforgeeks.org/archives/4036 (See question 3), I can’t understand the logic behind the answer.

Yes, ISA does work Function.
Imagine this assumption. If the ISA supports an instruction (such as mov in x86), it can take an operand after 3 levels of indirection (recall the indirect addressing mode of x86). Let’s call it It is system A.
On another system, you can have up to 2 levels of indirection to call it.

On A and B, if we give 4 as the minimum frame Count and see what happens.
B works well, not A. Here is the reason:
When an instruction with 3 levels of indirection in its operand is loaded into the cpu for execution, remember that our process only has 4 frames, assuming this scene
The 1st frame will be used for the instruction itself.
The 2nd frame will be used for the first level of indirect operands in another page
The 3rd frame will be used for the second Level of indirection, maybe this is not in the address range of the previously allocated frame.
The 4th frame is the same as the next level of indirection.
Now recalling the pipeline, we can enter the next execution stage only after the operand is extracted. , But we don’t have the last operand, we only have its address in the 4th frame, now you get a page fault, so you delete a previously allocated frame to process and restart the instruction that caused the error, but the same thing happens
System B does not have this problem.

As far as I know, this is the way ISA plays a role in determining the minimum number of frames for a process.
Please refer to galvin I think this book Covers the virtual memory part.
But this is theoretical, I don’t know how this process is performed in a real system like linux.

Cheers:)

Edit:-For example, the instructions given in the link you point to may cross the page boundary

What determines the minimum amount that must be allocated to the running process in the virtual memory environment Number of page frames.

I found that the answer to the above question is the instruction set architecture, but I cannot understand the reason behind it.

Please explain.

Edit:
The problem lies in the following link http://www.geeksforgeeks.org/archives/4036 (see question 3), I cannot understand the logic behind the answer.

Yes, the ISA does work.
Imagine this assumption. If the ISA supports an instruction (such as mov in x86), it can take an operand after 3 levels of indirection (recall x86 indirect addressing mode). Let’s call it System A.
On another system, you can call it with up to 2 levels of indirection.

In A and On B, if we give 4 as the minimum number of frames, see what happens.
B works well, not A. Here is the reason:
When an instruction with 3 levels of indirection in its operand is loaded to When executing in the cpu, remember that our process has only 4 frames, assuming this scene
The first frame will be used for the instruction itself.
The second frame will be used for the first level of indirect operands in another page
The 3rd frame will be used for the second level of indirection, maybe this is not in the address range of the previously allocated frame.
The 4th frame is the same as the next level of indirection.
Recalling the pipeline now, only in operation After the data extraction is completed, we can enter the next execution stage, but we do not have the final operand, we only have its address in the 4th frame, and now you get a page fault, so you delete a previously allocated frame to process and restart The command that caused the error was started, but the same thing happened.
System B doesn’t have this problem.

As far as I know, this is how the ISA plays a role in determining the minimum number of frames for a process.
Please refer to galvin. I think this book covers the virtual memory part.
But this is theoretical, I don’t know how this process is performed in a real system like linux.

< p>Cheers:)

Edit:-If the instructions given in the link you point to may cross the page boundary

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5376 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.