I know this is a very late response, the answer to the question would be to add a counter (reference count) which will have the count of all existing processes. The wait time is called "grace period" where the guarantee of readers being done with their jobs in that time period will be the decrement of the reference counter as readers are getting done with their jobs. After grace period it is ensured to have the counter value of 0. And as such no readers from now are not allowed to go the old way. (from the old data).
Thompson Jennifer Lee Brenda Anderson Jeffrey
a nice elaboration, but I'm curious how to implement "wait all old readers done their jobs", using some counters or locks
I know this is a very late response, the answer to the question would be to add a counter (reference count) which will have the count of all existing processes. The wait time is called "grace period" where the guarantee of readers being done with their jobs in that time period will be the decrement of the reference counter as readers are getting done with their jobs. After grace period it is ensured to have the counter value of 0. And as such no readers from now are not allowed to go the old way. (from the old data).