Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!hal!nic.MR.NET!tank!ncar!noao!asuvax!nud!mcdchg!ddsw1!igloo!drac From: drac@igloo.UUCP (Bruce Maynard) Newsgroups: comp.os.misc Subject: Re: Multi-CPU system task scheduling Summary: suggestion Keywords: Need help... Message-ID: <1125@igloo.UUCP> Date: 12 Nov 88 19:59:50 GMT References: <2174@ficc.uu.net> Organization: igloo, Northbrook, IL Lines: 37 In article <2174@ficc.uu.net>, walker@ficc.uu.net (Walker Mangum) writes: > > I'm working on a real-time multi-CPU system in which a process can > be scheduled by another process, a timer, or an event in the "most > attractive" CPU. The actual mechanics of loading and scheduling > the new process work just fine. The problem is the definition of > "most attractive" CPU. > >i*abbreviated* > Currently, the "most attractive" CPU is determined by sampling the > load average for all CPUs, and selecting the CPU that has the > lowest load average and has no processes holding for memory > allocation. *abbreviated*> > Is there a better way to handle this problem? I would appreciate > *any* and *all* ideas/answers. > Can you change 'most favored CPU' selection to the one with the longest idle time? Seems to me that if you use that as the major criterion (and, of course, change that cpu's idle time to '0' immediately) you may get better results; the difference is not immediately obvious, but we use it all the time on some of our systems, and it works rather well... There is a possibility, of course, of the system bottlenecking if all CPU's are 'busy' when a job is ready to be submitted; you can either hold the job, or THEN pick the CPU with the lowest loading. Personally, I'd think that what you might want to do is have a 'central' pool of job submissions and then have each CPU query the pool (say, every second or so) to see if there's a new process waiting. Then, as each task is entered, it would automatically select the next job in line (queued by priority and time of submission of course). Hope this's some help; if not, Se la guerre... "If it ain't broke, don't fix it!" Bruce Maynard Hanover Park, IL