NEWS & UPDATES >> BCA BCSP064 Synopsis & Project Work Started for DEC 2017, IGNOU MCA MCSP060 Synopsis Work Started for DEC 2017, CONTACT 4 IGNOU Mini Project

UNIX LINUX IMPORTANT QUESTION ANSWER PART 2

UNIX LINUX IMPORTANT QUESTION ANSWER

for IGNOU BCA MCA Students


10. What is the difference between Swapping and Paging?

Swapping:

Whole process is moved from the swap device to the main memory for execution. Process size must be less than or equal to the available main memory. It is easier to implementation and overhead to the system. Swapping systems does not handle the memory more flexibly as compared to the paging systems.
Paging:

Only the required memory pages are moved to main memory from the swap device for execution. Process size does not matter. Gives the concept of the virtual memory. It provides greater flexibility in mapping the virtual address space into the physical memory of the machine. Allows more number of processes to fit in the main memory simultaneously. Allows the greater process size than the available physical memory. Demand paging systems handle the memory more flexibly.



Intermediate UNIX Interview Questions Answers


1. What is difference between ps -ef and ps -auxwww?
This is indeed a good Unix Interview Command Question and I

have faced this issue while ago where one culprit process was not visible by execute ps ef command and we are wondering which process is holding the file.
ps -ef will omit process with very long command line while ps -auxwww will list those process as well.



2. How do you find how many cpu are in your system and there details?

By looking into file /etc/cpuinfo for example you can use below command:

cat /proc/cpuinfo



3. What is difference between HardLink and SoftLink in UNIX?

I have discussed this Unix Command Interview questions  in my blog post  difference between Soft link and Hard



4. What is Zombie process in UNIX? How do you find Zombie process in UNIX?

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 need it - for example, the parent may need to check the child's exit status. To be able to get this information, the parent calls 'wait()'; In the interval between the child terminating and the parent calling 'wait()', the child is said to be a 'zombie' (If you do 'ps', the child will have a 'Z' in its status field to indicate this.)
Zombie : The process is dead but have not been removed from the process table.



5. What is "chmod" command? What do you understand by this line "r-- -w- --x?



6. There is a file some where in your system which contains word "UnixCommandInterviewQuestions"

How will find that file in Unix?

By using find command in UNIX for details see here  10 example of using find command in Unix


7. In a file word UNIX is appearing many times? How will you count number?

grep -c "Unix" filename



8. How do you set environment variable which will be accessible form sub shell?

By using export   for example export count=1 will be available on all sub shell.



9. How do you check if a particular process is listening on a particular port on remote host?

By using telnet command for example "telnet hostname port", if it able to successfully connect then some process

is listening on that port. To read more about telnet read  networking command in UNIX


10. How do you find whether your system is 32 bit or 64 bit ?

Either by using "uname -a" command or by using "arch" command.





Advanced UNIX Interview Questions and Answers


1. How do you find which processes are using a particular file?



By using lsof command in UNIX. It wills list down PID of all the process which is using a particular file.



No comments:

Post a Comment