3i Infotech Papers: Sample Questions 297 - 298 of 1245

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 297

» Database » MySQL

Essay Question▾

Describe in Detail

What is the difference between “procedure” and “function” procedure?


Difference between procedure and function

Difference between procedure and function



  • Procedure may or may not return a value or may return more than one value using the OUT parameter.

  • Function is mainly used in the case where it must return a value.

  • Procedure can not be called from the sql statements

  • Function can be called from SQL statements

  • Procedures are normally used for executing business logic.

  • Functions are normally used for computations

  • Procedure can return multiple values (max 1024).

  • Function returns 1 value only.

  • Procedure returns always integer value by default zero

  • Function return type could be scalar or table or table values

  • Procedure is precompiled execution plan

  • Functions are not precompiled execution plan

  • A procedure may modify an object

  • Function can only return a value.

Question number: 298

» Operating System » Unix

Essay Question▾

Describe in Detail

What is a zombie?


  • Process that has completed execution but still retains entry in the process table.

  • At end of the process, every memory resource is deallocated and can be used by other processes, however, entry of the process remains unavailable.

  • When exit status of a child is read by the parent using the wait system call- zombie can be removed.

  • Ones the zombie is removed, the process id in the process table is removed and reused.

  • Zombie state finishes when the parent dies.

  • Zombie processes accumulate in the system when parent process is not programmed properly and never calls wait () -zombine children remain in the memory.