Monday, November 18, 2013

Student Assignment - 1 Learn Unix Prog / internals without tears!


Dear Students of Engineering /
 computer science



Free down load from :

https://www.free-ebooks.net/search/natarajan


English Version would follow soon.



முன்னுறை 

யுனிக்ஸ் புரோகிராமிங் அல்லது யுனிக்ஸ் இண்டர்னல்ஸ் என்று தவறாக அழைக்கப்படும் ஒரு அறி வியல்  சாதனை  ஒன்றை  அல்லது  மென்  பொருளை ( அதற்கான  கல்வியை)  அறிய முயற்சி  செய்யும்  மாணவரோ  மற்ற எவருமோ  கண்ணீர் விடாமல் கற்க முடியாது என்பது ஒரு பேருண்மை ,

அந்த வகை மாணவரில் நானும் ஒருவன்தான்

அதன் விளைவுதான் சில மாதங்கள் பல புத்தகங்களுடன் போராடி, அதில் அதில் கிடைத்த அறிவில் சில வல்லுனர்களின்  சித்தங்களை கலங்கவைத்து
யுனிக்ஸ் புரோகிராமிங் என்றும் யுனிக்ஸ் சிஸ்டம் டிசைன் என்பதை எளிதாக கற்கும் முறையினைக் கண்டுபிடித்தேன்

 பின்னர் என் மாணவர்களை கண்ணீரில் கரையாதவாறு காப்பாற்றி, பல நூறு மாணவர்களைக் யுனிக்ஸ் கற்கவைத்த  அனுபவம்  இந்த புத்தகத்தின்  அடித்தளம்.

இந்தப் புத்தகத்தில் கண்டவாறு அளிக்கும் முயற்சி ந்ன்றாகப் பரிசோதிக்கப்பட்டது.

இந்த வகையில் புத்தங்கள் எழுதப்பட்டு, பாடங்கள்  ந்டத்தப்பட்டால், மாணவர்கள் என்றுமே கண்ணீர் விட மாட்டார்கள்.

இதற்கு இரண்டு பாகங்கள் உண்டு.


1.  கதைகளின்  அடிப்படையில் கொடுக்கப்பட்ட  விளக்கம்   


2.  இதைப் பயனுள்ளதாக மாற்ற சி புரோகிராம்கள் தேவைப்படும்
.


இந்தப்   புத்தகத்தின் இறுதியில் சில புத்தகப்  பட்டியலும்  இணைய தள விவரங்கள் தரப்பட்டுள்ளன . இதை சரியாக பயன்படுத்தினால்    இரண்டாம் பாகத்திற்கு  தனியான சில புத்தகங்கம் அவசியப்படாது 

தேவைப்படுமானால் பின்னாளில்  அதையும் எழுதிடுவோம் 


அறிவியலுக்குக்  கற்பனைக்  கதைகள், மற்றும்  இயற்கை நிகழ்வுகள்  மற்றும் அன்றாட நிகழ்வுகள் எப்படிப்  பயனாகும் ?

இயற்கையிலிருந்து பெற்ற அறிவின் அடிப்படையிலேதான் எண்ணற்ற 

அறிவியல் கண்டுபிடிப்புகள்  தோன்றியிருக்கின்றன.

அறிவியலில் 
சூழ்நிலையின் சாயல்கள் அல்லது தாக்கம் 

பறவையைக்  கண்டான்  விமானம் படைத்தான் 
பாயும்  மீனில் படகினைக் கண்டான்  .....

 என்று கவிஞ்ர் கண்ணதாசன்  எழுதியது  தொழில் மற்றும் அறிவியலுக்கு மிகவும் பொருந்தும்.


மாணவர்களில் பெரும்பாலானவர்கள் ஒரு கட்டத்தில் தீவிர சினிமா ரசிகர்களாக இருப்பார்கள். அதிலிருந்தும் அதிலிருந்து  ஆனந்தம் மட்டுமில்லை   அறிவையும்  அடையலாம்.

கடந்தகால திரைப்படப் பாடலில் வரும் ஒரு பாட்டில் விஞ்ஞானம் மற்றும் புதிய கண்டுபிடிப்புகளைப் பற்றிய ஒரு அருமையான செய்தி.: 

 பறவையைக் கண்டான், விமானம் படைத்தான், பாயும் மீனில்   படகினைக்  கண்டான் எல்லா கண்டுபிடிப்புகள் இயற்க்கையில் அல்லது நம்மைச் சுற்றியுள்ளா பல நிகழ்வுகளின் சாயல்கள் காணப்படும். யுனிக்ஸ் வடிவமைப்பை  நாம் முழுவதாக அறிவும்போது, தினசரி வாழ்வில் காணப்படும் ந்கழ்விலிருந்து நிர்மானித்தார்கள் என்பது தீர்மானமாகும்.
இவற்றில் சொல்லப்பட்ட கதைகள் முற்றும் கற்பனையே. கதையை அவ்வப்போது கழட்டிவிட்டு கருத்தை மாத்திரம் கெட்டியாகப்    பிடித்துக் கொள்ளுங்கள். 
பல மாணவர்களை, லைனக்ஸ் ஆப்பரேடிங் சிஸ்டத்தின் சிறப்பு அம்சங்கள் என்னவென்று கேட்கும் பொழுது, நமக்குக் தீர்மானமானக் கிடைக்கும் ஒரே பதில் ’  இது இலவசம்...
 இந்த அளவு அறிவு போதாது. முக்கியமாக லைலக்ஸிலே  இதைவிட சிறப்பான பல, முக்கியமான அம்சங்கள் உண்டு அவற்றை  ந்ன்றாகத் தெரிந்து, பயன்படுத்த்த் தெரியாமல் ஒரு ந்ல்ல கம்ப்யூட்டர் எஞ்சினியராக உருவாக முடியாது. 
யுனிக்ஸ் பயிற்சி 

யுனிக்ஸ் இண்டர்னல்ஸ் என்ற பயற்சியை பிரபல பயிற்சி நிரூவனங்கள் ஒரு பெரிய கட்டணம் ஒன்றை வசூலித்து, ஐந்து நாள் பாடமாகச் சொல்லிக் கொடுப்பார்கள். இந்தப் பயிற்ச்சியை,  நான், ஓரு முறை போதாதென்று இரண்டு முறை  மேற்கொண்டு,  இந்தப் பிறவிலே யுனிக்ஸ் கற்றுக்கொள்ள வேண்ணாம் சாமி, என்ற  முடிவிற்கு வந்த நினைவு இன்றும் பசுமையாக உள்ளது.

நான் யுனிக்ஸைக் கைவிட்டாலும் யுனிக்ஸ் என்னை விடுவதாயில்லை. நானே, யுனிக்ஸ் பயிற்சியை பல இளம் எஞ்சினிரிங் பட்டதாரிகளுக்கு அளிக்கும் சூழ்னிலை உருவாகியது.Êசில மாதங்கள் ஒரு பிரபல புத்தக் கடையிலிருந்த எல்லா யுனிக்ஸ் புத்தகங்களையும் தருவித்தேன். அவைகளுடன் மன்றாடி, உடன் பணிபுரிந்த பல நிபுணர்களைக் குழப்பி, நானும் குழம்பினேன். 

அதன் விளைவாக கண்ணீர் வராமல், எளிமையாக மாணவர்கள் யுனிக்ஸ் எவ்வாறு இள்ங்குகிறது என்னும் விளக்கத்தை,  நமது தினசரி வாழ்கையிலிருன்து பல உதாரணங்களையும் மற்றும் கதைகள் மூலமாகவும் சொல்லி வந்தேன்.  இந்த வகையான பயிற்சி (கல்வி அளிக்கும்) முறை மாணவர்களிடையே நல்ல வரவேற்ப்பைப் பெற்றது. 
இன்றும் என்றும் யுனிக்ஸ் புரோகிராமிங் என்ற துறை மிக உயர்ந்ததாகவும்  கடினமானதாகவும் கருதப்பபௌகிறது. அதன் காரணம்,  தவறான பயிற்சி முறை. யுனிக்ஸ்  பயிற்சி அளிக்கும் அனைவரும், யுனிக்ஸ் பிறந்த காலம் முதல் இந்த நாள் வரை ஒரே ஒரு விதமான பயிற்சி முறையைக் கடைபிடித்து வருகிறார்கள்.
அந்தப் பயிற்சி பெற்றவர்கள் ஒரு குத்து மதிப்பாக கொடுத்த வேலையச் செய்து வந்தாலும் நாம் என்ன செய்கிறோம். இதனால் என்ன விளைகிறது என்று முழுமையாக உணர்வதில்லை. எனவே இதை மிக சிக்கலான, அயீக அறிவு தேவைப்படும் ஒரு தேவ ரகசியமாக இன்றுவரை கருதப்படுகிறது, 
அந்த முறையில் கற்றவரும், கற்பிப்பவரும்,  யுனிக்ஸ் செயல்பாட்டில் என்றுமே ஆழ்ந்த அடிப்படை அறிவை அடையாததே முக்கிய காரணம் என்று, இந்த புத்தகத்தைப் படித்து முடித்தபின்  அறியலாம்.  

மிகச் சிக்கலான ஒரு மென் பொருளாக யுனிக்ஸ் அமைந்திருந்தாலும்,  மிக மிக எளிதான முறையில், அனைவரும்  கற்றுப் பயனடைவது சாத்தியமே என்று என் சோதனைகள் நிரூபித்தன. 

தினம் சுமார் மூன்று மணி நேரம் அளவில்  நான்கு நாள் பாடமாக மூன்று  வருடங்கள் நடத்தி வந்த அனுபவம் இந்த புத்தகம் வெளிவர முக்கிய காரணம்.  சமீப காலத்தில், கணியம் என்னும் தமிழ் லைனக்ஸ்  மின்பத்திரிக்கையில் இதையே தொடராக எழுதி வரும்போது,  ஒரு புத்தகமாக தயாரிக்கும் என் பல நாள் கனவு நினைவாகிறது. 

இந்தப் புத்தகத்தை படித்து, மாணவர்களும், மற்றவர்களும்  மிகுந்த பயனடைவார்கள் என்று  நம்பிக்கை எனக்கு உண்டு.

நடராஜன் நாகரெத்தினம்
பங்களூரு


அத்தியாயம் 01
பாரம்பரிய  யுனிக்ஸ் பயிற்சி முறை 

யுனிக்ஸில் மேதாவிகள் என்று ஒரு கூட்டம், கம்ப்யூட்டர் நிருவங்களில் உள்ள சேர்ந்த புது முகங்களுக்கும் (அதனுடன். வளர முயற்சி செய்துவரும் பழைய முகங்களுக்கும்) பயிற்சி அளிப்பது வழக்கம். அவர்கல் கீழே கண்டவாறு வரிசையாகச் சொல்வார்கள்:
1. யுனிக்ஸ் ஒரு சிஸ்டம் சாப்ட்வேர். அதன் உள்ளே ஐந்து மாட்யூல்கள் உள்ளன. இவைகள் என்ன என்ன என்று வெள்ளைப் பலகையில் எழுதப்படும். அவைகள் :
(1) பைல் சிஸ்டம்  திவீறீமீ sஹ்stமீனீ (2) பிராசஸ் மானேஜர், றிக்ஷீஷீநீமீss விணீஸீணீரீமீக்ஷீ (3) மெமொரி மானேஜர்  விமீனீஷீக்ஷீஹ் விணீஸீணீரீமீக்ஷீ, (4) ஐ ஓ மானேஜர், மி ளி விணீஸீணீரீமீக்ஷீ (5) நெட் வொர்க்கிங் மாட்யூல். ழிமீtஷ்ஷீக்ஷீளீவீஸீரீ விஷீபீuறீமீ
2. முதலில் பைல் சிஸ்டத்திற்கு வருவோம் என்பார்கள்.   
பெரும்பாலும் பைல் சிஸ்டத்தை ஹார்ட் டிஸ்குலேதான். (பிணீக்ஷீபீ ஞிவீsளீ)   இன்ஸ்டால் (மிஸீstணீறீறீ) செய்வோம் ஒரே டிஸ்குலே ஒன்று அல்லது அதற்கு மேலும் பல பைல் சிஸ்டங்களைப் போட்டுக்கலாம். (ஏன் ?  எப்படி ? பைல், பைல் சிஸ்டம் என்றால் என்ன? அதில் எத்தனை வகை உண்டு? என்ற எல்லா விளக்கங்களும் பயிற்சி பெறும் நமக்குத் தெரிந்திருக்க வேண்டும். தெரியவில்லையானால், அடுத்த சில நிவீடங்களில் உறக்கம் ந்ம்மைத் தேடிவரும்).   
.ஆனா இதிலே பல பைல் சிஸ்டத்தைப் போட்டாலும், ஒண்ணே ஒண்ணுலே மாத்திரம் தான் ஆப்பரேடிங் சிஸ்டத்தை வச்சிருக்கும்., (அவ்படியா? சரி.)
பைல் சிஸ்டட்துலே ஆப்பரேடிங் சிஸ்டம் வச்சிர இடத்துக்குப் பேரு.  பூட் பிளால். (அவ்படியா?)
பைல் சிஸ்டத்தைப் பற்றிய மற்ற விளக்கங்கள், கீழே கண்டவாறு தொடரும்..
பைல் சிஸ்டம் நான்கு பகுதிகளாக பிரிக்கப்பட்டிருக்கும். என்றும் சொல்வார்கள். அவை பூட் பிலாக் (ஙிஷீஷீt தீறீஷீநீளீ). ஐநோடு பிளாக், (மிஸீஷீபீமீ தீறீஷீநீளீ), டேட்டா பிளாக், (ஞிணீtணீ ஙிறீஷீநீளீ) சூவ்பர் பிளாக் (ஷிuஜீமீக்ஷீ தீறீஷீநீளீ).
 அடுத்தார்ப் போல  தொடருவது:.   ஐனோடு டேபிள்  (மிஸீஷீபீமீ tணீதீறீமீ)  என்பார்கள்.  அதில் 13 (மீஸீtக்ஷீவீமீs) வரிகள் உண்டு. . இவற்றில் 10  நேரரை  வரிகளும் மிகுந்த மூன்று மறைமுக வைரிகளாக இருக்கும் .
(ஐநோடுன்னா என்ன? நேரடி, மறைமுக வரிகள் எதற்காக? சொல்லப்படுவதில்லை). இந்த கட்டத்திலே பலரை தூக்கம் ஆட்கொள்ளும்.
உறக்கம் கலைந்து, என்ன  நடக்கிறது என்று பககத்துப் பையனைக் கேட்டால், ஏதேதோ சொன்னாங்க ஒண்ணும் புரியல்லே என்கிறார், பலர் உறங்குவதை உணர்ந்த பயிற்சியாளராக வந்த பையன் டீ பிரேக் என்று அலர, அரை குறையா புரிந்து கொண்ட சிலர். கூட்டமாக பயிற்சியாளரைச் சுற்றி முற்றுகையிட்டு, கேள்விகளால் துளைக்க, மற்றவர்கள் காண்டீனை நோக்கி விரந்தார்கள்.
யுனிக்ஸ் ஒண்ணும் புரியல்லே. ஆனா, இவ்படி யுனிக்ஸ் படிச்சா , இந்த ஜென்மம் முழுக்கப் பாடுபட்டாலும் பயன் இல்லை என்று சுத்தமாகப் புரிந்தது..
பயமுறுத்தும் புதிய் சொற்கள்.

மாணவர்கள் மட்டுமில்லாமல் எல்லா வயதிரனுக்கும், எத்தனை பட்டங்கள் பெற்றிருந்தாலும், விஞ்ஞானம் மற்றும் மெய்ஞானம் தொடர்பாக புதியதாக, முதன் முதலாக கற்றுவரும்போது, தலைவலி தருவதும், தடையாக இருப்பதும்  ஜார்கான் ( jargon). ஒரே சொலின்  பொருள் இடத்திற்கு இடம் துறைக்குத் துறை மாறுபடும்.

துறை சார்ந்த புதிய மற்றும் புதிரான ஆங்கில வார்த்தைகள் ஜார்கான்  என்று அழைக்கப்படும். 

விஞ்ஞானம் மெய்ஞானம் இரண்டுமே சிண்டைப் பிய்க்கும் சிந்தனை தேவைப்படும் விஷயங்கள் இல்லை. ஆனால் அப்படிப் பட்ட ஜாகான் ஏராளம் உண்டு. ஏன்? 

ஞானிகளும், விஞ்ஞானிகளும், தாங்கள் கண்டுபிடிப்பை. மற்றவருக்கு ஆர்வத்துடன் விளக்கும் போது  தங்களின் மனதில் தோன்றிய புதுப் புது வார்தைகளையும்  விளக்கங்களையும் உபயோகிப்பதுண்டு. (புரியாததைப் பேசும்போது மக்கள் அவர்களை மேதாவிகளாக நினைக்க இடமுண்டு. அதுவும் ஜார்கான்கள் பிறப்பதற்கு ஒரு காரணமாகலாம்.

புதிய சொல்லை பிரயோகிக்கும் முன்னாள் , அதையே  சுலபமாக விளக்கும் வேறு வார்த்தைகள் ஏற்கனவே இருக்கிறதா இல்லையா என்று பலர் தேடுவதில்லை.  

அது போகட்டும். சொல்ல நினைத்ததற்கு வாழ்கையின் நிகழ்சிகளிலிருன்து சரியானதொரு மேற்கோள் காட்டி சுலபமாக புரிய வைக்கலாம்.  இதையும் பெரும்பாலோர் முயற்சி செய்வதில்லை. 

காலப் போக்கில் இப்படி உருவான ஜார்கான்கள் கண்டுபிடிப்புகளோடு  கலந்து ஒன்றாகி, மாணவர்களுக்கும், துறைக்குப் புதியவர்களுக்கும் தீராத தலைவலியை தந்து வருகிறது. உதாரணமாக: குறுன்தகடு. மடிக் கணினி.
ஜார்கான்களைத் தள்ளிவைத்து, நாம்  நன்றாக அறிந்த, புரியும்பபையான வார்த்தைகளால் விளக்கிவிட்டால், சிக்கலான விஞ்ஞானம் சுத்தமாக புரிந்து கொள்வது எளிதாகும். வரிவடிவங்கள் (Patterns) 

அறிவை அடைவதில் பல கட்டங்கள் உண்டு. (இவை அறிவாளராகவும், பேரறிவாளராகவும் மாறுவது எப்படி என்ற புத்தகத்தில் காணலாம்). இவற்றின் உச்சகட்டம், புதியதாக அறிந்துகொள்ள் முயற்சி செய்யும் நிகழ்வுகளில் மற்ற, (முன்னமே அறிந்த) பல நிகழ்வுகளின் வரிவடிவங்களை அல்லது அதன் சாயல்களைக் கண்டு உணர்வது. 

விளக்கம்: அண்டமும், அண்டத்தில் காணும் பல நிகழ்வுகளும் ஒரு குறிப்பிட்ட எண்ணிக்கையிலான வரிவடிவங்களின் சாயலாகவும் மற்றும் கலவையாகவும் இருக்கும். யுனிக்ஸைப் பொருத்தவரை, தினசரி வாழ்க்கையில் நாம் காணும் நிகழ்வுகளில் பல வரிவடிவங்களை ஒட்டி அமைந்திருப்பதைக் காணலாம்.  விஞ்ஞானக் கண்டுபிடிப்புகளும்  மெய்ஞான அறிவும், இதற்கு விதிவிலக்கல்ல.  

இதை சீரணித்து மனதில் கொள்ளத் தடையிருந்தால் அடுத்து வரும் உதாரணங்கள் அவற்றை எளிதாக்கும்.

இவ்பொழுது. உதாரணங்கள் மற்றும் உவமானங்களில் காணும் வரிவவைங்களை ஆதாரமாகக் கொண்டு,  யுனிக்ஸ் படிக்கப் போகலாம், வாங்க.


பாகம் 1
கதைகள்

யுனிக்சை புரிய வைக்க சில கதைகள் 

கதை (1)  பிள்ளையார் பிடிக்க, குரங்காக முடிந்த கதை.
கதை (2) கிராமத்தில் ஒரு உணவு விடுதி. (மணி அய்யர் ஓட்டல்.)
கதை 03  அலுவலகம் ஒன்று. ஆனால் பணியிடங்களோ இரண்டு..
கதை 04 அம்மா ஒரு மல்டி டாஸ்கிங் இயந்திரமோ?.
கதை (5) திருப்பதியில் மொட்டை !
கதை (6) பந்தியிலே சாப்பாடு: 
கதை (7) பெர்கலி யுனிவர்சிடியிலே உதவிப் பேராசிரியர் ராமசாமியோட
        தங்கச்சிக்கு, கும்மிடிப் பூண்டியிலே கல்யாணம்.
       கதை (8) பீட்டர் போனாரு பிளாக் ஸ்டாப் (Flag staff) 
       கதை (9)   இல்லத்தரசிகளுக்கு.  ஆச்சி மசாலா !
       கதை (10) புரோக்கர்கள்
கதை (11) கல்லைக் கண்டால் காணாமல் போகும் நாய்;
       . நாய்   காணப்படும்போது காணாமல் போகும் கல்.
கதை (12) மாடி வீட்டு இருமல் தாத்தா:
கதை (13) ராமசாமி வீட்டு குழந்தைகளின் பிரச்சனைகள்.
கதை (14)  பாத் ரூம் பாடகர்கள்.
கதை (15) டிராபிக் போலீசு


The design of Unix operating system   (Internals / programming  etc)was never taught in a way one enjoy understanding the same. Infact, I was one of the victims of formal Unix Internals aka. Unix Programming, training program.


When I had the necessity to train engineers in Unix I discovered that Teaching Unix with out tears in the (trainee's) eyes was easily possible.


The primary requirement for teaching a topic that would interest the learner is that one should understand the topic well. Often this is not the case. The trainer / teacher ends up ritualistic, not bothering to examine if his teaching is effective or not.


When one understand unix, it is very easy to explain others in a way they understand everything about unix and shapeup as great Unix professionals.

I am writing Unix in Tamil  with a lot of stories in it.
Hope I will come with an English version too soon,
If any one can render my Tamil version into English and other languages I would be too happy to share the Tamil version.


For feed back, contact: natarajan.naga@gmail.com

------------------------------------------------------------------------------------
சீக்கிரமா  ஒரு database அப்பிளிகேஷன் தயாராகுது,.

அதை வச்சு உங்களுக்கு என்ன தெரியும், என்ன தெரியாது அல்லது தெரிந்துகொள்ள வேண்டும் என்று அறிந்து கொள்ள ஒரு அறிய வாய்ப்பு 

உங்கள்  மனதில்  எழும்  சந்தேகங்களை எனக்கு எழுதலாமே
--------------------------------------------------------------------------- 


QUIZ – Part I

UNIX PROGRAMMING / INTERNALS

Explain

(1) How Unix / Linux is different from Typical Desktop OS?

(2) The Three operating system (Designer) goals : Batch Processing, (b) Real Time systems ©(a) ----------

(3) Explain the flow of a process from creation to killing – from the perspective of a process.

(4) Explain the flow of process from creation to Killing in the perspective of the OS.

(5) What are the unique features of Linux / Unix?

(6) What is a Shell and why is that required?

(7) What are different shell types available in Linux / Unix? Explain their differences.

(8) List some frequently used shell commands by user.

(9) What is shell scripting? Give some examples.

(10) Explain the sequence as how a Linux operating system comes-up when you power the computer.

(11) Explain the term kernel.

(12) What are different types of OS ?

(13) What is multi tasking?

(14) Explain Multi-user multi tasking.

(15) What are the five functions of Unix?

(16) What are the different processes that are associated with UNIX/ Linux (Instance of a process, Child process, parent process, related process)

(17) What is a process?

(18) What is the difference between an executable program and a process?

(19) List various process types referred in Unix and explain each.

(20) List various process states. Explain all about each state.

(21) What is a daemon process? How does it differ from other processes?

(22) How do you create a daemon process?

(23) What is a kernel data structure? (24) List various data structures used in five functional modules of unix

(25) List the various file system types, in computing?

(26) Explain kernel and user space.

(27) What purpose does APIs or System calls serve?

(28) Give examples of system calls and how it is used ? Give examples from real life

(29) What are signals? Why and how it is used? Explain with real lifeexamples.

(30) What are IPCs? List various IPCs available in LINUX.

(31) What is a file? Explain in the context of Unix.

(32) Explain Context switching


FILE SYSTEM

(33) What is a file system?

(34) What are the various file systems used in OS?

(35) What are the four blocks in any file system. Explain each.

(36) Discuss about various aspects of a File system and its restriction on the file size and the max Storage device it can candle.

(38) What is an inode. Explain all about inode.

(39) What is an incore inode?

(40) Explain Virtual Memory, Paging and swapping.

(41) Explain various device types used in Unix / Linux? How do they vary in programmer’s perspective?

(42) Explain Major and Minor numbers.

Networking basics

(43) What is a TCP/IP? Explain various layers and functions of each in simple terms.

(44) What is a networking protocol?

(45) List as many protocols as you could gather and explain in not more than 25 words to explain each one of them.


(46) Explain reliable and unreliable communication with reference to networking (LAN / WAN) .

(47) Explain the differences between Circuit switching and packet switching.

(48) What is socket programming?

(49) Give a list of network applications and its typical applications.

(50) What is a distributed computing and how networking is useful?

(51) Explain IP V 4 and IPV 6 and the differences between them.

(52) Make a brief write-up on various aspects of Networking and internet.

(53) Explain how an email sent to your from a cybercafé travel to your friend.


NEXT :

On IPC / Signals

Embedded Linux basics










QUIZ – Part II


UNIX PROGRAMMING / INTERNALS / DEVICE DRIVER



(1) The distinction between the different kernel tasks isn’t always clearly marked. Yet, the kernel’s role can be split logically, as five different logical groups. They are:

(A), (B) , (C) , (D) , (E) ;


(2) Each piece of code that can be added to the kernel at runtime is

called a ________;


(3) The Linux kernel offers support for a few different types (or

classes) of modules, including device drivers. Each module is made up of object code (not linked into a complete executable) that can be dynamically linked to the running kernel by the program and can be unlinked by the program.

(4) List three basic device driver types: _______, ______ , ______;

(5) Give examples of devices belonging to each type:

(6) _________; _________; ________ ; ________ ; ________;


_________; _________; ________ ; ________ ; ________;


(7) Say true or false:


Character devices :

(a) is one that can be accessed as a stream of bytes.(Y/N)

(b) is treated as a file (device file); (Y/N);

(c) Char devices are accessed by means of filesystem nodes (Y/N);

(d) difference between a char device and a regular file is that you

can always move back and forth in the regular file, whereas most char devices are just data channels, which you can only access sequentially (Y/N).

(e) These implement open, close, read, and write system calls.(Y/N)

block devices

(f) are accessed by filesystem nodes in the /dev

directory. (Y/N)

(g) hosts a filesystem. In most Unix systems; (Y/N)

(c) a block device can only handle I/O operations that transfer

one or more whole blocks, which are 512 bytes or multiples of that. (Y/N)

(h) Linux, allows the application to read and write a block device

like a char device—it permits the transfer of any number of bytes at a time (Y/N)

(i) block and char devices differ only in the way data is

managed internally by the kernel, and thus in the kernel/driver software interface. ` (Y/N)

(j) Block drivers have a completely different interface to the

kernel than char drivers. (Y/N)

Network interfaces

(k) Device that is able to exchange data with other hosts ; (Y/N);

(l) Typically, an interface is a hardware device; it might also be a pure software device; Example the loopback interface. (Y/N)


(m) This device type sends and receives data packets, driven by the network subsystem of the kernel, (Y/N)


(n) Many network connections (especially those using TCP) are stream-oriented, but network devices are, usually, designed around the transmission and receipt of packets. (Y/N)


(o) The Unix way to provide access to interfaces is still by

assigning a unique name to them (example: eth0), but that name doesn’t have a corresponding entry in the filesystem. (Y/N)


(p) Communication between the kernel and a network device driver is completely different from that used with char and block drivers. (Y/N)

(q) Instead of read and write, the kernel calls functions related to packet transmission. (Y/N)


(8) Traditionally, the _________ number identifies the driver associated with the device.

(9) Explain the following – every field and give comments on its contents:


crw-rw-rw- 1 root root 1, 3 Apr 11 2002 null

crw------- 1 root root 10, 1 Apr 11 2002 psaux

crw------- 1 root root 4, 1 Oct 28 03:04 tty1

crw-rw-rw- 1 root tty 4, 64 Apr 11 2002 ttys0

crw-rw---- 1 root uucp 4, 65 Apr 11 2002 ttyS1

crw--w---- 1 vcsa tty 7, 1 Apr 11 2002 vcs1

crw--w---- 1 vcsa tty 7, 129 Apr 11 2002 vcsa1

crw-rw-rw- 1 root root 1, 5 Apr 11 2002 zero

.

(10) Within the kernel, the dev_t type (defined in ) is used to hold device numbers—both the major and minor parts. As of Version 2.6.0 of the kernel, dev_t is a ____ bits quantity with _______ bits set aside for the major number and ____ bits for the minor number


One of the first things your driver will need to do when setting up a char device is to obtain one or more device numbers to work with. The necessary function for this task is register_chrdev_region, which is declared in : Y/N


(11) Static and Dynamic allocation of device numbers:


(a) Discuss the merits and demerits of both.

(b) Explain the sequence of obtaining a major and minor numbers for a driver.



(12) What does it mean for a process to “sleep”?

(13) What happens to that process that is made to sleep?.

(14) How a sleeping process can come out of that state?

(15) What can make a process to sleep?

(16) Precautions to be taken before a process is put to sleep.

(17) What is an atomic context?

(18) What is wait_event to do with the process sleep?