From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,f9d707f18092c081 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2002-04-24 08:13:40 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!xmission!news-out.spamkiller.net!propagator2-maxim!propagator-maxim!news-in.spamkiller.net!out.nntp.be!propagator-SanJose!in.nntp.be!easynews!feed.news.qwest.net!news.uswest.net.POSTED!not-for-mail From: "Thomas Losness" Newsgroups: comp.unix.tru64 References: Subject: Re: POSIX threads and Tru64 5.1a woes X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: Date: Wed, 24 Apr 2002 10:13:38 -0500 NNTP-Posting-Host: 63.231.228.181 X-Trace: news.uswest.net 1019661218 63.231.228.181 (Wed, 24 Apr 2002 10:13:38 CDT) NNTP-Posting-Date: Wed, 24 Apr 2002 10:13:38 CDT Xref: archiver1.google.com comp.unix.tru64:7374 David, Thank you for your reply. I realize that it might have been inappropriate to jump off of Steve's post with my own, but I still believe my original point is valid. Bugs of the level Steve and I describe can certainly be part of the Operating System and it may be a while before they are noticed and fixed. On the helpful questions you had: Yes, I am using SCS and yes I have submitted this bug to Compaq along with my example source. They acknowledge that it is a problem. Unfortunately, they will not be fixing it any time soon. I realize that my application may be narrow in the larger scheme of things, but I still believe that serious problems can and do occur. Thanks for your suggestions, Tom Losness "David Butenhof" wrote in message news:r%xx8.9$Qr5.351281@cacnews.cac.cpqcorp.net... > Thomas Losness wrote: > > > At the risk of sounding like I'm flaming David and Compaq, I don't agree > > that > > fundamental problems such as the one Steve describes are as rare as we'd > > all like. > > > > There is a bug in Tru64 5.1A having to do with POSIX shared memory and > > the changes made to the Universal Cache Buffer. I have a small test > > program that demonstrates a realtime application using POSIX threads, > > shared memory, > > and semaphores. This program runs at 50Hz and does some nonsense "work" > > during each of the intervals. The set of work takes about 6 milliseconds > > for each > > interval on a DS20E with two CPUS and 2GB of memory. > > While I can understand how someone completely dependent on realtime shared > memory synchronization might consider this problem "fundamental", and > certainly that you might be upset, it's hardly on the same level of > "fundamental" as a condition variable wait failing to wake up. You started > out, to begin with, by listing a whole set of specific conditions; the > original poster has not. As I said, I can only presume there are a lot of > specialized conditions that aren't explained and cannot be inferred from > the description. > > By the way -- if you're writing a realtime thread program that's dependent > on realtime synchronization with external state (such as hardware, or > threads in other processes), I hope you're using SCS (system contention > scope) threads? While the default PCS threads are more system-friendly and > lighter-weight for most applications, they're NOT appropriate for such > realtime operations because the scheduling state of a PCS thread contends > only against other threads within the process. The kernel threads (or > "virtual processors") on which PCS threads are scheduled have the kernel > policy and priority of the process, which is generally lower than the > visible thread state (e.g., the default timeshare priority 19). > > > The bug shows up when the 'update' program is run by the OS to sync the > > disks. > > At that point, my realtime program running at high priority and with FIFO > > scheduling > > will take anywhere from 12-50 milliseconds to do the same work it was > > doing > > in 6 milliseconds. In the case of a realtime application running at 50Hz, > > as soon > > as the work interval takes more than 20 milliseconds, we've just busted a > > frame. > > > > This same source compiled on a Tru64 4.0G machine works just fine. Now, > > a realtime application is certainly not the norm for most Compaq > > customers, but I > > would think those 50 millisecond hits would be awfully painful to > > customers running > > webservers or database servers on Tru64 5.x. If you're using POSIX shared > > memory > > and Tru64 5.1A UNIX, you should be aware that this problem may hit you > > pretty hard. > > > > If anyone is interested in obtaining my test program to see for > > themselves, please > > email me using tlosness as the portion in front of the at symbol and > > aerosysengr > > for the company name with com at the end (I do hate SPAM, so I won't post > > me email address in an obvious manner). > > > > Please note that the current workaround is to replace POSIX shared memory > > with SYSV shared memory. The test source I have also incorporates this > > and can be compiled in that manner by setting an #define. > > That's unfortunate, and I'm sure the VM people would love to hear about > this. Have you done anything to inform them? Like entering a formal problem > report that can be tracked and prioritized? If you have, then presumably > you attached your sample code and they already have it. > > /------------------[ David.Butenhof@compaq.com ]------------------\ > | Compaq Computer Corporation POSIX Thread Architect | > | My book: http://www.awl.com/cseng/titles/0-201-63392-2/ | > \-----[ http://home.earthlink.net/~anneart/family/dave.html ]-----/