Re: [algogeeks] OS problems

2010-07-01 Thread Anand
if there are 32 such frames of 8 X 1024 then the logical address will be
(10+5)15 as pointed out by Harit.

On Thu, Jul 1, 2010 at 8:57 AM, sharad kumar sharad20073...@gmail.comwrote:

 i think harit's answer is correct regarding ques 2 plzz someone comment on
 this

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] OS problems

2010-06-25 Thread harit agarwal
1. the virtual memory size depends on the page size that the system is
using...
2. logical address=5+10=15 bits + (some modifying bits if they are present
like modified,copied etc..)

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] OS problems

2010-06-19 Thread Amit Jaspal
@ above

I think it is because of the heap size . The Heap corresponding to dynamic
memory allocation grows and merges with the stack section of the process.

Correct me if I am wrong.
And if was only because of calloc() , then will malloc work?

Can we allocate 1gb dynamically using malloc()??


On Sat, Jun 19, 2010 at 10:14 AM, harit agarwal agarwalha...@gmail.comwrote:

 @amit

 1. calloc gives contiguos allocated space and it is not necessary that  it
 can find 1gb in a row that's why it failed after allocating some memory...
  it is not necessary that it will always allocate 800mb of space as in this
 case...


 2. whenever a process is executed in critical sectionit is means that
 it raises it execution level so that it can't be interrupted while the other
 processors are still on the same execution level they can be interrupted

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] OS problems

2010-06-19 Thread sharad kumar
for 1
other reasons apart 4m d 1 told by harit are
1)in every os,a user has maximum space allocated to him according to his
previlege so ... may be it is exceeding that maximum capacity
2)it may be possible that it has exceeded total space available to whole os
i.e it may be smaller system having much less physical memeory

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] OS problems

2010-06-19 Thread harit agarwal
yes you can allocate 1gb using malloc but it also depends on how much heap
size is available to you..
if you try 2gb then more chances are it won't allocate because of heap is
exhausted..

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] OS problems

2010-06-19 Thread Anand
In SMP operating sytem provides spinlock to execute critical section of code
that is shared among various processors. Spinlocks keeps every other
processors just to spin around and there by prevents them from generating
interrupts which could interrupt the processor which is executing the
critical section.
On Thu, Jun 17, 2010 at 12:39 PM, amit amitjaspal...@gmail.com wrote:

 1. a mad user tries to allocate 1 gb memory using calloc.
 but the program fails after allocationg about 800mg(appx. i dont
 remember). Tell me what could have gone wrong?

 2.
 We know disabling interrupts works only if it is single processor(i.e
 local disabling of interrupts).

 Consider this case where we have a SMP(symmetric multi proc) the
 processor. Processor-1 wants to perform some critical operation so it
 disables all the interrupts.

 What will happen when processor-2 throws an interrupt.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] OS problems

2010-06-19 Thread harit agarwal
@amit

i think your query is answered by varun..as each process do system call to
allocate memory so it is exhausting the memory for all the processesas
all  processes are having the same interface...

@sharad

1.i don't think priviliges affect the user address spaceit tells that in
which way the user can use that space
2.as you said may be whole memory available to OS 1 gb-this is the
extreme case and also i don't think such kind of systems exist now...

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] OS problems

2010-06-18 Thread jaladhi dave
can you explain what you meant when you said the program fails after
allocationg about 800mg(appx. i dont remember).
This is the excerpt from calloc man page, Calloc will either fail or succeed
but there is no way you can tell so much was alloted and then it failed.
*Return Value***For calloc() and malloc(), the value returned is a pointer
to the allocated memory, which is suitably aligned for any kind of variable,
or NULL if the request fails.

On Fri, Jun 18, 2010 at 1:09 AM, amit amitjaspal...@gmail.com wrote:

 1. a mad user tries to allocate 1 gb memory using calloc.
 but the program fails after allocationg about 800mg(appx. i dont
 remember). Tell me what could have gone wrong?

 2.
 We know disabling interrupts works only if it is single processor(i.e
 local disabling of interrupts).

 Consider this case where we have a SMP(symmetric multi proc) the
 processor. Processor-1 wants to perform some critical operation so it
 disables all the interrupts.

 What will happen when processor-2 throws an interrupt.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] OS problems

2010-06-18 Thread Amit Jaspal
It means the program crashed while it was trying to allocate more memory .
Now can u guess why that happened?

On Fri, Jun 18, 2010 at 1:29 PM, jaladhi dave jaladhi.k.d...@gmail.comwrote:

 can you explain what you meant when you said the program fails after
 allocationg about 800mg(appx. i dont remember).
 This is the excerpt from calloc man page, Calloc will either fail or
 succeed but there is no way you can tell so much was alloted and then it
 failed.
 *Return Value***For calloc() and malloc(), the value returned is a pointer
 to the allocated memory, which is suitably aligned for any kind of variable,
 or NULL if the request fails.

 On Fri, Jun 18, 2010 at 1:09 AM, amit amitjaspal...@gmail.com wrote:

 1. a mad user tries to allocate 1 gb memory using calloc.
 but the program fails after allocationg about 800mg(appx. i dont
 remember). Tell me what could have gone wrong?

 2.
 We know disabling interrupts works only if it is single processor(i.e
 local disabling of interrupts).

 Consider this case where we have a SMP(symmetric multi proc) the
 processor. Processor-1 wants to perform some critical operation so it
 disables all the interrupts.

 What will happen when processor-2 throws an interrupt.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] OS problems

2010-06-18 Thread harit agarwal
@amit

1. calloc gives contiguos allocated space and it is not necessary that  it
can find 1gb in a row that's why it failed after allocating some memory...
 it is not necessary that it will always allocate 800mb of space as in this
case...


2. whenever a process is executed in critical sectionit is means that it
raises it execution level so that it can't be interrupted while the other
processors are still on the same execution level they can be interrupted

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.