Compare the performance to that obtained using regular locks

Assignment Help Basic Computer Science
Reference no: EM131091145

Write a threaded program for solving a 15-puzzle. The program takes an initial position and keeps an open list of outstanding positions. This list is sorted on the "goodness" measure of the boards. A simple goodness measure is the Manhattan distance (i.e., the sum of x -displacement and y-displacement of every tile from where it needs to be). This open list is a work queue implemented as a heap. Each thread extracts work (a board) from the work queue, expands it to all possible successors, and inserts the successors into the work queue if it has not already been encountered. Use a hash table (from Problem 7.9) to keep track of entries that have been previously encountered. Plot the speedup of your program with the number of threads. You can compute the speedups for some reference board that is the same for various thread counts.

Problem 7.9 Change the locks to read-write locks in the hash table and use write locks only when inserting an entry into the linked list. Examine the performance of this program as a function of k. Compare the performance to that obtained using regular locks.

Reference no: EM131091145

Questions Cloud

Solve a triangular system of equations of the form ux = y : Describe a pipelined algorithm for performing back-substitution to solve a triangular system of equations of the form Ux = y , where the n x n unit upper-triangular matrix U is 2-D partitioned onto an n x n mesh of processes
A professional cover letter for a potential employer : In today's technological world, it is critical to be able to introduce yourself well in writing. The way in which you present this information may be the "thing" that sets you apart from the competition.
Implement a multi-access threaded queue with multiple thread : Repeat Problem 7.2 using condition variables (in addition to mutex locks). Document the time for the same test case as above. Comment on the difference in the times.
U.s. department of education or the national education : Create one activity (to work for a group of families) that will encourage the positive relationship between an educator and a students' family. The academic activity/strategy should focus on the community as a whole and increasing the involvement ..
Compare the performance to that obtained using regular locks : Change the locks to read-write locks in the hash table and use write locks only when inserting an entry into the linked list. Examine the performance of this program as a function of k. Compare the performance to that obtained using regular locks.
Compare your performance with the previous case : Compare your performance with the previous case
The business development proposal at kids paradise : The business development proposal at kids paradise
Calculate the sound pressure level : Three small fans are located near each other at 1.5 m above the ground, and produce an annoying noise in the 250 Hz band. A localresident whose bedroom window is at the same height as the fans and is 80 m away complains about this noise. Measurements..
Building culturally responsive family-school relationships : Chapter 11: Engaging in Collaborative Problem Solving with Families. Chapter 12: Family-Centered Parent Involvement and Shared Decisions Making in Special Education Classrooms

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Computers on the internet have an assigned address

Computers on the Internet have an assigned address (location) called its Uniform Resource Locator (URL). The URL is used to identify one computer to the other computers on the Internet.

  E-books distributor

You are a linguistic working at an e-books distributor. Your management has interest in finding out if commonly used words used in a book make the books more popular, therefore more books would be sold if the number of commonly used words in the book..

  Design of e-business applications

With that in mind, how do you think the Americans with Disabilities Act affects website design and design of E-business applications?

  Identify the goals of the business

Provide a reliable analysis of needs, which must include both business and stakeholder requirements for use of the website .

  Write a program to count number of inversions

Write a Program to count number of inversions in an input file of integers using Brute force method

  Boot/shutdown & user interfaces/desktops

You are working as a Linux technician and you just got a visit from the information security officer (ISO) at your company. Apparently, an unauthorized person gained access to some files on the receptionist's computer. The security officer thinks it ..

  The sales office and the printer in the business office

A table identifying each subnet, the subnet address, subnet mask in dotted decimal, highest useable address, lowest useable address, and broadcast address.The IP address, subnet mask, and gateway address for the printer in the Sales office and the pr..

  Explain size of new working set system designers

Suppose a process changes its locality and size of new working set is too large to be stored into available free memory. What are some options system designers could choose from to handle this situation?

  The result is in the domain n

Find the truth set for the following predicates: Hint: answer should be a { set } A) 8/x where x is an integer,the result is in the domain N

  Own research findings on tcp hijacking

Submit a discussion that shares your own research findings on TCP hijacking

  Design a class named clock that contains private data fields

Design a class named Clock that contains private data fields for startTime and endTime, no argument constructor that initializes the startTime to the current time, a method named start() that resets the startTime to the given time, a stop() me..

  Developing an input design

Explain what principle you believe is the MOST essential in developing an input design, and justify your choice.

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