subject
Computers and Technology, 24.11.2021 07:30 momo842

Consider an event facility that has a 100-person capacity where the number of persons cannot exceed 100 at any time. There are 2 gates, G1, an entry gate (cannot be used to exit) and G2, an exit gate (cannot be used to enter). G1 and G2 use a turnstile type of gate so that only one person can use at any time when enabled. Two APIs are available in the system: G1_permit_one() and G2_permit_one(). When called, G1_permit_one() will enable the turnstile to allow exactly one person to enter. Similarly, when called, API G2_permit_one() will enable the turnstile to allow exactly one person to exit. There are two processes: manage_G1 and manage_G2 that share variables between them. Also available are two semaphores s_arrive and s_depart, both initialized to 0. When a person arrives at the entry gate (wanting to enter the facility) a sensor placed at the entry gate executes signal(s_arrive). Similarly, when a person arrives at the exit gate (wanting to exit the facility), a sensor placed at exit gate executes signal(s_depart).
These are given.
Code the two processes manage_G1 and manage_G2.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:00
Let r be a robotic arm with a fixed base and seven links. the last joint of r is a prismatic joint, the other ones are revolute joints. give a set of parameters that determines a placement of r. what is the dimension of the configuration space resulting from your choice of parameters?
Answers: 3
question
Computers and Technology, 23.06.2019 19:30
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a,b] se pot scrie ca produs de două numere prime? “.
Answers: 3
question
Computers and Technology, 24.06.2019 00:30
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
question
Computers and Technology, 24.06.2019 10:20
Write a program that keeps asking the user for new values to be added to a list until the user enters 'exit' ('exit' should not be added to the list). these values entered by the user are added to a list we call 'initial_list'. then write a function that takes this initial_list as input and returns another list with 3 copies of every value in the initial_list. finally, inside print out all of the values in the new list. for example: input: enter value to be added to list: a enter value to be added to list: b enter value to be added to list: c enter value to be added to list: exit output: a b c a b c a b c note how 'exit' is not added to the list. also, your program needs to be able to handle any variation of 'exit' such as 'exit', 'exit' etc. and treat them all as 'exit'.
Answers: 2
You know the right answer?
Consider an event facility that has a 100-person capacity where the number of persons cannot exceed...
Questions