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
Fantom [35]
3 years ago
9

When nondeterminism results from multiple threads attempting to access a shared resource such as a shared variable or a shared f

ile, at least one of the accesses is an update, and the accesses can result in an error, we have a race condition.
a) True
b) False
Engineering
1 answer:
Sindrei [870]3 years ago
6 0

Answer:

a) True

Explanation:

In Computer programming, when a multiple thread is executing, the sequence in which the statements (codes) contained therein are executed by these multiple thread is mainly nondeterministic in nature.

When nondeterminism results from multiple threads attempting to access a shared resource such as a shared variable or a shared file, at least one of the accesses is an update, and the accesses can result in an error, we have a race condition.

A race condition can be defined as a condition in which multiple threads have the ability to access shared data at the same time and as such they both try to change (modify) the data. Thus, in a race condition occurs in computer (software) programming when a software application's behavior is solely dependent on the timing of multiple threads (processes) in order to function properly.

You might be interested in
A tank with some water in it begins to drain. The function v ( t ) = 46 − 3.5 t determines the volume of the water in the tank (
olchik [2.2K]

Answer with Explanation:

Part a)

The volume of water in the tank as a function of time is plotted in the below attached figure.

The vertical intercept of the graph is 46.

Part b)

The vertical intercept represents the volume of water that is initially present in the tank before draining begins.

Part c)

To find the time required to completely drain the tank we calculate the volume of the water in the tank to zero.

0=46-3.5t\\\\3.5=46\\\\\therefore t=\frac{46}{3.5}=13.143minutes

Part d)

The horizontal intercept represents the time it takes to empty the tank which as calculated above is 13.143 minutes.

7 0
4 years ago
python Write a program that asks a user to type in two strings and that prints •the characters that occur in both strings. •the
Yuliya22 [10]

Answer:

see explanation

Explanation:

#we first get the elements as inputs

x = input("enter string A :")

y = input("enter string B :")

#then we make independent sets with each

x = set(x)

y = set(y)

#then the intersection of the two sets

intersection = set.intersection(x,y)

#another set for the alphabet

#we use set.difference to get the elements present in x and not in y, and

#viceversa, finally we get the difference between the alphabet and the #intersection of the elements in our strings

z = set('abcdefghijklmnopqrstuvwxyz')

print('\nrepeated :\n',intersection)

print('differences :\n',' Items in A and not B\n',

set.difference(x,y),'\nItems in B and not A\n',

set.difference(y,x))

print('\nItems in neither :\n',set.difference(z,intersection))

8 0
3 years ago
A well insulated rigid tank contains 4 kg of argon gas at 450 kPa and 30 C. A valve is opened, allowing the argon to escape unti
natima [27]

Answer:

Final mass of Argon=  2.46 kg

Explanation:

Initial mass of Argon gas ( M1 ) = 4 kg

P1 = 450 kPa

T1 = 30°C = 303 K

P2 = 200 kPa

k ( specific heat ratio of Argon ) = 1.667

assuming a reversible adiabatic process

<u>Calculate the value of the M2 </u>

Applying ideal gas equation ( PV = mRT )

P₁V / P₂V = m₁ RT₁ / m₂ RT₂

hence : m2 = P₂T₁ / P₁T₂ * m₁

                   = (200 * 303 ) / (450 * 219 ) * 4

                   = 2.46 kg

<em>Note: Calculation for T2 is attached below</em>

5 0
3 years ago
Write a function named "read_prices" that takes one parameter that is a list of ticker symbols that your company owns in their p
ohaa [14]

Answer:

import pandas pd

def read_prices(tickers):

price_dict = {}

# Read ingthe ticker data for all the tickers

for ticker in tickers:

# Read data for one ticker using pandas.read_csv  

# We assume no column names in csv file

ticker_data = pd.read_csv("./" + ticker + ".csv", names=['date', 'price', 'volume'])

# ticker_data is now a panda data frame

# Creating dictionary

# for the ticker

price_dict[ticker] = {}

for i in range(len(ticker_data)):

# Use pandas.iloc  to access data

date = ticker_data.iloc[i]['date']

price = ticker_data.iloc[i]['price']

price_dict[ticker][date] = price

return price_dict  

7 0
4 years ago
A tensile test is performed on a metal specimen, and it is found that a true
alexdok [17]

Answer:

600 mpa

Explanation:

It's smart for a equation then you reperfuce

5 0
3 years ago
Other questions:
  • Based in bonding theory, explain why heat capacity increases when you consider metals, ceramics and polymers.
    14·1 answer
  • A circuit-switching scenario in whichNcs users, each requiring a bandwidth of 25 Mbps, must share a link of capacity 150 Mbps.
    12·1 answer
  • What are the disadvantages of using 3D ink jet printing ??
    8·1 answer
  • The density of a fluid is given by the empirical equation rho 70:5 exp 8:27 107 P where rho is density (lbm/ft3 ) and P is press
    6·1 answer
  • Implement a quick sort algorithm that will accept an integer array of size n and in random order. Develop or research three diff
    13·1 answer
  • Demonstreaza in 20 de propoziti ca snoava pacala si zarzarele boerului e o snoava
    12·1 answer
  • Hi,I want to know something.
    13·1 answer
  • I need to solve for d
    11·2 answers
  • The inspector should inspect insulation in unfinished spaces, including attics, _____ and foundation areas.
    13·1 answer
  • Aqueous cleaners are ________ parts cleaning agents.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!