I'm writing a real-time server which schedules certain events in a periodic
way(fixed period). During each period, the server may do the following:
1. Carries out the regular tasks for existing requests
2. Reads from the disk if any buffers for the existing requests need to be
filled up.
3. Accepts new connection requests if there're any.
I proposed to do it in one process by using asynchronous I/O and networking
in SUNOS 5.2. My questions are:
1. After the server initiates a disk read asynchronously, how can it detect
by poll(2) later on that the read has finished(which flags should be specified
for events). Can I detect the end of file using poll? How?
2. I don't want to use SIGIO to achieve this for fear of the cost of interrupt,
is that really a big problem?
3. When the server polls to find if there're any new connection requests and
accepts them if any, will this acceptance process take a long time(compared
with the server scheduling period,16ms), how long does it take to accept a
connection?
Any advice will be greatly appreciated(email preferred). Thanks in advance.
--Junbiao