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
Lena [83]
3 years ago
14

Assume you have a system that does not provide a usleep(unsigned long usec) call to suspend the execution of the thread for a gi

ven amount of time, say in ?secs. how would you implement this function using condition variables?
Business
1 answer:
Ilia_Sergeevich [38]3 years ago
4 0

#include <iostream>

#include <time.h>

using namespace std;

//usleep function declaration

void usleep(int microseconds);

//usleep function definition

void usleep(int microseconds) // Cross-platform sleep function

{

clock_t time_end;

time_end = clock() + microseconds * CLOCKS_PER_SEC / 1000000; //as 1 microsecond is 1/1000000 of a second.

while (clock() < time_end);

}

int main()

{

cout << "Before calling User defined usleep" << endl;

usleep(4000000);

cout << "After calling User defined usleep" << endl;

}

You might be interested in
The current value in today's dollars of a future sum of money is called :______
AleksandrR [38]
Ans: (a) present value
4 0
2 years ago
The _________ strategy involves a firm using different marketing mix activities to help consumers perceive the product as being
nadezda [96]

Answer:

product differentiation

Explanation:

A product differentiation strategy focuses on distinguishing your company's products or services from the competition. The company must add meaningful and valued differences that will distinguish our product or service in order for our customers to view them as different or better. The goal of a differentiation strategy is to gain a competitive advantage since customers associate differentiated products to higher quality products.

7 0
3 years ago
What if this website was a dating and show yourself and butt app/website?
marta [7]
It’s not but that would be weird considering a lot of people on here are minors
5 0
3 years ago
Roger is new-product project manager for a medical equipment company. Recently the team has exhibited a high degree of conflict
Flauer [41]

Answer: Storming stage

               

Explanation: In simple words, it refers to the stage in which conflict between members of a group starts happening due to arise of individual personalities. This is last and most crucial stage of team development process.

In this stage the performance of team starts declining due to lack of harmony and trust among the members of the team.  In the given case, Roger's team has been facing conflict over the controlling issues ,hence, we can conclude that they are at storming stage of development.

5 0
3 years ago
Fitzgerald Supermarkets (FS) operates at capacity and decides to apply ABC analysis to three product lines: baked goods, milk an
Alex777 [14]

Answer:(1) Baked Goods profit $6,700, Milk and Fruit juice profit $200, Frozen Products profit $8,900 (2) Baked Goods profit $160, Milk and Fruit juice profit $2,870, Frozen Products Profit $12,860. (3) it provide insight to FS managers that Frozen Products is the most profitable among the three product lines.

Explanation:

(1) Baked Goods. Milk and Fruit juice. Frozen Products

$ $ $

Revenue. 60,000. 66,500. 50,500

Less : Cost of good sold 41,000. 51,000. 32,000

------------- -------------- ---------------

Gross Margin. 19,000. 15,500. 18,500

Less: Store Support. 12,300. 15,300. 9,600

----------- ------------ -------------

Profit. 6,700. 200. 8,900

------------- --------------- ----------------'

(2)

Baked Goods. Milk and Fruit juice. Frozen Products

$ $ $

Revenue. 60,000. 66,500. 50,500

Less Cost of good sold 41,000. 51,000. 32,000

------------- ---------------- -----------

Contribution. 19,000. 15,500. 18,500

Less Overhead

Ordering cost. 4,180. 2,280. 1,,330

Delivery&Receipt. 9,120. 4,560. 2,736

Shelf Stocking. 3,230. 2,850. 380

Customer Support & Assistant 2,310. 3,030. 1,194

------------ -------------- ------------

Profit. 160. 2,870. 12,860

------------------ ----------------- ---------------

(3) The new insight to FS managers is that Frozen Products is the most profitable among the three products lines

Workings

Ordering cost ($95 × 44) = 4,180 ($95 × 24) = 2,280 ($95 × 14) = 1,330

Delivery &Receipt ($76 × 120) = 9,120 ($76 × 60) = 4,560 ($76 × 36) = 2,736

Shelf Stocking ($19 × 170) = 3,230 ($19 × 150) = 2,850 ( $19 × 20) = 380

Customer Support &Assistant ($0.15 × 15,400) = 2,310 ($0.15 × 20,200) = 3,030 ($0.15 × 7,960)= 1,194

7 0
3 years ago
Other questions:
  • to startup a small part time business assume your only cost are paying $100 for equipment and paying each employee you hire $ 20
    11·1 answer
  • what is one way we could pay for things like roads, schools, or the sewer system without taxing the public?
    6·1 answer
  • Eleanor paid an annual premium of $2,000 in total coverage for her homeowner's insurance, including $250,000 in damage coverage
    15·1 answer
  • How did madrids tax reforms also aggravate discontent?
    15·1 answer
  • During the year, Pablo keeps the following record of his travel: Miles Home to office 864 Office to home 864 Home to local clien
    5·2 answers
  • Alfredo has two offers for his grocery shop. The first offer is a cash payment of $60,000, and the second is a down payment of $
    7·1 answer
  • What are the requirements for being a dental assistant?
    8·1 answer
  • Given these observed times (in minutes) for four elements of a job, determine the observed time (OT) for each element. Note: the
    12·1 answer
  • You work for a Public Relations Consultancy that has been approached by the German company DHL to assist with their Public Relat
    5·1 answer
  • there are external vendors that stock and maintain magazine departments of the kmart retail establishment. they don't posess the
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!