An operating system co-created by AT&T researchers Dennis Ritchie and Ken Thompson. Unix is well known for its relative hardware independence and portable application interfaces. Lots of big companies are using Unix servers for its reliability and scalability. Some of the popular Unix flavours are: Linux, Solaris, HP-UX, AIX, etc.
The Open Group holds the definition of what a UNIX system is and its associated trademark in trust for the industry.
The UNIX* operating system was designed to let a number of programmers access the computer at the same time and share its resources.
The operating system coordinates the use of the computer's resources, allowing one person, for example, to run a spell check program while another creates a document, lets another edit a document while another creates graphics, and lets another user format a document -- all at the same time, with each user oblivious to the activities of the others.
The operating system controls all of the commands from all of the keyboards and all of the data being generated, and permits each user to believe he or she is the only person working on the computer.
This real-time sharing of resources make UNIX one of the most powerful operating systems ever.
Unix OS Interviews are getting tough these days as the technology grows faster. To get through the Unix OS interview one needs to update him/herself in a regular manner. Having said that, just before the interview, it is very important to have a quick glance of the reputed Unix OS questions and answers to make yourself comfortable during the interview process. This is where DoAnswers.com helps you in renewing yourself on Unix OS and various other technologies interview preparation.
21. Explain the layered aspect of a UNIX system. What are the layers? What does it mean to say they are layers?
A UNIX system has essentially three main layers: ? The hardware ? The operating system kernel ? The user-level programs The kernel hides the system?s hardware underneath an abstract, high-level programming interface. It is responsible for implementing many of the facilities that users and user-level programs take for granted. The kernel assembles all of the following UNIX concepts from lower-level hardware features: ? Processes (time-sharing, protected address space) ? Signals and semaphores ? Virtual Memory (swapping, paging, and mapping) ? The filesystem (files, directories, namespace) ? Pipes and network connections (inter-process communication)
22. Explain the steps that a shell follows while processing a command.
After the command line is terminated by the key, the shel goes ahead with processing the command line in one or more passes. The sequence is well defined and assumes the following order. Parsing: The shell first breaks up the command line into words, using spaces and the delimiters, unless quoted. All consecutive occurrences of a space or tab are replaced here with a single space. Variable evaluation: All words preceded by a $ are avaluated as variables, unless quoted or escaped. Command substitution: Any command surrounded by backquotes is executed by the shell which then replaces the standard output of the command into the command line. Wild-card interpretation: The shell finally scans the command line for wild-cards (the characters *, ?, [, ]). Any word containing a wild-card is replaced by a sorted list of filenames that match the pattern. The list of these filenames then forms the arguments to the command. PATH evaluation: It finally looks for the PATH variable to determine the sequence of directories it has to search in order to hunt for the command.
23. Explain the unix file system.
Basically there are 4 diiferent types of file systems in unix ,they are as follows 1.Device file 2.Directory fil. 3.FIFO 4.Regular file Unix:-There are two file system t.e exe1,exe2 Solaris:-Three types file system a)Disk base file system ufs(unix file system),HSFS(High sierra file system),PCFS,UFS(Universal file system) b)NFS(Network file system) c)Pseduo or vartual file system
24. Explain the working of Virtual Memory.
Virtual memory like as a temparary storage areAnswer:It consists of page table.In this pages are divided into frames.It is a contingous memroy allocation.It is also called logical memory. Memory contents that appear to be in contiguous addresses, but are actually mapped to different physical memory locations by hardware action of the translation lookaside buffer (TLB) and page tables.
25. Give examples of how memory leaks can occur with c programs
a memory leak occurs when mem is allocated but never freed . leakes can b caused by using malloc() without using any free(). but leaks can also be caused if a pointer to dynamically allocated memory is delleted overwritten , it can be caused when allocated mem is overwritten accidentally
26. How Connect to a Database in Shell Programming?Please tell me Step by Step
To Connect to Oracle Database and Collect the data in to text file from the table.echo "Enter User Name "read nameecho "Enter passwd "stty -echoread passstty echoecho "Enter Detp no"read dnosqlplus -S $name@oracle/$pass< Suppose you are using db2 and ksh #!/usr/bin/ksh connect to :@ user using ----------------------------------- If u have profile and catalog then ---------------------------------- #!/usr/bin/ksh db2 connect to ----------------------------------- To run a sample proc .. use the below db2 ""
27. How do u determine disk usage?
The disk usage can be determined by using the command,du.THis command outputs the number of kilobytes used by each sub-directory.
28. How do you debug a core dump
dbx-core-'exename' If you want to migrate a 32 bit application to a 64 bit os, what all would you check I am assuming the question is - port 32 bit appl to 64 bit os. This can a simple checklist of things one can check for - 1. Int, long will be 64 bits so care should be taken to see if there are any comparisons or allocations that assume a certain fixed amount of Memory 2. short is 32 bit and long long are 128 bit - conversion and assignment issues around mixing ints with longlongs / shorts and ints 3. ptr* is 64 bit, make sure things are properly aligned (in some OSes where alignment is a concern) 4. if the 32 appl has to run as is in a 64 bit machine then care should be taken to do so(coexistence of 32 and 64 bit application) 5. compilers and makefile issues should be handled
29. How do you find out drive statistics ?
iostat -E
30. How do you kill the process
kill -9