I think it’s System updates bc you have to use some type of technology to be able to update whatever your doing
Answer:
// Producer Thread
void *producer(void *param) {
buffer_item item;
while (true) {
item = rand() % 100;
sem_wait(&empty);
pthread_mutex_lock(&mutex);
if (insert_item(item))
printf("Can't insert item\n");
else
printf("Producer %d: produced %d\n", *((int*)param), item);
pthread_mutex_unlock(&mutex);
sem_post(&full);
}
}
// Consumer Thread
void *consumer(void *param) {
while (true) {
buffer_item item = NULL;
if (in > 0)
item = buffer[in - 1];
sem_wait(&full);
pthread_mutex_lock(&mutex);
if (remove_item(&item))
printf("Can't remove item\n");
else
printf("Consumer %d: consumed %d\n", *((int*)param), item);
pthread_mutex_unlock(&mutex);
sem_post(&empty);
}
}
Explanation:
An outline of the producer and consumer threads appears as shown above.
Answer:
Logic for a program
Explanation:
//Here ind = index
//declare the number
number ind
number sum
number avg
number SIZE = 20
number num[SIZE] = {0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0}
getReady()
while ind < SIZE
getNumbers()
stop
getReady()
ind = 0
sum = 0
return
getNumbers()
cout<< “Enter a number for position ”, ind
input numbers[ind]
sum = sum + numbers[ind]
ind = ind + 1
return
;
finishUp()
avg = sum/SIZE
ind = 0
while ind < SIZE
output numbers[ind], avg – numbers[index]
ind = ind + 1
return
Modify the program in 2a
number index
number sum
number avg
number actualSize
number SIZE = 10
number number[SIZE] = 0
Answer:
future value = 232369.1361
return % = 384.10 %
Explanation:
given data
principal = $100 per month
time = 40 year = 480 months
rate = 6.25 % yearly = 0.0625 yearly = 0.005208 monthly
to find out
total amount of capital at the end of your investment and percentage is your total return
solution
so here future value formula is
future value = P
..........1
here r is rate and t is time and P is principal
so put all value
future value = 100
future value = 232369.1361
so
Total capital at the end of investment-Total principle invested over the years
232369.1361 - 100 ( 12 × 40 )
184369.1361
so
Return % =
× 100
return % = 384.10 %
The generated code component that executes on the web server is the following does Laura tell you is NOT a component of the active server page.
a. the generated code component that executes on the web server
<u>Explanation:</u>
Asp technology is where it is a combination of both HTML and visual basic programming. Asp web pages are executed in server and display as Html to the end-users.
With the HTML coding, only static pages can be developed whereas through ASP web pages are developed and which contains visual basic coding languages and for client-side validates in ASP web pages either javascript or visual basic scripts are used.
Each ASP web pages are compiled at the server end and executed and complied out HTML pages are shown in web pages.
We need to install the ASP component at the server to execute the ASP web pages.