This action might not be possible to undo. Are you sure you want to continue?
#he se"ments that contain the pro"ram code and data are called te$t se"ments. #hese se"ments contain initiali!ed data. #he ob%ects in the Block Started by Symbol se"ment contain only a name and si!e b t not the &al e. Q.What is 'a"e(Stealer process? )$plain the pa"in" states *or a pa"e in memory. A.#he pa"es that are eli"ible *or s+appin" are *o nd by the 'a"e(Stealer, and places the pa"e n mbers in a list +hich contains the pa"es to be s+apped. #he pa"in" states are -. .a"in" and is not yet eli"ible *or s+appin", and /. .eli"ible *or s+appin" b t not yet eli"ible *or re assi"nment to other &irt al address space. Q.)$plain the phases o* s+appin" a pa"e *rom the memory. A.#he phases o* s+appin" a pa"e *rom the memory are0 #he eli"ibility *or s+appin" a pa"e +ill *o nd by the pa"e stealer and the pa"e n mber a&ailable in the list o* pa"es +ill be s+apped.#he pa"e is copied by the kernel to a s+ap de&ice and the &alid bit a&ailable in the pa"e table entry clearance is done. #he p*data re*erence co nt +ill be decremented and the p*data table entry is placed at the end o* the *ree list in case its re*erence co nt is 1. Q.What is 2emand 'a"in"? )$plain the conditions *or a machine to s pport 2emand 'a"in". A.#he process o* mappin" a lar"e address space into a relati&ely small amo nt o* physical memory is kno+n as demand pa"in". #he accomplishment o* demand pa"in" is done by implementin" .backin" store,. #he conditions are0 -.'a"es based memory architect re. /.3restartable, instr ctions s pport by the machine Q.2i**erence bet+een 4a lt 5andlers and the Interr pt handlers. A.4a lt handlers can sleep6 +here as interr pt handlers cannot. #he *a lt handler,s sleep sta"e occ rs by the memory *a lt +hich is in conte$t o* the process. Q.What is &alidity *a lt? In +hat +ay the &alidity *a lt handler concl des? A.7alidity *a lt is the res lt o* non settin" o* &alid bits in main memory at the time o* re*ererrin" a pa"e by a process. #his happens +hen the pa"es are a&ailable o tside the &irt al address space o* a process or the pa"es are the part o* the &irt al address space +here the physical address space is assi"ned to it.#he settin" the &alid bit o* the pa"e is the process o* handlin" &alidity *a lt by the +ay o* clearin" the modi*y bit and reclac latin" the process priority. Q.What is e$ and &i? )$plain their p rposes. A.e$6is the line editor mode o* .&i, editor. It allo+s to -.+rite 8IS' pro"rams
cmp Byte by byte comparision per*ormed *or t+o *iles comparision and displays the *irst mismatch byte.kill() is a system call +hich stops a process.pre&ent the accidental o&er+ritin" o* *iles :.Wild card interpretation0 4inally6 the shell identi*ies all the +ild cards(?6D) in the command line and replaces the +ild card +ith sorted list o* *ile names +hich maches the pattern. Q.@ommand S bstit tion0 #he commands s rro nded by backB otes +ill be e$ec ted by the shell.)$plain the steps that a shell *ollo+s +hile processin" a command. #he . It has the additional *eat res to edit6 sa&e lines and *iles.. #he tabs are replaced by a sin"le space. screen oriented &is al editor. Q. Q.'arsin"0 #he command is broke into +ords6 by sin" the spaces as delimiters nless B oted.errno >> )S?@5.What is the di**erence bet+een cmp and di** commands? 'ro&ide an e$ample *or each./. 8ater these +ill be replaced into standard o tp t o* the command into command line. It pro&ides the c rsor mo&ement options6 editin" options.What is kill()? )$plain its possible ret rn &al es. #he ret rn &al es o* kill() are0 -. #his implies the non(e$istence o* a process +ith a "i&en 'I2 or ca sin" the denial o* system by sec rity enhancements *or its e$istence.. /. is tr e. A. 'rocess is e$istin" +ith the "i&en 'I26 and si"nals can be sent to it. A. A.)&al ation o* a &ariable0 #he +ords +ith C as precedin" character +ill be e&al ted nless B oted.. .errno. It per*orms almost all the operations that are s pported by e$. A.)$plain ho+ the =ernel handles both the pa"e stealer and the *a lt handler.encrypt and decrypt the *iles &i . :.When the memory shorta"e occ rs then the pa"e stealer and *a lt handler thrashes. Use* l to +rite shell scriptin" in 8in $<Uni$. E.At times some other &al es ret rned by .1 . /. #he *a lt handler +ill be slept +hen the s m o* the +orkin" sets o* all the processes is more than the physical memory. 9. #he system thro "hp t red ction is the rest lt o* this process6 beca se the time spent by kernel *or the o&erhead is too m ch.errno >> )')?A.list all the *iles sa&ed as the res lt o* an editor or system crash 9. #he memory is rearra"ed in the *rantic pace. is tr e.'A#5 e&al ation0 Ultimately shell looks *or the 'A#5 &ariable *or the p rpose o* determinin" the seB ence o* directories to search *or the *iles or commands.(. #his implies that the kill proess +ill not be allo+ed by the system +ith the "i&en 'I26 +hich implies that the process e$ists or the enhancements are present by draconian sec rity. #he . 9.#he seB ence o* e$ec tin" commands by shell are as *ollo+s0 -. Q..
Frep stands *or re" lar e$pression. Q."rep.#he d (disk sa"e) command is sed to report the si!e o* directory trees.#he command d is mostly .#he 2irectory names can be sed. A. It ret rns tr e i* the pattern is *o nd in the *ile6 other+ise *alse. *ile.d .#he *ile contents are displayed pa"e by pa"e +ith the se o* .cmp ret rns the -st byte and the line no o* the *ileone to make the chan"es to make the *ileone identical to *ilet+o. "rep . command? What is its se? A.2i**erence bet+een cat and more command. 5alts once the screen pa"e is * ll and prompts to press a key to contin e Q. command is sed to *ind the patterns in a te$t *ile pro&ided by the ser. Q."rep.What is .l G more displays the *ile and directory names. "rep (r 38in s #or&alds3 D searches *or the *iles in c rrent and all the s b directories *or the pattern (8in s #or&alds).. command? 'ro&ide an e$ample A. #hese incl de the contents and the si!e o* all *iles. A ho" is an e$cessi&e or lar"e space occ pied by the *iles and directories on a secondary stora"e media. command.t$t displays the contents o* the *ile lin $. It is se* l to se d command *or the p rpose o* trackin" do+n the space ho"s. .cat. "rep (c 8in $ operatinsystems displays only the n mber o* times that the pattern is matched in the *ile b t not the lines.What is the se o* .It ret rns the te$t o* *ilet+o that is di**erent *rom *ilet+o.t$t ls . #he contents +ill scroll o** the screeen6 +hen the *ile contents are more than one screen pa"e.)$amples cat lin $.#he *ile contents are displayed by . command. )$amples0 "rep 8in *ile.*ile/ *ile9 searches the *iles *ile-6 *ile/6 *ile9 *or the lines +hich contains the strin" . di** Indicates the chan"es that are to be done to make the *iles identical.8in $ learnin" is "reat. 2irectory names can not be sed.more.8in $ learnin" is "reat .*ile/ *ile9 searches the *iles *ile-6 *ile/6 *ile9 *or the lines +hich contains the strin" 8in.
? ns <sbin<init +hich has the process n mber -('I2 > -) and prints the &ersion n mber. halt -.b and prompts *or the partition or kernel *or ima"e (8in $) or other (2HS) to load *irst E-/ bytes o* the partition. optionally6 mo nts root *ile system that is speci*ied by lilo or loadin +ith root>parameter. Q.'S/0 *or the p rpose o* m lti(line inp t 9. -) BIHS0 8oads the boot sector *rom the stora"e media.UNIX s pports : prompts0 -.$ is set. *or character de&ice *ile in the inode str ct re o* the *ile. A. #he order o* bootin" can be chan"ed sin" BIHS. )$ec tes the boot scripts debian in t rn r ns <etc<rcS.6 <de&.initrd.e.d<SD scripts6 r ns the pro"rams a&ailable in <etc<inittab. 9) 8I8H0 #he kernel ima"e is to be loaded as it does not nderstand the *ile system code. :) =ernel0 Initiali!es de&ices6 loads .An ordinary *ile does not reB ire these *ields.e. *or block de&ice *ile and c .hda-(: +hich is marked bootable.employed by the system administrators. A. #he *irst E-/ bytes o** the disk i.2escribe initial process seB ence +hile the system boots p.)$plain the &ario s prompts that are a&ailable in a UNIX system. #ypically the men code is a&ailable in <boot<boot. sin"le ser /. /) (2HS) Aaster Boot ?ecord (AB?)0 2HS option incl des AS(2HS6 Windo+s. #hey se d as a s pplement to the a tomated monitorin" system pro"rams +hich help to pre&ent the key directories and partitions *rom bein" * ll.'S-0 de*a lt prompt /. )$0 id0 90 initde*a lt0 #he other le&els are0 1.#here are / de&ice *iles.2escribe ho+ the kernel di**erentiates de&ice *iles and ordinary *iles. Q.'S:0 *or printin" be*ore the o tp t i* . Q. #hey are character de&ice *ile and block de&ice *ile. I) ? n 8e&els0 #he de*a lt le&el is de*ined in <etc<inittab. E) <sbin<init0 ?eads the <etc<inittab.6 <de&<had +ill be e$ec ted by BIHS. #he standard AB? looks *or the primary partition i. #he kernel ima"e is persisted as ra+ disk o**sets sin" BIHS ro tines to load the seB ence.'S90 *or printin" the select command :. A. #o distin" ish these t+o6 speci*y b . 4 ll A lti(User modes (de*a lt) .
A.%ar Q.#here are -9 block addresses in inode. J. Shell &ariables are special &ariables.Hne o* the most ob&io s ad&anta"es is that the e$it stat s o* the child process can be obtained by the parent process.#he --th6 -/th and -9th addresses are pointed to a one(le&el inde$ block and t+o(le&el inde$ block and three(le&el inde$ blocks respecti&ely.*ork() ( 4or creatin" child process /. are contained in each inode. .)$plain ho+ to "et<set an en&ironment &ariable *rom a pro"ram.By comm nicatin" +ith nnamed pipes6 the creation on pipe sho ld be done be*ore the creation o* child. #his process is called *orkin".si"nal() ( 4or handlin" a si"nal. type o* *ile6 access ri"hts6 and o+ners6 time stamps o* the *iles6 si!e6 and pointers to data blocks . #he sers instr ct an operation to the comp ter by typin" commands as te$t *or the e$ec tion.)$plain ho+ the inode maps to data block o* a *ile.#he *irst -1 block addresses are called direct block addresses +hich are the data blocks *or the *irst -1 in the *ile.#he inter comm nication bet+een a child process and a parent process can be done thro "h normal comm nication schemes s ch as pipes6 sockets6 messa"e B e es6shared memories. #hey are name and &al e pairs created and maintained by the concerned shell. A.&*ork() ( 4or creatin" child process only to copy(on(+rite 9.kill() ( 4or sendin" a si"nal to a process I.#he *ollo+in" are the system calls0 -. E. #he comm nication bet+een parent and child is done +ith this pipe.Same as / I.e$it() ( #o e$it o t o* e$ec tion o* a process K.)$plain some system calls sed *or process mana"ement. :. A. Q.What is a shell? What are shell &ariables? A. Q.2escribe ho+ a parent and child process comm nicates each other.A shell s an inter*ace to the ser o* any operatin" system.e$ec() ( 4or per*ormin" a di**erent task. #he *ile descriptions . A.?eboot Q. 4or e$ample0 'A#56 5HA)6 AAI86 #)?A etc. Soon a*ter *orkin"6the parent properties +ill be inherited by child6 also the pipe. Q. In Shell scriptin"0 #he en&ironment &ariable itsel* can be sed as0 AAI8L2)8I7)?ML@HA'8)#)>1 'A#5>C'A#50<home<my ser<D.e$it() ( #o e$it o t o* e$ec tion o* a process +itho t clean p.In @ pro"rammin" lan" a"e0 An en&ironment &ariable can "et sin" the * nction "eten&().9(E.+ait() ( #o make a process to +ait *or completion o* e$ec tion. #here are special +ays to inter comm nicate +hich has ad&anta"e o* the relationships.
What is 4ork s+ap? A. #he physical ?AA is di&ided into ch nks o* memory kno+n as pa"es. In case o* shorta"e o* memory6 the child process +ill be sent to the read(to(r n state in the s+ap de&ice. A pa"e o* memory is copied to the precon*i" red space on the hard disk6 *or the p rpose o* *reein" p that pa"e o* memory.5o+ the S+apper +orks? A.#he reB irement *or the s+apper is to +ork *or the process that is ready to r n and m st be the resident *or at least / seconds .d. Q. #his command is sed to display the c rrently r nnin" processes on 8in $<Uni$ systems.Ao&in" the in*ormation *rom *ast access memory and slo+ access memory and &ice &ersa is kno+n as s+appin".4or creation o* child process6 *ork() system call is in&oked.)$pansion s+ap is a part o* hard disk. Q. #o stop the c rrently r nnin" process *or the p rpose o* "ainin" the system speed6 and *ind o t the processes that are r nnin" on the remote system6 the ps command is a tool. con&entionally. Stoppin" o* a process can be done by kill command. #o per*orm s+appin"6 the commands s+apon and s+apo** are sed in lin $< ni$.#he shorta"e *or Nprocess stat sO is ps.What is the di**erence bet+een S+appin" and 'a"in"? A. It is like task mana"er in Windo+s.What is )$pansion s+ap? A. Q. Q.'a"e(ins and pa"e(o ts are the processors those are mo&ed *rom and to the physical memory to the disk in pa"in". #he s+apon is to enable the s+appin" and the s+apo** is to disable s+appin". #his is reser&ed *or the p rpose o* storin" ch nks o* a pro"ram that is e$ec tin" +hich is s+apped o t o* the memory in order to make space a&ailable *or other pro"rams. At the time o* processin" the *ork() call by parent6 the child process is created. What are the reB irements *or a s+apper to +ork? A. Q. #he s+apper searches *or sleepin" process.2aemon is the short *orm *or 2isk and )$ec tion Aonitor.S+appin" per*orms the +hole process to trans*er to the disk6 +here as pa"in" per*orms the part o* the process is trans*erred to the disk by makin" the rest o* the process a&ailable in the physical memory. It ret rns to the ser state +itho t per*ormin" the s+appin" the state o* parent.What is 3ps3 command *or? A.#he * nctionality o* a s+apper is on the sched lin" priority +hich is hi"hest. In UNIX6 the names o* daemons are end +ith. Hnce the memory is a&ailable6 the child process s+appin" is done into the main memory.S+ap(ins and s+ap(o ts are the processes those are mo&ed *rom and to the physical memory to the disk in s+appin". Q.What is a 2aemon? A.Q. Some o* the daemons are Ninetd6 httpd6 n*sd6 sshd6 named6 and lpd N. It searches *or the processes that are ready to r n *or s+appin"6 i* the sleepin" process not *o nd. A daemon is a back"ro nd process +hich ans+ers reB ests *or ser&ices in a lon"(r nnin" mode.
It +ill be a+aken once in a second by the kernel o* the HS.? A. A. A.&*ork ( In this system call ntil child e$its or e$ecs6 the parent +ill be s spended.Streams o* processes can be redirected to ser speci*ied locations sin" P 9. #his process is done on demand.#he ne$t most data item or instr ction is the closest to the c rrent data item or instr ction. #his error occ rs +hen accessin" stora"e space is tried by an application pro"ram +hich is not desi"nated *or its se. Q. A process has a pa"e table6 also called as map that contains pa"e table entries that points to the assi"ned memory to the process and comm nicates to the @'U6 the memory locations +hich are &alid *or accessin" a process.'rotection *a lt is a name o* an error. #hen pa"in" +ill create pri&ate pa"e copy o* the dirty pa"e *or the p rpose o* modi*yin" process. #he memory and stack are shared by the child.s per*ormance..the principle o* locality. Q.Uses o* 'ipe -. Q. A. Q.)$plain se o* pipes.#rap command0 controls the action to be taken by the shell +hen a si"nal is recei&ed.2i**erence bet+een the *ork() and &*ork() system call. e.'ipes are se* l to chain p se&eral pro"rams6 so that m ltiple commands can e$ec te at once +itho t sin" a shell script. #he s+apper +ill "o into the +ait state6 i* the reB irement is not satis*ied6 *or that e&ent. Q. 'rotectin *a lt is also most likely to occ r +hen a beta test &ersion o* a so*t+are is tried to access. trap Nrm C4I8)S e$itO << e$it (si"nal) and remo&e *ile (action) .Se&eral po+er* l * nctions can be in a sin"le statement /.*ork0 Both the parent and child share all o* the pa"e tables ntil any one o* them does a +rite.What is pa"e *a lt? Its types. Q.)$plain trap command6 shi*t @ommand6 "etopts command o* lin $. -.be*ore s+appin" o t.What is protection *a lt? A. #rap QH'#IHNSR Q Qar"R si"nspec.R Ar" is the action to be taken or e$ec ted on recei&in" a si"nal speci*ied in si"nspec.What is .". A pa"e table that is does not map memory area access6 +ill res lt in "eneration o* pa"e *a lt by @'U. 4or e$ample6 a block in a *ile may be the closest one that is needed ne$t.Hne o* the critical parts o* code in the 8in $ kernel. A. #he HS can read the ne$t block be*ore its need and made a&ailable it on hand at the time o* iss in" the act al read reB est. It has a ma%or in*l ence on memory s bsystem. )ach process is assi"ned to a memory ch nk named as pa"es. #he process m st be resided in the s+ap de&ice *or at least / seconds6 *or any s+appin". /.
" (+hether the ar" ment be"ins +ith a min s si"n and is *ollo+ed by any sin"le letter contained inside options ) I* not6 dia"nostic messa"es are sho+n. Q. Bein" a stateless system6 a system sho ld be able to be replaced at any time +ith or +itho t local stora"e media.#he t+o modes o* nslook p are0 Interacti&e and non(interacti&e. Interacti&e mode0 .Usin" . /. It e$amines the ne$t command line ar" ment and determines +hether it is a &alid option Fetopts Toptstrin"U T&ariable-U. Interacti&e and non interacti&e.Usin" .interacti&e mode. -.Shi*t @ommand0 Usin" shi*t command6 command line ar" ments can be accessed.Uses 82A' containin" in*ormation o* all systems to assist in *indin" o t +hich snapshot (o* state) sho ld be r nnin" on +hich system.What Stateless 8in $ ser&er? A.What does nslook p do? )$plain its t+o modes. 5ere6 optsrin" contains letters to be reco"ni!ed i* a letter is *ollo+ed by a colon6 an ar" ment sho ld be speci*ied.A stateless 8in $ ser&er is a centrali!ed ser&er in +hich no state e$ists on the sin"le +orkstations. the ser can % st print the name and reB ested in*ormation o* a host. It sends a domain name B ery packet to the correspondin" 2NS.Nslook p is sed to *ind details related to a 2omain name ser&er. It is se* l +hen se&eral parameters need to be tested. ).It stores home directories *or those systems :.4eat res0 -.It stores snapshots taken *or those systems 9. Q.Stateless lin $ is a +ay ho+ a system is to r n and be mana"ed.Non interacti&e mode is sed to *etch in*ormation abo t the speci*ied host or domain. ser can B ery the name ser&ers *or the in*ormation pertainin" to hosts and domains. #he command ca ses the positional parameters shi*t to the le*t. I* ser&er "oes o**line6 a ne+ &irt al instance that is r nnin" the HS ima"e o** o* the net+ork stora"e. #here may be scenarios +hen a state o* a partilc ar system is meanin"* l (A snap shot is taken then) and the ser +ants all the other machines to be in that state. Fetopts command0 this command is sed to parse ar" ments passed. A. Shi*t QnR +here n de*a lts to -.What are the *eat re o* Stateless 8in $ ser&er? A. It is s ally e$ec ted inside a loop. Interacti&e mode allo+s the ser to interact by B eryin" in*ormation abo t di**erent hosts and domains. In case o* hard dri&e crash6 the command resync can be sed to a ne+ dri&e.Nslook p has t+o modes. #his is +here the stateless 8in $ ser&er comes into pict re. Q.It stores the prototypes o* e&ery machine /.non(interacti&e mode. 2etails like I' addresses o* a machine6 AX records6 ser&ers etc.
".What is Bash Shell? A.8in $ *ile str ct re is a tree like str ct re. It has a combination o* the @ and =orn shell *eat res. It can display net+ork tra**ic statistics6 identi*y host etc.Net+ork monitorin" tools are sed to monitor the net+ork6 systems present on the net+ork6 tra**ic etc. Bash shell is not portable. . All the partitions are nder the root directory. Inter*aces are a&ailable to &ie+ s ch in*ormation.)$plain some Net+ork(Aonitorin" #ools in 8in $0 pin"6 tracero te6 tcpd mp6 ntop A.Ntop0 Net+ork top sho+s the net+ork sa"e. When bash script starts6 it e$ec tes commands o* di**erent scripts. pin" ipLaddress When the command is e$ec ted6 it ret rns a detailed s mmary o* the host. ?o ndtrip time in ms is sho+n *or e&ery &isit to a host. Bash stands *or XBo rne A"ain ShellO. -.Bash is a *ree shell *or UNIX. It displays s mmary o* net+ork sa"e by machines on the net+ork in a *ormat as o* UNIX top tility. 9. #he scripts +ritten in Bash are portable amon" machines6 distrib tions and e&en operatin" systems. It is the de*a lt shell *or most UNIX systems.#racero te0 the command is sed to trace the path taken by the packet across a net+ork. #cd mp capt res and displays packet headers and matchin" them a"ainst criteria or all. I* a partition is mo nted (#he mo nt point de*ines the place o* a partic lar data set in the *ile system) any+here apart *rom a Nde&iceO6 the system is not a+are o* the e$istence o* that partition or de&ice. any Bash( speci*ic *eat re +ill not * nction on a system sin" the Bo rne shell or one o* its replacements6 nless bash is installed as a secondary shell and the script be"ins +ith VW<bin<bash. A shell is the ser inter*ace. #racin" the path here means *indin" o t the hosts &isited by the packet to reach its destination. #his in*ormation is se* l in deb ""in".5o+ does the lin $ *ile system +ork? A. /. Q. Q. :. #o check i* the host is operatin". It s pports re" lar and e$pressions.#cpd mp0 commonly sed to monitor net+ork tra**ic. It can also be r n in +eb mode6 +hich allo+s the display to be bro+sed +ith a +eb bro+ser. It starts *rom the root directory6 represented by 3<36 and then e$pands into s b(directories.e. Bash is more con&enient shell *or sers amon" others. 'ackets sent6 recei&ed6 lost by estimatin" the ro nd trip time. 2irectories that are only one le&el belo+ the root directory are o*ten preceded by a slash6 to indicate their position.Nslook p QoptionsR Qser&erR Q. It interprets Boolean operators and accepts host names6 ip address6 net+ork names as ar" ments.'in"0 'in" command is sed to check i* the system is in the net+ork or not.
#he root directory s ally does not ha&e the critical *iles. #hese *iles are a&ailable in <de& directory.is the identi*ication n mber)6 <cp in*o (in*ormation abo t cp )6 <de&ices (in*ormation abo t de&ices installed)6 <*ilesystem (*ile systems con*i" red)6 <net (in*ormation abo t net+ork protocols)6 <mem (memory sa"e) At the time o* installation o* 8in $6 a *ile system is assi"ned and persists in the hard disk.What are the process states in 8in $? A. #his makes it possible to pdate the system *rom a ne+ &ersion o* the distrib tion6 or e&en a completely ne+ distrib tion6 +itho t ha&in" to install all pro"rams a"ain. In addition to data and e$ec table *iles6 8in $ treats directories and e&en the &ario s components o* yo r comp ter as *iles. It is called as &ar beca se the data keeps chan"in". S b directories incl de <bin6 <incl de6 <lib6 <local (*or local e$ec tables) 9. 8in $ treats directories and comp ter components also as *iles.<proc *ilesystem 0 this *ile system does not e$ist on the hard disk. #his in*ormation is s ally abo t the processes. User speci*ic con*i" ration *iles *or applications are stored in the ser3s home directory in a *ile.< sr *ilesystem 0 this *ile system is "enerally lar"e as it contains the e$ec table *iles to be shared amon"st di**erent machines.A *ile co ld be a list o* names and n mbers6 a cheesecake recipe6 or an e$ec table pro"ram. A *ile can be a list o* names and n mbers or e$ec table pro"rams. #hese are re*erred as special *iles kno+n as de&ices.". Hnce the ser is lo""ed in S he is placed in his home directory.-. UNIX creates directories *or all sers directory. It co ld be a keyboard6 console6 and printer6 ?AA or ?HA. 8in $ treats e&ery pro"ram as a *ile." <home<myLname. #his *ile system str ct re resembles a tree. #he s b directories incl de <cache<man (A cache *or man pa"es)6 <"ames (any &ariable data belon" to "ames)6 <lib (*iles that chan"e)6 <lo" (lo" *rom di**erent pro"rams)6 <tmp (*or temporary *iles) :. ). @ontains a hierarchy o* special *iles +hich represent the c rrent state o* the kernel . ).(directory +ith in*ormation abo t process n m -6 +here . Q. 4iles are s ally the ones installed +hile installin" 8in $.?oot X<X *ile system0 #he kernel needs a root *ile system to mo nt at start p. <bin (commands needed d rin" boot p)6 <etc (con*i" *iles) 6 <lib(shared libraries). Instead s b directories are created. It is created by the kernel in its memory to pro&ide in*ormation abo t the system. E.#he *ollo+in" are the process states0 . /. B t nder 8in $6 e&erythin" is a *ile.<&ar *ilesystem 0 this *ile system is speci*ic to local systems. #he root *ile system is "enerally small and sho ld not be chan"ed o*ten as it may interr pt in bootin".<home *ilesystem0 ( this *ile system di**ers *rom host to host.4e+ o* the 2irectories incl de <. 8in $ per*orms the comm nication +ith these de&ices by simply readin" *rom or +ritin" to these special *iles.
It is *ree and open so rce. #he desktop +ork stations *rom &ario s companies +ere based on UNIX. /. ? nnin"0 #his is a state +here a process is either in r nnin" or ready to r n. nice () is sed. #o terminate the process . #o make the process to +ait > +ait () is sed. I. #he process is *orced to halt *or certain condition that a hard+are stat s is +aited and a si"nal co ld not be handled. Q.What is a !ombie? A. Q. As 8in $ is *ree and r ns on any '@ plat*orm it "ained the pop larity &ery B ickly. 8ater a n mero s companies entered and each one o* them had their o+n UNIX &ersion. #he parent process +ill send a si"nal to the operatin" system that is not needed the !ombie by sin" +ait () system call. We can do+nload 8in $ *or *ree and c stomi!e it as per o r needs. 5o+e&er6 nlike UNIX6 8in $ is an open so rce and *ree so*t+are. 9.It is &ery rob st and adaptable. #o *ind the parent process id .8in $ is an operatin" system that ses UNIX like Hperatin" system. -. /. "etppid () is sed. J.'eople +ho are *amiliar +ith UNIX can +ork on 8in $ +ith ease and com*ort. Since this process is not ali&e6 it cannot react to si"nals. E. As the proprietary a thority is o+ned by each company and the lack o* central a thority +eaken UNIX. :.8in $ is a m lti ser6 m ltitask FUI based open so rce operatin" system.Yombie is a process state +hen the child dies be*ore the parent process. Stopped0 Hnce the process is completed6 this state occ rs. #o bias the c rrently r nnin" process property .'eople +ho +ant "reat control o&er net+ork sec rity and on operatin" system 'rior to 8in $6 there is UNIX. 9. "etpid () is sed.'rocess mana"ement ses certain system calls. #hey are e$plained belo+. All reso rces o* the !ombie state process are cleared by the kernel. A dead process cannot be killed. . #o create a ne+ process . Q. #o r n a ne+ pro"ram > e$ec () is sed. Interr ptible0 #his state is a blocked state o* a process +hich a+aits *or an e&ent or a si"nal *rom another process 9. In this case the str ct ral in*ormation o* the process is still in the process table.'op larity o* 8in $ is beca se o* the *ollo+in" reasons -. Uninterr ptible0 It is also a blocked state. #o *ind the niB e process id .-. Yombie state can *inish +hen the parent dies. e$it () is sed. E.2ead process is called a !ombie. *ork () is sed.What is 8in $ and +hy is it so pop lar? A. A.Immense amo nt o* libraries and tilities :. Yombie0 In this state6 the process +ill be terminated and the in*ormation +ill still be a&ailable in the process table. /. #his process can be restarted E.)$plain each system calls sed *or process mana"ement in lin $. 8in $ +as ori"inally created by 8in s #or&alds and commonly sed in ser&ers. #he processes +ill die e&ent ally at the time +hen they become !ombies. :.
8I8H stands *or 8in $ 8oader +hich is a bootstrap pro"ram.Static library has * nctionality that bo nd to a static pro"ram at compile time. #he content o* home directory is pri&ate and the ser has a complete control o* it. No separate process is there to r n these commands. 2ynamic libraries sa&e the ?AA space as a"ainst the static library beca se linkin" to static libraries incl des the act al code *or the library * nction(s)<proced re(s) +ith the e$ec table.)$plain the di**erence bet+een a static library and a dynamic library? A. Q.5ome directory 0 It is the de*a lt +orkin" directory +hen a ser lo"s in.t reB ire a separate process to e$ec te them.What are the * nctions per*ormed by 8I8H? A. 4or this reason6 8I8H is kno+n as boot mana"er.2ynamic libraries are loaded into the memory and binds at r n time. Internal commands don. Workin" directory can be chan"ed. 8I8H is a code snippet +hich loads '@ BIHS into the main memory at the time o* startin" the comp ter system.What is 8I8H? A. #hey can be e$ec ted any time and are independent. It is sed to load 8in $ into the memory and start the Hperatin" system. Q.8ocatin" 8in $ kernel /.8I8H handles the *ollo+in" tasks0 -.8I8H is 8in $ 8oader is a boot loader *or 8in $.5ome directory in 8in $ contains ser. Workin" directory0 #he directory in +hich the ser is +orkin" c rrently is kno+n as +orkin" directory. 8I8H can be con*i" red to boot other operatin" systems as +ell. Q.Static libraries are loaded +hen the pro"ram is compiled and dynamically(linked libraries are loaded in +hile the pro"ram is r nnin". )&ery static pro"ram has its o+n copy o* library.s c rrent directory.Q. I* the *iles *or the command are not present in the path6 the e$ternal command +on. Hn the other hand6 +orkin" directory is the ser. . )$ternal commands +ill ha&e an indi&id al process.t e$ec te.#he commands that are directly e$ec ted by the shell are kno+n as internal commands.Internal commands are commands that are already loaded in the system. 288 code is kept at one location and is s ally shared amon" all the processes that se the 288.con*.Starin" =ernel #he selection o* &ario s kernel ima"es and boot ro tines is s pported by 8I8H. )ach command has its niB e process id. Hn the other hand6 e$ternal commands are loaded +hen the ser reB ests *or them.What is the di**erence bet+een home directory and +orkin" directory? A. 8I8H is c stomi!able6 +hich means that i* the de*a lt con*i" ration is not correct6 it can be chan"ed. @on*i" *ile *or 8I8H is lilo. Q.What is the di**erence bet+een internal and e$ternal commands? A. It can be chan"ed sin" cd command. #he home may also be the +orkin" directory6 i* the ser is +orkin" in it.Identi*yin" other s pportin" pro"rams and loadin" them in the memory 9.#he commands that are e$ec ted by the kernel are kno+s as e$ternal commands.s personal data6 con*i" ration *iles6 settin"s o* a so*t+are etc. Internal commands are a part o* the shell +hile e$ternal commands reB ire a 'ath.
N4S is sed to partition a disk on a remote machine disk.s *or s b%ect6 (c *or copy and . N*s command in lin $ can be sed to achie&e this.5o+ do I send email +ith lin $? A.mail. So that an na thori!ed ser can not access one.#he e$ternal * nctionality is accessed at r ntime.' rpose o* N4S0 -.s email6 delete the *iles.?'A can &eri*y so*t+are packa"es.What is N4S? A.s N?eports are neededO It prompts displays the s b%ect as N?eports are neededO.b is "i&en the mail +ill be sent to the correspondin" recipients.)mail can be sent in 8in $ sin" the mail command. Hther reso rces like printers and stora"e de&ices can also be shared..mail. Synta$0 Aail QoptionsR Q sersR Hptions are0 (s6(c6(b Where .Similarly i* .?ed ction o* the n mber o* remo&able media dri&es thro "ho t the net+ork since they can be shared. Q.Its *eat res are0 -.What is its p rpose? A. Q.?'A can be ser&ed as a po+er* l search en"ine to search *or so*t+are. . mail serLname .". #he . It is a&ailable +ith 4edora6 S se6 @entHS6 Aandri&a 8in $ and other &ersion o* 8in $. 9. /. 4ile ser&ices *rom +indo+s can be accessed. mail sername . #he command to send email is .#he n+anted people access potential is pro&ided by N4S to access hard dri&e in a net+ork. /. ?'A is a strai"ht *or+ard pro"ram to per*orm the abo&e so*t+are mana"ement tasks. #his process red ces the o&erall *ootprint o* memory. It is a *ile system sed *or sharin" o* *iles o&er a net+ork.s.N4S is Net+ork 4ile system. Q. command is sed to send and recei&e emails.s NhelloO ). A.)$plain ?'A (?ed 5at 'acka"e Aana"er) *eat res.2ata can be stored on a sin"le machine and still remain accessible to others o&er the net+ork.8in $ s pports to +ork +ith sendin" mails sin" a set o* commands called as mail commands. N4S allo+s a B ick +ay o* *ile sharin".b *or blind carbon copy ). In other +ords *iles *rom one operatin" system can be shared by another sin" N4S.".?'A is a packa"e mana"in" system (collection o* tools to mana"e so*t+are packa"es). #his means that sin" N4S *iles can be accessed remotely.?'A is a po+er* l so*t+are mana"ement tool *or installin"6 ninstallin"6 &eri*yin"6 B eryin" and pdatin" so*t+are packa"es. Q.c and .N4S can be sed *or sharin" o* *iles remotely. N4S stands *or Net+ork 4ile System.
@omponents6 so*t+are. )&eryday a tomation process can be simpli*ied by a shell script. J.Aana"in" the comp ter reso rces0 =ernel allo+s the other pro"rams to r n and se the reso rces. . /. Shell scripts are se* l to accept inp ts and pro&ide o tp t to the ser. Shell Script0 A shell script is a pro"ram *ile in +hich certain 8in $ commands are placed to e$ec te one a*ter another. Shell interprets the ser reB ests6 e$ec tes them.Installin"6 reinstallin" can be done +ith ease sin" ?'A E.'er*orms inter process comm nication K. Shell may se kernel to e$ec te certain pro"rams. ?eso rces incl de i<o de&ices6 @'U6 memory. Q. I. Shell script is easy to deb "6 B icker as compared to +ritin" bi" pro"rams. :.A shell script6 as the name s ""ests6 is a script +ritten *or the shell.'ro&ides methods *or synchroni!ation and comm nication bet+een processes.=ernel is sed in UNIX like systems and is considered to be the heart o* the operatin" system. It is responsible *or comm nication bet+een hard+are and so*t+are components.2 rin" pdates ?'A handles con*i" ration *iles care* lly6 so that the c stomi!ation is not lost. Shell cate"ories in 8in $ are0Bo rne shell compatible6 @ shell compatible6 nontraditional6 and historical.9. 9.4or the processes to access and make se o* these ser&ices6 system calls are sed. E.'rocesses may also need to access the de&ices attached to the system.#he =ernel task mana"er allo+s tasks to r n conc rrently. A.'ro&ides the abstraction le&el *or reso rces s ch as memory6 processors6 and I<H de&ices.A shell script is a *lat te$t *ile.8in $ shell is the ser inter*ace to comm nicate +ith 8in $ operatin" system. Shell is a pro"ram the ser ses *or e$ec tin" the commands.8in $ shell is a ser inter*ace sed *or e$ec tin" the commands.?esponds to system calls Z.What is =ernel? )$plain the task it per*orms. )$amples o* commands are cp6 cn6 cd. =ernel Acti&ities are0 -. Q.=ernel is the component that is responsible *or mana"in" the reso rces o* a comp ter system.=ernel is responsible *or 'rocess mana"ement. Script here means a pro"rammin" lan" a"e sed to control the application. In UNIX6 any pro"ram can be the sers shell. =ernel assists the processes in doin" so.s etc can be p"raded sin" ?'A +itho t ha&in" to reinstall them :. It is primarily sed *or mana"in" the systems reso rces as +ell. 5o+e&er the e$ec tion speed is slo+ beca se it la nches a ne+ process *or e&ery shell command e$ec ted. Q.What is Shell Script? A.=ernel has an access to the systems memory and allo+s the processes to access the memory +hen reB ired. It allo+s m ltiple processes to r n sim ltaneo sly allo+in" ser to m ltitask. #he shell script allo+s di**erent commands entered in the shell to be e$ec ted.What is 8in $ Shell? A.
". #he symbol is G.t$t *ile +ill be sent as inp t *or +c command +hich co nts the no. #he o tp t o* the command to the le*t o* the pipe is sent as inp t to the command to the ri"ht o* the pipe.Q. o* +ords in a *ile.e. sort *ile G lpr ( sort the *ile and send it to printer).t$t. #he *ile *or +hich the no.What are 'ipes? A. In the abo&e e$ample the o tp t o* apple. UNIX shell has a special synta$ *or creation o* pipelines. .'ipe is a symbol sed to pro&ide o tp t o* one command as inp t to another command. #he commands are +ritten in seB ence separated by G.A pipe is a chain o* processes so that o tp t o* one process (stdo t) is *ed an inp t (stdin) to another. 4or e$ample0 C cat apple. 2i**erent *ilters are sed *or 'ipes like AW=6 F?)'. o* +ords co nts is the *ile apple.t$t G +c.