Page Faults & Page Fault Handling in Operating Systems | Page Fault Numerical Example | Thrashing
Вставка
- Опубліковано 8 вер 2024
- Support Simple Snippets by Donations -
Google Pay UPI ID - tanmaysakpal11@okicici
PayPal - paypal.me/tanmaysakpal11
--------------------------------------------------------------------------------------------- In this Operating systems - Memory Management video tutorial we will study and understand what is Page fault, how it happens and the entire process of Page Fault Handling in OS.
We will also understand what is Thrashing.
Page faults -
When a program tries to reference a page not currently present in RAM, the processor treats this invalid memory reference as a page fault and transfers control from the program to the operating system.
The operating system must:
1. Determine the location of the data on disk.
2. Obtain an empty page frame in RAM to use as a container for the data.
3. Load the requested data into the available page frame.
4. Update the page table to refer to the new page frame.
5. Return control to the program, transparently retrying the instruction that caused the page fault.
Thrashing -
After completing initialization, most programs operate on a small number of code and data pages compared to the total memory the program requires. The pages most frequently accessed are called the working set.
When the working set is a small percentage of the system's total number of pages, virtual memory systems work most efficiently and an insignificant amount of computing is spent resolving page faults. As the working set grows, resolving page faults remains manageable until the growth reaches a critical point. Then faults go up dramatically and the time spent resolving them overwhelms time spent on the computing the program was written to do. This condition is referred to as thrashing. Thrashing occurs on a program that works with huge data structures, as its large working set causes continual page faults that drastically slow down the system. Satisfying page faults may require freeing pages that will soon have to be re-read from disk.
Simple Snippets Official Website -
simplesnippets....
Simple Snippets on Facebook -
/ simplesnippets
Simple Snippets on Instagram -
/ simplesnippets
Simple Snippets on Twitter -
/ simplesnippet
Simple Snippets Google Plus Page -
plus.google.co...
Simple Snippets email ID -
simplesnippetsinfo@gmail.com
For More Technology News, Latest Updates and Blog articles visit our Official Website - simplesnippets....
#PageFaults #Paging #OperatingSystems #OS
Hey Guys, if you want more such tech educational videos on this channel then please support me by subscribing to this channel & also share it with your friends as it helps me create more content just for you ✌
Effective access time cannot be lesser than the memory access time when there is no page fault. It should come out to be 101 ms instead of 91 ms. This mistake has occurred because you have not added the usual (when there is no page fault) access time to the overhead in case of page fault before multiplying it by 0.1.
Also, comprehensive explanation otherwise. This was a great help.
Your explanation was superrb.....
I liked it a lot....
Just resolve my query
Thanks for the response buddy. I guess you used the formula wrong :-)
hey! there.Thank you so much. I could understand every concept of OS a day before exam cuz of your videos.
Most welcome buddy. I would request you to please share the videos and channel with your friends too. Thats the biggest help and support for the channel 😇
It was really clean how you explained the thrashing from what's needed to understand how the thrashing happens !
Your EAT calculation is wrong. The EAT is coming to be lower than memory access time after 10% page fault.
The correct calculation would bb 0.9 * 100 + 0.1 *(100 + 10) = 101ms
Yes, you're right
Rather than (1-P)* + P*, EAT should be = + P*.
This is because irrespective of page fault or not, memory access time is going to be there always.
Page fault overload process already includes the memory access time. So, if you put 1 instead of (1-p), you count the memory access time in page fault overload process twice
@@kemalkubilayylmaz4142The page fault overload in the example should be 110ms instead of 10ms which is used in the example calculation.
Tanks for video.
I hade a question about "page fault overlaod" in 10:35 : shoulden´t it be 110?
because "Momory access time" includes in page fault overload.
Fantastic explanation. Thank you, sir!
Thanks so much you explain computing so well!
Thank you so much Thomas, really glad to hear this from you. Please do subscribe to this channel & share the content with your friends too. That will be the biggest help & support 😇
Well explained, thank you
Thank you so much Vikas. Please share the video with your friends as well. That will be really helpful and the best support ✌
excellent explanation
thank you mr indian sirmen.
Great explanation. It made perfect sense.
I’m slightly curious about the test question though. Wouldn’t it actually be .9*100 + .1*110 which is 101? Because 10% of the time we have page fault overhead which adds to the already existing access time right? You could also think about it as 100% of the time, memory access is 100ms, but then 10% of the time there will be an extra 10ms which means it’s 1*100 + .1*10 = 101
Thank you! This video was very helpful!
Glad it was helpful!
Clear cut and simple boss...
Thank you Deepam 🤟 I try to keep it short simple and sweet 😇
Please do Subscribe & share with your friends. That's the biggest help and support ✌️
Hey man , thanks for such an awesome explanation !!!
Most welcome bro 😁 I'm glad you liked it. Please share the video with your friends too ✌️
Thank you!!!
This helped me a lot, thank you!
Most welcome ✌️
Thank you very much, well explanation.
I have a question. Is there a way to predict or count the number of page faults? either statically or at run-time?
Amazing video/explanation man.
Glad you liked it!
very nice explanation brother.
Best ever
Thanks bro, I'm glad to hear this. Please do share the videos with your friends too. That's the biggest help and support you can give back to me 🙏😊
The explanation was very good. Can you give the notes of page fault also in the way you have given for paging
Everything is good,but please make a subject wise playlist
Like paging videos in Operating systems playlist
Nice explanation
Bhai ye page fault waale question ka answer galat hai......
Answer 101 hoga....
((0.9*100)+(0.1*(100+10)))=101...
In this question 100 second will be memory access time + 10 seconds will be penalty for page fault....
Good question, well you have applied the formula incorrectly buddy. the second part is (probability of failure * the overhead time) and not the total time with overhead. the overhead time generally itself this the time taken to perform all the page fault activities itself :-)
@@SimpleSnippets dear,
We will only get to know that demanded page is missing in the primary memory when we will access it.....
So we should add access time to page fault time......
This is my last argument.....
Please resolve it.......
By the videos logic, it would be slower to access pages if all pages were already in the frame:
(1-0)*100+(0*10) = 100 > 91
I agree with Shubham.
We still do memory access for the small portion of cases with page fault, but we also waste time retrieving them from hdd. So it should be ((1-p)* (t memory)) + p * (t memory + overhead)
Thank you so much, Sir, for this video! You are amazing! SUBSCRIBED :D
Thank you so much buddy🙏 Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
Thanks for the tutorial, however, i have an issue with something.
Imagine if all pages were in hdd and no pages are in memory.
Then the access time is: 0*100 + 1* 10 = 10 ms
But if everything was in memory already:
1*100+0*10 = 100
How is accessing pages in memory slower than retrieving from hdd?
I thought the same thing, I think the page fault access time should be memory access time + page fault overhead = 110 ms
@@yxlxfxf Exactly. That hasn't been addressed properly. You have to add the memory access time with the overhead.
@@yxlxfxf You need to use the probability since not all pages will be in the secondary memory. it might be there not there. the answer should be greater or equal to 100 and less than 110
@@julesbamwe6061 The average memory access time would be between 100 and 110, I was referring to the time for one single page fault
@@yxlxfxf exact... Then u are right in that case. Obvious 110.
Thanks for sharing info. Just one question.. how paging (VM) created in secondary memory?
Is there a way I can download the diagram, I haven't found any other diagrams that come close to the level of detail you present.
Take a screenshot for now if that helps
Why EAT is shorter than memory access time??? Why it seems the more page fault happens, the shorter EAT is??
I understand the formula, but are the numbers realistic?
Love from Pakistan bro❤️
No page found, finds secondary storage, bring into free frame, update page table, restart instruction
in step 4 is the MMU that takes p3 3 to the main memory or OS ?
10:54 I believe your numerical problem example is not the best example. If memory access time is 100ms, how can the page fault overhead be 10ms?
Page fault overhead = memory access to page table + memory access to secondary storage + updating page table in memory + restarting the instruction
so if memory access time is itself 100ms, then page fault overhead needs to be at least 4x the memory access. Your formula is right, but the example doesn't make any sense.
Why are you missing TLB memory ?
Semaphore daal do yaar