Q.1 How are Devices are represented in UNIX?
Answer. All devices are represented by files called specified file that are located in /dev directory. Thus, device file and other file are named and accessed in the same way. A 'regular file' is just an oridnary data file in the disk. 'A block special file' represents a device with characteristics similar to a disk. A 'Character special file' represents a device with charactersitics similar to a keyboard.Q.2- What is Inode?
Answer- All unix file have its description stored in a structure called 'Inode'.The Indoe contains info about the file size, Location,Time of last access, time of last modification etc. Directories are also represented as file and have an asssociated indoe. In addition to description about the file, the inode contains pointer to the data block of the file. If the file is large indode has indirect pointer to a block of pointers to additional data block.A block is typicaly 8K.Q.3- What is a Shell?
Answer- A shell is an interactive user interface to an operating system service that allow an user to enter commands as character string or through a graphical user interface. The Shell converts them to system call to the os or fork off a process to excute the command. system call results and other information from the OS are represented to the user through an interactive interface. Commonaly used shell are the following.SH, CSH, KS.
Q.4- What is Zombie?
Answer- When a program forks and the child finishes before the parent, the kernel still keeps some of its information about the child in case the parent might neeed it.Q.5 How can get/set environment variable from a program?
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()'.