Operating System-Unix [3i Infotech Placement]: Sample Questions 36 - 38 of 78

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 36

Edit

Write in Short

Short Answer▾

How would you kill a process?

Explanation

  • To kill a process first find the process identifier number or PID, then pass the PID to the kill command.
  • In Unix, a process may be running in the background, foreground, or in a suspended state.
  • The OS shell will not return the prompt to the end-user until the current executing process finishes.
  • To kill a process a signal can also be sent via keystroke.

Question 37

Edit

Describe in Detail

Essay▾

What Happens when you execute a command?

Explanation

  • When command is given then unix forks the shell creating a new process which executes the command using “exec” .
  • For example when command “ls” in given in the shell:

    fork () ;

    exec (ls) ;

  • Results are returned when the child process dies.
  • To execute a command shell will search the following regions
    • Physical memory
      • Alias
      • Functions
    • HDD
      • Builtin commands
      • Path
      • Execute permission
      • System calls FORK_EXEC_EXIT
  • When command is found it is executed with given info.

Question 38

Edit

Write in Short

Short Answer▾

What are the entities that are swapped out of the main memory while swapping the process out of the main memory?

Explanation

  • All memory space occupied by the process, process՚s u-area, and kernel stack are swapped out.
  • If the process՚s u-area contains the address translation tables for the process then kernel does not swap the u-area.

Developed by: