cs211 lab4
https://maths.nuigalway.ie/~gettrick/teach/cs211/2024/labs/cs211Lab4.html
-
For this lab you must submit all source code (python
files), and, if applicable, the result(s) of running the program on (a few)
test cases. This should be sent in as a file upload/attachment
via CANVAS (not directly by email).
The source code must
be well presented (indenting, spaces, reasonable variable/function names,
etc.) and must include comments (as a rough guideline - aim to have nearly as
many comments as lines of code). Any questions asked should be answered by
typing the answers into the comments box on the CANVAS upload form, or
by including the answer in comments in the PYTHON source code..
-
This material should be uploaded
before
the deadline of 5pm
Friday March 1st., 2024. You will lose 20% for each day
(or part of day) the lab is late.
-
Plagiarism (the unattributed copying of work from other sources
(internet, fellow students,....)) will not be tolerated.
You risk getting zero for your lab if it is found to be
plagiarized.
Study the program "thread10.py" (and perhaps the other PYTHON programs
beginning with thread****.py) at
https://maths.nuigalway.ie/~gettrick/teach/cs211/oldNotes/progs/.
-
TASK
Modify the program as follows: 1) It should read in the URLS from the user
(any number of them).
2) It also reads in from the user a positive integer (lets call it n)
which is the maximum
number of simultaneous web addresses that will be queried. Use a semaphore
to limit (to n) the number of (parallel) threads querying external web pages, and a
MUTEX to limit the printouts to one thread at a time.
©
University of Galway