[algogeeks] mcq-os

2011-08-15 Thread Kamakshii Aggarwal
semaphores are used to solve the problem of? 1.process synchronization 2.race around 3.mutual exclusion. -- Regards, Kamakshi kamakshi...@gmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] mcq-os

2011-08-15 Thread aditi garg
process synchronization. On Mon, Aug 15, 2011 at 6:29 PM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: semaphores are used to solve the problem of? 1.process synchronization 2.race around 3.mutual exclusion. -- Regards, Kamakshi kamakshi...@gmail.com -- You received this message

Re: [algogeeks] mcq-os

2011-08-15 Thread rajeev bharshetty
All the above 1,2,3 Semaphores help to prevent race conditions in a program. They help in process synchronization by allowing multiple processes access to a common shared memory . and they also solve the problem of mutual exclusion allowing only a single process in a critical region at a time.

Re: [algogeeks] mcq-os

2011-08-15 Thread Dipankar Patro
As stated by Rajeev, 2,3 are a part of process synch. So I also think all 3 On 15 August 2011 18:35, rajeev bharshetty rajeevr...@gmail.com wrote: All the above 1,2,3 Semaphores help to prevent race conditions in a program. They help in process synchronization by allowing multiple processes

Re: [algogeeks] mcq-os

2011-08-15 Thread Kamakshii Aggarwal
I am confused about the race around..according to me it should be included with other options,but in the book which i am referring its not included.. On Mon, Aug 15, 2011 at 6:35 PM, rajeev bharshetty rajeevr...@gmail.comwrote: All the above 1,2,3 Semaphores help to prevent race conditions in

Re: [algogeeks] mcq-os

2011-08-15 Thread sandeep pandey
ya i also think all of d above.. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more

Re: [algogeeks] mcq-os

2011-08-15 Thread rajeev bharshetty
@kamakshi : Check this link. It has a very good explanation http://stargazer.bridgeport.edu/sed/projects/cs503/Spring_2001/kode/os/sync.htm On Mon, Aug 15, 2011 at 6:37 PM, sandeep pandey sandeep.masum4...@gmail.com wrote: ya i also think all of d above.. -- You received this message

Re: [algogeeks] mcq-os

2011-08-15 Thread Kamakshii Aggarwal
@rajeev:thanks a lot..the link is really very nice..:) On Mon, Aug 15, 2011 at 7:41 PM, rajeev bharshetty rajeevr...@gmail.comwrote: @kamakshi : Check this link. It has a very good explanation http://stargazer.bridgeport.edu/sed/projects/cs503/Spring_2001/kode/os/sync.htm On Mon, Aug 15,

Re: [algogeeks] mcq

2011-08-09 Thread Kamakshii Aggarwal
please explain On Tue, Aug 9, 2011 at 9:07 AM, Dipankar Patro dip10c...@gmail.com wrote: ans : n + 2nk - k^2 - k On 9 August 2011 08:43, Raman raman.u...@gmail.com wrote: Yes, the answer is n + 2nk - k^2 -k -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] mcq

2011-08-09 Thread Raman
It's simple arithmetic.. n + 2(n-1) + 2(n-2) +...2(n-k) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/nQx_DDDn07QJ. To post to this group, send email to

[algogeeks] mcq

2011-08-08 Thread Kamakshii Aggarwal
Which is not an advantage of using subroutines? (a) Easier maintenance (b) Runtime reduces (c) Storage space reduces (d) Modularity one of the answer is b. what about c? does subroutine reduce space? -- Regards, Kamakshi kamakshi...@gmail.com -- You received this message because

Re: [algogeeks] mcq

2011-08-08 Thread sourabh jakhar
b On Mon, Aug 8, 2011 at 4:18 PM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: Which is not an advantage of using subroutines? (a) Easier maintenance (b) Runtime reduces (c) Storage space reduces (d) Modularity one of the answer is b. what about c? does subroutine reduce space?

Re: [algogeeks] mcq

2011-08-08 Thread vijay goswami
it reduces the size of the source file On Mon, Aug 8, 2011 at 4:18 PM, sourabh jakhar sourabhjak...@gmail.comwrote: b On Mon, Aug 8, 2011 at 4:18 PM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: Which is not an advantage of using subroutines? (a) Easier maintenance (b) Runtime

Re: [algogeeks] mcq

2011-08-08 Thread Aditya Virmani
yes it may reduce the space req...suppose a subroutine is never called by a execution, thn the memory req by tht subroutine wnt be allocated. On Mon, Aug 8, 2011 at 4:26 PM, vijay goswami vjrockks...@gmail.com wrote: it reduces the size of the source file On Mon, Aug 8, 2011 at 4:18 PM,

[algogeeks] mcq

2011-08-08 Thread Kamakshii Aggarwal
A 1D - array A whose size is N is given and is divided into P partitions and an element x is to be searched in the array. Each partition is given to one processor. The elements are searched with in the partition using a binary search. What is the time complexity of the algorithm? (a) O (N/P) (b) O

Re: [algogeeks] mcq

2011-08-08 Thread Kamakshii Aggarwal
@aditya:u r talking about the case of dynamic loading. i got the answer it will reduce the size,suppose if u r not writing subroutine,then if the main should include that code again and again where it is to be used,but in case of subroutine u need to write it just once On Mon, Aug 8,

Re: [algogeeks] mcq

2011-08-08 Thread ankit sambyal
C -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at

Re: [algogeeks] mcq

2011-08-08 Thread Dipankar Patro
C On 8 August 2011 17:03, ankit sambyal ankitsamb...@gmail.com wrote: C -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] mcq

2011-08-08 Thread Kamakshii Aggarwal
how??array is not sorted...so first we have to sort na?? On Mon, Aug 8, 2011 at 5:04 PM, Dipankar Patro dip10c...@gmail.com wrote: C On 8 August 2011 17:03, ankit sambyal ankitsamb...@gmail.com wrote: C -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] mcq

2011-08-08 Thread Neeraj Gupta
As it's given that array is searched using BS, then it's quite obvious that they are sorted. Also, if that's not the case, then the complexity will be O(N/P log(N/P)) for sorting and O(Log(N/P)) for search. Not given as an option. On Mon, Aug 8, 2011 at 5:09 PM, Kamakshii Aggarwal

[algogeeks] mcq

2011-08-08 Thread Kamakshii Aggarwal
global variable conflicts due to multiple file occurence is resolved during a. compile-time b. run-time c. link-time d. load-time -- Regards, Kamakshi kamakshi...@gmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

Re: [algogeeks] mcq

2011-08-08 Thread hary rathor
link time -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this

Re: [algogeeks] mcq

2011-08-08 Thread Aditya Virmani
link time i guess On Mon, Aug 8, 2011 at 5:38 PM, hary rathor harry.rat...@gmail.com wrote: link time -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from

Re: [algogeeks] mcq

2011-08-08 Thread sukran dhawan
Its link time. in say c extern declaration in other files informs compiler that the variable is defined in other source files.so the compiler leaves the issue of resolving it to linker. so the linker resolves global var used across multiple source files On Mon, Aug 8, 2011 at 5:51 PM, Aditya

Re: [algogeeks] mcq

2011-08-08 Thread Amol Sharma
yes...linker it is -- Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad On Mon, Aug 8, 2011 at 5:58 PM, sukran dhawan sukrandha...@gmail.comwrote: Its link time. in say c extern declaration in other files informs compiler that the variable is defined in other

Re: [algogeeks] mcq

2011-08-08 Thread hary rathor
ans can be only c . it can't ans b because of subroutine don't reduce the run time ... cause it calling function require extra push and pop operations. that's why we use inline function. so we can say that ans c is perfact -- You received this message because you are subscribed to the Google

Re: [algogeeks] mcq

2011-08-08 Thread DeVaNsH gUpTa
link time -- Thanks and Regards *Devansh Gupta* *B.Tech Third Year* *MNNIT, Allahabad* -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send

Re: [algogeeks] mcq

2011-08-08 Thread Dipankar Patro
Link-time it is :) On 8 August 2011 19:03, DeVaNsH gUpTa devanshgupta...@gmail.com wrote: link time -- Thanks and Regards *Devansh Gupta* *B.Tech Third Year* *MNNIT, Allahabad* -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To

Re: [algogeeks] mcq

2011-08-08 Thread Puneet Goyal
i think ans is both (b) and (c) (b) : when a function is called the program will save its state, save the program counter, jump to the program routine , execute , after executing will retrieve its program counter and go back to the original location, retrieve its original state All this will take

[algogeeks] mcq

2011-08-08 Thread Kamakshii Aggarwal
A k-diagonal matrix is a n *n square matrix in which the elements on the principal diagonal and k diagonals above the principal diagonal and k diagonals below the principal diagonal only have none\ zero elements. Other elements are zero’s. In order to save the space, the non zero elements are

Re: [algogeeks] mcq

2011-08-08 Thread aditi garg
b) and c) options are same?? On Mon, Aug 8, 2011 at 8:53 PM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: A k-diagonal matrix is a n *n square matrix in which the elements on the principal diagonal and k diagonals above the principal diagonal and k diagonals below the principal diagonal

Re: [algogeeks] mcq

2011-08-08 Thread Kamakshii Aggarwal
i copied it from net..i dint understand the question. ignore the options..are u able to solve it? On Mon, Aug 8, 2011 at 10:16 PM, aditi garg aditi.garg.6...@gmail.comwrote: b) and c) options are same?? On Mon, Aug 8, 2011 at 8:53 PM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: A

Re: [algogeeks] mcq

2011-08-08 Thread aditi garg
well i ws trying to take some example and thn verify...if i take 5x5 matrix and k=2...thn 6 elements will be empty right?or does dis ques mean smthing else? On Mon, Aug 8, 2011 at 10:58 PM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: i copied it from net..i dint understand the question.

Re: [algogeeks] mcq

2011-08-08 Thread Kamakshii Aggarwal
i dint understand this question.i just cant understand what is the meaning of k-diaganol.. On Mon, Aug 8, 2011 at 11:01 PM, aditi garg aditi.garg.6...@gmail.comwrote: well i ws trying to take some example and thn verify...if i take 5x5 matrix and k=2...thn 6 elements will be empty

Re: [algogeeks] mcq

2011-08-08 Thread Anil Arya
post your problem after doing some research on it.dudess On Mon, Aug 8, 2011 at 11:05 PM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: i dint understand this question.i just cant understand what is the meaning of k-diaganol.. On Mon, Aug 8, 2011 at 11:01 PM, aditi

Re: [algogeeks] mcq

2011-08-08 Thread aditi garg
well u know wat a diagonal matrix is...so i guess fr suppose n=5 and k=2 principal diagonal will hv 5 elements,the diagonal abv it will have 4 and anothr one abv it will hv 3 and similarly below... so total elemnts dat we hv to store is 5+2x(4+3)=19 bt none of the gvn options satisfy :( On Mon,

Re: [algogeeks] mcq

2011-08-08 Thread shady
one of the options b or c should be ::: n + 2nk - k^2 - k if anyone else has the same answer then don't post again. On Mon, Aug 8, 2011 at 11:26 PM, aditi garg aditi.garg.6...@gmail.comwrote: well u know wat a diagonal matrix is...so i guess fr suppose n=5 and k=2 principal

Re: [algogeeks] mcq

2011-08-08 Thread Raman
Yes, the answer is n + 2nk - k^2 -k -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/-gfsoB87QO0J. To post to this group, send email to

Re: [algogeeks] mcq

2011-08-08 Thread Dipankar Patro
ans : n + 2nk - k^2 - k On 9 August 2011 08:43, Raman raman.u...@gmail.com wrote: Yes, the answer is n + 2nk - k^2 -k -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit