Linux-Development-Sys Digest #945, Volume #7     Sat, 10 Jun 00 16:13:17 EDT

Contents:
  Re: LINUX Pthreads ("Ruppert R. Koch")
  how to access /proc/ files from Kernel Module? ([EMAIL PROTECTED])
  CA24074E Visio for Linux ([EMAIL PROTECTED])
  Re: LINUX Pthreads (Kaz Kylheku)
  Re: how to add more than 8 loop devices ? (Karsten Laskowski)
  Re: how to access /proc/ files from Kernel Module? (Sam Birch)
  Please Help on my Final Year Project ("Alan Po")
  Re: CA24074E Visio for Linux (Christopher Browne)
  Re: Please Help on my Final Year Project (Cihl)
  Re: ramdisk/diskless linux boot (Mario Klebsch)
  Re: ramdisk/diskless linux boot (Mario Klebsch)
  Getting IP from Telnet-User (Jan =?iso-8859-1?Q?R=F6hrich?=)
  Linux/windows library (Arnaud Westenberg)
  Re: LINUX Pthreads ("U.Lang")
  Re: Getting IP from Telnet-User ("Frank")
  Re: ramdisk/diskless linux boot (Pete Zaitcev)

----------------------------------------------------------------------------

From: "Ruppert R. Koch" <[EMAIL PROTECTED]>
Subject: Re: LINUX Pthreads
Date: Fri, 09 Jun 2000 18:26:24 -0700

> > I loaded the core and the
> > workshop highlighted a line of the code which consists of a malloc.
> > I know that there is no memory leak because I checked it.

Doing free() or delete() on static objects or freeing od deleting
memory twice is not caught at runtime. However, it might mess
up your memory allocation table, which means some later malloc()/new()
(usually the very next one) will segfault.

Ruppert

 -----------------------------------------------------------------
 Ruppert Koch                   [EMAIL PROTECTED]
 Dept of Elec. & Comp. Engr.    http://alpha.ece.ucsb.edu/~ruppert
 University of California       Phone: (805) 893-7788
 Santa Barbara, CA 93106        Fax:   (805) 893-3262
 -----------------------------------------------------------------



------------------------------

From: [EMAIL PROTECTED]
Subject: how to access /proc/ files from Kernel Module?
Date: Sat, 10 Jun 2000 21:07:51 GMT

How do I access the /proc/ (or other files) from inside a kernel
module?

in /proc/ksyms i found sys_close but no other file functions

what about little things like open, read, write, etc.?

my objective is to have several modules locate each other using /proc
files to publish pointers to functiions and data structures
i'm already publishing the pointers, now i need to read them from
other kernel modules.

this way modules can gracefully handle a missing non-critical module
without failing to load due to a link failure.
also addresses loading/unloading sequence issues.

i know someone that got this to work with Windows.
Linux must be able to do anything Windows can, right?

RedHat 6,2 kernel 2.2.14 (i think)

thanks,

------------------------------

From: [EMAIL PROTECTED]
Subject: CA24074E Visio for Linux
Date: Sat,10 Jun 2000 00:12:09+2000


  Embrace the new Standard in Computer Aided design - Linux CAD !

 Linux CAD is an original independently designed program runs on new

advanced Linux Operating system.

     Complex design and graphics are created with ease and elegance.

  Linux CAD erases difficulties of Microsoft Visio and goes head to

head with AutoCAD.

    Our improved introductory packageis only $99.00 and we provide 

and custom design symbol libraries appropriate for your projects.



      www. l i n u x c a d .com  
      www. s o f t w a r e f o r g e .com





------------------------------

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: LINUX Pthreads
Reply-To: [EMAIL PROTECTED]
Date: Sat, 10 Jun 2000 06:26:45 GMT

On 9 Jun 2000 22:38:42 GMT, Abdel-Fatah Bounaira <[EMAIL PROTECTED]> wrote:
>
>I am currently working on a project which consists of developing a switch
>system.  This system is able to receive messages via TCP/IP and then route
>them on the basis of its routing table.
>
>To increase the performance of this tool, this system has been implemented
>using pthread on LINUX.
>
>This system is a classical server.  It creates a listening socket and each
>time it receives a message it creates a thread to deal with the new message.

Ouch! I'd say that is rather rococo. Consider queuing the messages to a small
pool of worker threads. Else you risk swamping your system with threads
if the messages arrive at a high rate.

>However, it crashes after receiving 1500 messages.  I loaded the core and
>the workshop highlighted a line of the code which consists of a malloc.  I
>know that there is no memory leak because I checked it.

Core dump debugging of threaded applications is not currently possible on
Linux. To debug a crash, get it to occur while the program is under
the debugger.

>- Is there any limitations on multithreading on LINUX?
>  For instance the number of thread running concurrently

Suffice it to say that Linux allows more threads that a sane application
design would ever call for.

-- 
#exclude <windows.h>

------------------------------

From: Karsten Laskowski <[EMAIL PROTECTED]>
Subject: Re: how to add more than 8 loop devices ?
Date: Sat, 10 Jun 2000 09:03:51 +0200



Johan Kullstam schrieb:

> Karsten Laskowski <[EMAIL PROTECTED]> writes:
>
> > Johan Kullstam schrieb:
> >
> > > Karsten Laskowski <[EMAIL PROTECTED]> writes:
> > >
> > > > Hello,
> > > >
> > > > I would like to use our Linux (SuSE 6.4, 2.2.14)  as a CDROM Server.
> > > > I copied the raw data from every CD on the harddisk as one image and
> > > > mounted it with the option -o loop=/dev/loop1 - /dev/loop7.
> > >
> > > this may seem like a stupid question, but i am not getting something.
> > >
> > > why not just mount the cd-rom and copy the filesystem over to the hard
> > > drive with tar?
> > >
> > > --
> > > johan kullstam l72t00052
> >
> >   I copied the cdroms without mounting, just by "cp /dev/hdd
> > /images/cdromxx". Handling is very easy, only 1 big file per cdrom. By
> > mounting loopback
>
> so the difference is this
>
> your way
>
> copy raw image to hard disk
> mount it on a loopback
>
> my way
>
> mount cdrom
> copy filesystem to hard disk
>
> (there may be a filesystem extractor (mtools?) that can read the raw
> iso9660 cdrom, interpret it and extract filesystem to hard disk
> without needing to mount it.)
>
> it seems about as much work either way.  either way you have to mount
> the parition to samba.
>
> your way requires loopback devices, which you say you've run out of.
>

I had a look at the Linux Device List, the loopback device with major number 7,
seems to allow 192 devices, like the /dev/vsc with the same major number. 192
mountable cds images are enougth, maybe there are other restrictions of the
system. ;-) It an interesting other way which you describe, I'll try it, too.
Thanks for your advice, nice weekend,Karsten Laskowski

> my way doesn't.  however, it doesn't have the raw iso9660 lying about
> if that is of interest in and of itself.
>
> > and pointing on the mountpoint with samba, you have a
> > cheap jukebox and high perfomance when accessing the "cdroms". Why do you
> > want to use tar,
>
> tar is the canonical filetree copier
>
> cd /destdir
> (cd /sourcedir ; tar cf - .) | tar xpf -
>
> i you like, use cp -r or whatever instead.
>
> > or is it a better way to archiv cdroms which have to be
> > accessed by win... clients?
> >
> > Karsten Laskowski
> >
>
> --
> johan kullstam l72t00052




------------------------------

From: Sam Birch <[EMAIL PROTECTED]>
Subject: Re: how to access /proc/ files from Kernel Module?
Reply-To: [EMAIL PROTECTED]
Date: Sat, 10 Jun 2000 07:40:21 GMT

On Sat, 10 Jun 2000 21:07:51 GMT, [EMAIL PROTECTED] wrote:

>my objective is to have several modules locate each other using /proc
>files to publish pointers to functiions and data structures
>i'm already publishing the pointers, now i need to read them from
>other kernel modules.
>
>this way modules can gracefully handle a missing non-critical module
>without failing to load due to a link failure.
>also addresses loading/unloading sequence issues.

The kernel has the functionality you desire without having to resort
to accessing the proc files.  In fact, accessing the proc filesystem
is doing double duty.  Any time you would perform a read on the proc
filesystem, you are actually having a module perform a user-space to
kernel-space copy of data which another module is creating dynamically
by doing a kernel-space to user-space copy......just keep it in the
kernel!?!

Look into request_module, release_module, etc... in
linux/include/linux/kerneld.h.  This topic is pretty well covered in
Linux Device Drivers, by Alessandro Rubini (in the chapter "Loading
modules on demand").

HTH
Sam

------------------------------

From: "Alan Po" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.advocacy,comp.os.linux.development,comp.os.linux.hardware,comp.os.linux.help,comp.os.linux.networking,comp.os.linux.questions
Subject: Please Help on my Final Year Project
Date: Sat, 10 Jun 2000 18:37:22 +0800

Dear All

I am a University Student in Hong Kong. I have choosen to develop an
Embedded Linux Environment for Industrial as my Final Year Project. My
Lecturer suggest me that my first step is to use a linux to control a Web
Camera first. However, in Hong Kong, almost all Web Camera only support USB
(Windows 98 or iMac). In my plan, I also find that if the USB Hardware
Interface may be more useful and meaningful because USB is PnP and it is
easy to find in the market (also the industrial). However, as I know, Linux
does not support USB.

Can anyone tell any USB development plan on Linux? Where can I get more
solutions or hints on USB for Linux? Thanks and welcome for any help and
suggestion on my project. Thanks a lot.

Alan Po
[EMAIL PROTECTED]




------------------------------

From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: CA24074E Visio for Linux
Reply-To: [EMAIL PROTECTED]
Date: Sat, 10 Jun 2000 13:10:53 GMT

Centuries ago, Nostradamus foresaw a time when [EMAIL PROTECTED]
would say:
>
>  Embrace the new Standard in Computer Aided design - Linux CAD !
>
> Linux CAD is an original independently designed program runs on new
>
>advanced Linux Operating system.
>
>     Complex design and graphics are created with ease and elegance.
>
>  Linux CAD erases difficulties of Microsoft Visio and goes head to
>
>head with AutoCAD.
>
>    Our improved introductory packageis only $99.00 and we provide 
>
>and custom design symbol libraries appropriate for your projects.
>
>
>
>      www. l i n u x c a d .com  
>      www. s o f t w a r e f o r g e .com

Cool.

They're back to spam the newsgroups.

Same high quality writing.  Same policy of using relatively 
anonymous sources to post the articles.  Same policy of comparing
themselves to AutoCAD, although this time they also try to compare
themselves with Visio.

It's most entertaining that the URL's <http://www.linuxcad.com/> and
<http://www.softwareforge.com/> are being fiddled with so that they
don't _exactly_ look like URLs...  I can't quite fathom why...

At any rate, those that would consider their software should
doubtless take a look at what reviews are available...

<a href="http://www.linuxgazette.com/issue30/wuest.html">LinuxCAD
Impressions</a>
<a href="http://www.zip.com.au/~erikd/lcad.html">Why I don't like
LinuxCAD</a>
<a href="http://www.linuxgazette.com/issue41/weaver.html">LinuxCAD LG
#41 - Official Reaction to "LinuxCAD Impressions"</a>

The choice is yours...
-- 
[EMAIL PROTECTED] - <http://www.ntlug.org/~cbbrowne/lsf.html>
Rules of the Evil Overlord #46. "If an advisor says to me "My liege,
he is but one man. What can one man possibly do?", I will reply
"This." and kill the advisor." <http://www.eviloverlord.com/>

------------------------------

From: Cihl <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.advocacy,comp.os.linux.development,comp.os.linux.hardware,comp.os.linux.help,comp.os.linux.networking,comp.os.linux.questions
Subject: Re: Please Help on my Final Year Project
Date: Sat, 10 Jun 2000 14:22:45 GMT

Alan Po wrote:
> 
> Dear All
> 
> I am a University Student in Hong Kong. I have choosen to develop an
> Embedded Linux Environment for Industrial as my Final Year Project. My

:-O
All this alone in one year?!

> Lecturer suggest me that my first step is to use a linux to control a Web
> Camera first. However, in Hong Kong, almost all Web Camera only support USB
> (Windows 98 or iMac). In my plan, I also find that if the USB Hardware
> Interface may be more useful and meaningful because USB is PnP and it is
> easy to find in the market (also the industrial). However, as I know, Linux
> does not support USB.

It does now, try the 2.4.0 test-kernel, the USB-implementation should
be stable by now.
Some info at http://www.linux-usb.org.

> Can anyone tell any USB development plan on Linux? Where can I get more
> solutions or hints on USB for Linux? Thanks and welcome for any help and
> suggestion on my project. Thanks a lot.

Oops, said it three lines too soon. :-)
 
> Alan Po
> [EMAIL PROTECTED]

------------------------------

From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: ramdisk/diskless linux boot
Date: Sat, 10 Jun 2000 11:49:54 +0200

[EMAIL PROTECTED] writes:

>I'm guessing that I am hitting the limit on
>this filesystem, and that it does not dynamically grow even though the
>ramdisk might.  Am I stuck with a fixed size filesystem?

It seems so.

>If I want to
>allow my root (and only) filesystem to get to 24 Megs do I need to
>create a 24 Meg (mostly empty) filesystem first?  I know that it would
>probably compress very well -- which will be good for the network
>download, but does it then consume 24 Megs when it is unzipped?

This obvously is the Linux sollution to this problem.

Other UNIXes do have a tempfs, which is a RAM disk in virtual
memory. It does have the size of your VM, but the space in this file
system is shared with the processes currently executing. Your free
memory will decrease, when you store a 1 MB file as well as when you
start a process requiering 1 MB of memory.

Unfortunately noone made something like this for linux, yet. It does
have another conceptual problem with your setup: Since it is no
filesystem stored on a classical device, the data is scattered around
in VM. So you cannot make an image of it. If you would make an image,
this image would include the entire running linux system.

>I'm also curious why I can't do a 'df' from my shell and see /dev/ram
>mounted as root.

Is is listed in /etc/mtab? df reads /etc/mtab to get the list of
currently mounted file systems.

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]

------------------------------

From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: ramdisk/diskless linux boot
Date: Sat, 10 Jun 2000 11:52:21 +0200

[EMAIL PROTECTED] (Pete Zaitcev) writes:

>I think that you may need to look at ramfs instead, which is not
>mounted on top of a ramdisk, but instead steals pages right from the
>VM system.

It seems, it is not included in the standard linux kernel (at least
not in 2.2.14 and older). Any pointers about it? I am locking for this
kind of file system for about a year.

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]

------------------------------

From: Jan =?iso-8859-1?Q?R=F6hrich?= <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development
Subject: Getting IP from Telnet-User
Date: Sat, 10 Jun 2000 17:21:43 +0200

How can I find out the IP of the client-system in a telnet-session? I
want to use the IP to connect back!

Jan


------------------------------

Date: Fri, 09 Jun 2000 19:12:26 +0200
From: Arnaud Westenberg <[EMAIL PROTECTED]>
Subject: Linux/windows library

Hi all,

I would like to implement a library for both Linux and windows (perhaps
more). The library has to talk with the different device drivers of both
OS's. Therefore there must be some sort layer between the drivers and
the lib.

The lib would be (L)GPL.

The lib would implement a higher level network protocol for a specific
network. (not sure if I should call it a lib or a stack) Functionality
must be (amongst other):

- Network management
- Error management
- Communication standards

I beleive the specifications conform with ISO layer 7.

There are no implementations of the protocol yet, certainly not GPL.

I would like some tips regarding:

- The layer between the drivers and the lib, how to keep things simlpe,
wich programming language would be most suitable etc.

- The lib itself, I was thinking of java or tcl, any other suggestions?

The lib must be used on embedded hardware, so I'm not sure wether java
is a good choice.

What are your experiences/opinions/suggestions?


Thanks 

Greetings Arnaud

------------------------------

From: "U.Lang" <[EMAIL PROTECTED]>
Subject: Re: LINUX Pthreads
Date: Sat, 10 Jun 2000 18:59:17 +0200

Hello Abdel-Fatah Bounaira,

currently we had a problem within malloc.c causing an segmentation fault.
After reading the man of malloc we got the hint to set an environment variable
MALLOC_CHECK_ to 1 or 2.
Values 1or 2 will check on malloc problems, e.g. in case a wrong pointer is
provided for free().
1 gives then a print to stderr, whilest 2 aborts the program, which is useful
for debugging.

I bet you have the same problem?

Ulrich

Abdel-Fatah Bounaira schrieb:

> I am currently working on a project which consists of developing a switch
> system.
> This system is able to receive messages via TCP/IP and then route them on
> the basis of its routing table.
>
> To increase the performance of this tool, this system has been implemented
> using
> pthread on LINUX.
>
> This system is a classical server.  It creates a listening socket and each
> time it
> receives a message it creates a thread to deal with the new message.
>
> However, it crashes after receiving 1500 messages.  I loaded the core and
> the
> workshop highlighted a line of the code which consists of a malloc.
> I know that there is no memory leak because I checked it.
>
> - Is there any limitations on multithreading on LINUX?
>   For instance the number of thread running concurrently
>
> - Do I have to add a specific pthread function within the program to avoid
> any core
>   dump?
>
> If anyone can help me, I will be more than grateful.
>
> Thanks,
>
> [EMAIL PROTECTED]


------------------------------

From: "Frank" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development
Subject: Re: Getting IP from Telnet-User
Date: Sat, 10 Jun 2000 18:15:00 GMT

Jan R�hrich <[EMAIL PROTECTED]> wrote in article
<[EMAIL PROTECTED]>...
^ How can I find out the IP of the client-system in a telnet-session? I
^ want to use the IP to connect back!

'netstat -n'

Frank

------------------------------

From: [EMAIL PROTECTED] (Pete Zaitcev)
Subject: Re: ramdisk/diskless linux boot
Date: Sat, 10 Jun 2000 19:56:50 GMT

> >I think that you may need to look at ramfs instead, which is not
> >mounted on top of a ramdisk, but instead steals pages right from the
> >VM system.
> 
> It seems, it is not included in the standard linux kernel (at least
> not in 2.2.14 and older). Any pointers about it? I am locking for this
> kind of file system for about a year.

It is included in 2.3.99. It is hard to say if it is downportable
to 2.2.x. Ask Viro or Torvalds, one of them would know.

--Pete

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.development.system) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-System Digest
******************************

Reply via email to