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 !
--
IONEL PLOAIE [EMAIL PROTECTED]
================================================
Network Administrator - SC Salubritas SA P.Neamt
Tel: 090.152669 ICQ 105549273
---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
unsubscribe from this list.