Sir, aapke ashirwaad se or aapki guidance se sabka bhala hoga. I guarantee it
@aniketdas3406 Жыл бұрын
If there's someone like me who's struggling to understand how multiple processes can read without allowing any other process to write, it can be explained in this way: When the first reader process enters it decrements the wrt and makes it 0 so that no writer process can execute untill the last reader has done its job and signals wrt. Therefore, after the first reader process, other readers which will try to read concurrently will skip the if(readcount ==1) part since wrt is already decremented by the first read process and write() operations are halted. I hope it helped you :)
@cruelgamer83519 ай бұрын
Okay but why there no code line to restrict readers in writer process
@aspirant84093 жыл бұрын
Start 7:10
@Adityasharma-oe8zp3 жыл бұрын
And the guy who connected the tv to headphones was badly injured in confrontation🤣🤣🤣
@Innov8mate2 ай бұрын
Y does we can't block readers in write in function.
@nirbhaykumarchaubey8777 Жыл бұрын
You Rock, Sir!
@codeeasy17 Жыл бұрын
Nice explanation
@krishbhat74662 жыл бұрын
sir initially its written that multiple readers can access the file, but in code only one reader is allowed at a time and other reader wait at mutex. why?
@Aditya-ie8ch Жыл бұрын
we can't let mulitple readers access the readcount variable at the same time..thats why we gotta use wait(mutex)..however once the readcount++ is done and signal(mutex) too...other reader can now access the file..so we gotta use preemption at the end of 1st signal(mutex) for multiple readers to be able to read
@latestsouthmoviehindi Жыл бұрын
Ready to caught
@uddipangoswami84272 жыл бұрын
Sir in writer code why wait mutex is not taken before wait(wrt) ?
@soumilyade10572 жыл бұрын
cause wrt is a Binary semaphore, and readcount is a regular variable that can have a value of n...
@AshishSinwer-o7e2 ай бұрын
no need of that ... wait(wrt) will handle the blocking of other writer processes here and if there is a reading process wants to enter during the writer process , then the process will stuck in the wait(wrt) part of the reader process code as wrt = 0 at that time.