answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vanyuwa [196]
2 years ago
4

A multithreaded web server wishes to keep track of the number of requests it services (known as hits). Consider the two followin

g strategies to prevent a race condition on the variable hits. The first strategy is to use a basic mutex lock when updating hits:int hits;mutex lock hit lock;hit lock.acquire();hits++;hit lock.release();A second strategy is to use an atomic integer:atomic t hits;atomic inc(&hits);Explain which of these two strategies is more efficient.
Computers and Technology
1 answer:
garik1379 [7]2 years ago
3 0
<span>Atomic integer strategy will be more efficient than a mutex. Technically, the atomic will lock the memory bus on most platforms. However, there are two ameliorating details It is impossible to suspend a thread during the memory bus lock, but it is possible to suspend a thread during a mutex lock. This is what lets you get a lockfree guarentee (which doesn't say anything about not locking</span>
You might be interested in
Describe how the process of sampling, RGB pixels, and binary sequences work together to display a digital color image
Rina8888 [55]

Explanation:

Sampling and RBG (red blue green) pixels and also the binary sequences working together such that it display any digitally colored image by allowing the computer system know where the Red Blue Green pixel is going to be placed and also what the opacity would be for that pixel. The combination of these components is what gives you a digital color image.

5 0
2 years ago
Select the correct text in the passage.
aliina [53]

Answer: When was admitted, hospital authorities recorded his medical history. Then, placed in an ICU where his vital signs were constantly monitored.

Explanation: With the help of computers, medical histories are often kept in the computer for future reference. Machines are connected to computers to record vital signs.

4 0
2 years ago
Which command suppresses the visibility of a particular Row or column in a worksheet?
leonid [27]

Answer:

Ctrl+Space is the keyboard shortcut to select an entire column.

Explanation:

When you press the Shift+Space shortcut the first time it will select the entire row within the Table.  Press Shift+Space a second time and it will select the entire row in the worksheet.

The same works for columns.  Ctrl+Space will select the column of data in the Table.  Pressing the keyboard shortcut a second time will include the column header of the Table in the selection.  Pressing Ctrl+Space a third time will select the entire column in the worksheet.

You can select multiple rows or columns by holding Shift and pressing the Arrow Keys multiple times.

4 0
2 years ago
Thomas has signed a deal with a production house that allows them to use his images on their website. What is required when imag
Phoenix [80]
D. Fair use. Because you need to give credit to the owner.
4 0
2 years ago
Read 2 more answers
Float_abs - return bit-level equivalent of absolute value of f for * floating point argument f. * both the argument and result a
olga_2 [115]

#include <stdio.h>

int main(void) {

            // your code goes here

            //unsigned a =float_times_four(0x80000000);

            unsigned float_times_four(unsigned uf){

                unsigned expn = (uf >> 23) & 0xFF;

                printf(expn);

                unsigned sign = uf & 0x80000000;

                unsigned frac = uf & 0x007FFFFF;

                if(expn == 255 ||(expn == 0 && frac ==0))

                    return uf;

                if(expn){

                    expn<<2;

                }else if(frac == 0x007FFFFF){

//here 0x7FFFFF given by you that is wrong you place this 0x007FFFFF will excute

                    frac>>2;

                    expn<<2;

                }else{

                    frac<<=2;

                }

return (sign) | (expn <<23) | (frac);

            }

            return 0;

}

3 0
2 years ago
Other questions:
  • The tuna marketers' task in the "tunathewonderfish.com" website and related campaign was to ________.
    15·1 answer
  • Jail and prison officials may generally limit inmate rights when the limitations serve
    13·2 answers
  • What is illustrated in the cells to the right of the Fourth Quarter column?
    5·2 answers
  • A company wants to inform a select list of it's regular customers about a flash sale. Which type of platform will it use to send
    9·1 answer
  • Fill in the blank; "As well as their traditional role of computing data, computers are also extensively used for..."
    14·1 answer
  • In computing, a(n) _____ is an attack on an information system that takes advantage of a particular system vulnerability. Select
    5·1 answer
  • Fill in the blanks to make the print_prime_factors function print all the prime factors of a number prime factor is a number tha
    10·1 answer
  • 5.6 Look carefully at how messages and mailboxes are represented in the email system that you use. Model the object classes that
    14·1 answer
  • Which fact does lean green eco machines present to show that electric cars are not perfect
    13·2 answers
  • You work at a computer repair store. A customer is having trouble with their hard drives. The computer is not recognizing all th
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!