Discussion forum: Note that participation is expected. - No posts is 5%. One post will not get all that. - Project 3 is usually where lots of issues come up Project 3 Notes: - Readme should describe data. Sample queries? - Change: User-friendly, most or all fields changeable. - -999 Displays should be tabular, if possible. - Scripts will be required in Project 3 * No scripts, no grade - Input must be error checked; in particular, selecting records by number * Numbering of records should occur with -999 - Show the menu every time - Doxygen mainpages will be point of emphasis in Project 3. - Project 3 will be submitted as a zip, tar, etc. =================================================================== Sockets - Clients identify the server target by : - Server just claims a port using bind. Project 3 Mutex ==> mutual exclusion - Ports are open between our three machines, mcg, cats, & calm, 2000-3000 - VPN use is encouraged for accessing 'our' machines (mcg, cats, & calm) * To login, on Putty, load your acad profile, change the acad to the other machines (once for each), change the moniker, save. Now you can login directly under VPN. The server controls: - bin file - server log Because the child servers contend to access these resources, synchronization is required. The first client on a machine: - Determines this by looking for the semaphores > If none found, it does the setup - blocks other clients from accessing shared resources until it's done setting up > Fact: Semaphores come from the factory set to 0, i.e. a binary semaphore is blocked The server (and clients) may use threads at your discretion. - Synchronization must be carried out using the best methods; concurrency is a MUST. Logging may include only the last number in the IP, for brevity. - The port must be included. Log files in this project should be persistent. Foreground/background kbd commands - fg brings a process that is either suspended or running in the background to the foreground * Multiple processes can be in the background, either running or suspended. In that case: > jobs will show the processes, with as number > To bring the desired process (numbered X) forward, use fg X Traditional semaphore commands are P (wait) and V (signal) - A wait is a request to access the shared resource - A signal releases access to the shared resource Whatever can be done on the client side, should be done on the client side. struct sembuf { ushort sem_num; /* semaphore # */ short semop; /*semaphore operation*/ short sem_flg; /*operation flags*/ } P() - semop <-- -1 V() - semop <-- 1