121 Question 121 EN + हिं Easy GB What is the innodb_deadlock_detect system variable in MySQL and what is the alternative when it is disabled? IN MySQL में innodb_deadlock_detect सिस्टम वेरिएबल क्या है और इसके अक्षम होने पर विकल्प क्या है? A innodb_deadlock_detect=ON (default): InnoDB actively detects deadlocks using a wait-for graph and immediately resolves them by aborting a victim. innodb_deadlock_detect=OFF: deadlock detection is disabled; the lock wait timeout (innodb_lock_wait_timeout) becomes the only mechanism to break deadlocks - transactions wait until timeout then abort. Disabling detection reduces overhead in very high-concurrency scenarios but increases worst-case deadlock resolution time. innodb_deadlock_detect=ON (डिफ़ॉल्ट): InnoDB सक्रिय रूप से प्रतीक्षा-ग्राफ़ का उपयोग करके गतिरोधों का पता लगाता है और पीड़ित को गर्भपात करके तुरंत उनका समाधान करता है। innodb_deadlock_detect=OFF: गतिरोध का पता लगाना अक्षम है; लॉक वेट टाइमआउट (innodb_lock_wait_timeout) गतिरोध को तोड़ने का एकमात्र तंत्र बन जाता है - लेनदेन टाइमआउट तक प्रतीक्षा करते हैं और फिर निरस्त हो जाते हैं। पहचान को अक्षम करने से बहुत उच्च-समवर्ती परिदृश्यों में ओवरहेड कम हो जाता है लेकिन सबसे खराब स्थिति में गतिरोध समाधान समय बढ़ जाता है। B It controls the deadlock timeout value यह डेडलॉक टाइमआउट मान को नियंत्रित करता है C It controls whether deadlocks are logged to the error log यह नियंत्रित करता है कि त्रुटि लॉग में गतिरोध लॉग हैं या नहीं D It determines which transaction becomes the deadlock victim यह निर्धारित करता है कि कौन सा लेनदेन गतिरोध का शिकार बनेगा ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) innodb_deadlock_detect: ON = active detection (default, recommended for most workloads). OFF = use timeout-only for resolution. Use case for OFF: extremely high concurrency systems where the deadlock detection mutex itself becomes a bottleneck (the detection latch protects the wait-for graph - under extremely high concurrent locking, this latch becomes a serialization point). Alternative: use innodb_lock_wait_timeout with a short value (e.g., 5 seconds). व्याख्या (हिन्दी) innodb_deadlock_detect: ON = सक्रिय पहचान (डिफ़ॉल्ट, अधिकांश कार्यभार के लिए अनुशंसित)। बंद = समाधान के लिए केवल टाइमआउट का उपयोग करें। ऑफ के लिए केस का उपयोग करें: अत्यधिक उच्च समवर्ती प्रणाली जहां डेडलॉक डिटेक्शन म्यूटेक्स स्वयं एक बाधा बन जाता है (डिटेक्शन लैच प्रतीक्षा-ग्राफ की सुरक्षा करता है - अत्यधिक उच्च समवर्ती लॉकिंग के तहत, यह लैच एक क्रमबद्धता बिंदु बन जाता है)। वैकल्पिक: कम मान (जैसे, 5 सेकंड) के साथ innodb_lock_wait_timeout का उपयोग करें। 🎯 Exam Perspective DBMS ("Deadlock" sub-topic) से जुड़ा यह सवाल — difficulty level "Easy" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions Wait-for graph detects deadlock when Deadlock occurs when Deadlock scenario: T1 locks question_id=1 then tries to... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
122 Question 122 EN + हिं Easy GB What are the implications of deadlocks in distributed microservices systems that use distributed transactions (SAGA pattern)? IN वितरित लेनदेन (एसएजीए पैटर्न) का उपयोग करने वाले वितरित माइक्रोसर्विसेज सिस्टम में गतिरोध के निहितार्थ क्या हैं? A Deadlocks in microservices require manual DBA intervention माइक्रोसर्विसेज में गतिरोध के लिए मैन्युअल डीबीए हस्तक्षेप की आवश्यकता होती है B In SAGA-based distributed transactions traditional database deadlocks at the local level can still occur within each services database; additionally SAGA introduces higher-level semantic deadlocks where multiple sagas wait for each other to complete compensating actions or where resource locks across services create circular dependencies - resolved by designing sagas to acquire resources in consistent order and implementing timeouts for saga steps एसएजीए-आधारित वितरित लेनदेन में स्थानीय स्तर पर पारंपरिक डेटाबेस गतिरोध अभी भी प्रत्येक सेवा डेटाबेस के भीतर हो सकता है; इसके अतिरिक्त SAGA उच्च-स्तरीय सिमेंटिक गतिरोधों का परिचय देता है, जहां कई गाथाएं क्षतिपूर्ति कार्यों को पूरा करने के लिए एक-दूसरे की प्रतीक्षा करती हैं या जहां सेवाओं में संसाधन लॉक परिपत्र निर्भरताएं बनाते हैं - सुसंगत क्रम में संसाधनों को प्राप्त करने के लिए गाथाओं को डिजाइन करके और गाथा चरणों के लिए टाइमआउट लागू करके हल किया जाता है। C SAGA eliminates all deadlock possibilities SAGA सभी गतिरोध संभावनाओं को समाप्त कर देता है D SAGA prevents deadlocks by eliminating all locking SAGA सभी लॉकिंग को समाप्त करके गतिरोध को रोकता है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Distributed microservice deadlocks: (1) Local deadlocks: each service may have deadlocks within its own database (handled by individual DBMS deadlock detection). (2) Saga-level deadlocks: uncommon but possible when sagas hold semantic locks (reservation of resources) in circular dependencies. Prevention: define saga ordering rules, implement step timeouts, use choreography with event-based coordination to reduce blocking. व्याख्या (हिन्दी) वितरित माइक्रोसर्विस गतिरोध: (1) स्थानीय गतिरोध: प्रत्येक सेवा के अपने डेटाबेस में गतिरोध हो सकते हैं (व्यक्तिगत डीबीएमएस गतिरोध का पता लगाने द्वारा नियंत्रित)। (2) सागा-स्तरीय गतिरोध: असामान्य लेकिन संभव है जब सागा परिपत्र निर्भरता में सिमेंटिक लॉक (संसाधनों का आरक्षण) रखता है। रोकथाम: सागा ऑर्डरिंग नियमों को परिभाषित करें, चरण टाइमआउट लागू करें, अवरोधन को कम करने के लिए इवेंट-आधारित समन्वय के साथ कोरियोग्राफी का उपयोग करें। 🎯 Exam Perspective UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में DBMS ("Deadlock" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Easy"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions Wait-for graph detects deadlock when Deadlock occurs when Deadlock scenario: T1 locks question_id=1 then tries to... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
123 Question 123 EN + हिं Hard GB Deadlock occurs when IN गतिरोध तब होता है जब A Two transactions commit simultaneously दो लेनदेन एक साथ प्रतिबद्ध हैं B Two or more transactions wait indefinitely for each other to release locks (circular wait) दो या दो से अधिक लेन-देन एक-दूसरे के लॉक जारी करने की अनिश्चित काल तक प्रतीक्षा करते हैं (परिपत्र प्रतीक्षा) C Transaction holds too many locks लेन-देन में बहुत अधिक ताले होते हैं D DB is overloaded डीबी अतिभारित है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Deadlock: circular wait - T1 waits for T2's lock, T2 waits for T1's lock → infinite blocking. व्याख्या (हिन्दी) गतिरोध: परिपत्र प्रतीक्षा - T1 T2 के लॉक की प्रतीक्षा करता है, T2 T1 के लॉक की प्रतीक्षा करता है → अनंत अवरोधन। 🎯 Exam Perspective अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो DBMS ("Deadlock" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Hard"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the innodb_deadlock_detect system variable in M... What are the implications of deadlocks in distributed m... Deadlock scenario: T1 locks question_id=1 then tries to... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
124 Question 124 EN + हिं Hard GB Wait-for graph detects deadlock when IN प्रतीक्षा-ग्राफ़ कब गतिरोध का पता लगाता है A No edges exist कोई किनारा मौजूद नहीं है B Many nodes exist कई नोड मौजूद हैं C A CYCLE is detected in the graph ग्राफ़ में एक चक्र का पता लगाया गया है D All transactions waiting सभी लेन-देन प्रतीक्षारत हैं ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Deadlock ↔ cycle in wait-for graph. T_i→T_j: T_i waits for lock held by T_j. व्याख्या (हिन्दी) प्रतीक्षा-ग्राफ़ में गतिरोध ↔ चक्र। T_i→T_j: T_i T_j द्वारा रखे गए लॉक की प्रतीक्षा करता है। 🎯 Exam Perspective DBMS ("Deadlock" sub-topic) के इस प्रश्न को — difficulty level "Hard" कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions Deadlock occurs when Deadlock detection frequency tradeoff What are the implications of deadlocks in distributed m... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
125 Question 125 EN + हिं Medium GB Deadlock detection frequency tradeoff IN डेडलॉक डिटेक्शन फ़्रीक्वेंसी ट्रेडऑफ़ A Higher frequency always better उच्च आवृत्ति हमेशा बेहतर होती है B Lower frequency always better कम आवृत्ति हमेशा बेहतर होती है C No tradeoff exists कोई समझौता मौजूद नहीं है D Higher frequency: detects deadlocks sooner but adds overhead; lower: less overhead but longer wait उच्च आवृत्ति: गतिरोधों का शीघ्र पता लगाता है लेकिन ओवरहेड जोड़ता है; निचला: कम ओवरहेड लेकिन लंबा इंतजार ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Tradeoff: check more often (less wait, more CPU) vs less often (more CPU free, longer deadlock wait). व्याख्या (हिन्दी) ट्रेडऑफ़: अधिक बार जांचें (कम प्रतीक्षा, अधिक सीपीयू) बनाम कम बार (अधिक सीपीयू मुक्त, लंबा गतिरोध प्रतीक्षा)। 🎯 Exam Perspective यह सवाल DBMS ("Deadlock" sub-topic) category का है — difficulty level "Medium", और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is the innodb_deadlock_detect system variable in M... Wait-for graph detects deadlock when Deadlock occurs when 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
126 Question 126 EN + हिं Hard GB Deadlock scenario: T1 locks question_id=1 then tries to lock question_id=2; T2 locks question_id=2 then tries question_id=1. Resolution is IN गतिरोध परिदृश्य: T1 प्रश्न_आईडी=1 को लॉक करता है, फिर प्रश्न_आईडी=2 को लॉक करने का प्रयास करता है; T2 प्रश्न_आईडी=2 को लॉक कर देता है और फिर प्रश्न_आईडी=1 का प्रयास करता है। संकल्प है A T1 always wins T1 हमेशा जीतता है B T2 always wins T2 हमेशा जीतता है C Wait indefinitely अनिश्चितकाल तक प्रतीक्षा करें D DBMS detects cycle, selects one transaction as victim (aborts it), other proceeds डीबीएमएस चक्र का पता लगाता है, एक लेनदेन को पीड़ित के रूप में चुनता है (इसे निरस्त करता है), अन्य आय प्राप्त करता है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) DBMS deadlock detection: circular wait detected, victim selected (usually younger or less work done) and aborted. व्याख्या (हिन्दी) डीबीएमएस गतिरोध का पता लगाना: सर्कुलर प्रतीक्षा का पता लगाया गया, पीड़ित का चयन किया गया (आमतौर पर कम उम्र या कम काम किया गया) और निरस्त कर दिया गया। 🎯 Exam Perspective यह प्रश्न DBMS ("Deadlock" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Hard"। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions Wait-for graph detects deadlock when What are the implications of deadlocks in distributed m... Deadlock occurs when 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)