*Writer will write untill ..there is reader...& reader will read untill ..there is writer...
*for loop tooks small time to enter .....but executes very fast
*If i execute writer processes one by one like ./writer && ./writer1 && ./writer2......then ./reader in which there is a for loop executing for all the three writers ...will read very fast...sometimes garbage or not turnwise......so i get need to ++ment statements ....or apply sleep() to synchronize the writers & reader having for loop reading all three clients
*If i execute all writer processes at one time...like ./writer & ./writer1 & ./writer2 ...in background process...it will take almost negligible time to make background process...the time in which SIGPIPE reader got signal that writer has came...
*So if i execute all writers at one time usinng ./writer & ./writer1 & ./writer2....then reader will get the time as one writer is writting ....so in that case ...reader could read only one writer ...that writes 1st of all......in fifo
*always remove fifo if u have to write to fifo again ...bcz fifo always have garbage...it do not flushes data into it untill it is removed
*if reader has to read ....at the time meanwhile the writer is writting...there is no use of applying sleep () after writer has written has written something ...& bcz in that time of sleep()....reader will not read...........reader has to read untill writer is writting
*for loop tooks small time to enter .....but executes very fast
*If i execute writer processes one by one like ./writer && ./writer1 && ./writer2......then ./reader in which there is a for loop executing for all the three writers ...will read very fast...sometimes garbage or not turnwise......so i get need to ++ment statements ....or apply sleep() to synchronize the writers & reader having for loop reading all three clients
*If i execute all writer processes at one time...like ./writer & ./writer1 & ./writer2 ...in background process...it will take almost negligible time to make background process...the time in which SIGPIPE reader got signal that writer has came...
*So if i execute all writers at one time usinng ./writer & ./writer1 & ./writer2....then reader will get the time as one writer is writting ....so in that case ...reader could read only one writer ...that writes 1st of all......in fifo
*always remove fifo if u have to write to fifo again ...bcz fifo always have garbage...it do not flushes data into it untill it is removed
*if reader has to read ....at the time meanwhile the writer is writting...there is no use of applying sleep () after writer has written has written something ...& bcz in that time of sleep()....reader will not read...........reader has to read untill writer is writting
*Now at this point.....writer needs to write one by one....so that reader may read all of the writers & do not miss any of the writer........either ./writer & ./writer1 & ./writer2 writers are writting at the same time....fifo should be shared by all of writers one by one....all writers should write one by one.......eithers request of all the writers came at same time....so semaphore is applied at this point of time......