1answer.
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
Drupady [299]
2 years ago
13

Race conditions are possible in many computer systems. Consider a banking system with two functions:

Computers and Technology
1 answer:
VARVARA [1.3K]2 years ago
6 0

Answer:

A race condition is actually possible in this scenario.

Explanation:

A race condition is an undesirable situation that occurs when a device or system attempts to perform two or more operations at the same time. In order to prevent the race condition from occurring the operations must be done in the proper sequence to be done correctly.

Here is an example of the race condition:  Let's assume the Current Balance of the shared bank account is $600.  The husband's program calls the withdraw($100) function and accesses the Current Balance of $600.  But right before it stores the new Current Balance, the wife's program calls function deposit($100) function and accesses the Current Balance of $600.  At this point, the husband's program changes the shared variable Current Balance to $500, followed by the wife's program changing the Current Balance variable to $700.  Based on calling both withdraw($100) and deposit($100) functions, the Current Balance should again be $600, but it is $700. Alternatively, the  Current Balance could also have been $500.

To prevent the race condition from occurring, the solution will be to create a method to "Lock" on the Current Balance variable.  Each method must "Lock" the variable before accessing it and changing it.  If a method determines that the variable is "Locked," then it must wait before accessing it.

You might be interested in
? An attempt to harm damage or cause threat to a system or network is broadly termed as
Radda [10]

Answer:

A cyber attack or hacking

Explanation:

6 0
2 years ago
Which smb share option should you enable if you don't want users to see files they don't have at least read permission to?
BigorU [14]
Enable all of them. have a nice day


5 0
3 years ago
Bruce needs to have a drive to rerecord data on the used DVD
Dahasolnce [82]

Answer:

DVD- RW

Explanation:

4 0
3 years ago
Given a one-dimensional array named yearlySalesTotals that contains decimal values, code the first line of a for statement that
VashaNatasha [74]

Answer:

for(int i =0; i<yearlySalesTotals.length;i++)

Explanation:

The for statement in has the syntax as given above, it has an int variable indicating the starting index, then a boolen condition ensuring that you don't get out of the array bounds, and an increment operator.

See below a complete program in java that will output all elements of the array  assuming the array yearlySalesTotals contains only ten elements and all indexes has been assigned values.

public class ANot {

   public static void main(String[] args) {

double []yearlySalesTotals = new double[10];

for(int i = 0; i<yearlySalesTotals.length; i++){

   System.out.println(yearlySalesTotals[i]);

   }

}

}

7 0
2 years ago
True or False: Cracking a Vigenère cipher with brute force takes longer than a Caesar cipher, but it is still a reliable method
iragen [17]

Answer:

False

Explanation:

The Vigenere cipher is an encryption method that uses a series of interwoven Ceaser ciphers and a keyword to encrypt text. The difference between this cipher and the Ceaser cipher is the tabular interwoven Ceaser cipher and the keyword.

Multiple keywords can be used in the Vigenere cipher. The use of this keyword makes the brute-force decipher algorithm unreliable for decoding text encrypted with it.

7 0
2 years ago
Other questions:
  • How does classless inter-domain routing (cidr) help reduce waste of ip addresses?
    8·1 answer
  • What is one of the most effective security tools available for protecting users from external threats?
    15·1 answer
  • Enables businesses and consumers to share data or use software applications directly from a remote server over the Internet or w
    6·1 answer
  • ____ are designed to be used with everyday objects, such as home appliances, gaming consoles, digital cameras, e-readers, digita
    12·1 answer
  • Which of the following is an accurate definition of a computer system? A computer system consists of the operating system that t
    6·1 answer
  • What type of program is Microsoft® Excel®?
    9·2 answers
  • What is inputted into a computer system?
    7·1 answer
  • Which of these lines of code will increment a variable?
    11·1 answer
  • If you're a beginner to data analysis, what is the first thing you should check when you build data queries?
    11·1 answer
  • What does it mean to clear a setting in a dialog box?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!