How does the inode map to data block of a file? Posted: Inode has 13 block addresses. The first 10 are direct block addresses of the first 10 data blocks in the file. The 11th address points to a one-level index block. The 12th address points to a two-level (double in-direction) index block. The 13th address points to a three-level(triple in-direction)index block. This provides a very large [...] |
| Discuss the mount and unmount system calls ? Posted: The privileged mount system call is used to attach a file system to a directory of another file system; the unmount system call detaches a file system. When you mount another file system on to your directory, you are essentially splicing one directory tree onto a branch in another directory tree. The first argument to [...] |
| How do you create special files like named pipes and device files? Posted: 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 [...] |
| Posted: FIFO are otherwise called as ‘named pipes’. FIFO (first-in-first-out) is a special file which is said to be data transient. Once data is read from named pipe, it cannot be read again. Also, data can be read only in the order written. It is used in interprocess communication where a process writes to one end [...] |
| What are links and symbolic links in UNIX file system? Posted: A link is a second name (not a file) for a file. Links can be used to assign more than one name to a file, but cannot be used to assign a directory more than one name or link filenames on different computers. Symbolic link ‘is’ a file that only contains the name of another file.Operation [...] |
| How do you change File Access Permissions? Posted: Every file has following attributes: owner’s user ID ( 16 bit integer ) owner’s group ID ( 16 bit integer ) File access mode word ‘r w x -r w x- r w x’ (user permission-group permission-others permission) r-read, w-write, x-execute To change the access mode, we use chmod(filename,mode). Example 1: To change mode of myfile to ‘rw-rw-r–’ (ie. read, write permission for user [...] |
| What are the Unix system calls for I/O? Posted: open(pathname,flag,mode) - open file creat(pathname,mode) - create file close(filedes) - close an open file read(filedes,buffer,bytes) - read data from an open file write(filedes,buffer,bytes) - write data to an open file lseek(filedes,offset,from) - position an open file dup(filedes) - duplicate an existing file descriptor dup2(oldfd,newfd) - duplicate to a desired file descriptor fcntl(filedes,cmd,arg) - change properties of an open file ioctl(filedes,request,arg) - change the behaviour [...] |
| Brief about the directory representation in UNIX ? Posted: A Unix directory is a file containing a correspondence between filenames and inodes. A directory is a special file that the kernel maintains. Only kernel modifies directories, but processes can read directories. The contents of a directory are a list of filename and inode number pairs. When new directories are created, kernel makes two entries [...] |
| Posted: All UNIX files have its description stored in a structure called ‘inode’. The inode contains info about the file-size, its location, time of last access, time of last modification, permission and so on. Directories are also represented as files and have an associated inode. In addition to descriptions about the file, the inode contains pointers [...] |
| How are devices represented in UNIX? Posted: All devices are represented by files called special files that are located in/dev directory. Thus, device files and other files are named and accessed in the same way. A ‘regular file’ is just an ordinary data file in the disk. A ‘block special file’ represents a device with characteristics similar to a disk (data transfer [...] |
| What does the following command line produce? Explain each aspect of this line ? Posted: $ (date ; ps -ef | awk ‘{print $1}’ | sort | uniq | wc -l ) >> Activity.log First let’s dissect the line: The date gives the date and time as the first command of the line, this is followed by the a list of all running processes in long form with UIDs listed first, [...] |
| What is the most graceful way to get to run level single user mode? Posted: The most graceful way is to use the command init s. If you want to shut everything down before going to single user mode then do init 0 first and from the ok prompt do a boot -s. |
| Write a command to find all of the files which have been accessed within the last 30 days ? Posted: This command will find all the files under root, which is ‘/’, with file type is file. ‘-atime -30′ will give all the files accessed less than 30 days ago. And the output will put into a file call December.files. |
| What is the main advantage of creating links to a file instead of copies of the file? Posted: The main advantage is not really that it saves disk space (though it does that too) but, rather, that a change of permissions on the file is applied to all the link access points. The link will show permissions of lrwxrwxrwx but that is for the link itself and not the access to the file [...] |
| Posted: LILO stands for Linux boot loader. It will load the MBR, master boot record, into the memory, and tell the system which partition and hard drive to boot from. |
| What is CVS? List some useful CVS commands.(Asked by Silicon Magic Corp.people) Posted: CVS is Concurrent Version System. It is the front end to the RCS revision control system which extends the notion of revision control from a collection of files in a single directory to a hierarchical collection of directories consisting of revision controlled files. These directories and files can be combined together to form a software [...] |
| What is NFS? What is its job?(Asked by Silicon Magic Corp. people) Posted: NFS stands for Network File System. NFS enables filesystems physically residing on one computer system to be used by other computers in the network, appearing to users on the remote host as just another local disk. |
| In Unix OS, what is the file server? (Asked by Silicon Magic Corp. people) Posted: The file server is a machine that shares its disk storage and files with other machines on the network. |
| Posted: We can use two major techniques to handle the collisions. They are open addressing and separate chaining. In open addressing, data items that hash to a full array cell are placed in another cell in the array. In separate chaining, each array element consist of a linked list. All data items hashing to a given [...] |
| What is the major advantage of a hash table? (Asked by Silicon Magic Corp. people) Posted: The major advantage of a hash table is its speed. Because the hash function is to take a range of key values and transform them into index values in such a way that the key values are distributed randomly across all the indices of a hash table. |
Wednesday, February 11, 2009
TECHNICAL QUESTIONS
Subscribe to:
Post Comments (Atom)



No comments:
Post a Comment