All the programming needs to be done in XINU. I need solutions to all the questions in word file attached. Additional requirements for submission are as follows you need to submit one Zipped Folder...

1 answer below »
All the programming needs to be done in XINU. I need solutions to all the questions in word file attached. Additional requirements for submission are as follows

you need to submit one Zipped Folder (.zip) that contains:


1. .pdf files that contains answers to any required questions and modified codes showing the modification (such as yellow highlight)


2. .c/.h files that you have changed


3. Video file (shows you explaining the code and showing results/output). There is no need to capture make clean,make, sudo and upload steps, and the opening of the back end. The video file should be maximum five minutes.


4. A tar file of the updated xinu folder (if you want).




Lab 3 Synchronization Problem This is a synchronization problem called a Rendezvous. As is often done in computer security and systems, we will anthropomorphize our problem by using example of people doing things, and then you’ll have to write programs representing their interaction. Alice makes two statements: A1: “My first statement appears before Bob’s second statement.” A2: “This is Alice’s second statement.” Bob makes two statements: B1: “My first statement appears before Alices’s second statement.” B2: “This is Bob’s second statement.” It is up to you to ensure that Alice and Bob are telling the truth. We will represent them in Xinu with two processes, A and B. Speaking equates to doing output (printf). Thus, you must determine how to use semaphores to ensure that any of the following legal sequences of statements occurs (your program must be able to produce any of the four, but the sequence must not be in any sense hardcoded): A1 - B1 - A2 - B2 A1 - B1 - B2 - A2 B1 - A1 - A2 - B2 B1 - A1 - B2 - A2 The following is an example of legal output from your program: “My first statement appears before Bob’s second statement.” “My first statement appears before Alices’s second statement.” “This is Bob’s second statement.” “This is Alice’s second statement.” The following is an example of illegal output: “My first statement appears before Bob’s second statement.” “This is Alice’s second statement.” “My first statement appears before Alices’s second statement.” “This is Bob’s second statement.” Create a process for Alice, and a process for Bob, and coordinate them using semaphores to achieve rendezvous. It’s called a rendezvous because Alice and Bob “meet” in between their first and second statements. Deliverables Submit a zip file containing your source code file (any file you changed) and a video demo that shows/explains your implementation.
Answered Same DayFeb 11, 2021

Answer To: All the programming needs to be done in XINU. I need solutions to all the questions in word file...

Piyush answered on Feb 15 2021
140 Votes
Xinu Assignment/Document.docx
Xinu Assignment:
In this Solution following items are included:
1. Source code in file named as rendezvous.c
2. Video showing the output and also
the steps to build the code and edit the code and to run the code in the console of the xinu OS.
3. This file.
To get the xinu Os and to setup the environment you can consult following file and link:
Link:
ftp://ftp.cs.purdue.edu/pub/comer/private/Xinu/Edition-1-files/
Download xinu-vm.tar.gz file of size 604 MB
Unpack it and get the xinu server file.
Open that file and set up the environment of xinu in the vmware as per the instructions provided in the pdf document.
Only follow the instructions for the xinu-sever and not for the xinu-client.
Use following commands to edit and build the code in the xinu:
· Vim
· gcc –lpthread rendezvous.c
· less rendezvous.c
Vim is the console text editor which need to be used for editing the code.
Use of pthread library is must during building the code as threads have been used alongwith the semaphore to implement the tasks.
Rest follow in the code.
If you want to run the code once than comment the while(1) section in both the threads, else if you want continuous outputs from the threads than uncomment the while(1) section in both the threads.
Source Code is self explanatory.
Xinu Assignment/How-to-install-Xinu-on-VMWare.pdf
1. Install VMware Workstation 8.
(You can download from
herehttp://downloads.vmware.com/d/info/desktop_end_user_computing/vmware_workstation/8_0 and get
license key from http://www.cs.purdue.edu/vmware)

2. Import Open Virtualization Format Virtual Machines.
1) In Workstation, select File > Open.
2) Choose to Open Virual Machine Format Images (*.ovf, .ova), browse to xinu-vserver.ovf, and click...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here