1
Q:

main()

{

fork();

 

printf(“Hello World!”);

}

Output for the above unix program is

A) Hello World! B) Hello World!Hello World!
C) Hello World D) None

Answer:   B) Hello World!Hello World!



Explanation:

The fork creates a child that is a duplicate of the parent process. The child begins from the fork().All the statements after the call to fork() will be executed twice.(once by the parent process and other by child). The statement before fork() is executed only by the parent process

Subject: Operating Systems
Exam Prep: GRE
Q:

Default read write and execute permissions given to a file for owner, group and others are

A) 6-4-4 B) 6-4-2
C) 6-4-6 D) 6-6-6
 
Answer & Explanation Answer: A) 6-4-4

Explanation:

Default permissions given to a file are:

Owner - read write and execute - 6

group - write - 4

others - write - 4

Report Error

View Answer Report Error Discuss

6 5119
Q:

What scheme does the Kernel in Unix System V follow while choosing a swap device among the multiple swap devices?

Answer

Kernel follows Round Robin scheme choosing a swap device among the multiple swap devices in Unix System V.

Report Error

View answer Workspace Report Error Discuss

Subject: Operating Systems Exam Prep: GATE

8 2733
Q:

A Map is an Array,which contains the addresses of the free space in swap device that are allocatable resources,and the number of the resource unit available there.

A) TRUE B) FALSE
Answer & Explanation Answer: A) TRUE

Explanation:

The given statement is clearly true.

Report Error

View Answer Workspace Report Error Discuss

Subject: Operating Systems
Exam Prep: GRE

2 3739
Q:

The PS command prints the process status for only some of the running processes.

A) TRUE B) FALSE
Answer & Explanation Answer: B) FALSE

Explanation:

The PS command prints the process status for some or all of the running processes

Report Error

View Answer Workspace Report Error Discuss

Subject: Operating Systems
Exam Prep: GATE

1 5514
Q:

Which among the following is not aprocess state in unix?

A) Running B) Runnable
C) Zombie D) Stopped
 
Answer & Explanation Answer: B) Runnable

Explanation:

The process states of unix are running,Zombie,stopped,Waiting.

Report Error

View Answer Report Error Discuss

Filed Under: Operating Systems
Exam Prep: GATE

7 4414
Q:

What is a zombie?

Answer

When a program forks and the child finishes before the parent, the kernel still keeps some of its information about the child in case the parent might need it – for example, the parent may need to check the child’s exit status. To be able to get this information, the parent calls `wait()’; In the interval between the child terminating and the parent calling `wait()’, the child is said to be a `zombie’ (If you do `ps’, the child will have a `Z’ in its status field to indicate this.)

Report Error

View answer Workspace Report Error Discuss

Subject: Operating Systems Exam Prep: GATE

1 2883
Q:

How can you get/set an environment variable from a program?

Answer

Getting the value of an environment variable is done by using `getenv()’. Setting the value of an environment variable is done by using `putenv()’

Report Error

View answer Workspace Report Error Discuss

Subject: Operating Systems Exam Prep: GATE

2 3170
Q:

getppid() system call is used to bias the existing priority of a process 

A) TRUE B) FALSE
Answer & Explanation Answer: B) FALSE

Explanation:

It is used to get parent process identifier

Report Error

View Answer Workspace Report Error Discuss

Subject: Operating Systems
Exam Prep: GATE

1 4148