[Haifux] ipc

2005-01-12 Thread yakoub abaya
what is the difference between two processes
communicating through a normal file discriptor and a fifo pipe discriptor ?
p0:
mkfifo(myfifo,)
int fd=open(myfifo,O_RDONLY..)
read(myfifo,buff...)
p1:
int fd=open(myfifo,O_WRONLY..)
write(myfifo,buff)
---
p0:
int fd=open(file,O_CREAT|O_RDONLY..)
read(file,buff...)
p0:
int fd=open(file,O_WRONLY..)
write(file,buff...)
is it only the blocking mechanizim ?
--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]



[Haifux] Xen and the art of giving talks

2005-01-12 Thread Muli Ben-Yehuda
Dear Haifuxians, 

Would you care to hear a talk on virtualization, hypervisors and
Xen[1][2]? Topics to be covered include a general introduction, design
and implementation of Xen, the new Xen 2.0 IO model and future plans.

[1] http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
[2] A short overview of Xen, from
http://www.mulix.org/lectures/OLS2004.html:

Xen is a virtual machine monitor, developed by the University of
Cambridge Computer Laboratory. Unlike VMWare, which provides complete
virtualization, guest operating systems need to be ported to the Xen
environment. So far, Linux 2.4 and 2.6 have been ported, as well as
NetBSD, FreeBSD and Plan9, and Windows XP. The Windows XP port was
done in collaboration with MS Research, and took much longer than the
Linux port...

Xen works by letting the monitor (hypervisor) run in ring 0, and the
guest OS run in ring 1. Userspace runs in ring 3, as usual. From a
Linux point of view, porting Linux to Xen (refereed to as XenoLinux)
is just a matter of implementing the arch specific hooks in Linux - no
core kernel files are modified!

Xen provides secure protection between VMs (unlike e.g. coLinux),
allows flexible partitioning of resources, and supports seamless
low-latency migration of running VMs(!). They also claims impressive
performance numbers, within 3% of the host performance.

Cheers, 
Muli
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/



signature.asc
Description: Digital signature


[Haifux] [HAIFUX LECTURE] C Without a Spoon- Programming in C in a free software environment - CPP gcc - Orna Agmon

2005-01-12 Thread Orna Agmon
Next Monday (10/1/2005), 18:30, the Haifa Linux Club will once
again meet to hear Orna Agmon  talk  about:
C Without a Spoon
Programming in C in a free software environment
On this unit we will learn about the CPP - C Pre Processor, and
about gcc - the free C compiler, and about using its options cleverly.
If time permits, we will start talking about variables in C.
(Note that next week's lecture will be by Dorit Naishlos from IBM HRL, 
about vectorization in gcc.)

This is the second of a series of lectures about good C programming in the 
environment of free software, to people who have already programmed in some 
language using procedural programming (In other words, we assume you know of 
some form of the contruct if-then-else, you know what variables and 
functions/subroutines are).

Slides and course material are available at:
http://haifux.org/~ladypine/115-sil/
We meet in the Technion, Taub 3. See http://www.haifux.org/where.html
for arrival details.
Attendance is free, and you are all invited!
We are always looking for interesting lecture ideas, and we have
already begun scheduling the 2005 season!
Future lectures include:
117 gcc and vectorization   Dorit Naishlos  17/1/2005
118 SNMP and OpenNMSZeev Halevi 31/01/2005
118-sil C without a spoon   Orna Agmon  07/02/2005
119 The VFS of the Linux-2.4 kernel - a play in 5 acts  Guy Keren
14/02/2005  Happy St. Valentine's Day!
120 Writing a STAM disk-based file-system for the Linux-2.4 kernel
Guy Keren   28/02/2005  Prior understanding required .
Have a subject
you want to talk about? Or a subject you'd like to hear someone else
talk about? email us.
Orna.
--
Orna Agmon http://haifux.org/~ladypine/
ICQ: 348759096
--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]



[Haifux] Test,please ignore

2005-01-12 Thread Orr Dunkelman

--
Orr Dunkelman,
[EMAIL PROTECTED]
If it wasn't for C, we'd be writing programs in BASI, PASAL, and OBOL, anon
Spammers: http://vipe.technion.ac.il/~orrd/spam.html
GPG fingerprint: C2D5 C6D6 9A24 9A95 C5B3  2023 6CAB 4A7C B73F D0AA
(This key will never sign Emails, only other PGP keys.)
--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]



[Haifux] man

2005-01-12 Thread yakoub abaya
when doing man read (for example )  i get
in that last line , the usual see also  comment
where it says :close(2), ...,write(2)...,lseek(2)
Q: what is the number following in the parentheses ? (-- 2 in write(2) )
if i do man write it doesn't show info about c language write command
so i suppose the number in the parentheses is useful
Q : how do i man write(2) ? , hwo do i use the 2 ?
--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]



[Haifux] man

2005-01-12 Thread yakoub abaya
when doing man read (for example )  i get
in that last line , the usual see also  comment
where it says :close(2), ...,write(2)...,lseek(2)
Q: what is the number following in the parentheses ? (-- 2 in write(2) )
if i do man write it doesn't show info about c language write function
so i suppose the number in the parentheses is useful
Q : how do i man write(2) ? , how do i use the 2 ?
--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]



Re: [Haifux] Xen and the art of giving talks

2005-01-12 Thread Orr Dunkelman
yes.
On Wed, 12 Jan 2005, Muli Ben-Yehuda wrote:
Dear Haifuxians,
Would you care to hear a talk on virtualization, hypervisors and
Xen[1][2]? Topics to be covered include a general introduction, design
and implementation of Xen, the new Xen 2.0 IO model and future plans.
[1] http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
[2] A short overview of Xen, from
http://www.mulix.org/lectures/OLS2004.html:
Xen is a virtual machine monitor, developed by the University of
Cambridge Computer Laboratory. Unlike VMWare, which provides complete
virtualization, guest operating systems need to be ported to the Xen
environment. So far, Linux 2.4 and 2.6 have been ported, as well as
NetBSD, FreeBSD and Plan9, and Windows XP. The Windows XP port was
done in collaboration with MS Research, and took much longer than the
Linux port...
Xen works by letting the monitor (hypervisor) run in ring 0, and the
guest OS run in ring 1. Userspace runs in ring 3, as usual. From a
Linux point of view, porting Linux to Xen (refereed to as XenoLinux)
is just a matter of implementing the arch specific hooks in Linux - no
core kernel files are modified!
Xen provides secure protection between VMs (unlike e.g. coLinux),
allows flexible partitioning of resources, and supports seamless
low-latency migration of running VMs(!). They also claims impressive
performance numbers, within 3% of the host performance.
Cheers,
Muli
--
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/

--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]



[Haifux] Error in mailing list

2005-01-12 Thread Orr Dunkelman
Due to some server-side error (my fault for not finding out this earlier), 
mails sent to haifux in the last few days (since last Friday), miight 
arrive out-of-order and out-of-date.

In case your mail doesn't arrive in the following few hours, please 
contact me personally, and I'll check to see what happened with your 
personal message.

Sorry.
--
Orr Dunkelman,
[EMAIL PROTECTED]
If it wasn't for C, we'd be writing programs in BASI, PASAL, and OBOL, anon
Spammers: http://vipe.technion.ac.il/~orrd/spam.html
GPG fingerprint: C2D5 C6D6 9A24 9A95 C5B3  2023 6CAB 4A7C B73F D0AA
(This key will never sign Emails, only other PGP keys.)
--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]



[Haifux] Re: man

2005-01-12 Thread Shlomi Fish
On Tuesday 11 January 2005 23:51, yakoub abaya wrote:
 when doing man read (for example )  i get
 in that last line , the usual see also  comment
 where it says :close(2), ...,write(2)...,lseek(2)

 Q: what is the number following in the parentheses ? (-- 2 in write(2) )


This is the section of the man pages to which this man page belongs. The 
sections are:


Section 1 
 User Commands
Section 2
 System Calls
Section 3
 Subroutines
Section 4
 Devices
Section 5
 File Formats
Section 6
 Games
Section 7
 Miscellaneous
Section 8
 System Administration
Section 9
 Kernel
Section n
 New


 if i do man write it doesn't show info about c language write command
 so i suppose the number in the parentheses is useful

 Q : how do i man write(2) ? , hwo do i use the 2 ?


man 2 write

Regards,

Shlomi Fish

 --
 Haifa Linux Club Mailing List (http://www.haifux.org)
 To unsub send an empty message to [EMAIL PROTECTED]

-- 

-
Shlomi Fish  [EMAIL PROTECTED]
Homepage:http://www.shlomifish.org/

Knuth is not God! It took him two days to build the Roman Empire.

--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]




Re: [Haifux] man

2005-01-12 Thread Ori Idan
yakoub abaya wrote:
when doing man read (for example )  i get
in that last line , the usual see also  comment
where it says :close(2), ...,write(2)...,lseek(2)
Q: what is the number following in the parentheses ? (-- 2 in write(2) )
The number is the man section number
Sections are:
1   Executable programs or shell commands
2   System calls (functions provided by the kernel)
3   Library calls (functions within program libraries)
4   Special files (usually found in /dev)
5   File formats and conventions eg /etc/passwd
6   Games
7   Miscellaneous  (including  macro  packages and conventions), e.g. 
man(7), groff(7)
8   System administration commands (usually only for root)
9   Kernel routines [Non standard]

if i do man write it doesn't show info about c language write function
so i suppose the number in the parentheses is useful
Q : how do i man write(2) ? , how do i use the 2 ?
do man 2 write
--
Ori Idan

--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]



Re: [Haifux] ipc

2005-01-12 Thread Baruch Even
yakoub abaya wrote:
what is the difference between two processes
communicating through a normal file discriptor and a fifo pipe discriptor ?
 [Transfer by a fifo vs. a shared file]
The difference is that the file is stored in the filesystem, and if the 
processes have a lot to talk about it is wasteful of filesystem space.

The blocking part is convenience and simplicity as well, how will the 
shared file reader know when the other side has some new data in the 
file? It requires polling and is not efficient in OS resources.

A fifo also has semantics that help you, such as atomicity of operations 
(up to some size of a message) and synchronization of work, the blocking 
gives you synchronization since the second process won't wake up (and 
won't waste OS time) until it has data to work on.

Baruch
--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]



Re: [Haifux] Xen and the art of giving talks

2005-01-12 Thread avivgoll
yes
very much

On Wednesday 12 January 2005 11:52, Muli Ben-Yehuda wrote:
 Dear Haifuxians,

 Would you care to hear a talk on virtualization, hypervisors and
 Xen[1][2]? Topics to be covered include a general introduction, design
 and implementation of Xen, the new Xen 2.0 IO model and future plans.

 [1] http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
 [2] A short overview of Xen, from
 http://www.mulix.org/lectures/OLS2004.html:

 Xen is a virtual machine monitor, developed by the University of
 Cambridge Computer Laboratory. Unlike VMWare, which provides complete
 virtualization, guest operating systems need to be ported to the Xen
 environment. So far, Linux 2.4 and 2.6 have been ported, as well as
 NetBSD, FreeBSD and Plan9, and Windows XP. The Windows XP port was
 done in collaboration with MS Research, and took much longer than the
 Linux port...

 Xen works by letting the monitor (hypervisor) run in ring 0, and the
 guest OS run in ring 1. Userspace runs in ring 3, as usual. From a
 Linux point of view, porting Linux to Xen (refereed to as XenoLinux)
 is just a matter of implementing the arch specific hooks in Linux - no
 core kernel files are modified!

 Xen provides secure protection between VMs (unlike e.g. coLinux),
 allows flexible partitioning of resources, and supports seamless
 low-latency migration of running VMs(!). They also claims impressive
 performance numbers, within 3% of the host performance.

 Cheers,
 Muli

--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]




Re: [Haifux] man

2005-01-12 Thread Oron Peled
On Wednesday 12 January 2005 18:04, Ori Idan wrote:
 yakoub abaya wrote:
  Q: what is the number following in the parentheses ? (-- 2 in write(2) )
 The number is the man section number
 
 Sections are:
 ...

Ori, you gave him fish (good ones I must admit), but he need also a
fishing pole (AKA RTFM).  Each section has an intro man page,
so we can run:
   man 1 intro
   man 2 intro
   

  Q : how do i man write(2) ? , how do i use the 2 ?
 
 do man 2 write

And even better:
  man man

:-)

-- 
Oron Peled Voice/Fax: +972-4-8228492
[EMAIL PROTECTED]  http://www.actcom.co.il/~oron
ICQ UIN: 16527398

If I have been able to see farther,
it was only because I stood on the shoulders of giants.
 -- Sir Isaac Newton

--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]




Re: [Haifux] Xen and the art of giving talks

2005-01-12 Thread Oron Peled
Yes,

Comparisons to other free (Qemu, Bochs,...) and non-free (vmware)
are of course welcome...

-- 
Oron Peled Voice/Fax: +972-4-8228492
[EMAIL PROTECTED]  http://www.actcom.co.il/~oron
ICQ UIN: 16527398

If it's there and you can see it, it's REAL
If it's there and you can't see it, it's TRANSPARENT
If it's not there and you can see it, it's VIRTUAL
If it's not there and you can't see it, it's GONE!

--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]




[Haifux] module directives ?

2005-01-12 Thread yakoub abaya
i've been reading about driver porting to kerne2.6
the section about block device .
they write :
   static int __init sbd_init(void); __init
   static void __exit sbd_exit(void);    __exit
   module_init(sbd_init);
   module_exit(sbd_exit);
Q: what is __init and __exit ? are they preprocessor directives ?
--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]



[Haifux] signal

2005-01-12 Thread yakoub abaya
when doing man signal :
there is :
typdef void (*sighandler_t)(int);
Q:what is this typdef ?, i don't understand it
  { i know that i can provide interrupt handler function
   with signal(...,...)  }
--
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]



Re: [Haifux] module directives ?

2005-01-12 Thread Muli Ben-Yehuda
On Thu, Jan 13, 2005 at 08:31:30AM +0200, yakoub abaya wrote:
 i've been reading about driver porting to kerne2.6
 the section about block device .
 
 they write :
static int __init sbd_init(void); __init
static void __exit sbd_exit(void);    __exit
 
module_init(sbd_init);
module_exit(sbd_exit);
 Q: what is __init and __exit ? are they preprocessor directives ?

Yes. They say that this code can be discarded in some cases, to make a
slightly smaller kernel. 

__init says that this is initialization code. Once the kernel or
module has finished initializing, it can be discarded. 
__exit says that this is finalization code. If module unloading is
disabled, it can be discarded. 

Cheers, 
Muli
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/



signature.asc
Description: Digital signature


Re: [Haifux] signal

2005-01-12 Thread Muli Ben-Yehuda
On Thu, Jan 13, 2005 at 08:35:20AM +0200, yakoub abaya wrote:
 when doing man signal :
 there is :
 typdef void (*sighandler_t)(int);
 Q:what is this typdef ?, i don't understand it

It says that sighandler_t has the type pointer to a function that
accepts an int and returns void. Consult a good C book for more
details. 

Cheers, 
Muli
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/



signature.asc
Description: Digital signature