PDA

View Full Version : CD-RW on Same IDE Channel as HD?


sburtchin
10-13-2006, 03:33 AM
I've read many times that CD drives won't usually work on the same IDE channel as a hard drive. I tried it once on my system without success. The explaination I read was because of a speed mismatch, but both of my units are UDMA compatible. Others talk about putting CD's and HD's on the same channel and make no mention of any possible incompatibilities.

I have a two HD system. Some sources claim that the pagefile should never be placed on a slave drive, therefore, I'm thinking the following arrangement (if possible) should give the best performance with only two IDE channels:

Primary Master - HD (Operating System partition, 750MB CDR cache partition)
Primary Slave - not used

Secondary Master - HD (Pagefile partition, Data partition)
Secondary Slave - CD-RW Drive

I'm guessing that the pagefile won't get used much in this arrangement while writing CD-R's if the entire CD contents are cached in one location prior to recording.

Can this be made to work? Is there a better arrangement?

Sylvander
10-13-2006, 04:24 AM
" I've read many times that CD drives won't usually work on the same IDE channel as a hard drive"
FALSE.
It's just not the best of arrangements [because of the speed mismatch].
My understanding is...That because both are on the same controller they must take turns...And because the CD-drive is so slow relative to the HDD, that the HDD must sit and wait, and wait, and wait, while the CD-drive does its thing.
Not a good idea! :(
I used to have my HDD jumpered as Master on the Primary IDE controller...
And the CD-RW as Master on the Secondary IDE Controller, and the CD-reader as Slave on the Secondary IDE Controller.
My idea was that when copying from one CD to another [for example]...
The reader would be reading whilst the data was being written to the HDD [both working concurrently on different controllers].
Then when the data was being read from the HDD and burned to a CD-R or CD-RW, again both would be working concurrently.
The burning could only go at the speed of the optical drives, but the HDD would only be slowed down whilst working on that task; it would be free to also do other tasks, possibly at its full speed.

"Some sources claim that the pagefile should never be placed on a slave drive"
I disagree with that.
On my previous PC I have a fixed-size swap-file on an old, small [1 GB] HDD [on D:] and it worked just fine.
My idea there was that both HDD's could be working concurrently [if they were on different controllers].
That means that the C: partition [on the Primary Master] could be read or written to whilst the D: partition [possibly on the Secondary Master][including the swap-file] could be CONCURRENTLY read or written to [like if you were copy ing files from C: to D:].
I think in practice I had both HDD on the Primary IDE controller, so didn't get the benefits of having them on different controllers.
Presently...
I have installed a PCI to IDE controller card, have 2 internal controllers, and 2 external controllers on the card, so my only HDD and 2 optical drives each have their own dedicated controller.
Hence ALL 3 drives work independently and concurrently.
Have a fixed-size swap-file, but just left it on C:

"Can this be made to work?"
Certainly.

"Is there a better arrangement?"
My first inclination would be to make the 2nd HDD a Primary Slave to avoid the CD-drive slowing it down.
But I can see your reasoning...
The swap-file is on the 2nd HDD, and you're putting that on the Secondary IDE Controller...
Cunning...
Don't know enough about the details to know whether the CD-RW drive and the 2nd HDD would ever need to run at the same time.

Fitting a [low cost] PCI to IDE controller card would eliminate all doubt by giving all drives their own controller.
My card is ATA133, so it also [noticeably] speeded up the operation of my ATA133 HDD [the mobo is much slower].

sburtchin
10-26-2006, 06:49 PM
"My first inclination would be to make the 2nd HDD a Primary Slave to avoid the CD-drive slowing it down."
This was my arrangement until today. One peculiar problem with this arrangement (CD as Secondary Master with no Slave) is that when the CD is writing I cannot do anything else.:confused:

I had tried in the past to put the HDD on the Primary Master with the CD on the Primary Slave with the secondary controller empty. I remember that the CD could not be found, but I may not have been persistent enough (see below).

I created the following hardware configuration today:

Primary Master - HDD (Operating System partition, 750MB CDR cache partition)
Primary Slave - not used

Secondary Master - HDD (Pagefile partition, Data partition)
Secondary Slave - CD-RW Drive

On the first boot into DOS the CD could not be found, but after booting the second time it was back again. Not sure why this was, because the BIOS found it on the first boot. Time will be required to determine if this new arrangement causes more coasters when burning CD-R's.

"My understanding is...that because both are on the same controller they must take turns...and because the CD-drive is so slow relative to the HDD, that the HDD must sit and wait, and wait, and wait, while the CD-drive does its thing."
I agree. If it is just a simple matter of taking turns, then this is truely a bad situation. But I think the Master has some priority over the Slave, I just don't know how much. I think the Slave has to get off the channel anytime the Master wants access, so in this arrangement the CD would have to wait, and wait . . . on the HDD, but never for very long. Is there a way to test if this is happening? Ideally, the CD should get access if it absolutely needs it to avoid burning a coaster, but otherwise, have to wait.

This arrangement also should work best if the pagefile does'nt need to be used while burning the CD. My thinking is that because the CD cache is on the HDD on the other channel, the data can be transferred directly from the cache to the CD recorder without an intermediate stop in the RAM or VM. Is there any way I can test to see if this is the case?

Should I have "Bus Mastering" enabled in the BIOS?

Sylvander
10-27-2006, 07:00 AM
"when the CD is writing I cannot do anything else"
Is that because the burning process is using so much CPU capacity/time?
That's fairly typical unless you have a really fast processor.
Or is there some other reason?
Does a different drive arrangement improve matters?

"I had tried in the past to put the HDD on the Primary Master with the CD on the Primary Slave with the secondary controller empty. I remember that the CD could not be found"
That should have worked with no serious problems; certainly the CD-drive should have functioned, can't think of an obvious reason why it wouldn't.

"I think the Master has some priority over the Slave"
I think different priority settings can be allocated to the various IRQ's.
Only have an imperfect understanding of how it woks...
1. PRE-EMPTIVE MULTI-TASKING [versus Co-operative Multi-Tasking].
The processor deals with tasks that are waiting in message queues.
a) The 16-bit SHARED message queue serves all the 16-bit programs/processes. The processor uses Co-operative Multi-tasking to deal with these. This means the CPU only moves on to the next 16-bit task after the previous one has finished. Hence, if any one task cannot complete, then none of them can be progressed and all 16-bit processes freeze.
Not sure whether they handled in an order decided by the PRIORITY SETTING OF THEIR IRQ, or by 1st come 1st served.
b) The 32-bit message queues, used by 32-bit programs/processes, are all independent, and the CPU uses Pre-emptive Multi-tasking on them.
That means each is given a short time, and the CPU rattles around each in turn, as decided by the PRIORITY SETTING OF THEIR IRQ.

Can't remember how IRQ priority settings are set or altered; I just leave that to Windows.
My HDD is connected to a PCI to IDE RAID controller card, and its controller uses IRQ 9.
Primary IDE Controller uses IRQ 14 [CD-RW on this].
Secondary IDE Controller uses IRQ 15 [CD-reader on this].
The drives don't use IRQ's.

"Is there a way to test if this is happening?"
Don't know, I've never done it.
If I'm burning a CD-R/RW...
a. I would watch the LED blinking on the reader as it reads...
b. The LED on the HDD glowing as it writes...
c. The burning software displaying how full is the 8 MB memory reservoir on the CD-RW drive. I can see the HDD reading and the reservoir filling to 100%...
d. Then see the CD-RW blinking as it burns yet another track, and the reservoir levels dropping to about 80% then refilling to 100% [dropping, refilling, droppin, refilling] until the track is completed.

By watching all of these I get a feel for what is happening, but I've never tried to study in in more detail than that.

"Should I have "Bus Mastering" enabled in the BIOS?"
Seems like a good idea to me [I'm no expert].
My understanding is that this allows the device [the optical burner or whatever] to take direct control of the [PCI] bus so that everything works to its satisfaction.

Pentium100
10-27-2006, 10:39 AM
If two drives are connected to the same IDE channel (one as master, the other as slave), then they must take turns. IDE (unlike SCSI) does not have a "disconnect" function to, for example, tell a drive to wait while the system accesses the other drive.

When you write a CD, the CD-RW drive takes the bus (at least when writing lead-in/lead-out) and the system cannot access the other drive. In your case (as I understand, you have a HDD with page file connected to the same channel as your CD-RW) the system cannot access the page file.

That's why if you have two CD-RWs and want to use both at the same time, it is impossible (that is, burning two CD's at once takes almost the same time as if burning them one at a time).

Hard drives take the bus for a shorter time (about the time they need to seek and read a block (64K) of data), so it is possible to use two hard drives on the same channel, but it costs some speed. CD-RWs take the bus for a longer time.

sburtchin
10-27-2006, 04:38 PM
"when the CD is writing I cannot do anything else"
Is that because the burning process is using so much CPU capacity/time?
That's fairly typical unless you have a really fast processor.
Or is there some other reason?
Does a different drive arrangement improve matters?The previous arrangement (CD-RW on Secondary Master, no Slave) should have been optimum for the CD, but Bus Mastering was not enabled then. I think with Bus Mastering the HDD can send the data directly to the CD-RW without getting the CPU involved. I was caching all 700MB first (NTI CD-Maker lets me cache the data to the HDD prior to writing to avoid buffer underruns. I think this converts the data into a writable format so it can be burned with no further processing, but I'm only speculating here.), but could be that all data was going through the CPU a second time while writing. I'm hoping the Bus Mastering will free the CPU to do other tasks.

b) The 32-bit message queues, used by 32-bit programs/processes, are all independent, and the CPU uses Pre-emptive Multi-tasking on them.Since I have now a HDD and CD-RW on the same IDE channel, they share the same IRQ. Some other mechanism will have to control their bus allocation. With Win98/Win2000 all the processes with the CD-RW should be 32 bit, right? So then the OS should figure a way to keep everybody happy sharing the same channel?

"I had tried in the past to put the HDD on the Primary Master with the CD on the Primary Slave with the secondary controller empty. I remember that the CD could not be found"
That should have worked with no serious problems; certainly the CD-drive should have functioned, can't think of an obvious reason why it wouldn't.
I may have given up too quickly then. This time with the HDD and CD-drive both on the Secondary channel, DOS could not find it on the first boot, even though the BIOS did, but all is well now. Go figure:confused:

If two drives are connected to the same IDE channel (one as master, the other as slave), then they must take turns. IDE (unlike SCSI) does not have a "disconnect" function to, for example, tell a drive to wait while the system accesses the other drive.

When you write a CD, the CD-RW drive takes the bus (at least when writing lead-in/lead-out) and the system cannot access the other drive. In your case (as I understand, you have a HDD with page file connected to the same channel as your CD-RW) the system cannot access the page file.Are you saying that the Master has no priority over the Slave?

Thank you both for being so helpful!

Pentium100
10-28-2006, 07:38 PM
Are you saying that the Master has no priority over the Slave?

The master/slave thing is only as an identifier - like SCSI IDs (well, SCSI IDs actually have different priorities) or an IP address of a computer. Once a drive takes control of a channel, the channel is busy until the drive releases it.

Sylvander
10-29-2006, 01:41 AM
"with Bus Mastering the HDD can send the data directly to the CD-RW without getting the CPU involved"
What you're describing is "Direct Memory Access" [DMA] rather than Bus Mastering.
DMA by-passes the CPU [hence freeing up the CPU for other tasks]. The data is transferred "direct" from one "device" to the other without involving the CPU.
The alternative [earlier] arrangement is "Programmed Input/Output" [PIO] where the CPU is in control [it uses up CPU capacity] of the movement of data from one device to the other.

"NTI CD-Maker lets me cache the data to the HDD prior to writing to avoid buffer underruns. I think this converts the data into a writable format so it can be burned with no further processing"
In the software I've used it's called an "Image".
You specify that an image is to be written to the HDD. That image can then be used to [more easily] make [one or] multiple optical disks. There's much less likely to be reading problems because the HDD can be read much faster than an optical disk can be burned; hence buffer under-runs are less likely.
If I was ever getting buffer under-runs I resorted to working in the [Win98SE] "msconfig->Diagnostic Startup->Normal mode at restart" environment, and used an "Image" for burning the disk.
I believe an image does indeed need no further processing.

sburtchin
10-29-2006, 04:41 AM
The NTI CD-Maker help explains it as follows:

If the source files linked with your CD image layout consist of many small files, CD-Maker 2000 will store those files with a size less than 200 KB (by default) to the program cache buffer. You can adjust this default threshold file size to ensure smooth transfer of data to the CD Recorder. As long as your program cache buffer has been allocated enough free disk space, you should increase the threshold to allow as many small files as possible to be stored to the program cache buffer.

I think it is just a repository to put copies of the files in case the originals are scattered about the disk or badly fragmented. There is a slider for me to choose which file sizes get put into the cache. I can put everything into the cache if I want.

I can also create an ISO CD image file, and burn CD's from ISO files. This may be the ideal arrangement provided the ISO file resides on a different IDE channel from the CD recorder. They are both UDMA devices, so I hope the HDD and CD recorder can work on this by themselves and let me have the CPU for other things. I will test and report back results.