questions about poll(2) in real-time scheduling

questions about poll(2) in real-time scheduling

Post by Junbiao Zha » Wed, 03 Nov 1993 07:14:15



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

 
 
 

1. Mixed Time-Share & real-Time scheduling

 I seem to have this problem:

 Process Proc is started in real time, it in turns creates  THR_BOUND thrA.

 And then it drops itself in time share queue and creates THR_BOUND thrB.
(Actually there are a multitude of time-share and real-time threads.)

 Now thrA runs for a while (some milliseconds, say 15 ) and then it sleeps
for some milliseconds. (This is actually done by some interrupt mechanism
but that probably is not important either) and then thrB comes in prints some
data generated by thrA and goes to sleep. So far so good. Now however
if I go to another window and do an "ls" or another command, what I am
seeing is that if "ls" starts when the time-share thread thrB is running,
it can preempt thrB, and when the time to run thrA comes again, scheduler
doesn't necessarily run thrA. Soit appears that some piece of code
in the scheduler, when it gets a level 10 interrupt, it checks the
process table, and not the LWP table to find out if any real-time
LWPs are waiting or not. So if there is NO processes in real-time
queue, it assumes that there are no real-time LWPs waiting, and skips
that portion of the scheduler.... This is pure conjecture, but I am at
a loss to explain this behaviour. This can make me sometimes lose 10 or
20 milliseconds, invalidating houirs worth of run sometimes.
It works correctly if the process is in the real-time queue. Any
suggestions. (we got and tried patch -54 just to be sure...)

Sinan

PS: platform is SS10/512MP

2. Audi log files fill up 100% /var

3. Real-time Scheduling

4. How do I bridge/route between a 10 mbps hub and a 100 mbps hub?

5. unix real-time scheduling?

6. Disable sending ICMPV6 redirects on IPV6

7. real-time scheduling on unix?

8. KDE newbie question re: "KDM respawning too fast"

9. Real-time Scheduling

10. 2.4-ac: real-time / scheduling information out of /proc

11. threads in real-time scheduling - help needed

12. Solaris2.0/2.1 Real time "Fast" timing/scheduling

13. Real-time / embedded programming - terminology question