Microsoft Interview Question for SDE-2s
- 0of 0 votes
Use synchronized, wait() and notify() to write a program such that below mentioned conditions are fulfilled while reading and writing data to a shared resource.- neer.1304 July 26, 2019 in United States
When a write is happening, no read or other write should be allowed(read and write threads should wait)
When a read is happening, no write should be allowed (write threads should wait) but. other read threads should be able to read.
Donot use any API classes e.g. ReadWriteLock, AtomicInteger etc..
| Report Duplicate | Flag | PURGE
Microsoft SDE-2 Java
Open Chat in New Window