LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 08: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, 04:32 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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 08:15 AM.
 
Old 11-08-2012, 06:04 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
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, 06:39 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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



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 02:15 PM
Keeping a pointer out of intput/mice and node in place for unplugged usb device AlexiaDeath Linux - Hardware 5 01-13-2006 05:16 AM
SCSI controller as a device? tbcpp Linux - Hardware 0 08-29-2005 01:09 PM
HP PSC1610 not reconized in hplip device manager, reduced functionality carlotegano Linux - Hardware 2 08-21-2005 02:22 AM
KDEinit (3.3) keeping my USB device busy. ValidiusMaximus Linux - Software 2 02-03-2005 05:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:57 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
Open Source Consulting | Domain Registration