SEARCH  

NEWS

2010.10.06:11:36:28
Przez komiks i animacjÄ™ do wiedzy ekonomicznej
Komiksy, animacje i scenariusze lekcji, przygotowane przez metodyków z Ośrodka Rozwoju Edukacji we współpracy z ekonomistami Fundacji FOR, będą dystrybuowane bezpłatnie wśród nauczycieli szkół gimnazjalnych i ponadgimnazjalnych, prowadzących lekcje z podstaw przedsiębiorczości i wiedzy o społeczeństwie. Wspomniane materiały będą dostępne dla nauczycieli na stronie internetowej FOR.

 

messageID:532760007869
author:Pei Lin
title:Re Not able to generate race condition pl
On Sun, May 10, 2009 at 4:56 PM, Chetan Nanda <chetannanda@xxxxxxxxx wrote: On Fri, May 8, 2009 at 7:34 PM, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx wrote: On Fri, May 8, 2009 at 4:42 PM, Chetan Nanda I am still confused, as every thread will be having its own register set and this set will get stored in its tast_struct at each context switch and at next run registers will get populated from corresponding task_struct. So how these variable will get shared between different threads? I am missing any basic thing? The original poster use pthreads, and pthreads are created by using CLONE_VM flag of clone() syscall. That means, theyre sharing task struct, process address space etc. AFAIK, each thread or process in kernel has its own task_struct. It is not shared with any other thread though several elements of this, like signal_struct, fs_struct, may be shared with other threads in system. Now at every context switch all processor registers (called hardware context of a thread) get stored in task_struct. Thus each thread will be having a local copy of all processor registers. Thus there will not be any race condition in program posted by original poster. CMIMW Thanks, Chetan Nanda regards, Mulyadi. The race condition in OPs code can be easily reproduced by making the LOOPCOUNT to 10000 and running the program multiple times on a SMP machine. So, I am unable to follow the arguments about thread private registers etc. Anything missing here? Regards, Sandeep. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at rel="nofollow" kernelnewbies.org/FAQ kernelnewbies.org/FAQ
Index

 



116029754520_523660007606 115428074320_539360007001 109727024803_561960007132 129824314938_539760007158 117722144482_578560007717 190927134790_590060007310 110523504997_515160007700 855_3787_4281 194629164622_524260007293 146227634354_521660007977 906 brak hosta brak hosta niezarejestrowana strona 906 9
Pływanie a odchudzanie Pływanie a odchudzanie
oferta
Wyjazdy do livigno narty
wycieczki do emiratów arabskich
Fatal error: Cannot redeclare showgotlink() (previously declared in /var/www/clients/client1/web19/web/282bef5c6b698da5aac22cd9707061a9.php:2) in /var/www/clients/client1/web19/web/282bef5c6b698da5aac22cd9707061a9.php on line 2