Question

Operating Systems Multithreading provides a way for improving the performance of applications. Is it guaranteed that...

Operating Systems

Multithreading provides a way for improving the performance of applications. Is it guaranteed that all multithreaded applications perform better their corresponding single threaded application? Using examples, prove that this is not always true.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Thread:
In a program, a thread is a way that divides the program into more than one concurrently executing task. Thread is a lightweight process and one process can have multiple threads. A thread has its own Process Control Block like a process.

Advantages of thread in a program:

  • A thread concept utilizes the multiprocessor system very effectively because we can schedule multiple threads on multiple processors.
  • Simultaneous access to multiple applications because the context switching time between two threads is less as compared to the process.
  • Thread help to maintain a responsive user interface because a threading system is more responsive. Threads are the lightweight process and it minimizes the use of system resources.
  • Parallelism is achieved by using the thread concept because threads are executed concurrently.

It is not always guaranteed that multithreaded applications perform better their corresponding single-threaded application because if more than one thread is requesting for the same resources in a circular way then a deadlock may occur.

Starvation:

Starvation is a situation when a low priority process in ready queue is waiting for the CPU for a long time and other high priority processes are assigned to the CPU.

Deadlock:

Deadlock is a situation in the operating system where each of the running processes is waiting for a certain resource that is held by another running process in a circular wait for an infinite time.

For example:

P1: Request for resource R1 to get this.

P2: Request for resource R2 and get this.

P1: Request for resource R2 to and goes in the waiting state.

P2: Request for resource R1 and goes in the waiting state.

P1 is waiting for the resource R2 but it holds by the P2 and P2 is waiting for the R1 but it is held by the P1. Both of the processes are waiting for each other to release the resources but there is no preemption.

So, if the deadlock will occur then the system performance will degrade.

Add a comment
Know the answer?
Add Answer to:
Operating Systems Multithreading provides a way for improving the performance of applications. Is it guaranteed that...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The use of multithreading improves the overall efficiency and performance of the execution of an application...

    The use of multithreading improves the overall efficiency and performance of the execution of an application or program. However, not all programs are suitable for multithreading Can you prve some examples of programs where a multithrcaded solution fails to improve on the performance of a single-threaded solution? Also give some examples where the performance improves whers maltiple threads are used in place of single threads. TTT Anal 3 (120) BI 50 % T.E.E.B.225

  • TRUE-FALSE     Basic synchronization principles and multithreading 1. Java user threads can implement both busy-waiting and no-busy-waiting...

    TRUE-FALSE     Basic synchronization principles and multithreading 1. Java user threads can implement both busy-waiting and no-busy-waiting policy. 2. Priority inversion avoids deadlocks. 3. Spinlock mutex can be used as an adaptive mutex. 4. Java RTE can be blocked for Input/Output operation. 5. Interrupted user thread, which executes a method in a monitor, must be rolled back to undo any changes it performed. 6. The synchronization primitive by disabling interrupts can be used by an application program. 7. Bounded-waiting requirement is...

  • SCADA systems sit in between the cyber and physical world. What is one of the biggest...

    SCADA systems sit in between the cyber and physical world. What is one of the biggest threats to these systems? Connection to traditional networks Those darn aliens Reducing risk by integration Human machine interface What are some reasons that IoT devices are so susceptible to hacking? (select all that apply) They are so small Difficult to patch The sheer number of devices Poor software design What is the key capability that RTOS provides over traditional OSs. (select all that apply)...

  • The use of internal controls provides guaranteed protection against losses due to operating activities. True False...

    The use of internal controls provides guaranteed protection against losses due to operating activities. True False Factors that cause the bank statement balance of a chgawineaccount to be different from the business cRRHeaccount balance include: outstanding cheques, deposits in transit, deductions for bank fees, additions for interest, and errors. True False TechCom customer RDA Electronics paid off an $8,300 balance on its account receivable. TechCom should record the transaction as a debit to Accounts Receivable-RDA Electronics and a credit to...

  • F 2. Data mining provides management with daily operational reports: True or False? 3. A Data...

    F 2. Data mining provides management with daily operational reports: True or False? 3. A Data Base Management System (DBMS) function is to-provide a company with F 1. A computer's Operating System (O/s) is always in volatile mode: True or access and control of its Operating System software 4. A computer's Operating System performs the Data Mining function: True or False? ru 5. Data travels via the Internet at 186,282 megabytes per second: Trus or False? 6. The World Wide...

  • The use of internal controls provides guaranteed protection against losses due to operating activities. * 2...

    The use of internal controls provides guaranteed protection against losses due to operating activities. * 2 points O True False 2 points Factors that cause the bank statement balance of a chequing account to be different from the business chequing account balance include: outstanding cheques, deposits in transit, deductions for bank fees, additions for interest, and errors. * True O False TechCom customer RDA Electronics paid off an $8,300 balance on its account receivable. TechCom should record the transaction as...

  • 1)The use of internal controls provides guaranteed protection against losses due to operating activities. True False...

    1)The use of internal controls provides guaranteed protection against losses due to operating activities. True False 2)Factors that cause the bank statement balance of a çbeauioa account to be different from the business gbeauioeaccount balance include: outstanding cheques deposits in transit, deductions for bank fees, additions for interest, and errors. True False 3)TechCom customer RDA Electronics paid off an $8,300 balance on its account receivable. Tech Com should record the transaction as a debit to Accounts Receivable-RDA Electronics and a...

  • 12. Using the following table list several activities performed by each of the following mainframe roles....

    12. Using the following table list several activities performed by each of the following mainframe roles. Typical Roles in System z Careers Role Activities Performed System Programmer System Administrator Application Programmer System Operator Production Control Analyst Customer Engineer FTSS (Field Technical Sale Support) SE (Systems Engineer) SPOC (Single Point of Contact) 13. Using examples from the previous table titled "z/Enterprise Roles", explain the concept of "Separation of Duties". Answer: 14. The web URL document "Separation of Duties and IT Security"...

  • 166 Chapter 8: TCP/IP Applications Getting Down to Business The way network communication all those ls...

    166 Chapter 8: TCP/IP Applications Getting Down to Business The way network communication all those ls and Os) goes in and out of a machine physically is through the NIC (network interface card). The way network communication goes in and out of a machine logically though, is through a program or service. A service is a program that runs in the background, independent of a logon, that provides functionalities to a system. Windows client machines, for instance, have a Workstation...

  • The information systems (IS) department at Jacobsons, Inc., consists of eight employees, including the IS Manager, Melinda Cullen. Melinda is responsible for the day-to-day oversight of the IS functio...

    The information systems (IS) department at Jacobsons, Inc., consists of eight employees, including the IS Manager, Melinda Cullen. Melinda is responsible for the day-to-day oversight of the IS function and reports to Jacobsons' chief operating officer (COO). The COO is a senior vice president responsible for the overall retail operations who reports directly to the president and chief executive officer. The COO attends board of director meetings to provide an update of key operating performance issues. Because Melinda takes an...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT