Hi Ionel! On Mon, 07 Jan 2002, Ionel Ploaie wrote:
> > > Salut, > Urmeaza problema: > Two n-dimension vectors are stored in two files x and y , in the same order of their >indexes. Write a C program with UNIX system calls, to calculate the scalar product: > > > Hint: > Use n+2 processes: > a "son" process reads data from the two files and sends a pair (xi,yi) into a pipe > n "son" processes read a pair (xi,yi) from the pipe and calculates "in parallel" a >term of the scalar product. Every one of these processes send the result in a pipe >and acknowledges the "parent" process by a signal when something was written into the >pipe. > The "parent" process calculates the sum of such partial products and displays the >result. The "parent" process must first determine n by searching the files (and >testing their correctness as well). > The program must cope with special situations such as "too many processes " and has >to terminate clean. > > Acesta este proiectul pe care l-am primit la materia Sisteme de operare. Problema >este ca as avea nevoie de ceva ajutor concret de vreme ce abia acum am invatat ceva >despre programarea *nix. Orice ajutor este foarte bine venit. In general este vorba >despre realizarea unui program care sa calculeze suma produsului scalar a doi >vectori(asa am inteles eu). > Documentatie am gasit destula si am cumparat o carte de Unix de la scoala destul de >buna. Adevarul este ca eu stau cam prost la partea de programare in C. > Asta este.. > Multumesc anticipat pentru ajutorul acordat ! fa programul mai intai in ce te pricepi mai bine, recomand un limbaj de scripting (interpretat); dupa aia te ajutam noi sa-l translatezi in C (sau folosesti SWIG [iirc]). -- teodor --- Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to unsubscribe from this list.
