Answer:
All
Explanation:
Not sure on the context of this question, but a loop is generally used to iterate though every piece of data to perform some kind of operation, on everything in something like an array or string.
Answer:
Advantages of both circuit switched networks and TDM are given below:
Explanation:
Advantages of circuit switched network over packet switched network:
- Circuit switched network has the advantage of being physically connected and having a dedicated channel for communication between the sender and the receiver which also makes it more reliable. Packet switched networks do not have a dedicated channel hence, they are not that reliable.
- Circuit switched networks are used for voice calls because there is no timing jitter or delay in these types of networks while packet switched networks do not offer this advantage.
Advantages of TDM over FDM in a circuit switched network:
- TDM is time division multiplexing i.e. multiple information is sent in different time intervals but on the same frequency. While FDM sends information using different frequencies. So, the advantage of using TDM is that the information will be sent from the sender to the receiver using only a single frequency.
- Using TDM, bandwidth is saved because it only sends information on a single frequency unlike FDM.
- In TDM, there is low chance of interference between signals since they are sent in different time intervals from the sender to the receiver. While FDM has a higher chance of interference.
(B) reporting additional cash found in the cash register
Answer:
<h3><u>Microblogging </u></h3>
- <u>One of the best-known channels in the microblogging world. Twitter is a quick and convenient way to share short posts, GIFs, article links, videos and more. Pinterest: Companies on Pinterest link to products, articles and other useful information for </u><u>audiences </u><u>.</u>
Explanation:
<h2>Hope this helps you !! </h2>
Answer:
Explanation:
Following are the Semaphores:
Customers: Counts waiting customers;
Barbers: Number of idle barbers (0 or 1)
mutex: Used for mutual exclusion.
Cutting: Ensures that the barber won’t cut another customer’s hair before the previous customer leaves
Shared data variable:
count_cust: Counts waiting customers. ------------copy of customers. As value of semaphores can’t access directly.
// shared data
semaphore customers = 0; semaphore barbers = 0; semaphore cutting = 0; semaphore mutex = 1;
int count_cust= 0;
void barber() {
while(true) { //shop is always open
wait(customers); //sleep when there are no waiting customers
wait(mutex); //mutex for accessing customers1
count_cust= count_cust-1; //customer left
signal(barbers);
signal(mutex);
cut_hair();
}
}
void customer() {
wait(mutex); //mutex for accessing count_cust
if (count_cust< n) {
count_cust= count_cust+1; //new customer
signal(customers); signal(mutex);
wait(barbers); //wait for available barbers get_haircut();
}
else { //do nothing (leave) when all chairs are used. signal(mutex);
}
}
cut_hair(){ waiting(cutting);
}
get_haircut(){
get hair cut for some time; signal(cutting);
}