Main

Quiz 2 revision session (week 7 and 8)

Saurabh Katti: education >> Harsh Shah: okay. then it is. Okay. >> Shailendra Vikram Singh: So what is the role of this revolutions ...

DBMS - IIT Madras BS Degree

Streamed 7 days ago

e e e e e sir uh sir can you take any doubts just now y e hi good morning everyone good morning sir morning sir yeah good morning good morning sir yeah good morning so let me share my screen okay so my screen is visible right yes sir okay yes sir okay so yes sir so I think week five and six cover all the topic cover in the Thursday session so today we will be cover week 7 and right sir a small request yes can you please share the quiz uh to mock solution PDF sir it is not yet uploaded in the por
tal okay like we'll upload don't worry thank you sir yeah so today we'll cover week seven and 8 and week seven most important topic will be like python to be conne sir are you writing somewhere yeah so cannot see that like my screen is not visible so the white so I think the slides you have shared PowerPoint now yeah it's visible okay let me sh whole screen then it will now Vis right yes sir yes sir yes sir so 7.4 is the most important topic right so from week seven like you can expect all the q
uestion be like from 7.4 lecture so python to connection is matter like it's important and from week eight there are three important topic first is VST second one is magnetic and third one is buffer replacement policy so these are the important topic in week eight so basically we'll solve all the numerical in today class we we'll solve some numerical from B will some will solve some numerical from magnetic and we will some solve some numerical from buffer replacement policy that is L only will b
e asking L Le recently so so week seven and 8 like clear for everyone like what are the important topics any doubt here no sir okay yes what do L you stand for list recently used list recently used okay so don't worry we will solve all the question we'll try to solve all the like we'll try to solve all the like PQ of BST and magnetic SS of what were the PIQ previous year question sorry to interrupt sir can you please ask others to mute so much students okay yes I think are muted okay so and the
Buffa replacement policy also what happened Buffa replacement policy also we will solve all the pyq right now let's go to First 7.4 lecture right so so basically 7.4 basically python DP connection is there python DP connection so basically how to connect the DVDs right so first step is you have to create the connection then second stem is you have to create a cursor to execute the query and third step is execute the query and the first step is comit roll back so whatever you have done changes it
will affect in the database and third step is like fif step is close the connection and close the connection right so and there are basically there are different method so first is psychop 2. connect so this method to allow to connect the database and connection do close the connection not close this method close the connection then connection do cursor this actually create the cursor and cursor do close this method close the cursor right and uh there are C there are three for fing the result t
here are different method cursor c. fetch one then second is cara. fetch manyu and third one is csor fet so basically petch one it faces the first toel of result right and this return toppel and cursor. F menu this is a suppose you want to p uh like two toppel three toppel so then you can use cara. fet Min and cara. fatall if you want to petch all the result set then you can use cara. fat so where is this used actually in create cursor or um uh like to Ping the result set so after executing the
query you have to P the result set right MH MH and if you uh like write cara. fet one onee so if you write carer fet one so basically it will P the first tle of the result set cars. F and cars. F if you like want to P two past two tle or past three Tel or past four tle then you can use carsa f men to then it will P the only two to and then if you want to petch all the result set then you can apply C set. PCH all if we don't specify any number in PCH many then what will happen uh I did not try th
en you can try so then it will fetch only first it will work like a first fetch one but it will give the tle in list oh yeah so fetch many gives always in a list while fetch one will give only a t right yes and fet all is also no no fetch one fet one will give tle petch man give the list of tle and also fetch one right yeah petch all okay let's me right that will go patch one patch one it will give all Apple but P many it will list of to and fatch all it will give the list of to list of yeah lis
t of T list means list of T is also F many also gives the list of T yeah if you if it is I think if it is one if you write one then it will give like tle if you write fetch many if you write one then it will give I think T if you write fetch many to like other than greater than one then it will give the list of tole Sir could you please check that sir sir fetch many also give list of tle but it will give one tle only in the list okay okay then fetch I think yeah it will list of yeah yeah you can
try in the uh PG admin okay so if you want to try let's go to okay let's go to the p okay so what what is the select delete update okay I think there so suppose s restart from employee so if you patch many P many if you one right so let's what happen okay so so we can see that it give the list of tole patch many always give the list of tole you can see that so everyone got that got that so what if we'll give two instead of one as parameter yeah two or three parameter right then it will give the
two two set right then it will give the two you can see that two tles like two set of T yes sir yeah so if you don't give any it will just still give one and it's in a list is it okay I think it will give only one so it will only give one still be in a list okay L uh so and if the execute query we are putting some filter and it is returning only let's say two elements but instead of that in Fetch Min if we put three then it will give error or what what will happen I think what about that look I
think this table has three four R let's six I think will give whatever the row is there only okay but it won't give any error yeah it won't give any error okay thank you and if you apply fet one so P one and it will give only tle you can see that it gives only tle so this thing clear for everyone yes sir yes sir okay one my wam is not working properly one just taking the [Music] I for okay okay now up to that now my screen is visible right yes yes okay now let's one solve one question okay so c
onsider the table instructor inside the university database the instructor table consist of the data S1 in the table three so ID name Department name salary right it's given based on the table what will be the output of the below python code so you have to find the what will the output of the below python code right so first is input psychop 2 then Dev connect D database name username password address and all the things are given address connectional to psycho. connect DB name user equal to user
name password equal to password hostal to port number cursor equal to connection. cursor so the cursor then qu is Select C from instructor where Department like percentage o means like Department consisting of O that will okay then CS execute query equal to carall for I print i z right so what is the query query is Select count from instructor where Department name like percentage Z percentage right so which of the row will be selected this quy uhuh yes of ID where the department name is compute
r science history and bio yeah so yeah this is one this is two and this is three right this three will be so this C so we then after that we doing pel res equal to c p so will store kind of this up to that is correct yes sir now what what what we are doing for I result print i z so we iterating through the list print i z i0 will be three so three will be the output everyone got it and I'll suggest like a revise SQL concept like Union Union all then accept accept all so please explain again histo
ry and biology is okay how computer science how can you can you repeat your question yeah okay oh right oh sorry okay right right yeah yes yes I got it sir yeah okay so this this type of question will come in the Pyon connection so I'll suggest revise this concept and some SQL like revise so uh so May 22 there is one question um 60 uh 73 uh in that they asked for select star from employee where each salary is greater than 5 lakhs the table has been given and there are three entries with e salary
greater than um 5 lakhs okay but when um and result is equal to cursor. fetch many okay uh it is uh giving only one as the answer okay maybe we'll solve that after the session maybe just I in such many no parameter be pass I guess huh no parameter so by default it will take one oh okay okay okay thank you yeah now okay now going to weate so in week seven you can accept this type of question and I will suggest revise this three SQL concept and like try to revise week two SQL concept that will be
sufficient for week seven right sir yes I have a question here so you have created here connection object so this connection object is connection between what a database and what uh do not got it like which part you have connection object you have created here using the connection method yes so this is connection between what like database right we connecting the database right using python so this python file the particular python file is a connection object what about the psycho. connect we h
ave to give the database name usern name okay let's go I got that I saying that this is connection between what database and a python file we are connecting the database right okay so with what you are connecting with python file we are working present actually what connection do database to python file connect the it's the connect the database it's connection connect the database that's whatever the database is given it's connect the database so whatever the database is given username of the po
st is connect the database and return a connection object okay but my doubt was to connection between connection database yes yes correct it it is it will connect your code your python code to database yeah correct yeah I asking that python file or but no no no it's not a python file so the object that you made F the data from the uh database so there there's no connection between a Python file in the database uh we created a object which disp the data from the database so there's no connection
you have an object that say the data that is what connection is uh no not clear sir can you can can you explain it's not clear to me so maybe like just explore that will be good like it's like a object so this is object to like uh to pH the data to execute the query kind of that okay so maybe here yeah maybe just explore with the Google that will be good okay okay for week seven uh you said to revise only week two is it week two where we have yeah SQL Cod that will be sufficient all all all SQL
codes right yeah yeah okay sufficient or should we go and have a look at week three week two is sufficient okay thank you because there is a code now you have to understand theq code only only for this this portion the query portion just we have to go and revise all the queries of and ref this concept okay okay okay okay let's go to week eight right so from week eight so there are three important topic one is yes from week seven only 5 connection is the important topic yeah we'll be asking only
the python connection this is the important topic but in graded assignment there were lot of other questions as well yeah yeah but quiz in quiz only we'll focus on the python D connection okay then that magnetic disc and there is a l buffer replacement policy right right okay let's go one by one what is binary sry so binary sry is a tree in which all the nodes hold the following properties first one is the value of each note in the left sub tree is less than the value of its roots so what about
the value of is not in the left sub tree is less than the value of its root so y should be less than x and the second question is the value of each note in the right sub greater than the value of each not so Val of this right sub will be y greater than x this is the properties of binary right now let's solve one question yes sir will we be ask do pro postorder pre-order things no no no post pre-order not not not it would be simple these Keys would be given and we have to construct a binary or is
correct yeah the following numbers are inserted into an mty minor in the given order 61 34 23 45 1 2 3 4 5 what is the height of the reging Min so you have to finding the height right so how to find the height so you have to build the binary s right so insert 61 61 now 34 34 is less than 61 or greater than 61 less left side yeah left side Now 23 less than 34 left of 34 yeah now 45 so right in the 61 greater than right 34 right yeah oh sorry yes sir yeah this will be 45 okay now one left of 23 2
3 less than 61 less than 34 less than 23 then two right of right of 23 one see 2 is less than 61 less than 34 less than 23 but greater than one so that's why right will be why is one inserted after3 and not after 45 see two we are asking about one or two about one okay one is less than 61 right yes sir it will left side of the 34 uh 61 then ask let's check with 34 so less than or greater than 34 less than 34 so it will left of 34 23 like one is less than 23 or greater than 23 less than 23 so tha
t's why you have put the okay left yes sir I guess that uh point which sir had shared that we sometimes mistake that only the immediate element has to be less than so this applies to all the elements which are being attached yeah all the elements I'm talking about the each each node the this properties will be hold each node okay so that's why one is not coming under 45 and it is coming under 23 yes now two now three less than 61 less than 34 less than 23 but greater than yeah greater than two s
o but here we have to balance this is not balance binary s this is only binary s so then height how will we compute height height will be the level what the level so for finding level we have to balance it right no no no this is not a balance binary s this is only binary sry binary s this is only see balance binary s is different like a and all the things are different this only talk about the binary SST not balance binary S I think you will balance in the pdss so no I already done thing that th
at's I confused it this is only binary s not a balance binary s okay and then four right of four right of three right of five will right of five so this is level zero this is one level what level three level four this is five this is six and this is seven so he will with the seven seven everyone got this question yes sir yes sir I have a doubt here actually if not given we have to consider the root as zero is it yeah we are considering level zero root as level zero if unless otherwise specified
root is level zero otherwise specify in the question that root is level one yeah correct okay thank you if that is the case then what is the height we count the levels after it no no height will be like same right height will be like uh we are only that how many edges like long numbers of edges so he will be kind of uh this is so what is the highest longest so you can see that one 2 3 4 5 6 7 so what will the highest numbers ofes like height will be like same it's independent of level okay good
yeah okay this is also I think a uh Wonder sorry sir I'm not getting what does it mean independent of level because here the level is seven and the height is also seven yeah why you are saying that it is independent of level so if you if are starting this from level one yeah oh from level one like that okay title will be the same okay okay so con uh construct a bstd for the following sequence 41 65 20 50 29 32 11 91 72 99 find the numbers of lip notes in the result BD so maybe I'll wait one or 2
minutes then you can solve then after that we'll solve sir can you enlarge okay it sir four okay let's let's insert the monetary 41 41 then 65 it's greater than 41 or less than 41 greater right side right side then 20 left left 40 left side left side then 50 left of 41 right of 41 65 yes 29 right of right of 29 then 32 okay so less than 41 but greater than 20 yes sir and greater than 29 so it will be right of 29 yes okay then 11 of 20 less than 41 less than 20 then 91 right of 665 greater than
41 greater than 65 this and 72 right of 50 left of 90 right 50 okay okay let me greater than 41 yes greater than 65 but less than 91 so left of 91 yes okay 99 greater than 41 greater than 65 right of 99 so you have asked numbers of LIF no what is the LI node children don't any like children right so I think yes 1 2 3 3 4 four five yeah five will be the answer okay let's go to the next question okay I think this is a mock question the previous question one second I have to take the screenshot yes
what happened he wanted to any doubt okay consider the binary s sh in figure two which of the following is your correct insertion order which will result in the given BST so we have to tell which will be the correct insert correct insertion order it will give you the this bstd right so maybe I'll wait one or two minut then you can solve for this we have to draw each and every options yeah yeah each and every option yes sir because everything is in the random order yeah but uh you can see that u
h uh compare it yeah that these are the same right so just you have to compare okay let's say insert option a 64 then 31 so anyway we can reduce the S I think if I'm not WR option b option option b sir okay okay okay whatever it is we can just see it through insertion okay okay we solve what happened 61 then 31 right so 31 will be less than right yes sir left of 64 less than 30 what then 20 less than 31 so right left of 31 okay now 52 greater than 31 right of 31 okay so less than 61 right up so
52 now 10 left of 20 left of 20 left of 20 now 96 right right of 64 right of 64 so this will be right of 64 96 now 98 right of 96 right of 96 98 now 69 left of 96 left of 96 left of 9 16 now we can see the left of 96 is 79 is there right yes sir it is wrong it is wrong so we'll move to the next option so this is wrong now we can see the 96 is up to that 96 is same right so after we'll remove that now we'll insert 25 right 20 yeah less than 64 less than 31 and greater than 20 so it will be right
of 25 right of 20 now 79 greater than 64 less than 79 now 84 right up 79 greater than 64 but less than 96 but it's greater than 74 right of 79 yes sir yeah 986 yeah 98 and 69 right9 yeah 16 so you can see that this yeah this is correct yes okay now let's have third one it may be M msq right now let's up third one okay ins 64 31 so we can see that uh up to that is same right so just copy 31 then 20 then 20 then 52 52 then 10 then 10 then 84 so 84 will be 6 yeah yes sir so this is 84 is there or 9
6 is there right so this option is this one is wrong and this is also wrong so everyone and question how to solve this type of problem yes sir okay let's go to next problem okay uh consider a binary s BST consisting of 16 elements what is the maximum possible height of the given BST so you have asked what what will the maximum possible height of the given BST so maybe I'll wait one or two minutes you can solve so 15 16 yeah 15 15 16 nus yeah 15 so it will be 15 so so if height is and okay so ele
ment is a numbers of element maximum height will be n minus one right so when it will be maximum anyone ex when it's asending or descending yeah when it will be ascending or descending order so let's take one small example if it is consisting of four elements like 1 2 3 4 so what will be the height so insert one then two then three then four so it will be you can see that this is a level Z level one level two this is level three so in this case height is 3 and - 1 4 - 1 right so here it will be
16 - 1 it will be 15 everyone clear that this is okay sir if you want to know what is the minimum height then what will the minimum numbers of height can you explain yeah so it is log of 16 minus one yeah yeah correct okay right okay excuse me excuse me hello yes so the height is the maximum level so here it it was three so the height is three yes so it is not the number of the nodes that come so if the number of noes are four that is not what it is number of level yeah yeah sir just now somebod
y said that the minimum height it's log 16 minus 1 so a minimum height minimum height what will be the minimum height yeah log you have to take upper bound I think can L log of base two okay yeah log of base 2 6 then it will be like a complete bance right so yeah it will be balanced right yeah it will balanced right yeah in that case can we not use that Formula 2 power H minus one yeah can you repeat 2 power H minus one yeah 2 power H+ yeah 2 power h H + 1 minus oneus one is always one node yeah
uh so just you have to reverse right okay sir can we find out using this formula no no this is a numbers of Maximum numbers of node okay okay Maxim yeah okay so if maximum levels of a complete Min stage five so maximum level is given five what is the numbers of no so maximum numbers of no so we have asked maximum numbers of node how it will be maximum numbers of node sir 2^ 5 + 1us 1 that means 6 2^ 6 64 when it will be the maximum numbers of node like in which case it will be the maximum numbe
rb of complete complete Min yeah complete Min then it will be maximum number so maximum level is given five so height will be five right so maximum numbers of node will be the power 6 - one 5 + 1 right - one yes 2 to the^ 6 so that is 64 minus 1 is 63 64 - 1 = 63 63 yes everyone got this question confusing actually 2 power H sometimes we use 2^ H minus one sometimes that is what was discussed in the PDS also no uh remember um they were saying it is level zero there but for us it is level one tha
t is the one that is hitting here you should take it as because this is unnecessarily see you can say inds will always like start with level zero in this course in this course I'm talking about the in this course we always level zero okay yeah okay okay thank you what will be the minimum number of notes Here minimum numbers of node okay minimum numbers of node will be six okay yeah it's H+ one the form okay so consisting A Min stic 15 elements M be the maximum height possible for a given minity
and and be the minimum height possible for a sorry to interrupt for the previous one is it 63 yes 63 thanks so sorry to interrupt again uh you're saying the minimum number of not but if it's a complete binary search tree then I don't think it would be six would it uh yeah yeah that yeah it will be different complete Min then it will be same it will be like kind of minimum and maximum will be the same sorry I did complete it would be complete me complete means like it will be kind of balance yes
sir for complete it would be same same yeah for complete it will be the same thanks thanks okay no sir but uh if you can go they have given the maximum level they are giving an upper bound on the liit on the level right yeah we have complete right but it is giving an upper bound it is not saying that the level is five so if they are asking for minimum nodes can we write one no it's maximum level right what about the maximum level maximum level they're not telling that the level is five yes sir h
e's right if they ask minimum will [Music] be but the thing is like it's complete Min right but if I want I can insert one node also if I want I can insert 63 nodes also no it complete no no no complete binary search tree every node will have two child and all levels will be full so it is five levels all level full every node in those five levels will have two children yeah correct correct uh sir but I I just wanted to ask if it is a single node if it is just a single node yeah then can we call
it as a complete um yeah yeah it's complete my either zero like if like say only leap node only leap node whatever the leap node only Li Note have like no child other than it will be like two child so sir in that case minimum level of a complete binary search tree could be one also I'm talking about this question no no no it is just out of this question like if it okay what is your no just we discussed right the maximum level of the binary the same question we were discussing fifth okay in that
the hsh actually point out that um minimum level of a complete banet Tre could be one it will be one right it can be one maximum yeah it can be one so minimum levels maximum maximum will be five it's correct like it is given in the question but minimum could be one see the thing is like see we have asked like what are the maximum levels of a complete binary three is five it is my limit right see the thing is like see okay if the maximum level of a complete Min we have telling that levels is five
then we have asked what is the maximum numbers of node already have given that maximum like levels is given sir is little means level is given maximum level level can be zero level can be one level can be Max the minimum number will be there yeah yeah the level is not maximum the level is exactly given as five it is not maximum level five levels are five yeah correct level is five but if this word maximum arises then we can write the answer for minimum is zero right no minimum just okay see I t
hink it's confusing the maximum right yes sir just ignore that if the levels of a complete Min is five then what is the maximum numb of node right so maximum numbers of node will be like 2^ H + 1 minus one so it will be 63 64 minus 1 it will be 63 so uh sir here level is starting from zero or one like level is starting from zero in this course we will be always level is starting from zero so sir if level is five then it means 0 to four right level is five means see this is level zero this is lev
el one right so in this way level okay so got it now everyone got it yeah sir what is exactly the expectation means we should also know the pdsa concepts or so be only on dbms only on dbms that only okay okay because I haven't done pdsc yet okay okay thanks okay solve this question I let me one or two minutes 11 oh yeah 11 11 will be the correct answer anyone Sol other than so what will the max maximum height 14 maximum height will be 15 elements right so it will be n minus one 14 yeah and what
will the uh minimum height minimum height will be 2 yeah minimum height I think three right yes three yeah minim yeah Power 3 + 1 - 1 so it will be 4 - 1 it will be uh uh 6 50 right so minimum will be three so it will be 14 - 3 will 11 how minimum he will be please explain so we know that the maximum will be 2 H+ 1 - one right so if it is three 3 + 1 - 1 so it will be 50 right yeah it is okay sir minimum height yeah minimum height okay now can go to the previous slide sir how calculate minimum h
eight sir I'm not okay with the minimum height is three okay so you have to if Suppose there are height is three what will the maximum numbers of elements 2 power 3 + 1 2 3 + 1- 1- 1 so what will be that 15 15 right so it's 15 element right so it is when it will be minimum height it will be when complete Min right yes yes yes yes that's why okay okay now magnetic this right right so the structure of this is a arm assembly and this is a arm and this is a read right head and this is the platter th
is is one one platter this is one platter and this is the platter and each platter consisting of two surfaces one surface and the Bel one surface one surface and the Bel surface and the each surface is divided into the track and the sector so let's sh the another image it will be clear for you so if you see this is the r right head this is the arm assembly and this is the arm and this is the each surface divided the track you can see that this each surface is divided the track and each track div
id into the sector so each track suppose this is is divid the and Spindel this is a track this is a track so each track is divided into the sector so structure of the magnitude is scar for everyone you can see that this this is a real life magnetic I have taken picture this is a real life you can see that are you can see that yeah sir when we refer to sector so that sector is respective to that track only yeah like this is a one sector this is a one sector right this is a one sector this is a on
e sector this is another sector kind of that okay so sector is a part of a track yeah part of a track part of a single track not a collection of tracks okay yeah yeah okay sir all of the PLS of this dis rotate simultanously see this is a spindle yeah all of the this is spin to rotate the discs this is a spindle you can see that this is a spindle to rotate the disc so it's roted simultaneously yeah now magnetic like if you want to like uh know more then you can watch week eight session I think Sa
turday session I have covered all the things how actually you are deriving all the formula like numbers of like capacity of the disc all the things so you can watch that session okay let's solve one question sir can you give a brief overview of all the formulas okay I'll give while solving the numerical we will give the formula right that will be sufficient right uh if you could write on a page that we could just refer to okay okay so okay let me solve all the question and after that we'll give
in one p that will be sufficient right yes that is perfectly so answer the question 8 9 and 10 B basis of the following data right so you have to answer the question basis of the following data consider a magnetic disc with eight PLS eight PLS two surface per platters 1024 tracks per surface 2048 sector per track and 51 bytes sector per byes per sectors the disc rotate with 6,000 Revolution per minutes what is the capacity of the disc so you have to find the capacity of the dis so maybe I'll wai
t one or two minutes you can solve then after that I'll solve what are all the formulas in this so you have to find the first numbers of sector then numbers of sector will be two into numbers of letters into numbers of track per surface into numbers of sector per track then after that you have to find the capacity this capacity is numbers of sector on one discs into capacity of one sector so first you have to find the numbers of sectors I have a question here yeah the sector size increases from
inner to Outer correct no no it's like all the same but that is not what is not indicated in uh the previous image in the previous slide no see sector size is like same for all the maybe density will be more in that inner but sector side all will be the same because if you like sector size is different then it will be very difficult to right yeah so sector size is same okay okay solve that question 16 GB 16 GB G yeah correct so let's see so numbers of sector equal to sorry 2 into sir uh yes now
please continue numbers of PL into number of tracks track for surface into numbers of sectors number subsector for track so 2 into numbers of letter 2 into to numbers of letter is given eight eight into numbers of track for surface one24 right one24 into numbers of sector per track so numbers of sector per TR is 204 48 okay so it will be 204 8 so 2^ 1 into 2^ 3 into 2 10 into 2 11 so it will be 2 25 seor taking number of sector okay yeah after that is collect yes yes sir yes sir dis capacity thi
s capacity equal to one sector size into numbers of sector one sector size is given 512 byes right yeah into 25 bytes it will be 2^ 9 into 2 ^ 25 2^ 34 2 34 bytes now we know that 2 10 = to 1 KB 2 20 = to 1 MB and 2 30 = to 1 GB right so we can write 2 30 2 10 bytes remember this is 2 10 all the bytes 34 right so 4 sorry 30 by = to 1 GB so 4 16 GB everyone got that sir one doubt why 2^ 30 + 2^ 4 by so we know that it's not you did a plus sign there that is multiplication multi yeah then it is ok
ay so sir what is the role of this revolutions per minute nothing disced with 6,000 revolutions per minute no it's nothing okay just for confusion no that is for I think question n and 10 somewhere it will be used yes it will be used okay so question number 9 is what is the minimum numbers of bits required for addressing all the sector so 25 just now we calculated yeah so number of sector equal to 2 25 right now numbers of bits theyard address all the sector equal to log to sing value we taking
log West to what are the numbers of sector so number of sector so it will be log 2 2 25 so it will be 25 bits 25 so what is the like concept behind this formula like how did we come okay so suppose you have a one bits how many unique things you can address if you have one bit then zero and one there are two things right if you have two things then you can address four things like two bits you can address four things 1 0 0 0 1 1 0 1 1 right okay so if you have 2 25 bits right so if you have like
you can see the that if you have n Bits then you can address 2 n Bits right so have 2 25 bits so it requires 25 bits to address all the sector one second uh sorry here I have a question one by is equal to 8 Bits yeah one by is yeah one bite equal to it is perect yeah one Bal bit Yeah bits yeah one bit equals to two values I did not got to your question 1 byal to 8 bit here correct so are we calcula the number of minimum number of bits required for addressing all the sectors sir can you show the
you show this please it's one B will be four bits eight bits eight bits eight yeah sir can you please show the previous version a lost connection I didn't think what we are calculating we calculating capacity so for capacity what we need first we have to need numbers of sectors so for numbers of sector 2 into numbers of letters into numbers of track for surface into numbers of sector part track so 2 into numbers of letter is given eight so 2 into 8 and number of track per surface is given 1024 s
o one2 2 4 and numbers of uh sector part is given 2048 so it will be 2 25 sector and this capacity equal to one sector size one sector size into numbers of sector so one sector size is 512 into numbers of sector to 25 so if you calculate this will be the byes right so it will be 16 GB okay okay okay so what I'm trying to understand is minimum number of bits required for addressing all the sectors yes because suppose see you have a hard dis right so if you have a hard dis right so while accessing
that uh suppose you have data like that you have okay so if like you want to access some sector you need address right correct and uh that sector is a a smallest right that's why we are addressing that sector correct but the SE sector from whatever has been given in the problem has some number of bytes there five 12 bytes per sector yeah 12 bytes per sector so see the thing is like what are the numbers of sector we have first you have to find the numbers of you have to see that thing is like we
uh address only the sector so first you have to find the numbers of sector what are the numbers of sector we not going to the size right okay for addressing only not what is in there okay yeah actually I have a doubt here uh say if you go from the basics say for example if I have two sectors yes I need one bit right yeah one bit Yeah if I have four sectors two two bits yeah 83 yeah 83 four now I have 2 power 25 sectors yes so how it will be 25 I'm not because eight is I need three bits only oka
y 16 right okay okay okay let me if you have zero bits so how many sorry if you have one bits how many uh things we can ID 2^ one right yes two if you have two bits if you have one sorry if you have two bits sorry if you have two bits then you can identify 2al to four right okay three okay so 25 means 22 okay okay like this okay I'm just going the other way and trying to confuse myself okay okay thank you okay let's go to the second question given that rotal speed of the deex is 6,000 ration per
minutes consider the S time is 3 millisecond what will be the rotational latency so you have to find the r leny sir 10 ms sir I want to ask in this question sir if it is seek time is not given in some question then how can we calculate SE time because rotational lency we know 1 by two Into Revolution one revolution time right in millisecond that is average average sir but how to calculate seek time SE will be given in the question sir always yeah it in case it is not given because because we ca
nnot calculate it's like you need like so many math and so many physics because we cannot calculate that's what I tried to check online but I find it very complicated yeah it's very so six time will be given in the question don't worry okay so so let's rotational leny to half into time for completing or right now 6,000 Evolution so 6,000 Revolution in one minute okay one m equal to 60 second right and 60c equal to 61 2 3 millisecond right so 6,000 revolution in 1 2 1 2 3 millisecond one revoluti
on will be 601 2 3 why 6 1 2 3 that will be 10 10 millisecond now half I have small doubt in this sir yeah sorry to interrupt uh in this question they have given rtion speed has 6,000 Revolution per minute but if they give Revolution per second what we should do sir so see 6,000 Revolution per minute right yes sir so 1al to 60 second right yes sir we have to find the millisecond right so 1 minute = 60 second and 60 second = to 60,000 Mill right yes sir so that's why right 1al to 6,000 Mond so ti
me now time for completing ration it will be 10 it will be why that half because we are caling half right what is rotational latency rotational latency means okay so what is rotational leny suppose this is a the D right okay suppose data is present in the in that position first you have to do first this right hand you have to move move into the Dig TR absolutely far away that is what first you to do the Dig track right MH then after that you have to rotate the disc correct so what is the time th
at because sometime what happen uh this data will be present in the this and data will be present in the this so sometime you have to rotate a small and small amount of time and sometime you have to rotate full L right yes that's why you're taking half not we taking average okay the dis rotates only in One Direction then yeah dis rotate in Only One Direction and seek time is this time required for finding a sector track yeah finding that dig track got it right what is the use of seat time in tha
t question Sy is nothing it's a redundant so we can directly use half of 10 Mill seconds yeah half of 10 m sir I have one question okay sir in the slide one minute um sir can you give me just few minute I want to open yes sir the seek times are in the slide um sir has mentioned uh seek time is half of half the worst case seek time so in after that he has mentioned 1/3 if all the tracks have same number of sectors so what does it mean can I tell which numbers of slides then maybe it will good sir
it's 8.4 uh slide number is 17 okay do you want me to share the slide okay I'm sharing right [Music] okay so what does this line mean half of so it's like a see like half time like what about the maximum six time right so it's six time and the one3 of the track have the numbers of sectors 4 M minut so half of time it's finding the a time not s Time s time will be given in the question sir I'm also not getting what does it one3 if all the tracks have same number of sector I believe all the track
s will always have a same number of sectors is it possible so then why the statement is required one3 okay maybe I'll post in the like discour I'm like I have to see what actually saying maybe watching after I'll watch the lecture and what actually sir is saying then after that I comment okay sir yeah sir and also yeah can you go back to the same slide sir yeah please yeah uh no the slide slide this one lecture slide okay lecture slides okay yeah so below s time they are also mentioned rotationa
l latency but in the question it doesn't say we have to calculate average latency so does it mean that rotational latency always means average latency yeah we are calculating like in the Nal we are also like always follow average lat rotational latency okay yeah there is something called mttf what is that in the slides will be not ask it's like now like we not asking that question from mttf because that is difficult question so we not it's not it's difficult to understand also yeah difficult so
will not ask because um like after first time we are not asking from the like it's kind of out of can say okay okay now consider discs having 128 track per surface 512 sector we solve the previous question yeah 5 millisecond answer is 5 millisecond what was the question actually what will be the rotational latency yes okay and this consider SE time of 3 milliseconds why this is a rant information it's this is information okay okay okay thank you if access time would have been asked then we have
to add that yeah correct correct then 1 by three or we have to time is time plus rotational it will be 8 so access is the one where we move the head to the right position and then we rotate is the light Andy time is for the rotation of the disc access time is to move the arm to the right location yes right yeah we have to so we have to always take excess time whatever it is given we don't need to assume the worst the SE time we don't need to consider like worst seek time we have yeah whatever th
e question is given it will only that so if they will ask every seek time then we have to consider it as a worst worst 3x2 we'll not ask time we always in the question always given in the time don't worry okay sir graded assignment question to in week8 uh I did not get the answer right but okay can we that yeah maybe we'll solve like after the session or maybe we can post in the discourse give the solution uh sir I got the answer as 15.5 but they are saying it is 31.12 okay maybe then we underst
and that total dises time they asking for okay okay yeah we give can we solve it today I will solve then okay thank you sir okay [Applause] then consider di having 128 track for surface 512 sector per track and 256 byes per sectors if the minimum numbers of bits requir to access a sector is 21 then find the numbers of letters is record so you have to find the numbers of letters that record okay okay so I lo it maybe one or two minutes you can solve just [Music] is it 16 yeah it will be 16 16 yea
h yes sir 16 yeah s is it PLS into sector is equals to rest of the things yeah so okay so numbers of gfts given is that 21s will be two sided no surface two sided surface will be like and two surfaces yeah two surf yeah okay so are we supposed to assume there will be two surfaces it's not given in this question so WR per surface like generally it will be like two surface so if it is not given in the question you can assume two surface it's given in the question one surface then you canum because
we'll use two surfaces you can see it is like two [Music] surface if it's one surface then we don't need to MTI yeah correct correct I have a basic question if you can go to that photo picture of this disc okay the which we have on the top we see in the physical picture right so this arm will be there for every platter we are not this arm will be like every platter yeah correct this will be this the top and then every platter so this arm will be there yeah you can see that there is some Gap is
there right okay we are not seeing it here but but it will be there yeah just if you want to like really want to explore that thing then open any hard dis then you can see break a hard disk okay okay thank you okay okay so consider D having 128 track per surface 51 2 sector per track and 256 bytes per sector if the minimum numbers of bit required to access the sector is 21 then find out the numbers of letters reir so total numbers of sector will be R please could you mute yourself oh yes sure 21
right yeah yes okay now uh total numbers of soor here what is the new Total number [Music] sector to 2 into letters sir how you got uh 2 to the 21 the number of sector numbers of bit to access so that's why in the in that question we have I think in that question if you have one bits then we can address 2 The Power one right you have two bits then we can address to the two sector right so numbers of bits will be numbers of bits is given so it will number sub sector will be 20 okay sir got it ye
ah so 2 into PLS into number of uh break for surface into numbers of for track total numbers of sector is 20 21 20 two into numbers of letters is given no you have to find two into numbers of letter letter you have to find into numbers of sectors given numbers of track per surface numbers of track per surface is 128 128 and numbers of sector for track numbers of sector track numbers of sector track 512 512 so 2 21 into 2 1 into number of letter 7 7 7 into 2 power n n nine so numbers of letter wi
ll be 21 if you add 1 + 7 that is 17 here we don't include B per sector h no not required right they not asking for memory but in question we a capacity right so we don't need capacity we need the platter it's yeah correct it's capacity right it's numbers of platter if we have this capacity then it's required otherwise not it will be 17 so it will 4 it will 16 PL so number of PL will be 16 sir why didn't we take uh 256 because this is a capacity 256 by per sector right yeah so total numbers of s
ector is 2 21 numbers of sector will 2 into number num of letter into number of track per surface numbers of track per surface into numbers of sector per track numbers of sector per track so two into numbers of letters into numbers of track for 128 and sector part track is 512 okay okay sir okay okay bits requ to access a SE is 21 but generally as we know that to to access a sector only one bit is required how this is possible in this question to access sector we require zero R1 as we in the pre
vious questions okay then how this is given that okay okay suppose uh okay uh okay let me give one example okay suppose his name is given Ram raak s [Music] so 1 2 3 okay let's keep four suppose this you want to assign a r numbers and you assign only numbers of bits so how many numbers of bit required to like uniquely identify all the names two yeah that yeah two bits we have ask like only one bits zero and one we can assign all the unique RO number or not uh whose name is I did not those who as
k that question can you tell what is the numbers of yeah I ask yeah so what is the numbers of bqu to inally identify all the RO number you can here are four lens uh so think to I don't know uh if I want to access the one name how many bits are required I have no idea two bits we can easily identify all the name right correct yeah yeah so you can see this is the address kind of Ro number kind of this address suppose say like whatever you said Can can you repeat it I'm not okay suppose they have a
four names right and you want to uniquely identify all the names using the bits so how many numbers of bit required using one bits we cannot access uh four things right so if you want all the name s tell like I want to store all the names then how would I do in two BS so I not about the access not about the storing like and like we want to give a unique role numbers or bits that we can uniquely like say right suppose Ram is 0 0 then we can say this is Ram this is 01 let's give the sector form a
lso like okay so suppose this is a the spinner only consisting of four sector four sector only consisting of four sector suppose you want to give uniquely identified to all the sector how many bits is requir we can add 0 0 0 1 one0 and one one one one two bits so with the help of one bits you can uniquely address all the things or not it's just like if you need uh with the help of two numbers I can uh arrange four Ro numbers yeah four RO number right so here it's given minimum numbers of bit to
access sector 21 here what is the numbers of bits to access sector two bits right yes corre so here is given to the uh 21 so numbers of sector will be 2 21 right here it's num of sector is 2 = 4 if 21 bit is 21 right you got it or you have some doubt sir so can we say that if there are n number of bits then we take the ceiling of log of n to the base 2 I did not got it what are you saying uh so right now there are four bits let's say there were five bits sorry five combinations which we want to
uniquely identify then you have to yeah so we yeah so can we say that it is log of n where n is the number of combinations to the base two and we take the ceing of that yeah yeah correct okay so you got this question right yes okay now let's solve this question consider a magnetic disc with four platter two surface for platter one2 tracks per surface and 28 sector per track with a dis capacity of 8 GB then you have to find the capacity of one sector so you have to find the capacity of one sector
sir I'm having one confusion yes sir I'm not able to means remember the hierarchy hierarchy is pretty simple first is some platters then uh that if platter is divided by Surface by two then the surface is divided by track so you can see that this is track one then each track is divided into the sector platter surface track and sector yeah okay and sector will have the capacity to store data yeah okay sir can you please Sol the previous question just sir here if the minimum number of bits requir
ed to access a access all sectors should be given now a sector is 21 is given yeah a sector is 21 only one sector only one sector you to access this sector how many bits is youir but it should be given all all the sectors in prev we have solved okay maybe it will be all the sector that will be good all the all the sectors should be given then yeah all maybe it's type of grammatical mistake okay yeah now solve this question sir is it 512 yeah I think it's 512 yeah okay so what is the capacity of
DX 8 GB 2 to the power 33 capacity D = to 8 GB you can say that it's like what byes right so capacity of disc we know that numbers of sectors into capacity of one sector so 2 33 what is the numbers of sector 2 to the^ 24 okay two numbers of letter is given four right yeah four into numbers of track so numbers of track is given per surface is 1024 into numbers of sector per track is given 2048 into capacity of one uh sector so if you cancel it will be 33 2^ 1 2 24 yeah 24 this is bytes into numbe
rs upon sector number of one sector will be 2 9 bytes and 9 = to 512 byes per sector so what is the use of two surface per here surface platter means here two surface per platter is also yeah two surface so each flatter consisting of two surface so you can see that this consist of two surface one and the below like we are storing that like we're rest storing on the both surface so it is the two multiplied whatever the constant we are using yeah that it's clear for you okay any doubt in this ques
tion okay let's go to the lru list recently replacement policy consider the string block of reference in the given eror uh 32 4 1 3 2 4 1 142 then you have to find that the system has a buffer with three slots so the system has a buffer with assum that initially the buffer isempty if L buffer replacement policy used then what will be the numbers of misses and numbers of HED and you have to find that two into numbers of Miss plus three into numbers of hits someone raise hand uh yeah uh are we don
e the with all the disc Concepts yeah are you are are we done with the all the dis concept here yeah dis concept like we'll be like mostly we'll be ask this type of question whatever you have solved so um I I've seen uh many question like about the data transfer rate so in the will be only will be asking this kind of question gred and practice may be there but we'll be asking only this and if you want to dat transpar and all the things I think I have solve one question on week Saturday session y
ou can watch that so it's not like important for the quiz to now not important for that we'll be only asking that thank you man yeah okay then I'll wait maybe two or 3 minutes we can solve that question sir 22 yes it will be 22 yes sir 22 okay let's solve that question I think so let's 3 2 4 3 3 2 4 1 3 2 4 1 4 2 inally buffer is in three now three three is present in the buffer or not it's not present right no so this will be Miss Miss now three two present in the buffer or not no it will be ye
s now three 2 four is the present buffer or not no no sir yes now one which which one will be the r use three right three so you have to replace one 2 and this is also miss now three three is a 1 3 4 so two yeah so you can see that two is the least recently right so you have to replace three Miss uh Miss then two which one of the least recently used four four 3 two Miss and four which one the Miss least recently used one one one 4 32 32 it will also miss and which will be the least recent three
right yeah 4 One 2 it will miss four is the hit right hit yes sir also hit one two it's also so number of he equal to 2 and of me equal to 8 7 8 8 8 so 2 into numers 2 into 8 + 3 into 2 it will be 22 Yeah so how to identify this whether three is present in the buffer or not okay that's all so three initially buffer is empty right this buffer is initially buffer is empty it's consisting of three slot now three is present in the buffer or not yes sir it's present sir how can I'm unable to understa
nd this please okay sir after inserting three uh how to identify whether it's hit or miss that is my question okay okay let me solve one second sir regarding concept regarding one concept I just want one clarification so in one of the live sessions only uh what sir said is like there is data in our hard disk and this buffer is nothing but it is same as RAM yeah so firstly the data will be pulled from hard disk into the RAM and and then it will be used yeah correct okay okay so we are checking fo
r the buffer and we are checking what is okay got it yeah buffer buffer is kind of some them I think I have explained in the previous live session okay okay so see this is a three slot only three slot is given this is a man or buffer three three is present in the this slot or not uh sir presently it's not present so it's a hit Miss so then you have to insert three right yes sir now two what is Miss here miss means if you P see so this this is a secondary disc or hard disc and this is the m m rig
ht so bar suppose consisting of three slots so suppose computer want to read some data or something like that so first computers see in the M memory M memory it's present in the M memory or not or can say the buffer also so if it is present in the man memory then we can say that this is a hit if not present in the M memory then we pull the data from the secondary disc right you got it yes sir now here you can see that this is the man three is present in the man M or not it's not present right ma
in memory is empty now yeah it's not right yes we have to pull the data from the hard disk yes so that's why a Miss is not present in the man memory okay now two is the present in the man memory or not no no it's also miss is so let's right here it's two is not in the present memory now four is the present present in the M or not no no sir it's also miss now we can see that bffar is full right yes sir yes sir yes sir reest come now one is present in the memory or not no not you have to replace s
ome buffer because you have only three slot right yes sir so which buff like Which slot will be replaced least recently used so you can see that three is the least recently used so three will be replaced it will be one it will also miss got it yes sir so in that way you have to do and you have to count the numbers of Miss and numbers of hit so sir if three again comes it has to slot back again yeah then it will be hit then it will be hit how okay mean after one we are removing three yes to accom
modate one so three is not there right yeah three is not there it will be Miss then then after that three is coming then which uh one will be the replace it will replace two and it will also yeah it will replace two and it will three so this is also miss yes sir Miss after maximum number of slot gets filled if the same um like number comes then it will be hit right yes correct no even if the buffer is not filled let's say first two and there's a reputation it will be still a hit you can't duplic
ate the buffer at any point of time it's very easy like if it is present in the buffer and you encounter the same observation it will be a hit if you want to insert it by even if want to replace and insert it will be a Miss yeah correct so everyone got this like how to solve this type of question because yeah and there won't be any fif or optimal only lru yeah only L will be there thank you I have a question in this Yes actually what we do with this Miss and hit we record Miss and hit for everyt
hing what do we do with that like which buffer replacement algorithm should use like in the operating system we will be learn in the detail if you go in the degree levels or something like that then operating system is there so there is some significance for recording this yeah so if you are using po or something like lru or something you are using other replacement use then you have to see that what is the numbers of pits or numbers of messages there so if numbers of it more then we can say tha
t data access time will be less right yes better buffering yeah what we miss what we hit we are not recording right because misses Miss for what we don't have we do we record that also because a Miss on a three and a miss on a two and a miss on a one or is something else right because we just record miss miss miss what do we yeah let me explain so you know there could be two buffers then if you compare Miss and hits then it'll give an idea which is better buffing okay see man memory is a very hi
gh fast memory right yeah and secondary memory is like low kind of that like it's like uh low fast like it's the access time is more right yeah if you want to access some data if already present in the man then it will be access time will be more access time will be like less right yes it's not present in the M memory if we pull thata from secondary D then access time will be more right yes and like in your system do you want like extra time is more or less less is better so like uh in that like
L like there are different buffer replacement policies also like we want to minimize the access time like which algorithm will be used because M memory is like limited right we cannot extend like up to like you can extend it's like it will be like very high price like kind of it 8 GB or kind of things right so some more things will come then how we replace things that is the Buffa replacement policy okay yeah okay thank you thank you yeah so it is safe to assume even buffer is actually also on
the same dis only buffer is not same disc it's like buffer is a main memory it's so basically then we can't use the the typical access time calculation that we use for magnetic disc right it's a different access time yeah it's like very fast it's kind of made of of T and all that it's like you cannot imagine it's like very fast but for that there is we don't use the same formula as we use for not some it's like see for only hard dis we use that formula that once SSD come it's like it's different
technology so access time will be different got it okay now let's if you understand question it's like I think this is a previous time question so let's solve this question I let maybe 3 4 minutes you can solve that question uh sorry to interrupt sir do you do you have left anything to cover today concept wise know it's like it's done okay because there's mad one revision session as yeah you can go then yeah thank you thank you sir how many questions are left after this sir this question only t
his question okay so this is the last one right yeah this is the last one and Sir where will you be attaching this PDF or PP maybe I'll give in the discourse then or if you need uh then you can just ping me in the chat my name is right yeah subendu shendu study. yes correct okay thank you sir huh is it two I think it's zero kind of that maybe I don't know the answer maybe I have to also solve soing say four slot not three slots yeah SL coming it maybe I I have to also solve just I'll few minutes
other so that others can also solve sir zero okay it will be zero I think okay what will the numbers of Miss anyone num so miss right hello yes to hear me thank you uh there was a problem with my system a little earlier and I was struggling for the past 5 10 minutes this problem would you be able to explain later uh if we are already gotten passed because I'm not clear about how the buffers are getting uh replaced okay maybe then we'll solve this question in detail okay so so there are four slo
t right just one quick question on the terminology some places people use page fault that we should consider as hit I no only like it's like simple kind of we are using only miss and hit not any kind of okay we will use the same terminology right the same okay so only have a for right so let's insert the answer is zero yeah answer is zero correct so initially you said the buffers are all free so there is nothing there which is a miss and once we four that is the first time it enters yeah okay so
four initially buffer is empty so it consist of only four slot not like other that so initially buffer is empty right so when four will be inserted it is missed right yeah it's not there so that's the reason why it is a Miss okay then six if it's present in the M memory or not no it is not it's only four that was present no yes that's also miss yeah now 4 six four four again and that's also not there it's a miss four is okay four is okay it is already okay it's hit hit okay now one one is prese
nt or not [Music] no 4 six one miss now three three is present or not no it is 4 6 1 3 it's a Miss it's a three now two two is present or not it is not no and we have to replace some of yeah four not four we can say least recently six right six we will replace six will be replaced why because least recently which is the least recently used you can see that three is also like recently used one is also recently used four is also recently used least recently used is six right the last one okay last
okay okay fine so it will be uh two 4 2 1 3 2 1 3 so it will be Miss yeah then uh four is coming yeah it's already present 4 2 1 three it's hit right yeah then one is coming it's hit yeah yeah so it will be uh it will be 4 2 1 3 it is hit then four is coming it's already hit already hit and two is also it yeah so numbers of me will be 1 2 3 4 5 numbers of Miss will be the number of it will be five uh sir it will be 5 - 5 0 sir yes sir I could not still get how you replac like why you replaced s
ix not four okay uh in that position right yes sir okay so we are using list recently used so you can see that three is also like recently used right four also used so among four of them which is the least recently used okay so six six is the so you have to replace six you got it yes so now I got it okay so I'll suggest like a solve this type of uh question so maybe I'll upload in the sir I wanted to yes is Sir the PDF that was the question solved for week five and six can I get that PDF where h
ow can I get that PDF maybe like I'll ask to P I think P say right can you please upload sir that I missed that sir yeah we'll upload all the things please upload upload please upload that PDF in one or two hour because we have today only okay maybe like we ask like will upload in that solution also sir I do have one sir it is to week five and six sir can I ask no sir yes you can ask uh like did you watch like a previous revision session uh no sir but I want to know how to calculate the maximum
number of Super Keys sir is there any formula for that yeah I think maximum numbers of Super Key discuss how to calculate in the previous session in detail way so just watch the previous session will it be available in YouTube or yeah it will be available in the okay sir sir graded 8 second question yeah yeah yeah so can I present it one minute yes uh this super key maximum number of super super key part is uh important for quiz to like it's maybe question will be there I don't know but it's bet
ter to revise the concept maybe one or two question will be there sir yes can can can you please explain four n sir just I think previous session it discussed so you can just go to and exp and sir but but but can can can you just please tell it in a small way sir it's just too elongated and just confusing sir I tried it yeah so did you watch that uh um so it will be like a think and there is one tutorial also so just I think there are four condition is there that's sufficient okay sir thank you
yeah sir yes is is a andm andm ttf likely likely to come on the exam sir mttf not got mttf sir mure will not come so mttf or mptf or Mt all these reliability questions performance are not at all in scope yeah not okay so so graded eight question two can you share your screen yes [Music] sir I'll take the screens okay okay you canop your screen my screen is visible right hello hello sir it's not clear it's not very clear oh now it's okay okay okay consider the following specifications so it's giv
en Windows okay let me okay so consider the this time with the six time is given sir yeah can can you please Zoom it sir it's not visible Zoom it now it's visible no it is not okay maybe like then maybe if you past it in a PowerPoint or something it probably will come better as an image and don't worry like this is a difficult question so it will be won't ask in the quizes we only focus on the simple things for magnetic disc now uh this is visible right yes sir yes sir it's visible okay what hap
pen this is problem consider the discs with the following specification with the following average rotational data is given 3.5 second and this block size is 4 KB data size that is 256 kb per second what will the total disc exess time for a single block of time right so total we have asked the total disc access time right so what is the total dis access time so total dis access time will be one six one six plus aage lay plus whatever the block transfer time right okay so s is given and rational
delay also given so we have to find the transfer rate right so what is the transfer rate it's given the 4kb dis Block in it is 4kb so transfer rate will be to transfer the let's use another to transfer for K time requir will be disc block size by data rate by data rate yeah so it's given 4 KV 4 KV by 256 KB so it will be so it will be like qu second if you calculate it then it will be uh I think 0 2 6 01 5 625 right and it will be 15 15 15 625 millisecond 16 is given six is given 12 3. and rotat
ional D also given 3.5 and for transfer 4 KV it will given 15.625 so it will be 31 125 millisecond yes any doubt this formula is given this total disk access time because access time is the one which we so also like we will only ask only access time not asking the Total Access time so maybe like from next time will move to the practice this type of question that will be good yeah okay thank you sir thank you thank you you okay thanks for joining all the best for quizes thank you sorry sorry to h
old you may I ask one question it's it's a little it probably is going to take a little more time okay okay it is about uh the videos of week six I have watched yes but when it comes to dependency preservation I'm getting confused more and more I watch the videos if you can take the notes that is there are a simple problem and explain it will be really helpful all the three of them I watch but uh somehow I'm not getting it so did you watch dependence preservation tutorial there basar yes okay uh
your session also you also covered it on um U man DEA I think that's the name she also covered it but the notes that she took to explain uh uh dependency pres preservation from the lecture notes I think okay it really threw me off I'm really confused about what exactly was the process so okay so let me explain that yeah uh my screen is visible right it's coming up so okay yes it is dependency preservation so what do mean dependency preservation so after decomposing the like if relation R you ar
e decompos into the two relation R1 and R2 right yes so what do mean dependency preserving like what about the parent functional dependency preserving parent this is a par table you can say that and this is the child table if all the dependency Preserve in the child table whatever the parent parent table FD is there FAL dependen is there if all the depend like all the fal dependency or FD is present in the child T then we can say that this is a dependency preservation obervation correct you got
it now how to check the dependency PR right so let's not go to that theoretical let's solve problem that will be good right yeah yeah okay now this a relation r a b c right yes and parent table function dependence is given a determine B and B determine C right right and decomposition table is given R1 a and R2 BC there are two decomposition table right right then you have to say this is a functional dependency or not so first you have to check what are the fds present in the child table right ye
ah so what the let's check what are the so a a take a closer from the parent table fun and differen what will the a closure a b c a b c right right so a we can write a determined a BC right yes now only two attribute is there so we can say that a determine B yeah right now let's check B closer also B closer what will get it's BC BC right yeah but C is not present so that's why we not writing right yeah now let's check you can see that BC is B closer equal to BC so we can write B determine C righ
t correct now C closer so C closure what will nothing nothing now we can see that a determine p is preserved directly and B determine C also preserved directly then we can say that this is a dependency preservation like like all that Abes had preserved in the child Tel okay you got it this yeah now let's solve another example okay AB BC this example that will be good okay now our relation r a b c d a determine b b determine c c determine D and D that FD is present right now decomposed into three
table R1 AB R2 BC and R3 BT right right and first you have to find the what are the child table functional dependency right so yeah what will be the a closure Tech a closure b c d a b c d yeah a b CD yeah so we can write a determined B CD right yeah so we can write a determined B right yeah now take B closer CD B CD of course yeah C DB right so because only a b is right so we can write now let B closer so we can write B determine C because b c DB right yes now let's set C closure here what what
we'll do what we'll get cdb cdb so we can write C determine cdb right right so we can write c determin b right yeah now take let's Che uh B closer B closure is already uh done b c DB so we can write right yeah and let's Che uh D closer so D determine b d determin b yeah yeah okay but why are we actually looking at B determines D why are we going for B closure there yeah because we have to see whatever the possible functional dependency present in the child table everything possible yeah everyth
ing possible right okay now okay a determine B is preserved a deter B is pres right yeah so a deter is preserved b determin c is preserved B determine C is preserv right yes now D determined b d determined is also preserv right but C Tod is not preserved you cannot say C to D is not preserved maybe like indirectly is preserved right by B to D R2 and R3 combination can give me that yeah so what you have to do the text C closure with the help of child T functional dependency so what we'll get C cl
osure R2 R3 R2 R to B C B and B to d right yeah so you can see so C to D also preserved okay so you have to take all the possible combination so first for every relation what are all the attributes that are there everything that is possible if is that more than three attributes yeah a b c so you have to take a closer B closer C closer then you have to take a closer b c closure CA closure kind of also okay we don't have to take ABC again right yeah ABC yeah ABC closure also we'll have to do no no
because ABC can determine ABC right so okay so now what I think that basar tutorial that dependency preserving Tut then I think you will get it sure thank you thank you very much thank you this was really helpful yeah yeah so thanks for joining wish you all the best for the thank you also you do the same sir yes thank you sir can can you please also explain Canal it's really confusing for me can I think I have discussed that week five start a session or something like that so just watch my sess
ion that will bear s sir can can you please explain it in Bri brief sir I just don't know way to browse it okay maybe I'll just give the link that will be good so maybe let's see that the people would at least this this so I have covered that uh I think previous year live session previous time live session it's I think only you have to take like 10 to 15 minutes then you can like watch that session sir also the thank you sir mock for quiz to solution PDF sir yeah yeah we'll release all the thing
s don't worry okay maybe like after one or two hour assignment Solutions also are not there sir okay okay like we only fifth is there 678 day okay maybe then we'll release all the things thank you thank you thank you sir okay I wish you all the best for thanks thank you sir bye thank you

Comments