Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

11 . What is the exception raised for an error that doesn't fall in any of the categories? LookupError ReferenceError RuntimeError SystemError 12 . How

11 . What is the exception raised for an error that doesn't fall in any of the categories?

  • LookupError
  • ReferenceError
  • RuntimeError
  • SystemError

12 . How to detect the status of a python thread?

  • isAlive()
  • isActive()
  • None
  • isDaemon()

13 . How does global value mutation used for thread-safety?

  • None
  • via GIL (Global Interpreter Lock)
  • via Mutex
  • via Locking

14 . What are the states/features supported by a RLock object?

  • Recursion level
  • Locked
  • Unlocked
  • Owning thread

15 . Which thread method is used to wait until it terminates?

  • wait()
  • None
  • join()
  • waitforthread()

16 . What would be the impact of multithreading on a uni-processor system?

  • Increase throughput
  • Degrade performance
  • Reduce execution time
  • Improve performance

17 . What is the difference between a semaphore and bounded semaphore?

  • A semaphore makes sure its current value doesn't exceed its initial value while bounded semaphore doesn't.
  • A bounded semaphore makes sure its current value doesn't exceed its initial value while semaphore doesn't.
  • Bounded semaphore holds a counter for the number of release() calls minus the number of acquire() calls, plus an initial value but semaphore doesn't.
  • Semaphore holds a counter for the number of release() calls minus the number of acquire() calls, plus an initial value but bounded semaphore doesn't.

18 . What are the states/features supported by a Lock object?

  • Locked
  • Owning thread
  • Unlocked
  • Recursion level

19 . Which one is reentrant lock type?

  • Condition
  • Lock
  • Semaphore
  • RLock

20 . Which method is used to identify a thread?

  • getThread()
  • getName()
  • None
  • get_ident()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

5. Why is the supply curve upward-sloping?

Answered: 1 week ago

Question

The paleolithic age human life, short write up ?

Answered: 1 week ago