Define a hybrid userlevel or kernel-level lock

Assignment Help Computer Engineering
Reference no: EM131476334

Question: Linux provides a sys futex() system call to assist in implementing hybrid user-level/kernel-level locks and condition variables. A call to long sys futex(void *addr1, FUTEX WAIT, int val1, NULL, NULL, 0 checks to see if the memory at address addr1 has the same value as val1. If so, the calling thread is suspended. If not, the calling thread returns immediately with the error return value EWOULDBLOCK. In addition, the system call will return with the value EINTR if the threadreceives a signal. A call to long sys futex(void *addr1, FUTEX WAKE, 1, NULL, NULL, 0) causes one thread waiting on addr1 to return. Consider the following (too) simple implementation of a hybrid userlevel/kernel-level lock.

2185_Too.png

There are three problems with this code.

(a.) Peformance. The goal of this code is to avoid making (expensive) system calls in the uncontested case when an Acquire() tries to acquire a free lock or a Release() call releases a lock with no other waiting threads. This code fails to meet this goal. Why?

(b.) Performance. There is a subtle corner case when multiple threads try to acquire the lock at the same time that can show up as occasional slowdowns and bursts of CPU usage. What is the problem?

(c.) Correctness. There is a corner case that can cause the mutual exclusion correctness condition to be violated, allowing two threads to both believe they hold the lock. What is the problem?

Reference no: EM131476334

Questions Cloud

What is the calculated twa : What is the calculated TWA? What would you tell plant management in terms of exposure to acetone and compliance with the PEL?
Explain the petersons algorithm : Wikipedia provides an implementation of Peterson's algorithm to provide mutual exclusion using loads and stores at http://en.wikipedia.org/ wiki/Peterson's.
Case appear to reflect individualized consideration : What specific statements in this case appear to reflect individualized consideration, a core component of transformational leadership, by Branson?
Create a presentation research-based models : Create a presentation describing cultural, research-based models and how they help clarify the organization's core values.
Define a hybrid userlevel or kernel-level lock : Linux provides a sys futex() system call to assist in implementing hybrid user-level/kernel-level locks and condition variables. A call to long sys futex.
Strategic human resource management : how one large company implemented a workforce planning and design process to move to a human capital perspective on strategic human resource management.
What yield to maturity is the bond offering : Compute Bond Price Compute the price of a 3.8 percent coupon bond with 15 years left to maturity and a market interest rate of 6.8 percent.
Provide positive guidance and direction to paraeducators : Identify and describe two strategies to provide positive guidance and direction to paraeducators,
Strategies for reading critically : Describe the challenges you have with reading certain types of written works (e.g., textbooks, academic papers, lab reports, government documents, ).

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd