YouTube Icon

Interview Questions.

Top 100+ Unix Process Management Interview Questions And Answers - Jun 02, 2020

fluid

Top 100+ Unix Process Management Interview Questions And Answers

Question 1. What Is A Daemon? 

Answer : 

A daemon is a procedure that disengages itself from the terminal and runs, separated, out of sight, sitting tight for solicitations and reacting to them. It can likewise be characterized as the foundation procedure that doesn't have a place with a terminal meeting. Numerous framework capacities are regularly performed by daemons, including the sendmail daemon, which handles mail, and the NNTP daemon, which handles USENET news. Numerous different daemons may exist. 

Probably the most widely recognized daemons are: 

init: Takes over the fundamental running of the framework when the portion has completed the boot procedure. 

inetd: Responsible for beginning system benefits that don't have their own independent daemons. For instance, inetd as a rule deals with approaching rlogin, telnet, and ftp associations. 

cron: Responsible for running tedious assignments on a standard timetable. 

Question 2. What Is "ps" Command For? 

Answer : 

The "ps" order prints the procedure status for a few or the entirety of the running procedures. The data given are the procedure recognizable proof number (PID),the measure of time that the procedure has taken to execute so far and so forth. 

UNIX/XENIX Interview Questions 

Question 3. How Would You Kill A Process? 

Answer : 

The "execute" order accepts the PID as one contention; this recognizes which procedure to end. The PID of a procedure can be got utilizing "ps" order. 

Question 4. What Is An Advantage Of Executing A Process In Background? 

Answer : 

The most widely recognized motivation to place a procedure out of sight is to permit you to accomplish something different intuitively without trusting that the procedure will finish. Toward the finish of the order you include the unique foundation image, and. This image advises your shell to execute the provided order out of sight. 

Model: cp *.* ../backup& (cp is for duplicate) 

Apache Hive Tutorial 

Question 5. How Do You Execute One Program From Within Another? 

Answer : 

The framework calls utilized for low-level procedure creation are "execlp()" and "execvp()". The "execlp()" consider overlays the current program with the upgraded one, runs that and exits. The first program gains back power just when a blunder happens. 

execlp(path,file_name,arguments..);/last contention must be NULL 

A variation of "execlp()" called "execvp()" is utilized when the quantity of contentions isn't known ahead of time. 

execvp(path,argument_array);/contention exhibit ought to be ended by NULL 

Apache Hive Interview Questions 

Question 6. What Is Ipc? What Are The Various Schemes Available? 

Answer : 

The term IPC (Inter-Process Communication) depicts different ways by which distinctive procedure running on some working framework convey between one another. 

Different plans accessible are as per the following: 

Funnels: One-way correspondence conspire through which distinctive procedure can convey. The issue is that the two procedures ought to have a typical progenitor (parent-kid relationship). Anyway this issue was fixed with the presentation of named-pipes (FIFO). 

Message Queues : Message lines can be utilized among related and disconnected procedures running on a machine. 

Mutual Memory: This is the quickest of all IPC plans. The memory to be shared is mapped into the location space of the procedures (that are sharing). The speed accomplished is credited to the way that there is no portion contribution. In any case, this plan needs synchronization. 

Different types of synchronization are mutexes, condition-factors, read-compose locks, record-bolts, and semaphores. 

Question 7. How Might You Get/set An Environment Variable From A Program? 

Answer : 

Getting the estimation of a situation variable is finished by utilizing "getenv()". 

Setting the estimation of a situation variable is finished by utilizing "putenv()" 

Hadoop MapReduce Tutorial Hadoop MapReduce Interview Questions 

Question 8. By what means Can A Parent And Child Process Communicate? 

Answer : 

A parent and youngster can convey through any of the typical between process correspondence plans (pipes, attachments, message lines, shared memory), yet additionally have some extraordinary approaches to impart that exploit their relationship as a parent and kid. One of the most clear is that the parent can get the leave status of the youngster. 

Question 9. What Is A Zombie? 

Answer : 

At the point when a program forks and the youngster completes before the parent, the piece despite everything keeps a portion of its data about the kid on the off chance that the parent may require it - for instance, the parent may need to check the kid's leave status. To have the option to get this data, the parent calls 'wait()'; In the span between the youngster ending and the parent calling 'wait()', the kid is supposed to be a 'zombie' (If you do 'ps', the kid will have a 'Z' in its status field to demonstrate this.) 

Apache Pig Interview Questions 

Question 10. What Are The Process States In Unix? 

Answer : 

As a procedure executes it changes state as indicated by its conditions. Unix forms have the accompanying states: 

Running : The procedure is either running or it is prepared to run . 

Holding up : The procedure is sitting tight for an occasion or for an asset. 

Halted : The procedure has been halted, typically by accepting a sign. 

Zombie : The procedure is dead yet have not been expelled from the procedure table. 

Apache Pig Tutorial 

Question 11. What Happens When You Execute A Program? 

Answer : 

At the point when you execute a program on your UNIX framework, the framework makes a unique situation for that program. This condition contains everything required for the framework to run the program as though no other program were running on the framework. 

Each procedure has process setting, which is everything that is extraordinary about the condition of the program you are right now running. Each time you execute a program the UNIX framework does a fork, which plays out a progression of tasks to make a procedure setting and afterward execute your program in that specific circumstance. 

The means incorporate the accompanying: 

Assign a space in the process table, a rundown of as of now running projects kept by UNIX. 

Appoint a one of a kind procedure identifier (PID) to the procedure. 

iCopy the setting of the parent, the procedure that mentioned the producing of the new procedure. 

Return the new PID to the parent procedure. This empowers the parent procedure to look at or control the procedure straightforwardly. 

After the fork is finished, UNIX runs your program. 

Unix Inter-Process Communication (IPC) Interview Questions 

Question 12. What Happens When You Execute A Command? 

Answer : 

At the point when you enter "ls" order to take a gander at the substance of your present working index, UNIX does a progression of things to make a domain for "ls" and the run it: The shell has UNIX play out a fork. This makes another procedure that the shell will use to run the ls program. The shell has UNIX play out an executive of the "ls" program. 

This replaces the shell program and information with the program and information for "ls" and afterward begins running that new program. The "ls" program is stacked into the new procedure setting, supplanting the content and information of the shell. The "ls" program plays out its undertaking, posting the substance of the present catalog. 

UNIX/XENIX Interview Questions 

Question 13. Brief About The Initial Process Sequence While The System Boots Up.? 

Answer : 

While booting, unique procedure called the 'swapper' or 'scheduler' is made with Process-ID 0. The swapper oversees memory portion for procedures and impacts CPU allotment. 

The swapper inturn makes 3 kids: 

the procedure dispatcher, 

vhand and 

dbflush 

with IDs 1,2 and 3 separately. 

This is finished by executing the record "/and so on/init". Procedure dispatcher brings forth the shell. Unix monitors all the procedures in an inner information structure called the Process Table (posting order is ps - el). 

Unix/Linux Tutorial 

Question 14. What Are Various Ids Associated With A Process? 

Answer : 

Unix distinguishes each procedure with a special whole number called ProcessID. The procedure that executes the solicitation for production of a procedure is known as the 'parent procedure's whose PID is 'Parent Process ID'. Each procedure is related with a specific client called the 'proprietor' who has benefits over the procedure. 

The recognizable proof for the client is 'UserID'. Proprietor is the client who executes the procedure. Procedure likewise has 'Powerful User ID' which decides the entrance benefits for getting to assets like records. 

getpid() - process id 

getppid() - parent process id 

getuid() - client id 

geteuid() - viable client id 

Question 15. Clarify Fork() System Call.? 

Answer : 

The 'fork()' used to make another procedure from a current procedure. The new procedure is known as the youngster procedure, and the current procedure is known as the parent. We can tell which will be which by checking the arrival esteem from 'fork()'. The parent gets the youngster's pid came back to him, yet the kid gets 0 came back to him. 

UNIX Memory Management Interview Questions 

Question 16. Foresee The Output Of The Following Program Code.?<br> Main() <br> { <br> Fork(); <br> Printf("hello World!"); <br> } 

Answer : 

Hi World!Hello World! 

Clarification: The fork makes a youngster that is a copy of the parent procedure. The kid starts from the fork(). All the announcements after the call to fork() will be executed twice.(once by the parent procedure and other by youngster). The announcement before fork() is executed uniquely by the parent procedure. 

Unix attachment Tutorial 

Question 17. Foresee The Output Of The Following Program Code?<br> Main() <br> { <br> Fork(); Fork(); Fork(); <br> Printf("hello World!"); <br> } 

Answer : 

"Hi World" will be printed multiple times. 

Clarification: 2^n occasions where n is the quantity of calls to fork(); 

Hadoop Distributed File System (HDFS) Interview Questions 

Question 18. Rundown The System Calls Used For Process Management: 

Answer :

Framework calls - Description 

fork() - To make another procedure 

executive() - To execute another program in a procedure 

pause() - To hold up until a made procedure finishes its execution 

exit() - To exit from a procedure execution 

getpid() - To get a procedure identifier of the present procedure 

getppid() - To get parent process identifier 

decent() - To predisposition the current need of a procedure 

brk() - To build/decline the information section size of a procedure 

Apache Hive Interview Questions 

Question 19. By what method Will You Run A Process In Background? In what capacity Will You Bring That Into Foreground And How Will You Kill That Process? 

Answer : 

For running a procedure in foundation in order line use "and". For bringing it back in frontal area order line use "fg jobid" and for landing position id we use order "employments", for murdering that procedure discover PID and we use execute - 9 PID order. 

Unix makefile Tutorial 

Question 20. How Do You Know If A Remote Host Is Alive Or Not? 

Answer : 

We can check these by utilizing either telnet or ping order in UNIX. 

Linux File Systems Interview Questions 

Question 21. How Do You See Command Line History In Unix? 

Answer : 

We use history order alongside grep order in unix to locate any important order we have just executed. 

Question 22. How Do You Copy File From One Host To Other? 

Answer : 

By utilizing "scp" order we can duplicate record from one host to other. we can likewise utilize rsync order . 

Question 23. How Do You Find Which Process Is Taking How Much Cpu? 

Answer : 

By utilizing "top" order in UNIX we can discover process is taking the amount CPU. 

Unix/Linux Interview Questions 

Question 24. How Do You Check How Much Space Left In Current Drive? 

Answer : 

By utilizing "df" order in UNIX we can check how much space left in current drive. 

Hadoop MapReduce Interview Questions 

Question 25. How Might We Get And Set An Environment Variable From A Program? 

Answer : 

By utilizing "getenv()"getting the estimation of a situation variable is finished. 

By utilizing "putenv()"Setting the estimation of a domain variable is finished. 

Question 26. What Is "ps" Command For? 

Answer : 

The "ps" commandis utilized for printing the procedure status for a few or the entirety of the running procedures. The data given are the procedure ID number (PID),the measure of time that the procedure has taken to execute so far and so on. 

Unix attachment Interview Questions




CFG