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]
3 years ago
10

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

Computers and Technology
1 answer:
dusya [7]3 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
13. A 2-sided coin has an equal likelihood of landing on each side. One side is called "heads" and the other is called "tails".
serious [3.7K]

Answer: c

Explanation:

only reasonable answer

7 0
2 years ago
A videogame designer would be most interested in the _____ elements of beowulf.
adelina 88 [10]
I think he would be interested in a. epic elements of beowulf.
5 0
3 years ago
Read 2 more answers
Describe two differences between landscape mode and portrait mode. Respond in 2-3 complete sentences.
Mice21 [21]

Answer:

they just are different

Explanation:

3 0
3 years ago
Read 2 more answers
Why would you use a custom filter?
Angelina_Jolie [31]

Answer:By specifying conditions, you can create custom filters that narrow down the data in the exact way that you want. You do this by building a filter. If you've ever queried data in a database, this will look familiar to you. Point to either Number Filters or Text Filters in the list.

Explanation:

5 0
3 years ago
6.Which of the following statements illustrates a characteristic of a person's attitudes
OleMash [197]
They act like a filter for info a person receives
8 0
3 years ago
Read 2 more answers
Other questions:
  • What dose it need For a device to be considered a kind of computer
    14·2 answers
  • Consider the following code segment.
    15·1 answer
  • What is the most likely result of making a plan for life after high school
    14·1 answer
  • Which of the following is not considered a system component that can be found inside a computer? A-CPU B-RAM C-PCIe graphics ada
    6·1 answer
  • Small data files that are deposited on a user's hard disk when they visit a website are called _______.
    6·2 answers
  • What is DATE data type and its syntax and what is TIMESTAMP data type and its syntax in SQL language.Explain the difference betw
    14·1 answer
  • Which item is used for formatting in responsive web design?
    14·2 answers
  • Define client and.server​
    13·1 answer
  • Write a program in qbasic to accept a character and check it is vowel or consonant​
    14·1 answer
  • Plz subscribe my yt gaming channel <br>FIREAZZ GAMING​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!