CoolInterview.com - World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.




Get it now !!
Send your Resume to 6000 Companies
UNIX Interview Questions & Answers - Learning Mode
COOLINTERVIEW.COM OPERATING SYSTEMS INTERVIEW QUESTIONS UNIX INTERVIEW QUESTIONS QUESTIONS & ANSWERS - LEARNING MODE

UNIX Interview Questions & Answers - Learning Mode

UNIX is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy. Today's Unix systems are split into various branches, developed over time by AT&T. UNIX was one of the first operating systems to be written in a high-level programming language, namely C. This meant that it could be installed on virtually any computer for which a C compiler existed. This natural portability combined with its low price made it a popular choice among universities.

Try UNIX Interview Questions & Answers - Exam Mode

1 2 3 4 5 6 7 8 9 10 11 12 13 14 Next

Sort By : Latest First | Oldest First | By Rating

UNIX Interview Questions & Answers - Learning Mode
Try UNIX Interview Questions & Answers - Exam Mode
Question: Unix command to concatenate (attach) two strings?



Answer: cat $str1 $str2 is WRONG - cat command will need file names as input Source: CoolInterview.com
Question: What is Semaphore?



Answer: A semaphore is a type of Interprocess communication resource used for synchronization and mutual exclusion between any two asynchronous processes. Source: CoolInterview.com
Question: Explain Memory Partitioning, Paging, Segmentation.









































Answer: PAGING: Paging memory allocation algorithms divide computer memory into small partitions, and allocates memory using a page as the smallest building block.

SEGMENTAION: Segmentation means that a part or parts of the memory will be sealed off from the currently running process, through the use of hardware registers. If the data that is about to be read or written to is outside the permitted address space of that process, a segmentation fault will result.
Source: CoolInterview.com
Question: Explain Scheduling.



Answer: The way by which the processes are alloated to CPU to use the CPU time is called scheduling.

there are different types of schedulings algorithms

1.FCFS(first come first serve)

2.SJF(shortest job first)

3. SHORTEST JOB NEXT

4.ROUND ROBIN

5. MULTILEVEL FEEDBACK SCHEDULING


Source: CoolInterview.com
Question: What is difference between lilo and stub?



Answer: STUB is A temporary implementaion of part of a program for debugging purposes.

LILO (LInux LOader) is a boot loader for Linux. Source: CoolInterview.com
Question: What is Concurrency? Explain with example Deadlock and Starvation.



Answer: A {
wait_for(lock_1) {
do something that takes time
wait_for(lock_2) {
do something
}
}
}

B {
wait_for(lock_2) {
do something that takes time
wait_for(lock_1) {
do something
}
}
}

start A
start B


A will be holding lock_1, waiting for lock_2
and B will be holding lock_2, waiting for lock_1

hence, deadlock occurs

Source: CoolInterview.com
Question: What is the difference between soft link and hard link in Unix operating system ?




Answer: Hard Links :

1. All Links have same inode number.

2.ls -l command shows all the links with the link column(Second) shows No. of links.

3. Links have actual file contents

4.Removing any link ,just reduces the link count , but doesn't affect other links.

Soft Links(Symbolic Links) :

1.Links have different inode numbers.

2. ls -l command shows all links with second column value 1 and the link points to original file.

3. Link has the path f Source: CoolInterview.com
Question: How can you get/set an environment variable from a program in UNIX?

Answer: Getting the value of an environment variable is done by using `getenv()'. Setting the value of an environment variable is done by using `putenv()'. Source: CoolInterview.com
Question: Name two paging states for a page in memory?

Answer: The two paging states are:
The page is aging and is not yet eligible for swapping,
The page is eligible for swapping but not yet eligible for reassignment to other virtual address space.
Source: CoolInterview.com
Question: What are the phases of swapping a page from the memory?

Answer: Page stealer finds the page eligible for swapping and places the page number in the list of pages to be swapped.
Kernel copies the page to a swap device when necessary and clears the valid bit in the page table entry, decrements the pfdata reference count, and places the pfdata table entry at the end of the free list if its reference count is 0. Source: CoolInterview.com
Question: How to find some partuicular lines in unix Vi editor which starts with a paricular word and end with another particular word?? For ex - There are 10 lines in the editor and only 4 lines start with the word APPLE and end with the word MANGO.Now how to find out these particular lines in Unix .



Answer: 1. Esc

2. :

3. /APPLE*

4. /*MANGO
Source: CoolInterview.com
Question: In what way the Fault Handlers and the Interrupt handlers are different?

Answer: Fault handlers are also an interrupt handler with an exception that the interrupt handlers cannot sleep. Fault handlers sleep in the context of the process that caused the memory fault. The fault refers to the running process and no arbitrary processes are put to sleep. Source: CoolInterview.com
Question: What exactly is UNIX?

Answer: UNIX is written in C and it is portable. It runs on a range of computers from microprocessors to the largest mainframes. The source code is available and written in high level language which makes it easy to adapt for a particular requirement. Source: CoolInterview.com
Question: What is BSS(Block Started by Symbol)?

Answer: A data representation at the machine level, that has initial values when a program starts and tells about how much space the kernel allocates for the un-initialized data. Kernel initializes it to zero at run-time. Source: CoolInterview.com
Question: How to get a computer aided instruction?

Answer: Your system may have a command called learn which provides computer aided instruction on the file system and basic commands, the editor, document preparation and even ?C? programming. IF $learn exists on your system, it will teach you what to do from there. Source: CoolInterview.com
Question: What are data structures that are used for Demand Paging?

Answer: Kernel contains 4 data structures for Demand paging. They are,
Page table entries,
Disk block descriptors,
Page frame data table (pfdata),
Swap-use table.

Source: CoolInterview.com
Question: What are shell variables?



Answer: Shell variables are system environment variables.they include

TERM,SHELL, MAIL

the output of the shell variable we can see by typing the command

$>echo $TERM

ansi

at the prompt.
Source: CoolInterview.com
Question: What is an advantage of executing a process in background?

Answer: The most common reason to put a process in the background is to allow you to do something else interactively without waiting for the process to complete. At the end of the command you add the special background symbol, &. This symbol tells your shell to execute the given command in the background.
Source: CoolInterview.com
Question: Explain about cat?

Answer: Cat is the simplest of all the printing commands. Cat prints the contents of all the files named by its arguments. The named file or files are catenated the terminal one after another with nothing between. You have to be quick with CTRL-S to stop O/P from cat before it flows off your screen. Source: CoolInterview.com
Question: How do you create a decision tree in a shell script?

Answer: It depends on shell, usually a case-esac or an if-endif or fi structure. Source: CoolInterview.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 Next



India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.390625 Seconds