So this is a general question about the use of monitors in the Reader/Writers problem.
I know the monitor procedures for the Readers/Writers problem are used for mutual exclusion to a critical section, but my professor claims the critical section is outside the monitor as opposed to being inside the monitor for the Reader/Writers problem? Why?
I supposed the critical section is outside the monitor since the monitor is supposed to encapsulate shared data structures, procedures operating on those data structures, and synchronization between concurrent procedure invocations. Thus, a monitor is used to make sure that a writer does not illegitimately access its data through its procedures... But when I went searching, I found out that many programmers implemented the monitor with the critical section inside as opposed to outside.