Linux-Development-Sys Digest #120, Volume #8      Sat, 2 Sep 00 15:13:11 EDT

Contents:
  Caching files from CD---problem when playing MP3s on CD (Bruce Stephens)
  Re: Caching files from CD---problem when playing MP3s on CD
  Re: Memory allocation Strangeness.  (Update) ("Tristan Wibberley")
  Re: Caching files from CD---problem when playing MP3s on CD (Bruce Stephens)
  Is c++ exception supported in GNU C++ ("Zhang Liang")
  shared libraries (firstline-administration)
  Re: shared libraries (Karl Heyes)
  Re: Is c++ exception supported in GNU C++ (Karl Heyes)
  Elite CMI 8738 Chip modem configuration and RH 6.2 (David Yeung)
  Re: Time critical code (Peter Pointner)
  Re: system without graphic HW (Peter Pointner)
  Can kernel use 2 processors to process TCP queue? ([EMAIL PROTECTED])
  Re: Tools for version management (David Highley)
  Threads on Linux (Tom Anderson)
  Re: Tools for version management (Grant Edwards)

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

From: Bruce Stephens <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Caching files from CD---problem when playing MP3s on CD
Date: 01 Sep 2000 22:12:23 +0100

For convenience, I've stuck lots of MP3 files onto a CD.  However,
when I try playing them using freeamp (say), I find the CD is pretty
constantly active, which is annoying and wasteful---especially on a
laptop.

What's going wrong?  Why isn't the 5M or so file just buffered?  Hmm,
or does file buffering work per block or something?

More importantly, what might I try to avoid this behaviour?  Is there
some setting I can change to alter the behaviour of this?

I don't think I'm chronically short of memory---there should be enough
free to buffer the typical 5 or 10M file.

Alternatively, once upon a time, Linux-FT (the distribution from the
now-defunct small company Lasermoon) had a neat feature: it installed
basically everything from its CD, only some things (user selectable)
were installed essentially as symbolic links to the CD.  The idea was
that you ran the system with the CD in the drive, and if you asked for
files that weren't installed, it would install them (and unused files
would be removed, replaced by symbolic links).  (This was back when
650M was quite a lot of disk space.)


The same sort of idea strikes me as possible for what I want: I just
need a user-mode filesystem (and I'm sure I've seen such things
around, although I don't recall the name), and it could layer on the
CDROM---each time a file is opened, it could copy it to somewhere on
the hard disk and operate on that.  Similarly, these temporary copies
could be deleted.

Does this seem feasible to anyone else?  Any hints as to what I can
look at to make doing this easier?

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

From: <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: Caching files from CD---problem when playing MP3s on CD
Date: Fri, 1 Sep 2000 17:50:46 -0400

Can you use hdparm to activate dma transfers on the cdrom alone ?
This won't cause it to buffer everything, but should decrease the amount of
time it spends reading. The drive motor would still be running, though.

Bruce Stephens <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> For convenience, I've stuck lots of MP3 files onto a CD.  However,
> when I try playing them using freeamp (say), I find the CD is pretty
> constantly active, which is annoying and wasteful---especially on a
> laptop.
>
> What's going wrong?  Why isn't the 5M or so file just buffered?  Hmm,
> or does file buffering work per block or something?
>
> More importantly, what might I try to avoid this behaviour?  Is there
> some setting I can change to alter the behaviour of this?
>
> I don't think I'm chronically short of memory---there should be enough
> free to buffer the typical 5 or 10M file.
>
> Alternatively, once upon a time, Linux-FT (the distribution from the
> now-defunct small company Lasermoon) had a neat feature: it installed
> basically everything from its CD, only some things (user selectable)
> were installed essentially as symbolic links to the CD.  The idea was
> that you ran the system with the CD in the drive, and if you asked for
> files that weren't installed, it would install them (and unused files
> would be removed, replaced by symbolic links).  (This was back when
> 650M was quite a lot of disk space.)
>
>
> The same sort of idea strikes me as possible for what I want: I just
> need a user-mode filesystem (and I'm sure I've seen such things
> around, although I don't recall the name), and it could layer on the
> CDROM---each time a file is opened, it could copy it to somewhere on
> the hard disk and operate on that.  Similarly, these temporary copies
> could be deleted.
>
> Does this seem feasible to anyone else?  Any hints as to what I can
> look at to make doing this easier?



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

From: "Tristan Wibberley" <[EMAIL PROTECTED]>
Subject: Re: Memory allocation Strangeness.  (Update)
Date: Fri, 1 Sep 2000 23:13:11 +0100


Olivier CARRERE wrote in message <[EMAIL PROTECTED]>...
>Tristan Wibberley wrote:
>
>> >I use a 2.2.16 kernel, and I'm using *very large* applications (using
>> >more than 900MB). I just received a new 2GB machine hoping I could use
>> >it under Linux for my large applications. I compiled 2.2.16 kernel with
>> >2GB memory support, with and without SMP (just in case, since it's a SMP
>> >machine), and the same problem occurs : My app can't allocate memory
>> >when it becomes large (More than 500 MB).
>>
>> I think it's because of where libc is mapped into memory (sbrk stops when
it
>> hits it).
>
>Ok, I managed to find a clue to what happened.
>
>I was wrong when I said I mallocated 1MB blocks (my fault :( ).
>
>Actually, I malloced blocks of 1024 bytes by bunches of 1024...
>
>So I re-ran my tests on a 128MB computer/ 1 GB swap.
>
>While mallocing 1MB blocks, I managed to allocate 1.9 GB!

Linux doesn't bother to check if you actually have the memory before
promising your process that it can use it. You can't ever find out if it is
safe to use - malloc should tell you by returning a pointer to allocated
memory if it's safe to use it, and return NULL (with errno set for reason)
if it can't guarantee allocated memory. This is a very serious bug in Linux,
which prays to god that you don't ever use the memory that you allocate for
your use (sounds a bit silly when you think about it, doesn't it - badly
written software doesn't fsck up your system by reserving all memory, but
well written software does by using memory you haven't got and killing
everything in it's path :( The assumption is that badly written software is
more likely, and only the few people with lots of money invested in their
software and their business to make it good/successful will get bitten -
very sad I think).


>While mallocing 2KB blocks, I managed to allocate 995 MB.
>While mallocing 1KB blocks, I managed to allocate 887 MB.
>While mallocing 1B blocks, I managed to allocate 114KB!! (my test prog
>took actually 895MB of memory on 'top' :))

Every allocation with malloc must be deallocatable with free. This implies
management data stored for each malloc - if you malloc lots, you use lots
for management data (currently 4 bytes overhead for every malloc over 4
bytes, and exactly 8 bytes used in total for every malloc of 4 bytes and
under in glibc on ia32 - I think). Also, if you do free, it will only return
memory to the system if you free the right allocated memory - This is where
a multi-process model works well (and mmap if you're clever with it, unless
you're unlucky), since you can migrate data to a new process with no wasted
memory as yet and wipe out the old process to free any memory that you can't
otherwise release to the system.

obstacks can provide much more efficient memory use (see GNU libc
documentation).

--
Tristan Wibberley



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

From: Bruce Stephens <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: Caching files from CD---problem when playing MP3s on CD
Date: 01 Sep 2000 23:19:51 +0100

<[EMAIL PROTECTED]> writes:

> Can you use hdparm to activate dma transfers on the cdrom alone ?
> This won't cause it to buffer everything, but should decrease the
> amount of time it spends reading. The drive motor would still be
> running, though.

I'll certainly try that.  However, I don't think that's the issue:
this is a O(5M) file, and it's going to be read in little bits for O(5
minutes).  There isn't really a speed issue there---any CDROM can read
data at that rate!

The irritation is that (it seems) the CDROM is intermittently active
just about all the time.  

I don't want to copy the entire CD to hard disk---however, I guess I
could copy it one directory at a time.  That would be fine for this
particular one (it's the BBC radio Lord of the Rings, which I have on
13CDs, but 1 is much easier to carry around, so pretty sequential
listening is what I'm likely to do).  A more general solution would
still be nice, IMHO.

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

From: "Zhang Liang" <[EMAIL PROTECTED]>
Subject: Is c++ exception supported in GNU C++
Date: Fri, 1 Sep 2000 14:26:06 +0100
Reply-To: "Zhang Liang" <[EMAIL PROTECTED]>

I have tried the try , catch block in codes compiled by GNU C++, but it
seems that it doesn't work.
Is c++ exception supported in GNU C++. If so, any example how to use it
correctly? Are there special compiling options passed to g++ command line?



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

From: firstline-administration <[EMAIL PROTECTED]>
Subject: shared libraries
Date: Fri, 01 Sep 2000 20:00:44 -0400

hello

after installing of a binary rpm package i get the error:

error in loading share libraries: libjpeg.so.62: cannot open shared
object file: no such file or directory

the file is available under /usr/lib/ !

are the permissions wrong?

patric

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

From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: shared libraries
Date: Sat, 02 Sep 2000 01:58:31 +0000

In article <[EMAIL PROTECTED]>, firstline-administration
<[EMAIL PROTECTED]> wrote:
> hello
> 
> after installing of a binary rpm package i get the error:
> 
> error in loading share libraries: libjpeg.so.62: cannot open shared object
> file: no such file or directory
> 
> the file is available under /usr/lib/ !
> 
> are the permissions wrong?

more likely thr cache hasn't been updated by the rpm, as root type

ldconfig 

then try it.

karl.

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

From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: Is c++ exception supported in GNU C++
Date: Sat, 02 Sep 2000 02:02:25 +0000

In article <8onhq8$1k8f$[EMAIL PROTECTED]>, "Zhang Liang" <[EMAIL PROTECTED]> wrote:
> I have tried the try , catch block in codes compiled by GNU C++, but it seems
> that it doesn't work. Is c++ exception supported in GNU C++. If so, any
> example how to use it correctly? Are there special compiling options passed
> to g++ command line?
> 

Works here,  Im using egcs 1 1 2 comes with RH 6.2.  Check what version you
are using (g++ -v). No special switches.

karl.



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

From: David Yeung <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Elite CMI 8738 Chip modem configuration and RH 6.2
Date: Sat, 02 Sep 2000 11:24:51 +0800

Does anyone know how to configure the internal modem in the CMI 8738 chip
running RedHat 6.2.

Thanks

david

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

From: Peter Pointner <[EMAIL PROTECTED]>
Subject: Re: Time critical code
Date: 2 Sep 2000 04:54:22 +0200

Yusuf Motiwala <[EMAIL PROTECTED]> wrote:
> Thanks for reply, but I think cli/sti will not stop scheduler and
> hence task switching. right? any idea.

It does stop task switching, because nothing will call the scheduler.
Of course you must make sure you don't give up the cpu voluntarily.

Peter


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

From: Peter Pointner <[EMAIL PROTECTED]>
Subject: Re: system without graphic HW
Date: 2 Sep 2000 05:20:08 +0200

Tim Roberts <[EMAIL PROTECTED]> wrote:
> "Christian Hoefer (EED)" <[EMAIL PROTECTED]> wrote:
>>
>>I'd like to run a linux box without a graphics adaptor. what code must i
>>remove/modify to disable the local console. I plan to add a two line LCD
>>display and few keys for locale admistration later. but normaly
>>admistration is done by ssh connections. 

> You shouldn't have to modify ANY code.  Unix systems run like this all the
> time.

But you can remove the vga and virtual terminal support from the kernel,
if you don't need it. Support for a serial console might be usefull.

> There is a how-to that describes how to redirect your console to a serial
> port (probably the SERIAL how-to...).  That'd be a good place to start.

/usr/src/linux/Documentation/serial-console.txt

>>And, is there a way to capture boot messages and store them once the
>>first file system is mounted. 

> Most of the interesting boot messages go into the message log.

man dmesg klogd syslogd syslog.conf

Peter



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

From: [EMAIL PROTECTED]
Subject: Can kernel use 2 processors to process TCP queue?
Date: Sat, 02 Sep 2000 04:15:50 GMT



  If we use Machine that are running in 2 CPU and SMP kernel.
  Is TCP stack in kernel will use both processor to process data in
queue???
  Hoe about the Receive queue? Is Network adaptor card will use two
processor to receive the incomming packets??


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: David Highley <[EMAIL PROTECTED]>
Subject: Re: Tools for version management
Date: Fri, 01 Sep 2000 23:36:26 -0700

"Joachim H�rnle" wrote:

> Has someone hands-on experiences with professional version management tools
> like ClearCase or similar products on Linux? Is there are page/list
> available, which gives a good overview about the software development tools
> for Linux?

We use ClearCase on Linux, but until November when release 4.1 is available
it is not a full implementation.  Until then you have two ways of accessing
the
information/code stored in the ClearCase database.  You can use exported
views and VOBs from a fully implemented ClearCase server or you can use
snap shot views.

A VOB is a versioned object base, really a network database.  A view is
a private storage area and the rules for what you want to select out of a
VOB.

Should be able to find more information on Rationals WEB site.


>
>
> Thanks!
>
> [EMAIL PROTECTED]

--

Regards,

David Highley
Highley Recommended, Inc.
2927 SW 339th Street
Federal Way, WA 98023-7732

Phone: (206) 669-0081
FAX:   (253) 838-8509
Email: [EMAIL PROTECTED]
WEB:   http://www.highley-recommended.com




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

From: Tom Anderson <[EMAIL PROTECTED]>
Subject: Threads on Linux
Date: Sat, 02 Sep 2000 01:41:40 -0700

Anyone able to recommend a good book/web page/??? that has a lot of good

low level information about programming with threads on Linux?  I am
trying to
port some software to Linux, but the fact that each "thread" has it's
own PID
is causing me no end of trouble.  Any chance the library will be
re-worked
to eliminate this "feature"?

My other alternative appears to be to throw out my existing pthreads
based code
and write a special Linux one-off that uses "clone()" directly, setting
the flags so
that the "children" retain the PID of the parent to try and get it to
behave like
every other threads implementation.  Anyone played around with this and
have
some success/horror stories they are willing to share?

Thanks!


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

From: [EMAIL PROTECTED] (Grant Edwards)
Subject: Re: Tools for version management
Date: Sat, 02 Sep 2000 15:55:18 GMT

On Fri, 1 Sep 2000 10:23:53 +0200, Joachim H�rnle <[EMAIL PROTECTED]> wrote:

>Has someone hands-on experiences with professional version
>management tools like ClearCase or similar products on Linux?

I've had excellent experience with both RCS and CVS.  I've been
using RCS for over 10 years, and CVS for a couple.

-- 
Grant Edwards                   grante             Yow!  As a FAD follower,
                                  at               my BEVERAGE choices are
                               visi.com            rich and fulfilling!

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


** 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