Computers and Technology

1. The bakery algorithm allows two processes to pick the same value for turn. Yet, it does not create a conflict for mutual exclusion. How is this situation resolved?

2. Consider the three states a process can assume: running, ready, and blocked. A process is currently scheduled to run. There is a hardware interrupt raised. What will be the state transition for the process?

3. The the following code to creates a child to do something and return. The return value is to be caught by the parent. Can you see any problem with the code that I wrote? How will you fix it?

pid_t pid = fork();

if ( pid < 0 )

exit ( 1 );

if ( pid == 0 )

wait();

exit ( 0 );

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 08:50, najashohatee1234
Can online classes such as gradpoint track your ip location like if im taking a final and i give somebody else my account and they take the final for me will it show where they are taking the final from? and can this be countered with a vpn
Answers: 1
image
Computers and Technology, 22.06.2019 17:30, Samsonb
Working on this program in python 3.7: a year in the modern gregorian calendar consists of 365 days. in reality, the earth takes longer to rotate around the sun. to account for the difference in time, every 4 years, a leap year takes place. a leap year is when a year has 366 days: an extra day, february 29th. the requirements for a given year to be a leap year are: 1) the year must be divisible by 42) if the year is a century year (1700, 1800, the year must be evenly divisible by 400some example leap years are 1600, 1712, and 2016.write a program that takes in a year and determines whether that year is a leap year. ex: if the input is 1712, the output is: 1712 is a leap year. ex: if the input is 1913, the output is: 1913 is not a leap year. your program must define and call the function isleapyear(useryear). the function should return true if the input year is a leap year and false otherwise.
Answers: 1
image
Computers and Technology, 22.06.2019 23:30, jhonpiper
For her science class, elaine is creating a presentation on weather in the united states. she wants to make the presentation beautiful and interesting by drawing simple cloud or wave shapes. which is the best way for elaine to draw these shapes?
Answers: 1
image
Computers and Technology, 23.06.2019 12:30, Prettygirlyaya
How is the brightness of oled of the diaplay is controled
Answers: 1
Do you know the correct answer?
1. The bakery algorithm allows two processes to pick the same value for turn. Yet, it does not creat...

Questions in other subjects: