Skip to content

Commit 6189c27

Browse files
authored
Update README.md
1 parent eb364ea commit 6189c27

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Assignment 01 - Pi
1+
## Assignment 01 - Pi (π)
22

33
Write a program that activates a thread T that performs the approximate calculation of π.
44

@@ -52,12 +52,12 @@ The Polo Marzotto's computer lab is used by three types of users, students, thes
5252

5353
The professors have priority over everyone in the access to the laboratory, the thesis students have priority over the students.
5454

55-
Nobody can be interrupted while using a computer. Write a JAVA program that simulates user and tutor behavior. The program receives as input the number of students, thesis students and professors who use the laboratory and activates a thread for each user. Each user accesses k times to the lab, with k generated randomly. Simulate the time interval between one access and the next one and the time spent in the laboratory using the sleep method. The tutor has to coordinate access to the lab. The program must end when all users have completed their access to the laboratory.
55+
Nobody can be interrupted while using a computer. Write a JAVA program that simulates user and tutor behavior. The program receives as input the number of students, thesis students and professors who use the laboratory and activates a thread for each user. Each user accesses k times to the lab, with k generated randomly. Simulate the time interval between one access and the next one and the time spent in the laboratory using the sleep method. The tutor has to coordinate access to the lab. The program must end when all users have completed their access to the laboratory.
5656
<br>
5757

5858
## Assignment 04 - Computer lab with Monitor
5959

60-
Solve the problem of the computer lab simulation, of the previous assignment, using the Monitor construct.
60+
Solve the problem of the computer lab simulation, of the previous assignment, using the Monitor construct.
6161
<br>
6262

6363
## Assignment 05 - File Crawler
@@ -79,6 +79,7 @@ The program must be structured as follows:
7979
* consumers take directory names from the queue and print their content (file names)
8080

8181
* the queue must be created with a LinkedList. Remember that a Linked List is not a thread-safe structure. From the JAVA API: *“Note that the implementation is not synchronized. If multiple threads access a linked list concurrently, and at least one of the threads modifies the list structurally, it must be synchronized externally”*
82+
<br>
8283

8384
## Assignment 06 - Bank accounts
8485

@@ -117,12 +118,14 @@ Further indications
117118

118119
Write an echo server program using the java NIO library and, in particular, the Selector and channels in non-blocking mode, and an echo client program, using NIO (also fine with blocking mode).
119120

120-
* The server accepts requests for connections from clients, receives messages sent by clients and sends them back (possibly adding "echoed by server" to the received message).
121+
* The server accepts requests for connections from clients, receives messages sent by clients and sends them back (possibly adding "echoed by server" to the received message)
121122

122123
* The client reads the message to be sent from the console, sends it to the server and displays what it has received from the server.
123124

124125
<br>
126+
125127
![Description](/image_assign8.png)
128+
126129
<br>
127130

128131
## Assignment 09 - UDP Ping
@@ -137,14 +140,14 @@ Also, since the execution of the programs will run on a single host or on the lo
137140

138141
### PING Client
139142

140-
* accepts two command-line arguments: **server name and port**. If one or more arguments are incorrect, the client terminates after printing an error message like *ERR -arg x*, where x is the argument number.
143+
* accepts two command-line arguments: **server name and port**. If one or more arguments are incorrect, the client terminates after printing an error message like *ERR -arg x*, where x is the argument number
141144

142145
* uses UDP communication to communicate with the server and sends 10 messages to the server, with the following format:
143146

144147
PING seqno timestamp
145148
where *seqno* is the PING sequence number (between 0-9) and the *timestamp* (in milliseconds) indicates when the message was sent
146149

147-
* does not send a new PING until it has received the echo of the previous PING, or a timeout has expired.
150+
* does not send a new PING until it has received the echo of the previous PING, or a timeout has expired
148151

149152
* Print each message sent to the server and the ping RTT or a * if the response was not received within 2 seconds
150153

@@ -173,26 +176,24 @@ Also, since the execution of the programs will run on a single host or on the lo
173176

174177
Define a *TimeServer* server, which:
175178

176-
* sends the date and time to a multicast group *dategroups* at regular intervals.
177-
* waits between one sending and the next a time interval simulated by the sleep () method.
179+
* sends the date and time to a multicast group *dategroups* at regular intervals
180+
* waits between one sending and the next a time interval simulated by the sleep () method
178181

179182
The IP address of *dategroup* is introduced by the command-line.
180183

181-
Then define a *TimeClient* client that joins *dategroup* and receives, ten consecutive times, date and time, displays them, then terminates.
184+
Then define a *TimeClient* client that joins *dategroup* and receives, ten consecutive times, date and time, displays them, then terminates.
182185
<br>
183186

184187
## Assignment 11 - Congress management
185188

186-
Design a Client/Server application for managing registrations at a congress. The organization of the congress provides the speakers of the various sessions with an interface through which to subscribe to a session, and the possibility of viewing the programs of the various days of the congress, with the interventions of the various sessions. The server maintains the programs of the 3 days of the congress, each of which is stored in a data structure, in which each line corresponds to a session (in total 12 for each day).
187-
188-
For each session, the names of the registered speakers (maximum 5) are stored.
189+
Design a Client/Server application for managing registrations at a congress. The organization of the congress provides the speakers of the various sessions with an interface through which to subscribe to a session, and the possibility of viewing the programs of the various days of the congress, with the interventions of the various sessions. The server maintains the programs of the 3 days of the congress, each of which is stored in a data structure, in which each line corresponds to a session (in total 12 for each day). For each session, the names of the registered speakers (maximum 5) are stored.
189190

190191
The client can request operations to:
191192

192-
* register a speaker at a session;
193-
* get the program of the congress;
193+
* register a speaker at a session
194+
* get the program of the congress
194195

195-
The client forwards requests to the server via the **RMI** mechanism. Provide, for each possible operation, the management of any abnormal conditions (for example the request for registration to a non-existent day and/or session or for which all the intervention spaces have already been covered)
196+
The client forwards requests to the server via the **RMI** mechanism. Provide, for each possible operation, the management of any abnormal conditions (for example the request for registration to a non-existent day and/or session or for which all the intervention spaces have already been covered).
196197

197198
The client is implemented as a cyclic process that continues making synchronous requests until all user needs are exhausted. Establish an appropriate termination condition for the request process.
198199

0 commit comments

Comments
 (0)