About

"Work alone to improve yourself, work together to grow yourself!"

Role

Alma Mater:

Not updated.

Experience:

Not updated.
Tud
1 year 9 months ago

Initially when all processes arrived they spent 10% on i/o. SRTF they mentioned.

so initially p1 will be considered which has 10 BT. so 10% i/o is 1. ( 0 to 1 slot in Gantt chart )

then 40% CPU operation is 40% of 10 BT, which is 4. ( 1 to 5 slot in Gantt chart )

now p1 will go for i/o at that time other SRTF process p2 is ready and its i/o is already overlapped. so it will execute for 40% of 20 BT, which is 8. But it cannot execute for all 8 because p1 will be  ready after 2 seconds and it will preempt p2. ( 5 to 7 slot in Gantt chart)

now p1 will execute 30% of 10 which is 3. (7 to 10 slot in Gantt Chart)

now p2 will execute for 6 which it left because of preemption... ( 10 to 16 slot in Gantt chart)

like this keep doing upto p4.

morelessAdd your answer
Tud
1 year 9 months ago

D is correct..

Because for this example you can not assign str[length] = '\0'  ... 

You can't assign null to specific char array index, as value represented by that index is char instead of pointer

morelessAdd your answer
Tud
1 year 10 months ago

In simple words, we can say variate is a set of random variables.

P(X=x), here X is a variate.

take u = mean 

for Poisson, E(X) = u and VAR(X) = u

VAR(X) = E(X2) - E(X)2

u = 20 - u

solving this, u=-5 and u=4

Hence ans is 'a'

morelessAdd your answer
Tud
1 year 10 months ago

You can find quality examples related to complexity in Narsimha Karumanchi book.. Just google it, pdf is available. You can try few related chapters of that book. 

morelessAdd your answer
Tud
1 year 10 months ago

Here,

-> for (i=0 to N) will execute atmost N times

-> for (j=1 to i) will execute atmost i times, where imax=N , so N times

-> for (k=j to i+j) will execute atmost i times as initial value is k=j and last value is k=i+j (so from j to i+j means i times). Here imax=N, so N times

-> for(L=1 to i+j+k) will execute atmost i+j-k times, where imax=N, jmax=N,  kmax=i+j = N+2N, so (i+j-k) = N+N-2N = -N (N times in descending order)

Hence, O( (N)(N)(2N)(N) ) = O(N4)

 

morelessAdd your answer
arvind.rawat's picture
Arvind Rawat
manohar_iisc's picture
M Manohar
vivek14's picture
Vivek Vikram Singh
ranita's picture
Ranita Biswas
pritam's picture
Pritam Prasun
techtud's picture
Techtud Admin
rajeshkpandey008's picture
Rajesh Kumar Pandey
gcetcs091's picture
saurabh agrawal
parimal_andhalkar's picture
Parimal Andhalkar
abhishekshan's picture
Abhishek Shankhadhar
spandana's picture
D Spandana
biranchi125's picture
biranchi
Sai Prasad Kousika
shiveshroy's picture
Shivesh Kumar Roy
jayesparmar's picture
Jayesh Parmar
nhkrishna's picture
Harikrishna Nalla
rohitsoneta's picture
Rohit Soneta
coolmalhotra's picture
Abhishek Malhotra
praveen678's picture
Praveen Goyal
amitweb19's picture
Amit Tiwari

Pages

5 Feb 2016 - 1:17am

Initially when all processes arrived they spent 10% on i/o. SRTF they mentioned.

so initially p1 will be considered which has 10 BT. so 10% i/o is 1. ( 0 to 1 slot in Gantt chart )

then 40% CPU operation is 40% of 10 BT, which is 4. ( 1 to 5 slot in Gantt chart )

now p1 will go for i/o at that time other SRTF process p2 is ready and its i/o is already overlapped. so it will execute for 40% of 20 BT, which is 8. But it cannot execute for all 8 because p1 will be  ready after 2 seconds and it will preempt p2. ( 5 to 7 slot in Gantt chart)

now p1 will execute 30% of 10 which is 3. (7 to 10 slot in Gantt Chart)

now p2 will execute for 6 which it left because of preemption... ( 10 to 16 slot in Gantt chart)

like this keep doing upto p4.

more less
26 Jan 2016 - 11:50am

D is correct..

Because for this example you can not assign str[length] = '\0'  ... 

You can't assign null to specific char array index, as value represented by that index is char instead of pointer

more less
23 Jan 2016 - 1:45am

In simple words, we can say variate is a set of random variables.

P(X=x), here X is a variate.

take u = mean 

for Poisson, E(X) = u and VAR(X) = u

VAR(X) = E(X2) - E(X)2

u = 20 - u

solving this, u=-5 and u=4

Hence ans is 'a'

more less
23 Jan 2016 - 1:14am

You can find quality examples related to complexity in Narsimha Karumanchi book.. Just google it, pdf is available. You can try few related chapters of that book. 

more less
23 Jan 2016 - 1:12am

Here,

-> for (i=0 to N) will execute atmost N times

-> for (j=1 to i) will execute atmost i times, where imax=N , so N times

-> for (k=j to i+j) will execute atmost i times as initial value is k=j and last value is k=i+j (so from j to i+j means i times). Here imax=N, so N times

-> for(L=1 to i+j+k) will execute atmost i+j-k times, where imax=N, jmax=N,  kmax=i+j = N+2N, so (i+j-k) = N+N-2N = -N (N times in descending order)

Hence, O( (N)(N)(2N)(N) ) = O(N4)

 

more less
12 Jan 2016 - 9:14pm

To cut a log into 4 pieces u need 3 cuts. (i think you understood everything from this sentence. :) )

To cut log into 3 pieces u need 2 cuts.

3 cuts : 4 minutes

2 cuts : ?

? = 8/3

Hence ans is D

more less

Answer is quite simple.. 

they have asked number of candidate keys "possible"... so we can assume that they are interested in maximum number of candidate keys..

Now definition of candidate key is: CK is a single field or least combination of fields that uniquely defines a row.

Super keys:

So possible number of combinations are same as possible number of binary strings.

n + nC2 + nC3 + .. + nCn  

candidate keys:

 For this we have to consider maximum number of combinations with same number of attributes.

for example.. if we have five attributes(A,B,C,D,E) then if we take individual attributes we can not take any other. But if we focus on AB, BC.. then we can consider all combinations with 2 attributes but not with 3 or 4. In this way we are getting maximum candidate keys.

If there are 6 attributes then we will get maximum CK at 6C3..

In general we can say, nCfloor(n/2) will give maximum combinations that we can consider as CK.. 

more less

Critical section is a part of code that no more than one process may access concurrently.

Imagine a scenario, You have a bike and you and your friend want to go 100 km far.

Critical section: Your bike is a critical section, which gives different result if only you or only ur friend or both of u together drive it.

Mutual exclusion: You and your friend will mutually decide to drive alternatively for every 10 km distance.

For deadlock see the following image:

more less

=> initially we have 2^44 byte LAS and page size = 2^14 byte

so size of 1st level page table=2^30 * 2^4 = 2^34 byte

=> now again do paging on this page table

size of 2nd level page table is=(2^34 / 2^14) * 2^4 = 2^24

=> now, size of 3rd level page table is = 2^10 * 2^4 = 2^14

this last page table can be fit into single page as page size is also 2^14.

therefore 3 level paging is required.

more less

ok, now i got, thank you... i was thinking about i/o waiting time only, and given is i/o service time.. thank you

more less

Pages

Enter your search keyword:

Search form

Wait!

Here is a chance to join biggest community of technical Students,
Tutors with FREE learning resources and so much more.
It takes less then 60 seconds.