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
Pie
4 years ago
8

What is the technique in which a process can do nothing until it gets permission to enter its critical section but continues to

execute an instruction or set of instructions that test the appropriate variable to gain entrance? A. Spin Waiting B. General Semaphore C. Critical Resource D. Message Passing
Computers and Technology
1 answer:
iVinArrow [24]4 years ago
7 0

Answer:  A)Spin Waiting

Explanation: Spin waiting is the mechanism to wait in a loop till the permission for the entering the critical sector is granted.The permission is granted on the basis of availability of the lock. The loop continues to wait by tending to be in busy waiting situation .

Other options are incorrect because general semaphore is used for solving critical issues and achieving synchronization, critical resource can be used at one time at one certain situation and message passing is used for communication of object by sending and receiving message.Thus, the correct option is option(A).

You might be interested in
Which attributes does not come in tag?
Ne4ueva [31]

Answer:

length is your answer

Explanation:

Have a great day! ^-^

can you me as brainliest if its right? i need 10000 points and 35 brainliest's to rank up to genius

4 0
3 years ago
Read 2 more answers
Given the following code: PreparedStatement ps = connection.prepareStatement("select firstName, mi, lastName from Student where
katen-ka-za [31]

Answer:

In this question, the code will be given a run-time error.

Explanation:

In java programming, the database code will give a run-time error because cursor in the resultSet that is the object of the resultSet class not point any rows in the table and we must use the resultSet.next() function. This function passes the cursor value to the first row in resultSet class object and this function helps to pass the value in the cursor for the next row in the resultSet class object.

5 0
3 years ago
Write a program named ArrayDemo that stores an array of 10 integers. (Note that the array is created for you and does not need t
romanna [79]

Answer:

Hi Zoom! Good question. This is particularly useful for learning sorting functions in arrays and user input handling as well. Please find the implementation below.

Explanation:

I have implemented the code in Python 2+. You can save the below code into a file called ArrayDemo.py and then run it from the command line with the command "python ArrayDemo.py". I have declared the demo_array in the code to an array of 10 unsorted integer values to test this. You can change the code if needed to have this array input by user as well and it should work fine.

Note: if you're using Python 3+ then you'll need to change the "raw_input" in the code to just "input" to make it work.

ArrayDemo.py

demo_array = [2,1,3,4,5,7,6,8,10,9]

option = 0

while (option != 4):

 option = raw_input("Enter 1 to view list in ascending order, 2 to view list in descending order, 3 to choose specific poisition to view, 4 to quit the application: ")

 try:

   option = int(option)

   if option == 1:

     sort_by = 'asc'

     print(sorted(demo_array, reverse=False))

   elif option == 2:

     sort_by = 'desc'

     print(sorted(demo_array, reverse=True))

   elif option == 3:

     position = raw_input("Enter specific position to view (0-9): ")

     try:

       position = int(position)

       if position < 0 or position > 9:

         print("Position does not exist")

       else:

         print(demo_array[position])

     except ValueError:

       print("Position does not exist!")

   elif option == 4:

     break

   else:

     break

 except ValueError:

   print("Invalid input!")

5 0
3 years ago
HELP PLEASE! What is an acceptable use policy and what is the purpose of the acceptable use policy?
Ostrovityanka [42]
Hai what is the answer choices?? please tell me so I can help u

3 0
3 years ago
What is branching in Python​
timama [110]

Answer:

Branching is where a program decides whether to do something or not.

6 0
3 years ago
Other questions:
  • Monica needs a printer to use at home. She wants fine-quality prints at an affordable cost. Which printer will help her achieve
    9·1 answer
  • To prevent class objects from being copied or assigned, you can:
    8·1 answer
  • If x window system is installed, linux users can use x11 forwarding to run __________ as they would on a windows computer. gui a
    11·1 answer
  • Please I need help!!!!!!!
    14·2 answers
  • __' the low level language? a.machine and assembly c.3G and 4G d.machine and 4gl​
    15·1 answer
  • Be your self today!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    9·1 answer
  • You cannot then move and resize the control on the form as desired with your mouse TRUE OR FALSE​
    6·2 answers
  • Helppp plzz ajjsndndbsskdjf​
    11·1 answer
  • Please answer this question​
    13·1 answer
  • Differentiate between off the shelf software and bespoke software
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!