Lecture 29: Page Replacement Algorithms || How to implement LRU algorithm?
Вставка
- Опубліковано 5 сер 2024
- This video provides an engaging glimpse of Page Replacement Algorithms in Operating System
Email ID for Testimonials: coderstrek@gmail.com
There is a lot to learn, Keep in mind “ Mnn bhot karega k chor yrr apne se nahi hoga ya maza nahi aara, Just ask 1 question “ Why I started ? “
Visit Crio: bit.ly/34gXEIr
Slides:drive.google.com/file/d/112po...
Notes: drive.google.com/file/d/1_FTH...
Discord Server Link: / discord
Do provide you feedback in the comments, we are going to make it best collectively.
Connect with Lakshay:
Instagram: lakshayk12...
LinkedIn: / lakshay-kumar-368a06146
Connect with Babbar here:
Instagram: / lovebabbar1
Twitter: / lovebabbar3
Telegram Group Link: Love Babbar CODE HELP
telegram.me/lovebabbercodehelp
My Editor: rishu.rsing...
TimeStamps:
00:00 - Introduction
01:10 - Promotion
02:06 - What is Page fault?
05:47 - FIFO Page replacement algorithm
13:00 - Belady's Anomaly
16:25 - Optimal Page replacement algorithm
22:34 - LRU Page replacement algorithm
28:20 - Methods to implement LRU cache/algorithm
37:50 - Least frequently used algorithm
39:11 - Most frequently used algorithm
Intro Sequence: We have bought all the required Licenses of the Audio, Video & Animation used.
#OSBusted #Lakshay
Earlier I was very weak in OS concepts, after watching your series I can say with utmost confidence that I am super confident in OS. Thanks for making our lives easy. Loved this series.
I have binged watch this series successfully with no interruption. It was I can say the most practical and knowledgeable series in OS. This is how our education system should look like
This OS series is very amazing ❤️ thank you lakshay bhai❤️❤️
Bhaiya your OS series was really amazing as DB I have watched both series and I am from mechanical background. waiting for you next series on computer networks.
Os k baad ab DBMS start krna please🙏
honestly, it's an awesome course, followed it so far and would suggest to those checking comments for how the course actually is, thank you bhaiya
Lru cache implement kar liya bhaiya. Implemented it using orderedDict in python.. Maza aagya 😃
Thank you so much for all the effort, it is Highly appreciated :)
very grateful to babbar bhaiya , such a nice course , legit attended all the videos of this course which made my confidence so highhh
Great efforts, I appreciate your efforts.
Was waiting for it🔥
Valuable series . Thankyou...
Best Underrated operating system course
thankyou so much sir for your efforts i highly appreciate your hardwork
Amazing series!
Thankyou sir! very useful series
jod course, liked it very much😀😀😀
Maja aa gaya bhai....
What a playlist sir really greatttttt🙌🙌🙌
Thanks bhaiya for this awesome series
Amazing.....
Thank you bhaiya
Sir amazing video very nice 😇😇😇😊😊
Best playlist
Hope next on Computer Network.
Bhaiya maza aa gaya
Awsome Series Lakshay Sir
Thanks for this amazing lecture
Amazing course 👍
Sir i watched full playlist and help of this video i passed the college exam with nice grade thank you sir and in my 2nd sem I'll watch full dbms playlist ☺️🙂
Thank you bhaiya😇
great 🔥🔥
Awsm. twist when the best technique is not possible!
Note: - This comment
is with refernce to the Optimal Page Replaccement Algorithm.
Thank you 😊
superb
Done bhai❤
awesome
Bhaiya ek computer networks for placements pe bhi bna do...
I never heard that they ask about CNF in interviews, do they?
they do
Very nice video
Nice Efforts in the series. By far one of the best.
Present 🙋🏻♀️
Great 👍👍👍👍
implement kr li bhaiya
Bhaiya moj kr diii
Starting me motivation kam thi kyuki subjective topic hai to neend aati thi...
But ab importance samajh aa rahi hai OS ki to ab value pata chali hai is course ki
nice series
lakshya ...the best
Very nice
we can use set pair to implement counter .In which first will be the counter and second is value
we can also implement it by using circular array concept . In the above example as discussed in lecture keep a array of size 3 after each time will update i to (i+1)%3 .
great
Why cant we use a queue instead of stack in LRU?
How will you remove pages from the end of the stack in case of LRU
I mean certain pages would have a valid/invalid bit as 1 since the ram has the capacity to hold three pages according to the said situation.Hence if the pages are present in RAM than the page fault would occur. ONLY in the scenario where all the demanded pages are new that 15 page faults can occur.
LRU ka counter wale approach ko implement krne ke liye hashmap use krna hai kya
can we implement the lru with mean heap with custom ??
🔥🔥🔥
Please make video on computer network
Can simply use a priority queue for lru
Implemented
Implemented LRU Cache 👍🏻
completed whole playlist in one day, exam time killls now going to sleep
08/07/24 page replacement algos cleared++ Lakshay bhaiyaa
implemented
🙏😍
I think there are less page faults than 15 in FIFO.
plz Computer networks ki playlist laao bhaiyaa
Is this playlist is completed for placement?
yes
bhai maza aya khatam krke ye playlist
Day 29 done✓
Maine Video Pura dekha
to kya kare? Prasad de? 😂😂
cat aagyi pichhe se😁😁 12:58
ye java development mei kaam aayega?
no
prioirty queue se implement ho jaiga
Day 29 done ...10/06/24
Sir start dbms asap plz
How is LRU different from FIFO?
FIFO is about entry of the earliest page. LRU is about earliest usage of a page due to which it is pushed to the stack top even when it is already present in the frames.
this series doesnt has system calls.please add
Hai
Comment++
class Node
{
public:
int a, b;
Node *pre;
Node *next;
Node()
{
pre = NULL;
next = NULL;
a = -1;
b = -1;
}
};
class LRUCache
{
public:
map mp;
Node *head = new Node();
Node *tail = new Node();
int cap;
LRUCache(int capi)
{
this->cap = capi;
head->next = tail;
tail->pre = head;
mp.clear();
}
void add(Node *a)
{
a->pre = head;
Node *rt = head->next;
a->next = rt;
head->next = a;
rt->pre = a;
}
void deletenode(Node *a)
{
Node *pr = a->pre;
Node *nx = a->next;
pr->next = nx;
nx->pre = pr;
}
void put(int a, int b)
{
if (mp.find(a) != mp.end())
{
deletenode(mp[a]);
add(mp[a]);
mp[a]->b=b;
return ;
}
if (mp.size() == cap)
{
mp.erase(tail->pre->a);
deletenode(tail->pre);
}
Node* p=new Node();
p->a=a;
p->b=b;
add(p);
mp[a]=p;
return ;
}
int get(int a)
{
if (mp.find(a) == mp.end())
return -1;
deletenode(mp[a]);
add(mp[a]);
return mp[a]->b;
}
};
LRU CATCHE iMPLEMENTATION
Mai abhi mobile par video dekh raha hun, time abhi 22:16 hai video mai, from start till this point I'm only seeing "In Japan" picture on the screen. Is this happening only with me?
In a way we can say that (iv) Counters method is a Doglapan 😂
😂😂😂 true
*****
Sir make next class on computer architecture & Organization 🙏🙏🙏🙏
bhaiiii ... 😐😐😐😐😣😣😣😣😣
@@dibyadutta4525 ok
most impotent😂😂
🔥🔥🔥