Basic CS [Redpine Infotech Placement]: Sample Questions 11 - 12 of 13

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

Question 11

Basic CS

Question

MCQ▾

evaluates 18 then

  1. -left associative ⚹ has precedence over-
  2. -right associative ⚹ has precedence over-
  3. ⚹ left associative - has precedence over ⚹
  4. ⚹ right associative - has precedence over ⚹

Which is correct?

Choices

Choice (4)

a.

1

b.

3

c.

2

d.

4

Answer

d.

Explanation

Given,

Evaluates 18

Then,

The Algorithms

- has precedence over ⚹ and it associates from the right.

Question 12

Edit

Describe in Detail

Essay▾

What are the necessary conditions for deadlock?

Explanation

Given Deadlock Necessary Conditions

Mutual Exclusion Condition:

  • One resource is held in a non-sharable mode, that is, only one process at a time can use the resource.
  • If another process requests that resource, the requesting process must be delayed until the resource is released.

Hold and Wait Condition:

  • Requesting process holds resources while waiting for other requested resources.
  • There must exist a process that is holding a resource already allocated to it while waiting for additional resources that are currently being held by other processes.

No-Pre-emption Condition:

  • Resources already allocated to a process cannot be pre-empted.
  • Resources cannot be removed from the processes- they are used till completion or released voluntarily by the process holding it.

Circular Wait Condition:

  • The processes in the system form a circular list or chain where each process in the list is waiting for a resource held by the next process in the list.

Developed by: