REQ: Help on server testing

Giorgos Keramidas keramida at ceid.upatras.gr
Fri Aug 30 18:49:01 EEST 2002


On 2002-08-30 16:34 +0000, Antonis Kanavouras wrote:
> Koita pws to skeftomai:

As to analusoume pio polu.

> - To multiplexing to analamvanei ex oloklhrou h main thread
> - O user A dinei kapoio input

Kala os edo.  H main thread exei to input tou user.

> - Me to pou pairnei ampariza (apo thn poll()) h socket tou A
>   xekinaei mia thread me xamhloterh priority pou kanei process o,ti
>   edwse o A. Meta enhmerwnei thn main thread gia tis apofaseis ths

Pio analutika.

    X   - To main thread kanei ena kainourio thread.
1   X   - Otan teleiosei h dimiourgia tou thread, to main thread
1   X     pernaei thn eidoso tou xrhsth sto neo thread.
	- To neo thread diabazei to input.
	- To neo thread stelnei ta dedomena piso sthn main thread.
2   Y   - H main thread diabazei ta dedomena.
    Y   - H main thread apantaei sto xrhsth (?)

> - Sto metaxy h main thread einai eley8erh na dextei input apo ton
>   user B,C,D

To mono shmeio pou mporei na ginei auto einai stis grammes pou den
einai markarismenes oute me X oute me Y.  Sta shmeia pou einai
markarismena me X, Y, h main thread den dexetai eidoso apo kapoio
user, afou exei alla pragmata na kanei.

Sta shmeia 1 kai 2 uparxei epikoinwnia metaju threads.  Edo einai to
IPC pou anefere o V13.  Me kapoio tropo prepei duo threads na
epikoinwnhsoun to ena me to allo.  Sto shmeio auto, epeidh mporei na
uparxoun diafora threads pou theloun na epoikoinwnhsoun me to main()
thread tha prepei na arxiseis na skeftesai kai per-thread structures
sthn main sou, gia na kserei kathe fora me pio thread milaei.  H isos
mia koinh perioxh mnhmhs, pou moirazontai ola ta threads, kai locking,
oste na min mporei ena random thread na grapsei sta koina dedomena ths
main thread kai kapoias allhs.

Blepeis, ta "threads" den einai kati pou apla to petas pano se kati
kai ksafnika ws dia mageias ginetai ekato fores pio grhgoro.  Exei mia
douleia to thema ;-)

-- 
FreeBSD: The Power to Serve -- http://www.FreeBSD.org



More information about the Linux-greek-users mailing list