Answer:
Bus Topology
Explanation:
In local area networks (LANs), Bus topology is used to connect all the computers on the single cable. This cable is called backbone of the network. In this type of network when a computer sends data, it will be received on entire network.
For Example
In water line system, all the taps that are connected to single pipe. If the pipe or a single tap broken this will affect the whole system.
Entire system can be crash if any node or wire will break.
Answer:
4 bits are required. 4 bits can represent 16 different values (2*2*2*2 or ). 3 bits can only represent 8 different values. In the general case n bits can represent values, or correspondingly m values can be represented by bits.
Answer:
a) 4 processes
b) 2 resources
c) R1: 2 instances
R2: 2 instances
d) R2
e) R1
f) R1
g) No resource
h) R1
i) R2
j) R2
k) No
l)No deadlock
Explanation:
You need to know that the resources that are required by the processes for completion are shown by the request edge and the resources allocated are shown by the allocation edge. And thus, we can find what resources are allocated to the process, and required for the completion accordingly. And here again, the cycle is created, and hence deadlock may or may not occur. However, we see that resources have multiple instances and get freed on time. And hence, deadlock does not occur.
Like,
P4 uses R2 and free one instance of R2.
P3 then uses one instance of R2 and free R2.
P3 then uses one instance of R3 and free R3.
P1 uses one instance of R1 and free R1 one instance
P1 then uses R2 and free R2.
P2 uses R1 and free R1.
Hence, all the processes are complete and deadlock does not occur.
Answer:
Explanation:
the answer is also in the question. The loop is used to control the number of program execution. So in order not to run forever, the loop should be included inside the loop brackets. Then you can restructure the code as done below.
var numItems = promptNum("How many items?");
var total = 0;
var itemPrice=0;
while (numItems > 0){
itemPrice = promptNum("Enter next item price");
total = total + itemPrice;
numItems = numItems - 1;
}
console.log("The total is" + total);
The value to be displayed will be the total of the item prices inputted.