Elixir language to solve operating system problem

profile5hn05974j
document2.docx

Macintosh HD:Users:GT3:Desktop:Screen Shot 2017-04-10 at 12.47.12 AM.png

Macintosh HD:Users:GT3:Desktop:Screen Shot 2017-04-10 at 12.47.20 AM.png

Macintosh HD:Users:GT3:Desktop:Screen Shot 2017-04-10 at 12.47.25 AM.png

Macintosh HD:Users:GT3:Desktop:Screen Shot 2017-04-10 at 12.47.37 AM.png

Macintosh HD:Users:GT3:Desktop:Screen Shot 2017-04-10 at 12.47.44 AM.png

Macintosh HD:Users:GT3:Desktop:Screen Shot 2017-04-10 at 12.47.50 AM.png

Macintosh HD:Users:GT3:Desktop:Screen Shot 2017-04-12 at 1.22.45 PM.png

Macintosh HD:Users:GT3:Desktop:Screen Shot 2017-04-12 at 1.23.17 PM.png

Hint:

Also, since the names ":barber" and ":waitingroom" have been registered by the OS

for the pids of the Barber and WaitingRoom actors, use those names as the first argument  to the send() function, rather than passing a self() return address in the messages themselves,

and using it as the first argument to send().  This will simplify your code.

Lastly, let's accept the size of the waiting room also as a command-line

argument to make the program more flexible.  Thus, please use the

following main program:

Process.flag(:trap_exit, true)

waiting_room_size = String.to_integer(hd(System.argv())) customer_count = String.to_integer(hd(tl(System.argv()))) SleepingBarber.new_barber() SleepingBarber.new_waitingroom(waiting_room_size) SleepingBarber.spawn_customers(customer_count) SleepingBarber.wait_for_end(customer_count)