What is a deadlock ? Explain .

1 Answer

Answer :

Two processes wating to update the rows of a table which are locked
by the other process then deadlock arises. In a database environment
this will often happen because of not issuing proper row lock
commands. Poor design of front-end application may cause this
situation and the performance of server will reduce drastically.
These locks will be released automatically when a commit/rollback
operation performed or any one of this processes being killed
externally.

Related questions

Description : Explain deadlock? What are necessary conditions for deadlock?

Last Answer : In multiprogramming environment, several processes may compete for a finite number of resources. A process requests resources and if the resources are not available then the process enters into the ... Each process is waiting for the resources held by other waiting processes in circular form.

Description : Explain the term ‘Deadlock’. State reason of occurance.

Last Answer : A deadlock is a situation where in two or more competing actions are each waiting for the other to finish, and thus neither ever does.  * Assume thread/process T1 has exclusive access to resource R1. ... P1 to Pn P1 waiting for the resource held by P2, P2 waiting for resource held by P3 etc.

Description : If Macedonia's current political deadlock led to political destabilization, would Serbia step in?

Last Answer : Not likely, but we like to stick our nose in everything, so….

Description : What is the procedure adopted for resolving deadlock -SST 10th

Last Answer : The Bill goes for assent to the President. If the President returns the Bill for its reconsideration and Parliament repassess it again, the President has to give his assent to the Bill and it is considered as passed.

Description : Prime Minister Attlee’s announcement on February 20, 1947, was attempted to end the deadlock in India and marked the last few months of British Rule. -SST 10th

Last Answer : The Congress and the Muslim League could not work together for long. The Muslim League went on harping on its demand for division of India. Jinnah said, We shall resist anything that militates ... one Government. (iii) Lord Mountbatten was to replace Lord Wavell as the new Viceroy of India.

Description : What is deadlock what is starvation How do they differ from each other?

Last Answer : A deadlock occurs when two (or more) threads have created a situation where they are all blocking each other. ... Starvation occurs when a scheduler process (i.e. the operating system) refuses to give a particular thread any quantity of a particular resource (generally CPU).

Description : In the case of deadlock between the two houses paraliament, the joint sitting is presided over by the: (1) President (2) Senior most member of Lok Sabha (3) Speaker of Lok Sabha (4) Vice President

Last Answer : (3) Speaker of Lok Sabha Explanation: Article 108 of Indian Constitution prescribes the procedure for resolving a conflict between the two Houses of Parliament over a Bill through a joint sitting' of both ... is presided over by the Speaker who is assisted by the Secretary-General of the Lok Sabha.

Description : Which are the method for handling deadlocks. a. Deadlock prevention b. Deadlock avoidance c. Deadlock detection d. Allof these

Last Answer : d. Allof these

Description : How many condition that should be met in order to produce a deadlock. a. 2 b 4 Cc. 6 d 8

Last Answer : b 4

Description : Which are the condition that should be met in order to produce a deadlock. a. Mutual exclusion b. Hold and Wait Cc. No preemption d. Circular wait e. Allofthese

Last Answer : e. Allofthese

Description : Which lock is more serious than indefinite postponement or starvation because it affect more than one job: a. Deadlock b. Spinelock c. Both d. None of these

Last Answer : a. Deadlock

Description : If the word ―resolution‖ in the story is to be replaced by another word, it would be (a) Prolonging (b) Continuation (c) Firmness (d) Deadlock

Last Answer : (c) Firmness

Description : What is NOT true about the tenure of the Speaker of the Lok Sabha? (a) He is no longer a Speaker if he ceases to be a member of the Lok Sabha due to any reason (b) When the Lok Sabha ... representative (d) When there's a deadlock in vote, the Speaker can cast his casting vote to break the deadlock

Last Answer : (b) When the Lok Sabha dissolves, the Speaker vacates his position simultaneously

Description : Necessary conditions for deadlock are: a) Non preemptive and circular wait b) Mutual exclusion and partial allocation c) Both of The Above d) None of The Above

Last Answer : b) are privileged calls that are used to perform resource management functions, which are controlled by the operating system

Description : A direct method of deadlock prevention is to prevent the occurrence of ………….. A) Mutual exclusion B) Hold and wait C) Circular waits D) No preemption

Last Answer : C) Circular waits

Description : The following conditions of policy must be present for a deadlock to be possible. i) Mutual exclusion ii) Hold and wait iii) No preemption iv) Circular wait A) i, ii and iii only B) ii, iii and iv only C) i, iii and iv only D) All i, ii, iii and iv

Last Answer : D) All i, ii, iii and iv

Description : ……………. Can be defined as the permanent blocking of a set of processed that either complete for system resources or communicate with each other. A) Deadlock B) Permanent lock C) Starvation D) Mutual exclusion

Last Answer : A) Deadlock

Description : ………………. Techniques can be used to resolve conflicts, such as competition for resources, and to synchronize processes so that they can cooperate. A) Mutual Exclusion B) Busy Waiting C) Deadlock D) Starvation

Last Answer : A) Mutual Exclusion

Description : …………… is a condition in which there is a set of concurrent processes, only one of which is able to access a given resource or perform a given function at any time. A) Mutual Exclusion B) Busy Waiting C) Deadlock D) Starvation

Last Answer : A) Mutual Exclusion

Description : Which of the following is not the approach to dealing with deadlock? A) Prevention B) Avoidance C) Detection D) Deletion

Last Answer : D) Deletion

Description : A direct method of deadlock prevention is to prevent the occurrences of ................... A) Mutual exclusion B) Hold and wait C) Circular waits D) No preemption

Last Answer : C) Circular waits

Description : Simplest way of deadlock recovery is (A) Roll back (B) Preempt resource (C) Lock one of the processes (D) Kill one of the processes

Last Answer : (D) Kill one of the processes

Description : Which of the following concurrency protocol ensures both conflict serializability and freedom from deadlock : I. 2-phase locking II. Time phase ordering (A) Both I & II (B) II only (C) I only (D) Neither I nor II

Last Answer : (B) II only

Description : Which of the following concurrency protocol ensures both conflict serializability and freedom from deadlock ? (a) 2-phase Locking (b) Time stamp - ordering (A) Both (a) and (b) (B) (a) only (C) (b) only (D) Neither (a) nor (b)

Last Answer : (C) (b) only

Description : Consider a system having ‘m’ resources of the same type. These resources are shared by three processes P1, P2 and P3 which have peak demands of 2, 5 and 7 resources respectively. For what value of ‘m’ deadlock will not occur? (A) 70 (B) 14 (C) 13 (D) 7

Last Answer : (B) 14

Description : The Network is overloaded with enormous data sent by many computers within the network. The inability of the network to deliver the data is termed as __________ . (1) Access control (2) Congestion (3) Error propagation (4) Deadlock

Last Answer : Congestion

Description : Explain UNION,MINUS,UNION ALL, INTERSECT ?

Last Answer : INTERSECT returns all distinct rows selected by both queries.MINUS - returns all distinct rows selected by the first query but not by the second.UNION - returns all distinct rows selected by either queryUNION ALL - returns all rows selected by either query, including all duplicates.

Description : What are the return values of functions SQLCODE and SQLERRM ? What is Pragma EXECPTION_INIT ? Explain the usage ?

Last Answer : SQLCODE returns the latest code of the error that has occurred. SQLERRM returns the relevant error message of the SQLCODE.

Description : Explain what partitioning is and what its benefit is.

Last Answer : Partitioning is a method of taking large tables and indexes and splitting them into smaller, more manageable pieces.

Description : Explain materialized views and how they are used.

Last Answer : Materialized views are objects that are reduced sets of information that have been summarized, grouped, or aggregated from base tables. They are typically used in data warehouse or decision support systems.

Description : Explain the use of table functions.

Last Answer : Table functions are designed to return a set of rows through PL/SQL logic but are intended to be used as a normal table or view in a SQL statement. They are also used to pipeline information in an ETL process.

Description : Explain the difference between a FUNCTION, PROCEDURE and PACKAGE.

Last Answer : A function and procedure are the same in that they are intended to be a collection of PL/SQL code that carries a single task. While a procedure does not have to return any ... functions and procedures that are grouped together based on their commonality to a business function or application.

Description : Explain the use of setting GLOBAL_NAMES equal to TRUE.

Last Answer : Setting GLOBAL_NAMES dictates how you might connect to a database. This variable is either TRUE or FALSE and if it is set to TRUE it enforces database links to have the same name as the remote database to which they are linking.

Description : Explain the difference between $ORACLE_HOME and $ORACLE_BASE.

Last Answer : ORACLE_BASE is the root directory for oracle. ORACLE_HOME located beneath ORACLE_BASE is where the oracle products reside.

Description : Explain an ORA-01555

Last Answer : You get this error when you get a snapshot too old within rollback. It can usually be solved by increasing the undo retention or increasing the size of rollbacks. You should also look at the logic involved in the application getting the error message.

Description : How would you go about generating an EXPLAIN plan?

Last Answer : Create a plan table with utlxplan.sql. Use the explain plan set statement_id = 'tst1' into plan_table for a SQL statement Look at the explain plan with utlxplp.sql or utlxpls.sql

Description : Explain the difference between ARCHIVELOG mode and NOARCHIVELOG mode and the benefits and disadvantages to each.

Last Answer : ARCHIVELOG mode is a mode that you can put the database in for creating a backup of all transactions that have occurred in the database so that you can recover to any point in time. ... having to write transactions to an archive log and thus increases the performance of the database slightly.

Description : Explain the difference between a data block, an extent and a segment.

Last Answer : A data block is the smallest unit of logical storage for a database object. As objects grow they take chunks of additional storage that are composed of contiguous data blocks. These groupings ... that an object takes when grouped together are considered the segment of the database object.

Description : Explain the difference between a hot backup and a cold backup and the benefits associated with each.

Last Answer : A hot backup is basically taking a backup of the database while it is still up and running and it must be in archive log mode. A cold backup is taking a backup of the database while it is ... and thus there will be a slight performance gain as the database is not cutting archive logs to disk.

Description : What is a join ? Explain the different types of joins ?

Last Answer : Join is a query which retrieves related columns or rows from multiple tables.Self Join - Joining the table with itself.Equi Join - Joining two tables by equating two common columns.Non-Equi Join - ... that query can also retrieve rows that do not have corresponding join value in the other table.

Description : Explain Connect by Prior ?in a session before accessing next value ?

Last Answer : Retrieves rows in hierarchical order.e.g. select empno, ename from emp where.

Description : Explain how procedures and functions are called in a PL/SQL block ?

Last Answer : Function is called as part of an expression. sal := calculate_sal ('a822'); procedure is called as a PL/SQL statement calculate_bonus ('A822');

Description : What is a package ? What are the advantages of packages ? What is Pragma EXECPTION_INIT ? Explain the usage ?

Last Answer : The PRAGMA EXECPTION_INIT tells the complier to associate an exception with an oracle error. To get an error message of a specific oracle error. e.g. PRAGMA EXCEPTION_INIT (exception name, oracle error number)

Description : Explain the two type of Cursors ?

Last Answer : There are two types of cursors, Implicit Cursor and Explicit Cursor. PL/SQL uses Implicit Cursors for queries. User defined cursors are called Explicit Cursors. They can be declared and used.

Description : Explain the usage of WHERE CURRENT OF clause in cursors ?

Last Answer : WHERE CURRENT OF clause in an UPDATE,DELETE statement refers to the latest row fetched from a cursor. Database Triggers

Description : Explain the following file extension related to library?

Last Answer : .pll,.lib,.pld The library pll files is a portable design file comparable to an fmb form file The library lib file is a plat form specific, generated library file comparable to a fmx form file The pld file is Txt format file and can be used for source controlling your library files Parameter

Description : Explain types of Block in forms4.0?

Last Answer : Base table Blocks. Control Blocks. 1. A base table block is one that is associated with a specific database table or view. 2. A control block is a block that is not associated with a database table. ITEMS

Description : Explain about stacked canvas views?

Last Answer : Stacked canvas view is displayed in a window on top of, or "stacked" on the content canvas view assigned to that same window. Stacked canvas views obscure some part of the underlying content canvas view, and or often shown and hidden programmatically.

Description : Explain about horizontal, Vertical tool bar canvas views?

Last Answer : Tool bar canvas views are used to create tool bars for individual windows. Horizontal tool bars are display at the top of a window, just under its menu bar. Vertical Tool bars are displayed along the left side of a window

Description : What is a Database instance ? Explain

Last Answer : A database instance (Server) is a set of memory structure and background processes that access a set of database files. The process can be shared by all users. The memory structure that are ... helps up to improve database performance by decreasing the amount of I/O performed against data file.