GATE Questions

Q:

If you are using C language to implement the heterogeneous linked list, what pointer type will you use?

Answer

The heterogeneous linked list contains different data types in its nodes and we need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of storing pointer to any type as it is a generic pointer type.

Report Error

View answer Workspace Report Error Discuss

Subject: Database Exam Prep: GATE
Job Role: Database Administration

0 1947
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 2773
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 5584
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 4459
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 2909
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 3204
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 4197
Q:

Which among the following is a system call used for process management

A) fork() B) exec()
C) getppid() D) All the above
 
Answer & Explanation Answer: D) All the above

Explanation:

All the above listed are the System calls for process management

Report Error

View Answer Report Error Discuss

Filed Under: Operating Systems
Exam Prep: GATE
Job Role: Software Architect

0 4369