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
Nutka1998 [239]
4 years ago
10

Consider the following program that monitors two sensors. Here sensor1 and sensor2 denote

Computers and Technology
1 answer:
dusya [7]4 years ago
5 0

Answer:

Check the explanation

Explanation:

a)

It is a technical impossible for the update in the value of sensor1 in ISR while the main function is still evaluating whether sensor1 is with a fault or not at the point of execution in the critical section block because in this block no other instructions are not executed until the completion of instructions in the critical section.

Also semaphores are used to execute instructions when they are get lock to execute. if we write the code in operating system in such a way that at any instant of time shared resources cannot be executed in parallel, then only it is not possible to update ISR value of sensor1 while main function checking for sensor1 faultiness.

-> It is possible that  to update ISR value of sensor1 while main function checking for sensor1 faultiness if operating system and compilers are coded for parallel execution even though shared resources.

for example:

int i=5;

main()

if (i==5)

{print "i is %d",i}

other()

i=7;

//if above program executes parallel boh main() and other() functions are parallel executed

then at first clock cycle in main method i=5 so goes to next instruction print.

but in the first clock cycle also in other method i value changes to 7.

so in the next clock cycle in main method result as " i is 7.

b)

if there is an occurrence of error related to only for faulty value of sensor 1 or sensor 2 then only it is possible for this code would report "Sensor1 faulty" or "Sensor2 faulty" when there is no error related to other issues.

Like power interrupt etc.

if a spurious error can cause not only sensor1 or sensor2 to be a faulty value but also interrupting whole program or suspending entire program etc may possible for this code would not report  "Sensor1 faulty" or "Sensor2 faulty".

c)

if we Assume the interrupt source for ISR() is timer-driven , then there are conditions could cause this code to never check whether sensors are faulty or not.

timer driven means set a clock for its execution how can we set the clock. if we set clock for ISR() method to stop the entire program or repeated continuously at setting up interrupts and enabling interrupts.

these two conditions 1)set clock to stop the program would not enter into checking sensors faultiness.

2)set the clock to spare entire time to execute  at setting up interrupts and enabling interrupts. repeated continuously.

It means never run ":while(1) {} " block instructions for checking faultiness of the sensors.

You might be interested in
Como realizar un cuadro comprativo?​
Kruka [31]
How to make a comparison chart?
3 0
3 years ago
The landscape layout is more appropriate for leaflet. <br> TRUE OR FALSE
Reptile [31]
False im very sure its false
4 0
3 years ago
Read the following scenario and decide whether it is fair use and why Donnie has a major paper do for school he finds a great we
ss7ja [257]

Answer:

(A) and (B) I'm leaning more towards (B)

Explanation:

5 0
3 years ago
10 to the 8th power divided by 10 to the -4th power
sammy [17]
The answer is 10 to the twelfth power.

8 0
4 years ago
A _______ contains several blades of differing thicknesses and is used to measure the clearance between parts.
motikmotik
A Feeler Gauge. It is a tool used to measure gap widths
3 0
3 years ago
Other questions:
  • I want to know all the part of computer system
    14·1 answer
  • Jenny needs to record the names of 30 students, write down the subjects they studied, and note grades in each subject after the
    13·2 answers
  • A(n) ____________ is special high-speed memory that allows a microprocessor to access data more rapidly than from memory located
    14·2 answers
  • Which of the following is not a compilation error? Group of answer choices a. Placing a semicolon at the end of the first line o
    13·1 answer
  • Prepare a algorithm visualization for the Tower of Hanoi when 4 disks are to be moved from spindle #1 to spindle #3.
    12·1 answer
  • Why does a print document need a higher raster effect setting ?​
    14·1 answer
  • HEEELLPPPPP, ILL GIVE THE BRAIN THING
    14·1 answer
  • Does anyone know how to delete a question you put up? I'll give you 20 points.
    8·1 answer
  • A.)navigate
    7·1 answer
  • What is containment and why is it part of the planning process
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!