Sail E0 Webinar

MCQs

Total Questions : 14 | Page 1 of 2 pages
Question 1. Which of these is returned by operators &, ?
  1.    Integer
  2.    Boolean
  3.    Character
  4.    Float
 Discuss Question
Answer: Option C. -> Character


Character


Question 2. Literals in java must be preceded by which of these?
  1.    L
  2.    l
  3.    D
  4.    both a & b
 Discuss Question
Answer: Option D. -> both a & b


both a & bData type long literals are appended by an upper or lowercase L.


Question 3. Literal can be of which of these data types?
  1.    integer
  2.    float
  3.    boolean
  4.    all of the mentioned
 Discuss Question
Answer: Option D. -> all of the mentioned


all of the mentioned


Question 4. Which of these can not be used for a variable name in Java?
  1.    identifier
  2.    keyword
  3.    both a < b
  4.    None of the mentioned
 Discuss Question
Answer: Option B. -> keyword


keywordKeywords are specially reserved words which can not be used for naming a user defined variable, example : class, int, for etc.


Question 5. A system is in a ______ state if there exists a set of transactions such that every transaction in the set is waiting for another transaction in the set.
  1.    Idle
  2.    Waiting
  3.    Deadlock
  4.    Ready
 Discuss Question
Answer: Option C. -> Deadlock


DeadlockWhen one data item is waiting for another data item in a transaction then system is in deadlock.


Question 6. The deadlock state can be changed back to stable state by using _____________ statement.
  1.    Commit
  2.    Rollback
  3.    Savepoint
  4.    Deadlock
 Discuss Question
Answer: Option B. -> Rollback


RollbackRollback is used to rollback to the point before lock is obtained.


Question 7. What are the ways of dealing with deadlock ?
  1.    Deadlock prevention
  2.    Deadlock recovery
  3.    Deadlock detection
  4.    All of the mentioned
 Discuss Question
Answer: Option D. -> All of the mentioned


All of the mentionedDeadlock prevention is also called as deadlock recovery.Prevention is commonly used if the probability that the system would enter a deadlock state is relatively high; otherwise, detection and recovery are more efficient.


Question 8. When transaction Ti requests a data item currently held by Tj , Ti is allowed to wait only if it has a timestamp smaller than that of Tj (that is, Ti is older than Tj ). Otherwise, Ti is rolled back (dies). This is
  1.    Wait-die
  2.    Wait-wound
  3.    Wound-wait
  4.    Wait
 Discuss Question
Answer: Option A. -> Wait-die


Wait-dieThe wait“die scheme is a non-preemptive technique.


Question 9. When transaction Ti requests a data item currently held by Tj , Ti is allowed to wait only if it has a timestamp larger than that of Tj (that is, Ti is younger than Tj ). Otherwise, Tj is rolled back (Tj is wounded by Ti ). This is
  1.    Wait-die
  2.    Wait-wound
  3.    Wound-wait
  4.    Wait
 Discuss Question
Answer: Option C. -> Wound-wait


Wound-waitThe wound“wait scheme is a preemptive technique. It is a counterpart to the wait“die scheme.


Question 10. The deadlock in a set of transaction can be determined by
  1.    Read-only graph
  2.    Wait graph
  3.    Wait-for graph
  4.    All of the mentioned
 Discuss Question
Answer: Option A. -> Read-only graph


Read-only graphEach transaction involved in the cycle is said to be deadlocked.


Latest Videos

Latest Test Papers