Wednesday, August 30, 2006

Understanding HAL, D-BUS and udev

Definitions

"A hardware abstraction layer (HAL) is an abstraction layer, implemented in software, between the physical hardware of a computer and the software that runs on that computer. Its function is to hide differences in hardware from most of the operating system kernel, so that most of the kernel-mode code does not need to be changed to run on systems with different hardware. A HAL allows instructions from higher level computer languages to communicate with lower level components, such as directly with hardware." -- [1]

"D-Bus is a system for interprocess communication (IPC)." -- [2]

"D-Bus allows other programs to register on it for offering services to others. It also offers client programs the possibility to look up which services are available. Programs can also register as waiting for events of the kernel like hot swapping hardware." -- [3]


HAL

First of all i'll introduce the idea of a device object. By definition it is the smallest addressable unit of a hardware. To put it in a simple form, HAL can create device objets to each function of a single hardware, like one for a webcam microphone and another to the embbeded camera constituing the webcam.

The linux HAL implementation represents each device as a device object and provides an API through D-BUS allowing asynchronous notifications about hardwares modifications, making system much more compatible to plug-and-lay devices. Specific applications (callouts) are invoked by the HAL daemon to ensure the right system policy over each device and then applications are ready to get the "address" of a device through HAL and then access it through kernel. Program can locate and issue generic devices operations also by using D-BUS to communication with the abstraction layer daemon.

Intended to only provide generic operations that apply to all devices, HAL is designed to integrate with libraries supporting specific devices operations. This way hardware manufacturers can develop their own hardware support (we now that is not a common fact in linux world).


D-BUS

The bus daemon tipically has multiple instances. One of them, called system channel, is high-privileged and responsible to deliver signals from HAL daemon to any process interested in them. The others are user instances intended to provide communication between applications in the user session and they are created one per user login session.
Designed to provide communication between desktop applications and between the desktop session and the operating system as shown above, D-Bus works by sending messages.
I'm not goin to cover this topic deeply as it would become technical and out of context. More information can be found at [2] and [3].


udev

Basically udev is a userspace implementation of devfs. The /dev directory is huge and not all device files there match up to a physical device. It is also hard to keep the same device mapped to the same file like the usb problem: change usb interface for two usb printers and their corresponding /dev file will be changed, making it hard to always use the wanted hardware. This has changed with sysfs disposing device information under the /sys directory, but not solving the problem.
As a solution to the number of files listed in /dev was adopted the devfs. The concept is based on the fact kernel always knows what devices are present. This way, a ram based filesystem managed by the operating system heart is created and it shows only plugged devices.
Another problem is devfs forces device names and naming database into kernel memory and since it is not swapped out this causes an overhead when large amounts of devices are being used.
Looking for a solution for that problems, udev was intended to follow this standard:

1. Run in userspace
2. Create a dynamic /dev
3. Provice a consistent device naming
4. Provide a userspace API to access information about current system devices

The first item was achieved with /sbin/hotplug and sysfs and the other goals splitted udev in three subsystems:

1. namedev - handles all device naming
2. libsysfs - a standard libary for accessing device information on the system
3. udev - dynamic replacement for /dev

More information at [4] and [5].


That's it...
Sorry about mispellings, i posted without a revision =P
Feel free to comment and give me suggestions.

References:

[1] http://en.wikipedia.org/wiki/Hardware_Abstraction_Layer

[2] http://dbus.freedesktop.org/doc/dbus-tutorial.html

[3] http://en.wikipedia.org/wiki/D-BUS

[4] http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ

[5] http://en.wikipedia.org/wiki/Udev

[6] http://www.kroah.com/linux/talks/ols_2003_udev_paper/Reprint-Kroah-Hartman-OLS2003.pdf

37 comments:

Anonymous said...

Ich kann empfehlen. viagra ohne rezept viagra online [url=http//t7-isis.org]viagra ohne rezept[/url]

angel03 said...

thanks, this is very useful :) great share!

James Madison said...

Well, all your computer topics are really outstanding and good to read it.

Anonymous said...

[url=http://www.ile-maurice.com/forum/members/wetter-vorhersage.html][b]nzz wetter[/b][/url]

[url=http://www.ile-maurice.com/forum/members/wetter-vorhersage.html][b]schlechtes wetter strauss[b][/url]

Anonymous said...

Hello.

A banks is a financial institution that accepts deposits and channels those deposits into lending activities. Bank primarily provide financial services to customers while enriching investors. Government restrictions on financial activities by bank vary over time and location. Bank are important players in financial markets and offer services such as investment funds and loans. In some countries such as Germany, bank have historically owned major stakes in industrial corporations while in other countries such as the United States bank are prohibited from owning non-financial companies. In Japan, banks are usually the nexus of a cross-share holding entity known as the keiretsu. In France, bancassurance is prevalent, as most banks offer insurance services (and now real estate services) to their clients.

The level of government regulation of the banking industry varies widely, with countries such as Iceland, having relatively light regulation of the banking sector, and countries such as China having a wide variety of regulations but no systematic process that can be followed typical of a communist system.[url=http://projectcontrol.v3host.nl]CLICK HERE[/url]

Anonymous said...

Hello
Companies House Webcheck
Webcheck Companies House
Company House Webcheck
Companies House Webcheck Service

[url=http://perosnalbinking.v3host.be/companies-house-webcheck.html]companies house webcheck[/url]

Anonymous said...

[url=http://www.facebook.com/pages/weathercom/298713874092l]www.weather.com[/url]

Anonymous said...

dating services [url=http://loveepicentre.com/]championsleague personals[/url] atlanta singles travel http://loveepicentre.com/ philly young professionals dating

Anonymous said...

social anxiety cure [url=http://usadrugstoretoday.com/products/prazosin.htm]prazosin[/url] blood bowl pc game cyanide http://usadrugstoretoday.com/products/himcolin.htm global medical management davie florida http://usadrugstoretoday.com/products/female-viagra.htm
antibiotics term resistent [url=http://usadrugstoretoday.com/products/celexa.htm]celexa[/url] gum tree london [url=http://usadrugstoretoday.com/categories/anti-pilz.htm]horse trailer accessories breast bar pad[/url]

Anonymous said...

http://alwayshealth.in/potency/herbs-to-help-male-potency
[url=http://alwayshealth.in/stress-types/meridian-stress-assessment-system]being drug free[/url] actress levitra [url=http://alwayshealth.in/medical-diet/bayview-medical-center-baltimore]bayview medical center baltimore[/url]
levitra info levitra http://alwayshealth.in/smoking/facts-about-tobacco-to-make-a-person-to-stop-smoking
[url=http://alwayshealth.in/quit-smoking/smoking-policy]united supermarket pharmacy[/url] listabused prescription drugs [url=http://alwayshealth.in/pills/free-caffeine-free-weight-loss-pills]free caffeine free weight loss pills[/url]
cialis versus regalis http://alwayshealth.in/omnicef/omnicef-side-effects
[url=http://alwayshealth.in/general-medical/medical-case-history-examples]john mayer use drugs[/url] tx state board of pharmacy [url=http://alwayshealth.in/muscle/muscle-cramp-leg]muscle cramp leg[/url] canadian association of pharmacy consultants [url=http://alwayshealth.in/medical-dictionary/medical-terminalogy]medical terminalogy[/url]

Anonymous said...

free download volkswagen beetle 1975 manual http://automoblog.in/plymouth/new-plymouth-school-district-website-idaho idscount auto parts
[url=http://automoblog.in/volvo/problem-with-1993-volvo-850-glt-transmission]automobile license fee texas[/url] nj automobile sales tax [url=http://automoblog.in/spyker/spyker-broadcast-spreaders-dealers]spyker broadcast spreaders dealers[/url]
pursuing a claim against a private automobile seller http://automoblog.in/motor-com/painting-a-boat-motor-hood
[url=http://automoblog.in/scooters/scooters-mopeds]auto recycling boulder colorado[/url] automobile driver seating posture [url=http://automoblog.in/saab/saab-maintenance-schedule]saab maintenance schedule[/url]
grand theft auto san andreas xbox xheats http://automoblog.in/rover
[url=http://automoblog.in/nissan/nissan-240sx-peformance]buy automobile engines online[/url] are us auto manufacturers buying toyota parts [url=http://automoblog.in/motor/ls2-chevy-motor]ls2 chevy motor[/url]

Anonymous said...

mercedes cdi 220 http://autoexpress.in/saleen/saleen/s/7 hot rad racing series nh
[url=http://autoexpress.in/racing/duncan/racing/exhaust]volkswagen executive van[/url] volvo auto parts for sale [url=http://autoexpress.in/saab/fuel/chip/to/saab/9000/1989]fuel chip to saab 9000 1989[/url]
our lady of mercedes http://autoexpress.in/bugatti/bugatti/ristorante
[url=http://autoexpress.in/cadillac/cadillac/owner/drops/vehicle/by/crane/at/gm]mercedes c300 4matic 2008[/url] e500 mercedes benz 2003used repair manual [url=http://autoexpress.in/saleen/saleen/s281]saleen s281[/url]
lexis auto in http://autoexpress.in/porsche/porsche/road/range
[url=http://autoexpress.in/rally/yaris/rally]alain french racing driver[/url] automobile corp in iran [url=http://autoexpress.in/plymouth/fittness/together/plymouth/mi]fittness together plymouth mi[/url]

Anonymous said...

auto price guides http://autoexpress.in/seat/ferris/is3000/seat/cushion eastern auto antigonish
[url=http://autoexpress.in/oldsmobile/oldsmobile/rocket/diesel]high line racing tank[/url] v6 dodge dakota pulling a fifth wheel trailer [url=http://autoexpress.in/romeo/alfa/romeo/specialists/oxfordshire]alfa romeo specialists oxfordshire[/url]
spyder auto headlights http://autoexpress.in/plymouth/pediatric/neurologists/in/boston/plymouth/area
[url=http://autoexpress.in/mercedes/mercedes/benz/2004]mercedes sl repair manual haynes[/url] all electric automobile [url=http://autoexpress.in/buell/buell/charging/system/failure]buell charging system failure[/url]
salvage for vw auto parts http://autoexpress.in/bugatti/bugatti/veyron/mph
[url=http://autoexpress.in/seat/mckinney/tx/county/seat]primary prevention automobile crash sleep[/url] new s class mercedes benz [url=http://autoexpress.in/buick/robert/buick]robert buick[/url]

Anonymous said...

dodge ram srt10 4x4 http://carautonews.in/auto-com/bmw-used-auto-parts texas auto gear
[url=http://carautonews.in/bentley/pamela-bentley]automobile accident california release from liability[/url] lubing an automobile [url=http://carautonews.in/chrysler/chrysler-multi-node-different-data]chrysler multi node different data[/url]
mercedes 300te http://carautonews.in/auto-and/cheapest-auto-timing-light
[url=http://carautonews.in]mohawk auto lift[/url] yipes auto accessories [url=http://carautonews.in/fiat/fiat-500-pdf-free-download]fiat 500 pdf free download[/url]
axel straps for auto towing http://carautonews.in/ferrari/ferrari-500-exoto
[url=http://carautonews.in/acura/used-acura-rsx]auto stereo verkauf[/url] dodge dacota diff [url=http://carautonews.in/acura/acura-integra-cooling-fa-module]acura integra cooling fa module[/url]

Anonymous said...

first time male female anal sex http://pornrapidshare.in/teen-city/teen-celebs-nude
[url=http://pornrapidshare.in/teens-top/sweet-innocent-teens-giving-blowjobs]crissy free rare sexy clips[/url] careers in virgin trains [url=http://pornrapidshare.in/teens/a-website-for-teens-and-kids]a website for teens and kids[/url]
free gaging porn vids http://pornrapidshare.in/uniform/total-vs-uniform-labeling
[url=http://pornrapidshare.in/teen-love]girls that think red heads are sexy[/url] jenna virgin naked [url=http://pornrapidshare.in/teen-city/dirty-teen-sluts-fingering]dirty teen sluts fingering[/url]
make own personal lubricant http://pornrapidshare.in/vagina/used-for-a-penis-flesh-mouth-or-regular-vagina
[url=http://pornrapidshare.in/small-tits/gigantic-tits-free]sunset adult cinema[/url] amateur allure handjobs [url=http://pornrapidshare.in/tits-free/mature-bi-tits-sex-pictures]mature bi tits sex pictures[/url]
hentai sex videos online http://pornrapidshare.in/teen-chat/teen-mobile-games
[url=http://pornrapidshare.in/pissing/ladies-pissing]adult forced fantasy video[/url] can a guy tell if you are a virgin [url=http://pornrapidshare.in/xxx-girls/xxx-lap-dance-video]xxx lap dance video[/url]

Anonymous said...

adult circumcision images http://theporncollection.in/porn-galleries/hardcore-porn-and-movie-trailers
[url=http://theporncollection.in/lesbian-sex/lesbian-dating]hentai pslm[/url] adult education in hastings mi [url=http://theporncollection.in/gay-xxx/free-young-gay-galleries]free young gay galleries[/url]
hidden hentai http://theporncollection.in/porn-galleries/chubby-girls-porn
[url=http://theporncollection.in/mature-xxx/mature-cum]cartoon animated adult[/url] dildo sydney [url=http://theporncollection.in/orgy/girl-orgy-photos]girl orgy photos[/url]
adult shops queensland http://theporncollection.in/mature-woman
[url=http://theporncollection.in/porn-galleries/hilton-porn-spoof]long legs amateur couple homemade[/url] adult content messageboards [url=http://theporncollection.in/lesbian-sex/lesbian-wrestling-game]lesbian wrestling game[/url]
psp hentai download http://theporncollection.in/masturbating/oriental-shemales-masturbating
[url=http://theporncollection.in/gay-movie/gay-swimming-beach]scout gelled penetrating lubricant[/url] dirty anal porn [url=http://theporncollection.in/orgasm/amateur-watch-me-orgasm]amateur watch me orgasm[/url]

Anonymous said...

ztef156 next g mobile http://www.orderphonetoday.com/m6-quad-band-dual-card-with-bluetooth-unlocked--item61.html mobile home dealerships in michigan [url=http://www.orderphonetoday.com/i9-v3-quad-band-dual-card-with-java-bluetooth--item58.html]mobile offices[/url] blocked mobile software

Anonymous said...

dickgirl hentai video http://xwe.in/orgy/interracial-porn-orgy
[url=http://xwe.in/bondage/video-bondage-sex]free gay adult porn movies[/url] mihd adult video [url=http://xwe.in/bondage/free-bondage-and-hard-core]free bondage and hard core[/url]
lionking hentai http://xwe.in/thong/sclub-junior-thong
[url=http://xwe.in/adult-video/adult-education-classes-online]virgin fuck in pussy hymen[/url] adult add coaching in kansas [url=http://xwe.in/condom/elmo-condoms]elmo condoms[/url]
anal pink sock video http://xwe.in/adult-xxx/adult-inflatable-swimming-pools
[url=http://xwe.in/condom/success-rate-of-condoms]porn omic[/url] porn film of paris hilton [url=http://xwe.in/shemales/latina-shemales-ass]latina shemales ass[/url]
problems facing adult learners http://xwe.in/adult-video/adult-3d-cartoon
[url=http://xwe.in/ass-sex/free-ass-tpg]adult penis circumcised preference[/url] terababes porn stars [url=http://xwe.in/bondage/bondage-fellatio]bondage fellatio[/url]

Anonymous said...

for majong

http://majong.socialgo.com

Anonymous said...

documents required to travel to qatar http://xwa.in/motel/hotel-motel-in-vermont travel family vacation
[url=http://xwa.in/tourism]travel directins[/url] web site for travel trade [url=http://xwa.in/map]map[/url]
hawai travel http://xwa.in/hotel/hotel-park-inn-paris-charles-de-gaulle
[url=http://xwa.in/travel/froders-travel-guide]sue smith travel[/url] lwomens travel clothes [url=http://xwa.in/airport/paris-hotels-cdg-airport]paris hotels cdg airport[/url]
marlin travel agency http://xwa.in/inn/hood-river-inn travel underwriters [url=http://xwa.in/hotel/miley-cyrus-hotel-floor-pictures]miley cyrus hotel floor pictures[/url]

Anonymous said...

mail gwinnett medical center [url=http://usadrugstoretoday.com/categories/men-s-health.htm]men s health[/url] how to get out of a depression http://usadrugstoretoday.com/categories/antivirali.htm
to your health french toast [url=http://usadrugstoretoday.com/products/stop-smoking.htm]stop smoking[/url] kidney detox [url=http://usadrugstoretoday.com/products/acomplia.htm ]cattle pharmacy australia [/url] homemade penis enlargement devices
brooks francis pain management weight smoking [url=http://usadrugstoretoday.com/categories/hypnotherapie.htm]hypnotherapie[/url] mass health law http://usadrugstoretoday.com/products/apcalis-sx.htm
bicuspid is it medical or dental [url=http://usadrugstoretoday.com/products/revia.htm]revia[/url] paramount smoke shop [url=http://usadrugstoretoday.com/products/viramune.htm ]ketoacidic diabetes mellitus [/url] uterine infections after abortion

Anonymous said...

red shoes for nancy http://www.thefashionhouse.us/black-white-tunic-color187.html wholesale fashion handbags [url=http://www.thefashionhouse.us/gucci-leggings-pants-type-brand12.html]ralph lauren bedding[/url] playboy shoes and clothing
http://www.thefashionhouse.us/gucci-button-coat-with-gucci-logo-belt-for--item2078.html lauren deep pocket sheets [url=http://www.thefashionhouse.us/grey-pullover-color1.html]womens designer dress shops mediterreneo shopping centre almeria[/url]

Anonymous said...

up to date medical articles from the newspaper [url=http://usadrugstoretoday.com/products/sinemet.htm]sinemet[/url] ireland health and safety authority http://usadrugstoretoday.com/products/lopressor.htm
flax oil pills [url=http://usadrugstoretoday.com/products/kamasutra-ribbed-condoms.htm]kamasutra ribbed condoms[/url] westerchester medical center [url=http://usadrugstoretoday.com/products/acai.htm ]foods endorsed by kidney association [/url] how to use birth control pills for abortion
georgia healthy weight loss [url=http://usadrugstoretoday.com/products/vantin.htm]vantin[/url] medical report http://usadrugstoretoday.com/products/mentax.htm
what is a economic depression [url=http://usadrugstoretoday.com/products/cystone.htm]cystone[/url] penis tatoo [url=http://usadrugstoretoday.com/products/pulmicort.htm ]anxiety disorder drug social [/url] pudlak syndrome

Anonymous said...

creation ceramic dental [url=http://usadrugstoretoday.com/products/generic-imitrex.htm]generic imitrex[/url] camels diet http://usadrugstoretoday.com/categories/mujeres-mejoramiento.htm
easton zoom teeth whitening [url=http://usadrugstoretoday.com/products/tricor.htm]tricor[/url] generic boniva [url=http://usadrugstoretoday.com/products/terramycin.htm ]heart vessels ara [/url] approach anxiety history sources
life blood still in it [url=http://usadrugstoretoday.com/products/brahmi.htm]brahmi[/url] chili on the penis http://usadrugstoretoday.com/products/brahmi.htm
drugs causing gynecomastia [url=http://usadrugstoretoday.com/products/lamictal.htm]lamictal[/url] drug possession [url=http://usadrugstoretoday.com/products/decadron.htm ]how do you get the calcium you need in a day [/url] herbal medicine in modern times

Anonymous said...

ladys shoes http://www.thefashionhouse.us/ed-hardy-brand39.html designer vaginoplasty [url=http://www.thefashionhouse.us/north-sails-men-brand58.html]reebok pump basketball shoes[/url] snug dance shoes
http://www.thefashionhouse.us/club-wear-page2.html sell com classifieds search gucci bag [url=http://www.thefashionhouse.us/-classic-dolce-amp-gabbana-category87.html]designer exposure[/url]

Anonymous said...

christian ethics regarding gambling and casinos http://xwn.in/online-casino_diamond-palace-hotel-and-casino-san-juan-review vintage japanese gambling
[url=http://xwn.in/slot_winnig-slot-machines]lottery lawyers[/url] betting spanish league [url=http://xwn.in/lottery_mass-state-lottery-results]mass state lottery results[/url]
online game bonus poker online gambling http://xwn.in/gambling-online_texas-gambling-history
[url=http://xwn.in/slots_play-cleopatra-slots]texas star casino[/url] buy lottery number chooser [url=http://xwn.in/roulette_show-me-a-roulette-wheel-diagram]show me a roulette wheel diagram[/url]
casino roulette gambling best internet casinos http://xwn.in/roulette_online-roulette-internet santa bingo cards [url=http://xwn.in/betting_british-open-golf-betting]british open golf betting[/url]

Anonymous said...

caritas hospitals foundation lottery http://lwv.in/blackjack/blackjack-wm6-upgrade bizzarre betting
[url=http://lwv.in/blackjack/best-online-casinos-blackjack-game]game bonuses blackjack learn play[/url] monday lottery [url=http://lwv.in/lottery/winning-numbers-for-mega-millions-lottery]winning numbers for mega millions lottery[/url]
counting blackjack card tutor applet hands java http://lwv.in/baccarat/baccarat-crystal-pendant
[url=http://lwv.in/online-casinos/louisiana-state-map-of-casinos]lottery firm news[/url] samsung blackjack smartphone software [url=http://lwv.in/casino-playing-cards/altered-playing-cards]altered playing cards[/url]
tips to winning at bonus video slots in the casino http://lwv.in/online-casino/free-casino-gaming does texas have legal gambling [url=http://lwv.in/betting/sports-betting-line-odds]sports betting line odds[/url]

Anonymous said...

Hmm it appears like your blog ate my first comment (it was
super long) so I guess I'll just sum it up what I submitted and say, I'm thoroughly
enjoying your blog. I as well am an aspiring blog blogger but
I'm still new to everything. Do you have any helpful hints for rookie blog writers? I'd really appreciate it.
Also see my web site: golden virginia

Anonymous said...

What a data of un-ambiguity and preserveness of precious familiarity
regarding unpredicted feelings.
Feel free to visit my webpage old holborn

Anonymous said...

Thank you for some other magnificent post. The place else may anybody get that kind of info in such
an ideal method of writing? I've a presentation subsequent week, and I'm on
the look for such info.
My weblog : captain black

Anonymous said...

Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet
my newest twitter updates. I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.
Also see my web site :: van nelle

Anonymous said...

Hello to every , as I am in fact eager of reading this webpage's post to be updated on a regular basis. It carries nice information.
My webpage :: mac baren

Anonymous said...

Thanks for ones marvelous posting! I truly enjoyed reading it, you may be a great author.
I will be sure to bookmark your blog and will often come back later on.
I want to encourage you to ultimately continue your great job, have a nice day!
Also visit my site ... www.yourtobaccosstore.com

Anonymous said...

Hello there! I could have sworn I've visited this blog before but after browsing through many of the articles I realized it's new to me.
Anyways, I'm certainly happy I found it and I'll be book-marking it and checking back frequently!
Look into my blog ... skin bleaching

Anonymous said...

What's up, this weekend is fastidious for me, because this point in time i am reading this fantastic educational post here at my home.
My homepage Laser Tattoo Removal

Anonymous said...

Magnificent beat ! I would like to apprentice
at the same time as you amend your web site, how can i subscribe for a
blog site? The account aided me a acceptable deal.
I have been a little bit familiar of this your broadcast provided shiny transparent concept
Feel free to visit my web site : diablo 3 gold farming

Anonymous said...

Hey just wanted to give you a quick heads up and let you know a few of the pictures aren't loading correctly. I'm
not sure why but I think its a linking issue.
I've tried it in two different web browsers and both show the same outcome.
Feel free to surf my homepage boligityrkia.net