LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 11-06-2012, 09:38 AM   #1
noman.butt31
LQ Newbie
 
Registered: Nov 2012
Posts: 1

Rep: Reputation: Disabled
Keeping device functionality in device controller instead of kernel.


A friend of mine asked me this question in the class and I could not answer it. He asked:

Since we know kernel controls the physical hardware via device drivers. What if all this functionality is kept inside the device controller itself rather than kernel managing them. What would be the consequences of such scenario? Good or Bad?

I searched online for this question but could not get information about this scenario. May be I'm not googling in the right keyword.

You insight into this will help me getting clearing my concepts.

Please answer.

Thanks.
 
Old 11-07-2012, 05:32 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,651
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
This concept is pretty old. You can see it for example with the Commodore C64 and its floppy drive VC1541. The 1541 had a separate CPU that controlled the drive independent from the main system. AFAIK, this concept was given up because a) modern CPUs can control other devices without serious impact on performance, and b) it is much cheaper to let the main CPU do the work. It should in fact nowadays be faster to let the kernel directly control the device than having a communication overhead between two independent threads.

Last edited by TobiSGD; 11-08-2012 at 09:15 AM.
 
Old 11-08-2012, 07:04 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,447
Blog Entries: 4

Rep: Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505
Member Response

Hi,

I would like to add to what 'TobiSGD' stated: Modern subsystems like the HDD does contain and support local control via interface. Direct control and controlled access are still used widely in device control or subsystem to remove any unwarranted loads via DMA. DMA load cycles for modern HDD are good but even better for SSD devices.

DMA is widely used in device control intermediately or controlled access to off load from the central system. Device driver will handle intermediate control where as the device controller will handle memory transfers between the system and subsystem. Look at: Direct Memory Access and Bus Mastering for a general description.

Modern CPU are capable of implementation for multiple device control. There are times when a subsystem with local management surpasses the capabilities of the main CPU(Master). Some Data controllers, DAS or remote DMA will be often served by local control then presenting data back to the master via DMA, Network device or even scheduled data transfers via interrupt. Even with DMA one must be careful not to load the system via errant data transfers which can cause major issues for other system handlers if the buffers are not managed properly by the device handler.

Another good example for comparative reasons would be a NAS which utilizes network subsystem for exchanges but the NAS itself as an appliance does have the means to control, manage or store data locally for later transfer when requested.
HTH!
 
Old 11-08-2012, 07:39 AM   #4
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Quote:
Originally Posted by noman.butt31 View Post
A friend of mine asked me this question in the class and I could not answer it. He asked:

Since we know kernel controls the physical hardware via device drivers. What if all this functionality is kept inside the device controller itself rather than kernel managing them. What would be the consequences of such scenario? Good or Bad?
They may be called device drivers but for many devices they should be called controller drivers. For example, take the SATA/AHCI controller. There are no kernel drivers for HDDs or SSDs or DVD+-RW drives, there are only drivers for sata_brand and ahci. So, this is the way it actually works, the drivers are for controllers, like the SATA/AHCI controller, USB controller UHCI/EHCI/xHCI, etc.

As said above, controllers are used to offload the CPU from work that can be done by specialized controllers.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] With new kernel the device names are changed and lilo still looks for old device timetraveler Slackware 10 04-30-2010 03:15 PM
Keeping a pointer out of intput/mice and node in place for unplugged usb device AlexiaDeath Linux - Hardware 5 01-13-2006 06:16 AM
SCSI controller as a device? tbcpp Linux - Hardware 0 08-29-2005 02:09 PM
HP PSC1610 not reconized in hplip device manager, reduced functionality carlotegano Linux - Hardware 2 08-21-2005 03:22 AM
KDEinit (3.3) keeping my USB device busy. ValidiusMaximus Linux - Software 2 02-03-2005 06:36 AM


All times are GMT -5. The time now is 11:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration