Question

(Operating Systems) Describe how locked linked lists work. Where are the locks for such lists required? What is the performance efficiency (or lack of efficiency) of these data structures?

(Operating Systems) Describe how locked linked lists work. Where are the locks for such lists required? What is the performance efficiency (or lack of efficiency) of these data structures?

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

Linked Lists--- • We can make effective spin locks – Correct – Work well under contention

List-Based Sets

public interface Set

{

public boolean add(Object x);

public boolean remove(Object x);

public boolean contains

List Entry

public class Entry {

public Object object;

public int key;

public Entry next;

}

use a lock :-

Lock (L)

local := counter

local++

counter := local

Unlock(L)

Lock Free Mean :--

• First try: “never using a lock”.

• Well, is this using a lock? (word is initially zero.)

while (!CAS(&word,0,1)) {}

local := counter

local++

counter := local

word := 0

Lock-Freedom

• Realistic (though difficult): Various lock-free data structures exist in the literature (stack, queue, hashing, skiplist, trees, etc.). • Advantages: Worst-case responsiveness, scalability, no deadlocks, no livelocks, added robustness to threads fail-stop. Lock-Freedom If you schedule enough steps across all threads, one of them will make progress. Linked List: Our First

PERFORM EFFIIENCY(or lack of efficiency) OF THESE DATA STRUCTURES:--

Algorithm Efficiency

Some algorithms are more efficient than others. We would prefer to chose an efficient algorithm, so it would be nice to have metrics for comparing algorithm efficiency.

The complexity of an algorithm is a function describing the efficiency of the algorithm in terms of the amount of data the algorithm must process. Usually there are natural units for the domain and range of this function. There are two main complexity measures of the efficiency of an algorithm:

  • Time complexity is a function describing the amount of time an algorithm takes in terms of the amount of input to the algorithm. "Time" can mean the number of memory accesses performed, the number of comparisons between integers, the number of times some inner loop is executed, or some other natural unit related to the amount of real time the algorithm will take. We try to keep this idea of time separate from "wall clock" time, since many factors unrelated to the algorithm itself can affect the real time (like the language used, type of computing hardware, proficiency of the programmer, optimization in the compiler, etc.). It turns out that, if we chose the units wisely, all of the other stuff doesn't matter and we can get an independent measure of the efficiency of the algorithm.
  • Space complexity is a function describing the amount of memory (space) an algorithm takes in terms of the amount of input to the algorithm. We often speak of "extra" memory needed, not counting the memory needed to store the input itself. Again, we use natural (but fixed-length) units to measure this. We can use bytes, but it's easier to use, say, number of integers used, number of fixed-sized structures, etc. In the end, the function we come up with will be independent of the actual number of bytes needed to represent the unit. Space complexity is sometimes ignored because the space used is minimal and/or obvious, but sometimes it becomes as important an issue as time.

For example, we might say "this algorithm takes n2 time," where n is the number of items in the input. Or we might say "this algorithm takes constant extra space," because the amount of extra memory needed doesn't vary with the number of items processed.

Add a comment
Know the answer?
Add Answer to:
(Operating Systems) Describe how locked linked lists work. Where are the locks for such lists required? What is the performance efficiency (or lack of efficiency) of these data structures?
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
  • ch 6 ex 14 lists plus, c++ plus data structures, linked list understanding Problem: Use the...

    ch 6 ex 14 lists plus, c++ plus data structures, linked list understanding Problem: Use the linked lists contained in the array pictures in figure 6.19 (see pics) to amswer the following questions : please show some explanation / work so that i can grasp and retain this information Thank you so much for your time! 14. Use the linked lists contained in the array pictured in Figure 6.19 to answer the following questions: a. What elements are in the...

  • How did the criminology students use data to improve performance of United airlines? Where else would...

    How did the criminology students use data to improve performance of United airlines? Where else would a similar approach be applicable? At a place you have worked or a business you have frequented describe a performance quality issue? Outline how you would improve performance. What data would you collect? Who would you involve? What investments would you consider? . At a place you have worked or a business you have frequented describe a performance quality issue? Outline how you would...

  • answer for all questions.... How do modern operating systems solve this? [3 marks] i) This is...

    answer for all questions.... How do modern operating systems solve this? [3 marks] i) This is a snapshot of a page table and a translation look aside buffer (TLB) of an operating system (Assume that these are the only populated entries). Toble 1: Page Table Entry Virtual Page Page Frame Time Loaded Time R bit M bit number Referenced 2 0 60 161 0 1 1 1 130 0 160 1 2 26 162 0 1 30 3 20 163...

  • Explain what enterprise resource planning (ERP) systems. Outline several of their key characteristics. Describe in reasonable...

    Explain what enterprise resource planning (ERP) systems. Outline several of their key characteristics. Describe in reasonable detail how a company leverages an ERP system and how its operations are improved after installing an ERP system like SAP. Explain how a supply chain management system helps an organization make its operations more efficient What is Upstream and Downstream management of the supply chain? Explain the concept of “Supply Network”, its benefits, and how technology made this concept available Explain the difference...

  • It’s 7 a.m. in San Antonio, Texas, and Rich Marcogliese, chief operating officer of Valero Energy,...

    It’s 7 a.m. in San Antonio, Texas, and Rich Marcogliese, chief operating officer of Valero Energy, is holding his usual morning meeting with the plant managers of 16 major refineries throughout the United States and Canada. On the walls of the headquarters’ operations center are a series of monitors centered by a giant screen with a live display of the company’s Refining Dashboard. Whether the executives are in the room or connected remotely, all eyes are trained on the Web-accessible...

  • Title: Partners Health Care Systems (PHS): Transforming Health Care Services Delivery through Information Management According to...

    Title: Partners Health Care Systems (PHS): Transforming Health Care Services Delivery through Information Management According to government sources, U.S. expenditures on health care in 2009 reached nearly $2.4 trillion dollars ($2.7 trillion by the end of 2010).[1] Despite this vaunting national level of expenditure on medical treatment, death rates due to preventable errors in the delivery of health services rose to approximately 98,000 deaths in 2009.[2] To address the dual challenges of cost control and quality improvement, some have argued...

  • 1.What was the problem at Celcom that was described this case? What people, organization, and technology...

    1.What was the problem at Celcom that was described this case? What people, organization, and technology factors contributed to this problem? 2.What was Celcom’s business strategy and what was the role of customer relationship management in that strategy? 3.Describe Celcom’s solution to its problem. What people, organization, and technology issues did the solution have to address? 4. How effective was this solution? How did it affect the way Celcom ran its business and its business performance? 5. Describe two operational...

  • Examining the Importance of Data Governance in Healthcare By Shannon Fuller, MBA HEALTHCARE HAS ALWAYS focused...

    Examining the Importance of Data Governance in Healthcare By Shannon Fuller, MBA HEALTHCARE HAS ALWAYS focused on managing information from application to application, instead of looking at information holistically and defining it holistically. The industry's shift of focus onto analytics—whether it's for predictive analytics or modeling for improved readmission rates—puts the focus back on foundational data. Ihat's what is needed for things like population health, which is increasingly important in healthcare. Patient data isn't held or uséd solely in electronic...

  • A new version of the operating system is being planned for installation into your department’s production...

    A new version of the operating system is being planned for installation into your department’s production environment. What sort of testing would you recommend is done before your department goes live with the new version? Identify each type of testing and describe what is tested. Explain the rationale for performing each type of testing. [ your answer goes here ] Would the amount of testing and types of testing to be done be different if you were installing a security...

  • .INTRODUCTION In the era of vicious competition, where customer is a king, organizations can only succeed...

    .INTRODUCTION In the era of vicious competition, where customer is a king, organizations can only succeed if they are able to cater the changing demands of the customers. While catering to these diverse demands; manufacturing costs and product lead time to launch the product to market must be minimized and delivering better performance for the product or service than the existing competitors in the market is of utmost importance (Surange, 2015). Hence if one has to survive the recession on...

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
ADVERTISEMENT