[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [OT]: Quiz for scheduler "want to be authors" [Was]: Re: code of process scheduling



On Thu, Oct 07, 2004 at 01:45:30PM +0300, Andrey Andreev wrote:
> 
> >Quiz for scheduler "want to be authors":
> >
> >Given: 
> >       A two man racing team.
> >       Race is 100 Km in length.
> >       The first team member drives the first half at 50Km/hr.
> >
> >Question 1:  
> >       How fast must the second driver drive the second
> >       half of the race for the TEAM to average 100Km/hour?
> The only way the team would average 100 km/h along the length of the 
> race is, as far as my imagination goes, the unlikely event that the 
> second driver quantum teleports to the finish line instantly. Either 
> that, or fall into a conveniently placed wormhole or something.
> 
> >
> >Question 2:  
> >       Essay, How the heck does this apply to the Linux scheduler.
> Seriously, how the heck does this apply to the Linux scheduler???

Well it is an example of a common situation that any scheduler might
encounter.  When a necessary first action takes "time" (too long) what
is the scheduler to do with those processes that depend on that action.
How can the kernel schedule actions so processes to not block.

If we were to say something like:
   Given:
	A disk rotates at 5200RPM
	Disk  command latency is 0.xx seconds
	Disk transfer rate is xyz...
	Operating system latency is abc...
   Question:
	When must a disk data transfer be issued so the block of data
	is ready for my application.

Or:	
   Given:
	It takes 0.04 seconds to render a frame for the screen.
   Question:
	Why is the effective frame rate of my application always less
	than 30 frames per second.

Or:
   Q: My CDROM burner errors out at 500X, what is wrong.
   Given:  I can fetch data from my shared drive channel
	   at a rate 150% faster than my 500x Burner needs it.

Or:
   Given: I want to burn CDROM audio data as it arrives from the network
   The drive reports under-run errors.  
   Q: What is the problem.

Or: 
   Q: I have two cooperating 'c' programs that exchange data
      carefully over a 56K baud data line one byte at a time.
      Why is the data rate 100 bytes per second in operation.
      In test I measured 5000 bytes per second.

Or:
   Given: I have a mix of three processes in a pipeline that should
   display constant updates on my X11 display.  I have given these
   applications special real time priorities because I want a real
   time display.

   Question: The display freezes when I run my pipeline of processes
   and I do not see the display I expect.  What is wrong?


-- 
	T o m  M i t c h e l l 
	Me, I would "Rather" Not.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]