14 March 2014

Basic Linux MCQ Questions for Beginners (Linux Processes) - Set 6


linux Question and answer in linux
This is set 6 in the ongoing series of MCQ. Hope you have enjoyed the other parts of the series. In this set we will cover questions related to Linux processes as processes are fundamental part of the Linux system. So lets get started


What is ppid(parent process id) of daemon process in Linux ?

any arbitrary number


Option B is correct, As daemon process are initiated by init process(Pid is 1). You can see all your system daemon process by running following command
$ cd /etc/init.d && ls
See all your currently running daemon process by executing following command
$ ps -ef | awk '$3 == 1'


What is context switch?

Process switches from user mode to kernel mode

Process switches from kernel mode to user mode

Kernel switches from one process to another process

None of these

When kernel switches from one process to another process, then this process of switching is known as context switch. On context switch kernel save the state of the process, so when it switch back to that process, it can start it from the point it left it.


Maximum number of processes exist in Linux system ?





Option A is correct. Number of process in a Linux system depends upon the highest value that can be assigned to the process. By default in linux it is 32768. You can check it by running following command
$ cat cat /proc/sys/kernel/pid_max


Which of the following command keep a process running even after you logout from your shell?





nohup is a command which keeps your process running in background even after you logout from shell. Use nohup as follows
$ nohup process_name &
Note: & used to run process in background, so above process will run background and it will continue to do so even after you logout from system.


What is the range of nice number in linux system ?

0 to 19

-20 to 19

-20 to 0

-10 to 10

Option B is correct. In linux priority of a process is indicated by nice number ranges from -20 to +19. Lesser the value of nice, greater the priority of the process. You can see nice value of process by running following command.
$ ps -efl
Note: Field NI indicates the nice value of that process


On success fork return ______ to parent process ?



parent process id

child process Id

Option D is correct answer.


Which of the following command kill all the process including shell ?

kill kill 0

kill -9 kill 0

kill -s kill 0

Both B and C

Option D is correct.


Which of the following statement is true ?

echo $$ return PID of login shell and echo $? return status of last command

echo $$ return status of last command and echo $? return PID of login shell

echo $$ and echo $? return some integer value of no significance

All of the statements are false

Option A is true. $$ and $? are shell variables which return PID of login shell and status of last command respectively.
$ echo $$
$ echo $?


Priority of the process can be changed using which of the following command ?




Not allowed to change process priority

Option C is correct. We can change process priority using renice command
$ renice -n nice_value -p process_id(s)


In _______ state of a process, the process will be terminated and the information will still be available in the process table.





option C is correct.
When process die it immediately moves to zombie state. It remains in this state until the parent picks up the child's exist status from the process table. A zombie process is a harmless dead child but you can't kill it. You can kill it by killing its parent process.

That's it. Let me know your suggestion and feedback in comment section.
Hope you Enjoyed the MCQ :)

If You Liked This Post Please Take a Time To Share This Post

You May Also Like...


  1. This is the inquiries and answers segment on Linux with clarification for different meeting, aggressive examination and passageway test. Explained illustrations with point by point answer depiction, clarification are given and it is straightforward.

    Kochi to munnar taxi

  2. Questions on Linux was really very interesting to read about. i just loved the way author described each and everything in detail. thanks for sharing such an amazing post.
    Engineering Colleges In Chennai, Nautical Science Colleges In Chennai

  3. Such a great info provided in this post. Keep providing useful post in this blog .I appreciate author for this specific valuable post. Culinary Schools in Dubai , International Centre for Culinary Arts

  4. This blog is having the general information. Got a creative work and this is very different one.We have to develop our creativity mind.This blog helps for this. Thank you for this blog. This is very interesting and useful.

    Informatica Training in Chennai

  5. Great post!I am actually getting ready to across this information,i am very happy to this commands.Also great blog here with all of the valuable information you have.Well done,its a great knowledge.

    AWS Training in Chennai

  6. Great post! I am actually getting ready to across this information, It's very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.

    Fresher Jobs in Mumbai
    Fresher Jobs in Pune
    Fresher Jobs in Noida
    Fresher Jobs in Hyderabad

  7. Really it was an awesome article...very interesting to read..You have provided an nice article....Thanks for sharing..
    Android Training in Chennai
    Ios Training in Chennai

  8. Good information very useful blog post for learners. For the
    Linux Online Training by Real Time Expert, if Interested Contact us for free software training tutorials

  9. This comment has been removed by the author.

  10. This comment has been removed by the author.

  11. Informative Blog... Thank you for giving us such a good detailed information, it helps me and motivates me in choosing my field in IT industry. I learn my basics from programming assignments help is the best assignment help provider in the United Kingdom. Programming assignment help Our Computer Programming Assignment Help UK is especially dedicated for the students studying in all UK colleges and universities. Submit assignment to get the best quality assignment help.
    Computer network assignment help
    Object Oriented Programming
    database assignment help

  12. Welcome to the Best writer Review, Here you can get the best All Assignment Help reviews sites. We strongly urge you to check our entire website once and we will assure you will find this review website very useful. Our hard work will be rewarded if students like you will appreciate our effort and spread the message about this site with your class-fellows and friends.