From owner-freebsd-chat Tue Jan 4 2: 0:45 2000 Delivered-To: freebsd-chat@freebsd.org Received: from knight.cons.org (knight.cons.org [194.233.237.195]) by hub.freebsd.org (Postfix) with ESMTP id 9F1091500F for ; Tue, 4 Jan 2000 02:00:40 -0800 (PST) (envelope-from cracauer@knight.cons.org) Received: (from cracauer@localhost) by knight.cons.org (8.9.3/8.9.3) id KAA01262; Tue, 4 Jan 2000 10:58:38 +0100 (CET) Date: Tue, 4 Jan 2000 10:58:37 +0100 From: Martin Cracauer To: Steffen Merkel Cc: Martin Cracauer , kip@lyris.com, chrisy@flix.net, freebsd-chat@FreeBSD.ORG Subject: Re: Limited amount of variables in a multithreaded programm? Message-ID: <20000104105835.A28110@cons.org> References: <20000103173027.A61058@cons.org> <20000103184233.B17710@cons.org> <002001bf5697$31869fe0$0201a8c0@blade> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <002001bf5697$31869fe0$0201a8c0@blade>; from d_f0rce@gmx.de on Tue, Jan 04, 2000 at 10:36:31AM +0100 Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Steffen, first of all your, your questions were not bad enough to flame you, but I moved the thread to -chat, which might be more appropriate. What you miss (IMHO) is the mapping from the C language to the machine. If you knew it, everything would become clearer. Recommendations: - Get an idea how memory management for a process in the UNIX model looks like and what is allocated on the stack and what is not. The 4.4BSD book will help. - Get the Pentium manual from Intels' website (really the best documentation on the machine instructions, forget normal books). - View the assembler code of your C routines (gcc -S). - Use gdb not just to step C code lines, but inspect the lower level parts of a running program. Reagrding threads, I think the usualy API teaching books are near to useless. My thread books are at home, so i can't recommend one for now, but I would say a book about thread implementation is a good read for anyone using threads. Vahalia's "final frontier" is probably good. Don't try to understand everything from start, just absorb what you can. Martin In <002001bf5697$31869fe0$0201a8c0@blade>, Steffen Merkel wrote: > Hello, > > thanks for all your help again first. > As I stated in a previous question, I'v been learning C now for only some > weeks. It seems that I started to work on a project that Is far far away > from my knowledge :-) On the other hand I don't like learning in small > steps. I always try to reach something I'm not capable of yet. I wouldn't > bother you (so often) with my silly questions (as Chris Luke said: > "This really is C-101 type stuff." :-) ) if you could tell me a book about > programming FreeBSD. I have Stevens "Advanced programming..." and > Haviland's "Unix System programming" but there is not much about threads > in these books. Moreover there is nothing about variable stack sizes in > threads. > So how can I learn this? > > For you to know how little my knowledge is, I have to tell you that I've > only > got a vague image of what a stack is :-( > I didn't find anything about stacks in my "C-Beginners Guides". So how could > I know of? > > It would by great if there was something like a freebsd-newbie-programmers > mailing list. So I don't have to bother you with my questions. > > Steffen > -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message