![]() no other process should be allowed to enter into the critical section(learn more about critical section from If a process is performing some write operation, then no other process should be allowed to perform the read or the write operation i.e. We can solve the above two problems by using the semaphore variable(learn more about semaphore from Only one process should be allowed to change the value of the data present in the file at a particular instant of time.Īnother problem is that if a process is reading the file and another process is writing on the same file at the same time, then this may lead to dirty-read because the process writing on the file will change the value of the file, but the process reading that file will read the old value present in the file. If a process is writing something on a file and another process also starts writing on the same file at the same time, then the system will go into the inconsistent state. But the problem that arises here is that: ![]() All these processes can perform these two operations. ![]() Basically, we perform two operations on a file i.e. In an Operating System, we deal with various processes and these processes may use files that are present in the system. Now, you are done with the prerequisites of the blog, so let's get started with the reader-writer problem. If you have no idea about the process synchronization, then learn from In this blog, we will learn about the Reader-Writer problem in Operating System which is used for process synchronization.
0 Comments
Leave a Reply. |