|
121. What Is An Advantage Of Executing A Process In Background?
Date Posted: 07/02/2012
Ans: 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.
|
|
|
122. What Happens When You Execute A Command?
Date Posted: 07/02/2012
Ans: When you enter 'ls’ command to look at the contents of your current working directory, UNIX does a series of things to create an environment for ls and the run it: The shell has UNIX perform a fork. This creates a new process that the shell will use to run the ls program. The shell has UNIX perform an exec of the ls program. This replaces the shell program and data with the program and data for ls and then starts running that new program. The ls program is loaded into the new process context, replacing the text and data of the shell. The ls program performs its task, listing the contents of the current directory.
|
|
|
123. Explain About TYPE-ahead?
Date Posted: 07/02/2012
Ans: The kernel reads what you type as you type it, even if it’s busy with something else, so you can type as fast as you want, whenever you want, even when some command is printing at you. Your I/P characters will appear intermixed with the O/P characters but they will be stored away and interpreted in the correct order.
|
|
|
124. How Do You Create Special Files Like Named Pipes And Device Files?
Date Posted: 07/02/2012
Ans: The system call mknod creates special files in the following sequence.
1. kernel assigns new inode,
2. Sets the file type to indicate that the file is a pipe, directory or special file,
3. If it is a device file, it makes the other entries like major, minor device numbers.
For example:
If the device is a disk, major device number refers to the disk controller and minor device number is the disk.
|
|
|
125. What Function Does ‘err No’ Do?
Date Posted: 07/02/2012
Ans: Sometimes it is nice to know what specific error occurred; for this purpose all system calls, when appropriate, leave an error number in an external integer called calls, when appropriate, leave an error number in an external integer called err no. By using err no, your program can, for example, determine whether an attempt to open a file failed because it did not exist or because you lacked permission to read it.
|
|
|
126. Is It Possible To Count Number Char, Line In A File; If So, How?
Date Posted: 07/02/2012
Ans:
Yes, wc-stands for word count.
WC -c for counting number of characters in a file.
WC -l for counting lines in a file.
|
|
|
127. What Is Validity Fault?
Date Posted: 07/02/2012
Ans: If a process referring a page in the main memory whose valid bit is not set, it results in validity fault. The valid bit is not set for those pages: that are outside the virtual address space of a process, that are the part of the virtual address space of the process but no physical address is assigned to it.
|
|
|
128. Describe The Process Of? Spname?
Date Posted: 07/02/2012
Ans: The operation of spname is straightforward enough, although there are a lot of boundary conditions to get right. Suppose the file name is /d1/d2/f. The basic ideas is to peel off the first component (/), then search that directory for a name close to the nest component (dl), then search that directory for something near d2, and so on, until a match has been found for each component. If at any stage there isn’t a plausible candidate in the directory, the search is abandoned.
|
|
|
129. Explain Different Types Of Unix Systems?
Date Posted: 07/02/2012
Ans: The most widely used are: 1. System V (AT&T) 2. AIX (IBM) 3. BSD (Berkeley) 4. Solaris (Sun) 5. Xenix ( A PC version of Unix)
|
|
|
130. Explain About Cat?
Date Posted: 07/02/2012
Ans: 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.
|
|