Linux-Development-Sys Digest #134, Volume #8 Sun, 10 Sep 00 09:13:11 EDT
Contents:
Re: buffer_dirty - what's the @#$%? ("Lurch")
Newbie question on programming? ("eric07")
Re: Memory allocation Strangeness. (Update) ("Tristan Wibberley")
Re: Memory allocation Strangeness. (Update) ("Tristan Wibberley")
Re: Newbie question on programming? (Karl Heyes)
Re: Threads on Linux (Karl Heyes)
Re: # of maximum outstanding disk IO's (Johan Kullstam)
Forte, linux and IBM's java. (Thaddeus L Olczyk)
Zip 100 Parallel Port Drive (Peter Rodriguez)
Re: Wish for a writable ISO-9660 compatible filsystem (fred smith)
Re: Zip 100 Parallel Port Drive (Wouter Verhelst)
socket beginner: developping inetd subserver (Pierre Wieser)
Re: Zip 100 Parallel Port Drive (Peter Rodriguez)
Re: Memory allocation Strangeness. (Update) (Larry Ebbitt)
Zip 100 Parallel Port Drive ([EMAIL PROTECTED])
ethernet over non ethernet hardware (Frank Neuber)
----------------------------------------------------------------------------
From: "Lurch" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: buffer_dirty - what's the @#$%?
Date: Sun, 10 Sep 2000 01:27:02 +0200
Hello,
to make sure the umount is done after the copy, you can use the "&&" instead
of ";" (the second instruction won't start executing before the first one
has terminated successfully
i.e. mount /mnt/fd && cp /mnt/fd/* /prj && umount /mnt/fd
hope this helps...
Ian Dichkovsky <[EMAIL PROTECTED]> wrote in message
news:8pa3fn$qjq$[EMAIL PROTECTED]...
> > > I copy file _FROM_ floppy to hard
>
> > it has time. If you remove the floppy before it gets around to
> > doing/finishing the copy the buffer is "dirty."
>
> I don't remove floppy before umount.
>
> >
> > sync
> >
> > forces the write (rather than waiting).
>
> I know about sync
>
> so maybe I must type
> mount /mnt/fd; cp /mnt/fd/* /prj; sync; umount /mnt/fd
>
>
> Bye!
>
>
------------------------------
From: "eric07" <[EMAIL PROTECTED]>
Subject: Newbie question on programming?
Date: Sat, 09 Sep 2000 23:30:17 GMT
I'm new to linux and trying to play with make some of the programs like
apache, etc.
I noticed that the majority of the major apps I'm interested in is written
in C not c++. Apache for example is written in C not c++.
I thought there was such a big push to c++. I want to learn how to program
in either c or c++.
So I'm trying to get some info on this.
Is there a reason why most of these apps are written in c and not c++?
Are there some restriction or something in c++ not found in c?
Any info would be appreciated.
Thanks
------------------------------
From: "Tristan Wibberley" <[EMAIL PROTECTED]>
Subject: Re: Memory allocation Strangeness. (Update)
Date: Sun, 10 Sep 2000 01:57:28 +0100
Larry Ebbitt wrote in message <[EMAIL PROTECTED]>...
>Szabolcs Csetey wrote:
>
>
>> It's not bug however a built in feature for efficience and also to let
>> applications run without enough resources [e.g. think of huge sparse
>> matrixes in scientific apps]. "Workaround" is proper resource limits.
>
>Absolutely. What's available now may not be what's available when the
>storage is actually used. MVS used to try to make sure that a certain
amount
>of back store (page space) was available before starting a job. It no
longer
>does as it caused far more trouble than it prevented.
What trouble? Crappy software like emacs trying to fork a 40MB process (who
in their right mind would do something like that? RMS? I said "right mind").
If you need the memory it should actually be there, if you don't, you
shouldn't allocate it.
--
Tristan Wibberley
------------------------------
From: "Tristan Wibberley" <[EMAIL PROTECTED]>
Subject: Re: Memory allocation Strangeness. (Update)
Date: Sun, 10 Sep 2000 02:20:36 +0100
Nix <$}xinix{[email protected]> wrote in message
<[EMAIL PROTECTED]>...
>"Tristan Wibberley" <[EMAIL PROTECTED]> writes:
>
>[memory overcommitment]
>> 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
>
>Oh, please, let's not start this again. It was thrashed to death on l-k
>last year :(
sorry, but it still isn't fixed ;)
>This is a feature, not a bug. You can partially turn it off (echo 0 >
>/proc/sys/vm/overcommit_memory); when you do that, memory allocated by
>your process always has backing store somewhere at the time it is
>allocated. But this is not much of a win: turning it off completely
>would consume huge hoards of memory, because the semantics of normal
>memory overcommitment with respect to whether you really have the memory
>you asked for are identical to those of COW page copying on fork(). And
>you really, *really* don't want to turn that off, unless you have dozens
>of gigabytes or more of swap just lying around to be wasted.
Don't fork a large process unless you need the forked process as is (if
you're going to exec, fork while your VM is small, and exec later from
that).
>It does not need no-overcommit-and-no-COW-fork(). And without that you
>won't get the perfect determinism you seem to want. (And with it, many
>data structures, like that used by C++'s vector<>, will eat even more
>silly amounts of memory. A vector<> is a sparse-ended array; it doubles
>in size whenever any growth is necessary; this is needed to satisfy its
>time complexity constraints. Hence you are likely wasting 50% again of
>the size of your vector<> whenever you use one.)
If you haven't reserved pages yet then you have to every page - that means
that vector isn't amortised constant time for push_back *with* overcommit,
but it is without (except the unavoidable caching and page faults for VM).
On an OS with overcommit, C++ standard vector *does not* meet the time
constraints (AFAICS). vectors amortised constant time for push_back is for
when you use large amounts of data but don't know how much before, while you
*do* need constant time - for this, it's so important that you just buy
enough RAM; if you don't need O(1), just explicitly set the capacity when
ever you fill it up. That's the *only* way to work it, over-commit or not.
There are things which *cannot* be done safely (or in the above case, at
all) if you over-commit, whiole fork-exec can be done without if you think
before you code.
--
Tristan Wibberley
------------------------------
From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: Newbie question on programming?
Date: Sun, 10 Sep 2000 02:31:32 +0000
In article <dKzu5.34752$[EMAIL PROTECTED]>, "eric07"
<[EMAIL PROTECTED]> wrote:
> I'm new to linux and trying to play with make some of the programs like
> apache, etc.
>
> I noticed that the majority of the major apps I'm interested in is written in
> C not c++. Apache for example is written in C not c++.
>
> I thought there was such a big push to c++. I want to learn how to program
> in either c or c++.
>
> So I'm trying to get some info on this. Is there a reason why most of these
> apps are written in c and not c++? Are there some restriction or something in
> c++ not found in c?
>
Not really, You won't see many due to several reasons.
C is well established, libraries, debugging and compilers have had countless
hours with C code.
People code in what ever language they prefer.
C++ is really for mid-large size projects where type-safe issues come in to
play, program correctness, and strong engineering skills required.
The apache example you gave is just typical, originally started as the first
web server, which then had many patches (a-patchy) applied. When some of
these projects started the C++ was not up to scratch.
The linux kernel use to be compiled with gnu c++ although it never used C++
techniques. It was used for purley type checking.
karl
------------------------------
From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: Threads on Linux
Date: Sun, 10 Sep 2000 02:57:29 +0000
In article <cbiu5.76046$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> Karl Heyes <[EMAIL PROTECTED]> wrote:
[ bit missed ]
>> Surely thats impossible!. If threads share the data area then some style of
>> locking is required, get your locks wrong, you have a race condition?. am I
>> missing something.
>
> Yes, the case where:
>
> 1. No threads modify the data segment.
>
> 2. Access to the data segment is authored so they aren't reading the
> same portion at the same time. (By design of the algorithm, not enforced by
> locking
>
So, in general you can't!. The above cases are not typical.
karl
------------------------------
Crossposted-To:
comp.os.linux.development.apps,comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: # of maximum outstanding disk IO's
From: Johan Kullstam <[EMAIL PROTECTED]>
Date: Sun, 10 Sep 2000 02:55:17 GMT
"Hog Rider" <[EMAIL PROTECTED]> writes:
> We are doing some performance testing of disk storage on different
> platforms, and I was wondering if Linux has a maximum number of IO's that
> can be outstanding at any given time. Translated, if the storage device is
> busy and the h/w queue is full, how many IO's will Linux queue up waiting
> for the storage device to be available again.
this is usually a limit set by your choice SCSI controller, hard disks
and other devices.
--
J o h a n K u l l s t a m
[[EMAIL PROTECTED]]
Don't Fear the Penguin!
------------------------------
From: [EMAIL PROTECTED] (Thaddeus L Olczyk)
Crossposted-To: comp.lang.java.softwaretools
Subject: Forte, linux and IBM's java.
Date: Sun, 10 Sep 2000 05:47:02 GMT
Reply-To: [EMAIL PROTECTED]
Since using Sun's version of java for linux in a no-no on SMP
machines (check the toplevel readme under System Requirements
Note to linux users). I've been using IBM's version of java for linux.
Recently I've tried out forte, but have a problem with IBM's java and
forte. When I get to loading javadoc I get an exception No class
definition found: class name sun/tools/javac/BatchEnvironment.
The IDE then hangs.
Any idea how to fix this?
( PS I haven't tried out blackdowns latest and greatest yet. Does
forte work with it?)
------------------------------
Date: Sun, 10 Sep 2000 19:00:52 +1200
From: Peter Rodriguez <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Subject: Zip 100 Parallel Port Drive
I am running RedHat 6.2 on one machine and 6.0 on another. Both machines
have Zip 100 parallel port drives connected. The RH 6.2 machine has Win
98 on another partition and the RH 6.0 machine has NT 4.0 Workstation on
the other partition.
My problem is that the Zip drives work fine with Win 98, NT 4.0 and
RedHat 6.0, and I have tried swapping the drives from one machine to the
other and the result is the same. Module imm refuses to load on RedHat
6.2 ( Linux Kernel 2.2.14-5.0). I get the same error message whether I
use insmod or modprobe, i.e.:-
"imm: Version 2.03 (for Linux 2.0.0)
scsi: 0 hosts
/lib/modules/2.2.14-5.0/scsi/imm.o: init_module: Device or resource
busy"
This is all strange territory to me, but does it mean that the wrong
version of imm.o is provided with RedHat 6.2? If so, how do I obtain the
correct version?
Then maybe I have got hold of the wrong end of the stick altogether.
Any help would be very much appreciated.
Peter Rodriguez
Auckland, New Zealand
"Give me the bazaar every time"
------------------------------
Crossposted-To: comp.os.linux.misc
From: fred smith <[EMAIL PROTECTED]>
Subject: Re: Wish for a writable ISO-9660 compatible filsystem
Date: Sat, 9 Sep 2000 21:40:53 GMT
In comp.os.linux.development.system Otto Wyss <[EMAIL PROTECTED]> wrote:
: While I was reorganizing my backup (using a CD-writer), I had the idea
: of using an ISO-9660 image file mounted through the loopback device. I
: soon had to learn it won't work the way I liked since ISO-9660 is simply
: readonly.
But there's no law that says you MUST use an ISO9660 filesystem on a
CD! You can write any old filesystem you like, as long as you're willing
to live with the hit that you can read it only on systems that understand
that type of filesystem. For example, SCO used to distribute old Skunkware
CDROMs with one of their own filesystems burned on it.
So, you should be able to create, e.g., a EXT2 loopback filesystem, fill
it up to 650 megs total filesystem size then burn it into a CD. Having
done that you SHOULD be able to mount it (with "-r") like any other
EXT2 filesystem.
: I think it's time Linux gets the ability to use writable image files, so
I seem to remember seeing that support for UDF is coming, perhaps in the
2.4.x kernel? When using a CD-RW medium it allows you to add/erase files
in a way that seems (at least superficailly) like any other R/W
filesystem. It works on Windoze (which isn't much of a recommendation, I
know! :^), so when it becomes supported on Linux you won't really need
your writable ISO stuff.
: I'm going to make the following proposition:
<snip>
: What are you thinking about my proposition? Could this be done or are
: there obstacles I don't see. Is it alltogether not necessary, because
: there's a much better solution?
I suspect (not having a CD writer on my Linux box, darn it!) that you
could simulate what you want without needing a new filesystem, although
it will cost you some disk space:
As my suggesiton above, make a loopback EXT2 system, put in it whatever
you want, add/delete/modify to your heart's content then when ready to
burn a CD, create an empty ISO filesystem, cp from the EXT2 loopback to
the ISO loopback and voila!
Or am I all wet? (be gentle! :^)
--
---- Fred Smith -- [EMAIL PROTECTED] ----------------------------
I can do all things through Christ
who strengthens me.
============================== Philippians 4:13 ===============================
------------------------------
From: [EMAIL PROTECTED] (Wouter Verhelst)
Subject: Re: Zip 100 Parallel Port Drive
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Date: Sun, 10 Sep 2000 07:44:10 GMT
In article <[EMAIL PROTECTED]>,
Peter Rodriguez <[EMAIL PROTECTED]> writes:
[ZIP module doesn't load correctly]
> This is all strange territory to me, but does it mean that the wrong
> version of imm.o is provided with RedHat 6.2? If so, how do I obtain the
> correct version?
Are you sure that you need imm.o? There are two different kinds of
ZIP-drives (from the software's point of view), so two different
modules as well.
The other module is called ppa.o
--
9:42am up 1:08, 2 users, load average: 2.06, 1.95, 1.50
Voor een vertaling van Documentation/Configure.help naar het Nederlands:
http://users.pandora.be/wouter.verhelst/configure.html
Far duller than a serpent's tooth it is to spend a quiet youth.
------------------------------
From: Pierre Wieser <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: socket beginner: developping inetd subserver
Date: Sun, 10 Sep 2000 09:03:49 GMT
Hi,
As I have free time, I'm currently trying to write a small C/S
appplication. The server-side should be a subserver of inetd...
I've understood that the server receives its messages on STDIN. So, I
can send and log a simple message to my server.
But I didn't found any responses on two points:
- how can my server get informations about the client which is sending
the message ? (or how can I get a socket when the connection is handled
by inetd ?)
- how can my server response to the client ? Should it open a new
connection or can it response via inetd ?
Thanks in advance for your help
Regards
Pierre
------------------------------
Date: Sun, 10 Sep 2000 21:27:05 +1200
From: Peter Rodriguez <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: Zip 100 Parallel Port Drive
Wouter Verhelst wrote:
> In article <[EMAIL PROTECTED]>,
> Peter Rodriguez <[EMAIL PROTECTED]> writes:
> [ZIP module doesn't load correctly]
>
> > This is all strange territory to me, but does it mean that the wrong
> > version of imm.o is provided with RedHat 6.2? If so, how do I obtain the
> > correct version?
>
> Are you sure that you need imm.o? There are two different kinds of
> ZIP-drives (from the software's point of view), so two different
> modules as well.
> The other module is called ppa.o
>
> --
> 9:42am up 1:08, 2 users, load average: 2.06, 1.95, 1.50
>
> Voor een vertaling van Documentation/Configure.help naar het Nederlands:
> http://users.pandora.be/wouter.verhelst/configure.html
>
> Far duller than a serpent's tooth it is to spend a quiet youth.
Thanks for your interest.
Yes, according to the documentation I have seen, I need to use imm. However,
I have tried to load ppa also, with the same result.
Peter Rodriguez
------------------------------
Date: Sun, 10 Sep 2000 07:32:10 -0400
From: Larry Ebbitt <[EMAIL PROTECTED]>
Subject: Re: Memory allocation Strangeness. (Update)
Tristan Wibberley wrote:
MVS used to try to make sure that a certain
> amount
> >of back store (page space) was available before starting a job. It no
> longer
> >does as it caused far more trouble than it prevented.
>
> What trouble? Crappy software like emacs trying to fork a 40MB process (who
> in their right mind would do something like that?
There's no fork() in MVS, thank god. The troubles were usually on
resource constrained systems, where jobs (processes) couldn't start
even though there was sufficient back store for them to run.
> If you need the memory it should actually be there, if you don't, you
> shouldn't allocate it.
If that's what you want, don't use virtual memory systems, where the
whole premise is based on jobs allocating more memory than they
actually use.
--
Larry Ebbitt - Linux + OS/2 - Atlanta
------------------------------
From: [EMAIL PROTECTED]
Subject: Zip 100 Parallel Port Drive
Date: Sun, 10 Sep 2000 12:29:49 GMT
Hi Folks,
I am trying to use my iomega drive on Red Hat 6.2 ( Kernel 2.2.14-5.0 ).
When I try ./Setup, I get kernel incompatibility message.
I went to '/usr/src/linux' directory and tried 'make xconfig'...BUT it
says "make: *** No rule to make target 'xconfig'"
Can anyone help?
Sincerely,
Tariq.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED] (Frank Neuber)
Subject: ethernet over non ethernet hardware
Date: Sun, 10 Sep 2000 14:51:45 +0200
Hi
I have to write a device driver for an PCI/VME bridge. This driver should
use the ethernet protocol including ARP.
The functions open() close() read() write() ... etc works well.
How can I use these functions to implement the eternet protocol for this
hardware. It should work with kernel 2.2 an in the future with 2.4
Does anyone know related links (WWW, mailing lists, newsgroups etc) to
similar projects e.g ethernet over serial lines.
Maybe there is a HOWTO or tutorial for this matter?
Many thanks in advance
Frank
--
_/_/_/_/ _// _/ Frank Neuber
_/ _/_/ _/ [EMAIL PROTECTED] (private)
_/_/_/ _/ _/ _/
_/ _/ _/_/ [EMAIL PROTECTED]
_/ _/ // http://www.opensource-systemberatung.de
------------------------------
** 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
******************************