*BSD News Article 2714


Return to BSD News archive

Path: sserve!manuel!munnari.oz.au!mips!mips!swrinde!cs.utexas.edu!uunet!mcsun!sunic!chalmers.se!dtek.chalmers.se!dxper
From: dxper@dtek.chalmers.se (Per Anders Olausson)
Newsgroups: comp.unix.bsd
Subject: 386bsd and I/O...sheduler bug?
Message-ID: <13017@chalmers.se>
Date: 29 Jul 92 11:53:55 GMT
Sender: news@chalmers.se
Organization: Chalmers University of Technology, Gothenburg Sweden
Lines: 50


  I have been suspecting all the time since V0.0 that there is something very
strange relating to disk i/o in 386bsd. This is either a bug or feature of the
BSD 4.3 sheduling algorithm. 

  Yesterday I therefore tried out the following simple program:

#include <stdio.h>

main()
{
	char	data[8192];
	FILE	*f;
	
	f = fopen("Test2.file", "w+");
	while(1)
	{
		fread(data, 1, 8192, f);
v		rewind(f);
		fwrite(data, 1, 8192, f);
	}
}

===

  If I run this at normal priority the system will turn on the disk led and
just grind to a halt. That is, it will not let any other process run as long
as it is running.

  If I run it with a nice value of 20 the system will let me use the shell
until I decide to do something and then it will hang. If you use the elbow
technique you'll sporadicly get hold of the cpu but after a while it will hang
to.

  So it appears as if processes doing I/O is somehow not accredited their usage
of the CPU. If you check out the load average while doing make depend or
something like that it seems a bit low too.

  Can anyone confirm if this has been fixed or does anyone have any clues as
to where the fault lies?

pao



--
-------------------------------Andrew Olausson--------------------------------
--------------------------Unemployed Unix Specialist--------------------------
------------------------------pao@cd.chalmers.se------------------------------
-------------------------------pa-ola@proxxi.se-------------------------------