0

UNIX Programming

Description: Information Technology
Number of Questions: 25
Created by:
Tags: UNIX Programming
Attempted 0/25 Correct 0 Score 0

Which of the following is a component that on one side manages and controls the hardware and on the other manages the applications?

  1. Operating system

  2. Process

  3. Kernel

  4. Bootstrapping


Correct Option: A
Explanation:

Operating system is a component that on one side manages and controls the hardware and on the other manages the applications.

____________ command is used for creating a File system.

  1. ext2

  2. hsfs

  3. bfs

  4. mkfs


Correct Option: D
Explanation:

The mkfs command is used for creating a file system. The exit code returned by mkfs is 0 on success and 1 on failure.

Which of the following determines the order in which file systems should be checked?

  1. dumpfreq

  2. passno

  3. mount-point

  4. none of these


Correct Option: B
Explanation:

This determines the order in which file systems should be checked.

Which of the following runs as process 0 on SVR5 system and can be used to set priority for real processes so that they can be given fast access to the kernel?

  1. sched

  2. swapper

  3. page daemon

  4. init


Correct Option: A
Explanation:

The sched runs as process 0 on SVR5 system and can be used to set priority for real processes so that they can be given fast access to the kernel.

___________ command lists the value of the environment variable called VAR_NAME.

  1. env

  2. env $VAR_NAME

  3. setenv VAR_NAME new_value

  4. unsetenv VAR_NAME


Correct Option: B
Explanation:

This command lists the value of the environment variable called VAR_NAME. The $ sign is necessary when a variable's value is being requested.

Which of the following fields refers to the total number of pages in the process?

  1. TTY field

  2. COMD field

  3. SZ field

  4. PRI field


Correct Option: C
Explanation:

This is the size field, which refers to the total number of pages in the process.

Which of the following process attributes is an unique number that defines the process within the kernel?

  1. PID

  2. PPID

  3. EUID

  4. EGID


Correct Option: A
Explanation:

PID stands for the process identification. This is an unique number that defines the process within the kernel.

______________ attribute is an User ID number of the user that owns this process.

  1. EUID

  2. UID

  3. GID

  4. EGID


Correct Option: B
Explanation:

This attribute is an User ID number of the user that owns this process.

A shared memory segment can be allocated, using ____________ system call.

  1. msgrcv()

  2. semget()

  3. shmget()

  4. none of these


Correct Option: C
Explanation:

 A shared memory segment can be allocated, using shmget() system call.

Which state of the process means the process is waiting to become available?

  1. S state

  2. X state

  3. R state

  4. None of these


Correct Option: B
Explanation:

This means the process is waiting to become available.

Which of the following is the basic way to create a new process?

  1. fork() system call

  2. pipe() system call

  3. msgrcv() system call

  4. semget() system call


Correct Option: A
Explanation:

The fork() system call is the basic way to create a new process.

Which system call causes the current process to be split into two processes - a parent and a child?

  1. pipe() system call

  2. fork() system call

  3. msgget() system call

  4. msgrcv() system call


Correct Option: B
Explanation:

This system call causes the current process to be split into two processes - a parent and a child.

The _______ control character is used to signal the end of input.

  1. eof

  2. kill

  3. eraser

  4. none of these


Correct Option: A
Explanation:

The eof control character is used to signal the end of input. The letter 'eof' come from end of file. 

Which of the following UNIX commands is a powerful tool that gives complete online access to the UNIX manual?

  1. Man

  2. Exit

  3. Cat

  4. None of these


Correct Option: A
Explanation:

The UNIX command 'Man' is a powerful tool that gives complete online access to the UNIX manual.

Which of the following control characters allows you to back up over typing mistakes?

  1. Eraser

  2. Kill

  3. Eof

  4. Stop and start


Correct Option: B
Explanation:

 The Kill control character allows you to back up over typing mistakes. Whereas, Eraser backs up one character at a time. Kill backs up all the way to the prompt.

___________ command takes any character from standard input, and then echoes them to standard output.

  1. Exit

  2. Cat

  3. Man

  4. None of these


Correct Option: B
Explanation:

Cat command takes any character from standard input , and then echoes them to standard output.

Which of the following UNIX file system types contains text, data or program information?

  1. Ordinary files

  2. Directories

  3. Devices

  4. Link


Correct Option: A
Explanation:

Ordinary files contain text, data or program information.

_________ are containers or folders that hold files and other directories.

  1. Link

  2. Directories

  3. Ordinary files

  4. None of these


Correct Option: B
Explanation:

Directories are containers or folders that hold files and other directories.

 
 
 

Which of the following directories can be referred to by the . (full stop) character and refers to actual location in the file store hierarchy?

  1. Home directory

  2. Parent directory

  3. Current directory

  4. None of these


Correct Option: C
Explanation:

The Current directory can be referred to by the . (full stop) character and it refers to your actual location in the file store hierarchy.

____________link to a file is indistinguishable from the file itself.

  1. Hard

  2. Soft

  3. Directory

  4. None of these


Correct Option: A
Explanation:

Hard link to a file is indistinguishable from the file itself.

UNIX provides each user his own directory known as _____________. Within this, the users can store their own files and create directories.

  1. current directory

  2. home directory

  3. parent directory

  4. none of these


Correct Option: B
Explanation:

UNIX provides each user his own directory known as home directory. Within this, the users can store their own files, and create directories.

 
 
 

Which device transfers data on a byte-by-byte basis?

  1. Block-oriented

  2. Character-oriented

  3. Soft link

  4. None of these


Correct Option: B
Explanation:

Character-oriented device transfers data on a byte-by-byte basis.

______________ is the process of starting up a computer from a halted or powered-down condition.

  1. Hardware management

  2. Process management

  3. Bootstrapping

  4. None of the above


Correct Option: C
Explanation:

This is the process of starting up a computer from a halted or powered-down condition.

In UNIX system, which of the following contains the barebones UNIX-the root directory and all the tools and utilities that are just adequate to keep the system booted in single-user mode?

  1. Root file system

  2. Swap file system

  3. Bootstrapping

  4. None of the above


Correct Option: A
Explanation:

The root file system should be present in every UNIX system. It contains the barebones UNIX-the root directory and all the tools and utilities that are just adequate to keep the system booted in single-user mode.

The ___________ daemon runs as process 0 on BSD systems. It manages the physical memory by moving the process from physical memory to swap space when more physical memory is needed.

  1. bfs

  2. init

  3. swapper

  4. none of the above


Correct Option: C
Explanation:

The swapper daemon runs as process 0 on BSD systems. It manages the physical memory by moving the process from physical memory to swap space when more physical memory is needed.

 

- Hide questions