Operating System [3i Infotech Placement]: Sample Questions 48 - 49 of 81

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

Question 48

Operating System
Edit

Describe in Detail

Essay▾

Discuss the mount and unmounts system calls.

Explanation

Understanding of Mount/Unmount

Mount

  • Mount system call makes a directory accessible by attaching a root directory of one file system to another directory.
  • In UNIX directories are represented by a tree structure and mounting attaches them to branches.
  • File system found on one device attaches itself to the main file-system tree- location in the system is called a mount point.

Example:

  • Mount:- t type device dir
  • Mounts the file system found on device “od” to the directory dir.

Unmounts

  • Unmount system calls does the opposite.
  • Unmounts the attached file from the mounts point.
  • A file in use by some process cannot be detached.

Question 49

Operating System
Edit

Write in Short

Short Answer▾

Predict the output of the following program code:

  1. main ()
  2. {
  3.     fork ();
  4.     printf (“HelloWorld!”);
  5. }

Explanation

  • Hello World! Hello World:
  • The fork creates a child that is a duplicate of the parent process.
  • The child begins from the fork () .
  • All the statements after fork () are executed twice (once by the parent and second time by child) .
  • The statement before fork () is executed only by the parent process.

Developed by: