| Author |
Message |
server *nix forums addict
Joined: 19 Feb 2005
Posts: 60
|
Posted: Mon Jun 27, 2005 6:06 pm Post subject:
testing
|
|
|
|
message unavailable |
|
| Back to top |
|
 |
Jinpeng Wei *nix forums beginner
Joined: 27 Jun 2005
Posts: 1
|
Posted: Mon Jun 27, 2005 6:06 pm Post subject:
Re: testing
|
|
|
kroty wrote:
| Quote: | test
This is also a test  |
|
|
| Back to top |
|
 |
Josef Moellers *nix forums Guru
Joined: 28 Feb 2005
Posts: 426
|
Posted: Mon Jun 27, 2005 6:06 pm Post subject:
Re: Linux x86-32 addr space split
|
|
|
Mosa Atilles wrote:
| Quote: | I've been testing linux 2.6 kernels from some time on x86 32-bit
machines. But could not quite get the reason behind the need to split
the process address space as 3GB + 1GB (other combinations as well)
between kernel and process-usable ones. Specifically, what is the need
for PAGE_OFFSET?
|
The advantage is that the kernel will have the current process' address
space as part of its own address space. In a large number of cases, this
makes expensice copies between separate address spaces (user<->kernel)
unnecessary.
Note To stay portable, one should nonetheless use the appropriate
functions/macros when copying between user and kernel space, even if
they will then just to a copy.
--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett |
|
| Back to top |
|
 |
Mosa Atilles *nix forums beginner
Joined: 07 Feb 2005
Posts: 3
|
Posted: Mon Jun 27, 2005 6:06 pm Post subject:
Linux x86-32 addr space split
|
|
|
I've been testing linux 2.6 kernels from some time on x86 32-bit
machines. But could not quite get the reason behind the need to split
the process address space as 3GB + 1GB (other combinations as well)
between kernel and process-usable ones. Specifically, what is the need
for PAGE_OFFSET? |
|
| Back to top |
|
 |
Mosa Atilles *nix forums beginner
Joined: 07 Feb 2005
Posts: 3
|
Posted: Mon Jun 27, 2005 6:06 pm Post subject:
Re: Linux x86-32 addr space split
|
|
|
Josef Moellers wrote:
| Quote: |
The advantage is that the kernel will have the current process' address
space as part of its own address space. In a large number of cases, this
makes expensice copies between separate address spaces (user<->kernel)
unnecessary.
Note To stay portable, one should nonetheless use the appropriate
functions/macros when copying between user and kernel space, even if
they will then just to a copy.
|
Thanks Josef. That certainly does reduce a lot of overhead.
But then there is only so much kernel address space to accommodate the
various kernel data structs (pte, vma etc). That in turn constrains the
amount of shared memory that can be mapped into the process addr space.
I guess it's a trade-off in favour of performance.
Thanks again, for imparting that clarity. |
|
| Back to top |
|
 |
Kamal R. Prasad *nix forums Guru Wannabe
Joined: 22 Dec 2004
Posts: 154
|
Posted: Mon Jun 27, 2005 6:06 pm Post subject:
Re: enabling/disabling preemption
|
|
|
junky_fellow@yahoo.co.in (junky_fellow) wrote in message news:<8c7d4a6e.0501192153.269778d3@posting.google.com>...
| Quote: | There are various places in the kernel code, where the preemption is
first disabled and then enabled again. Can any one where and when should
this be done ? What is the purpose of these ?
|
Preemption is done within the kernel -typically to improve
responsiveness of the system. If a thread of execution takes a lot of
time to complete -the kernel can check at specific points during the
execution -whether another thread is waiting to execute. To pre-empt,
the kernel should know in advance that the thread is going to take a
really long time and it should reach a point wherein it can yield to
another thread i.e. there should be no locks etc held.
| Quote: | Can we preempt a process in kernel mode ?
Preemption is done in kernel mode only. I mean, the scheduler |
pre-empts processes in usermode assuming its a round ronin scheduler
handling the process. So that leaves out only the kernel mode part of
the process' execution which the scheduler won't preempt till it
switches back to usermode after execution of a syscall.
regards
-kamal |
|
| Back to top |
|
 |
J.N.Subrahmanyam *nix forums beginner
Joined: 27 Jun 2005
Posts: 1
|
Posted: Mon Jun 27, 2005 6:06 pm Post subject:
Re: conditional variable and mutex
|
|
|
A mutex object is used by multiple threads to ensure the integrity of a
shared resource that they access, most commonly shared data, by allowing
only one thread to access it at a time.
A condition variable is a synchronization object used in conjunction with a
mutex. It allows a thread to block its own execution until some shared data
object reaches a particular state. A mutex controls access to shared data; a
condition variable allows threads to wait for that data to enter a defined
state.
The state is defined by a predicate in the form of a Boolean expression. A
predicate may be a Boolean variable in the shared data or the predicate may
be indirect: for example, testing whether a counter has reached a certain
value, or whether a queue is empty.
Regards,
subbu
"puzzlecracker" <ironsel2000@gmail.com> wrote in message
news:1106438870.278011.264150@c13g2000cwb.googlegroups.com...
Are these two interrelated?
Why would you use one in expense of the other? What is their
fundamental defense... always puzzled by these...
Thx |
|
| Back to top |
|
 |
mujoo *nix forums beginner
Joined: 15 Feb 2005
Posts: 4
|
Posted: Mon Jun 27, 2005 6:06 pm Post subject:
Re: conditional variable and mutex
|
|
|
I will give you an analogy of mutex.
Suppose you live with your two friends in an apartment, this apartment
has only one bathroom. On any day in the morning all three of you want
to enter into this bathroom because all of you are getting late for
college. But only one of you can enter into the bathroom. So when one
enters he closes the door behind him and opens only when he finishes.
The other two are waiting for him outside and checking continuously
whether he is out or not.. right? So we can say that he has taken mutex
when he goes inside the bathroom thereby preventing others to enter
into the same critical region. and when he comes out he releases the
mutex to allow others to enter. The others can follow the same
procedure.
I hope you got that. in case you are interested an analogy for condvars
let me know.
puzzlecracker wrote:
| Quote: | Are these two interrelated?
Why would you use one in expense of the other? What is their
fundamental defense... always puzzled by these...
Thx |
|
|
| Back to top |
|
 |
James T. Dennis *nix forums beginner
Joined: 08 Oct 2005
Posts: 1
|
Posted: Sat Oct 08, 2005 11:47 pm Post subject:
Re: sparse files
|
|
|
In comp.unix.admin Stephane CHAZELAS <this.address@is.invalid> wrote:
| Quote: | 2004-10-16, 02:05(+00), Ivan Rayner:
[...]
IRIX cp has known how to replicate holes since 1997.
Using which API?
|
Some systems provide ioctl()s for this.
| Quote: | It seems like
such an obvious thing to do that I'd be surprised if other UNIXes
didn't. I just tried it on Linux and that also replicates holes, at
least on XFS.
[...]
That would be very surprising given that GNU cp (at least from
coreutils 5.2.1) has no code for that. All it does is create as
many holes as possible in the destination file if it's a regular
file.
|
Yes. As for as I know the best strategy for generating a sparse
file is to translate any streams of ASCII NUL characters into
seek() (lseek()) calls. The underlying filesystem will then refrain
from allocating any unnecessary blocks. (So there will be a number
of NULs written to the nearest block boundary, then zero or more blocks
my be left unallocated, and then some NULs may be written into the next
non-empty block --- as a result of the next write.
When I teach classes in Linux/UNIX fundamentals I teach that sparse
files are really a side effect of the filesystem block allocation
strategy. That the system can treat "holes" as blocks of contiguous
steams of NULs (for reads) and that the result naturally from seek()s
past the end of the file.
--
Jim Dennis,
Starshine: Signed, Sealed, Delivered |
|
| Back to top |
|
 |
Frank Cusack *nix forums Guru Wannabe
Joined: 02 Mar 2005
Posts: 215
|
Posted: Thu Mar 23, 2006 11:23 pm Post subject:
Re: metrics for system capacity/load
|
|
|
getloadavg()?
On 23 Mar 2006 06:36:43 -0800 "Kamal R. Prasad" <kamalp@acm.org> wrote:
| Quote: | hello,
I am dealing with a situation wherein i have different AIX boxes [of
different cpu nos/types etc..] -but almost all running AIX 5.3.
Is there a way to ascertain programatically how much load one system
can take or alternatively are there any units that one uses (like
MFLOPS/GFLOPS) which can be used to rate the capacity of a server?
Further, is there any api to ascertain how much of this capacity is
being utilized by given process(es)?
This is actually a generic UNIX question -but which I am trying to
solve for AIX only.
thanks
-kamal |
|
|
| Back to top |
|
 |
Kamal R. Prasad *nix forums Guru Wannabe
Joined: 22 Dec 2004
Posts: 154
|
Posted: Fri Mar 24, 2006 7:12 am Post subject:
Re: metrics for system capacity/load
|
|
|
Frank Cusack wrote:
that probably gives the instantenous load on the system. I couldn't
find a man page for that anyways. But what I am looking for is info as
to how much capacity different UNIX servers have and how much load a
given application places on a server
(peak/avg/instantenous/whatever..)? At the very least, comparing
servers from the same company should not be like comparing apples to
oranges.
regards
-kamal
| Quote: | On 23 Mar 2006 06:36:43 -0800 "Kamal R. Prasad" <kamalp@acm.org> wrote:
hello,
I am dealing with a situation wherein i have different AIX boxes [of
different cpu nos/types etc..] -but almost all running AIX 5.3.
Is there a way to ascertain programatically how much load one system
can take or alternatively are there any units that one uses (like
MFLOPS/GFLOPS) which can be used to rate the capacity of a server?
Further, is there any api to ascertain how much of this capacity is
being utilized by given process(es)?
This is actually a generic UNIX question -but which I am trying to
solve for AIX only.
thanks
-kamal |
|
|
| Back to top |
|
 |
Brian Inglis *nix forums beginner
Joined: 16 Feb 2005
Posts: 22
|
Posted: Thu Jun 08, 2006 4:30 am Post subject:
Re: Kernel-FaQ
|
|
|
On Tue, 05 Oct 2004 06:15:04 GMT in comp.unix.internals,
unknown@this-world.com wrote:
| Quote: | Is there any FAQ available for Unix Internals or more
broadly Unix Kernel, or may be OS Development Faq. I dont
want any specific book which describes concepts and all, but
looking for FAQs, something like C-Faq or Unix Faq (At user
level), or anyother language faqs.
If not available, then why not we prepare one ?
|
Try http://www.kernelnewbies.org
--
Thanks. Take care, Brian Inglis Calgary, Alberta, Canada
Brian.Inglis@CSi.com (Brian[dot]Inglis{at}SystematicSW[dot]ab[dot]ca)
fake address use address above to reply |
|
| Back to top |
|
 |
Tim Robinson *nix forums beginner
Joined: 08 Jun 2006
Posts: 1
|
Posted: Thu Jun 08, 2006 4:30 am Post subject:
Re: Kernel-FaQ
|
|
|
unknown@this-world.com wrote:
| Quote: | Is there any FAQ available for Unix Internals or more
broadly Unix Kernel, or may be OS Development Faq. I dont
want any specific book which describes concepts and all, but
looking for FAQs, something like C-Faq or Unix Faq (At user
level), or anyother language faqs.
If not available, then why not we prepare one ?
|
OS development FAQ: http://www.mega-tokyo.com/osfaq2/
--
Tim Robinson (MVP, Windows SDK)
http://mobius.sourceforge.net/ |
|
| Back to top |
|
 |
Kurt Jaeger *nix forums beginner
Joined: 21 Feb 2005
Posts: 28
|
Posted: Thu Jun 08, 2006 4:30 am Post subject:
Re: Kernel-FaQ
|
|
|
Hi!
In article <IZq8d.44$SS2.31@news.cpqcorp.net>, <unknown@this-world.com> wrote:
| Quote: | Is there any FAQ available for Unix Internals or more
broadly Unix Kernel, or may be OS Development Faq. I dont
want any specific book which describes concepts and all, but
looking for FAQs, something like C-Faq or Unix Faq (At user
level), or anyother language faqs.
|
There's the new book on FreeBSD:
The Design and Implementation of the FreeBSD Operating System
ISBN: 0201702452
Publisher: Addison Wesley, 2005
--
MfG/Best regards, Kurt Jaeger 16 years to go !
LF.net GmbH fon +49 711 90074-23 pi@LF.net
Ruppmannstr. 27 fax +49 711 90074-33
D-70565 Stuttgart mob +49 171 3101372 |
|
| Back to top |
|
 |
mujoo *nix forums beginner
Joined: 15 Feb 2005
Posts: 4
|
Posted: Thu Jun 29, 2006 3:56 am Post subject:
Re: Need for Virtual Memory
|
|
|
Virtual memory is not actually required, since all the processes can
fit in the memory at the same time. It is straight forward question
with simle answer.
pramod8378@yahoo.com (Pramod Sharma) wrote in message news:<92379d72.0405100336.150fa7d5@posting.google.com>...
| Quote: | arunal2001@yahoo.co.in (aruna) wrote in message news:<a2efcaed.0404230617.383c3142@posting.google.com>...
I have 64MB RAM on a HP-UX Machine. I have 2 processes each of size 2MB.
I have 4 such instances of each of them running simultaneously?
Under such circumstances, is virtual memory required? If yes
why? If not will not the different instances of the process
interfere with one another? There are no other processes running
demanding for memory or CPU time?
First let me know how much work u had done on it ???
why actually we need virtual memory ?
If we are going to use VM , then when(at which time ) we use ???
Wht is the cost for VM ?
2nd question is most important .....and it will give you a lot of answers.
go through the UNIX INTERNALS by Maurice Bach chapter Memory Management .... |
|
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|