August 13th is a very special day for all of us. It is the organ donation day. As you are probably aware every year hundreds of thousands of people develop organ failure, be it kidney, liver, heart and sometimes other organs too. And the only hope and the best hope for these people is to get an organ transplantation day. Organ transplantation involves donation of an organ to help someone else. There are two kinds of donation. One is a living related or a living unrelated donation where a person donates one of his organs or part of his organ to someone else who needs it. This can happen in mostly kidney and liver. The other form of donation is called cadaver donation where after the brain death of an individual which is diagnosed by certain specialists if the family opts to they can donate the organ of that individual to others. Manipal Hospital Bangalore is recognized for multi-organ transplant and we at department of plastic surgery offer hand transplant services. It would be a great service to those people who have lost their hands and together we shall be able to transform their lives. Gift of an organ is almost equal to gift of a life. You know people are doing a noble gift by donating their organs and saving the lives of the people who are suffering from end stage organ disease. I would humbly request you to pledge your organs and save lives. It is very appropriate that we make every possible effort to educate our patients about the importance of organ donation about the work that is done in heart lung transplants in Manipal Hospital. The kidney transplant is quite safe nowadays and in fact as a success rate if you look at world over even one hour center is around 95 to 99 percent and they live much better if you look at one year survival on a kidney transplant is almost 99 percent that is almost near normal. So that's the reason kidney transplant after a donation will be definitely a great thing. Organ donation awareness is much better these days when compared to many years ago. On this organ donation day an important message that we would like to convey to the lay people is that kidney donation is a very important aspect of kidney transplantation wherein a friend a relative or a loved one donates an organ to the person who's suffering from kidney disease and this completely changes the life of the person who's suffering from disease. We have so many donations we all have had blood donation helping someone to study helping someone to get married many things in life but of all the donations if you look at organ donation probably stands the highest level because we might have any amount of money many things can be bought even in health with money but what we cannot certainly buy is an organ this has to be donated the eyes they say is a window to the world however there are more than three million people who are suffering from corneal blindness the only way to treat these patients is through a corneal transplantation where this opaque cornea can be replaced by a clear cornea so the simple act of eye donation gives sight to multiple blind people do not burn or bury the eyes donate them so even after the death we can still live through the eyes of a blind person and give give him hope and vision to see this beautiful world. The important message we want to give on this important day is that think about organ donation plan about it there are legal ways of going about it we can designate that in any unfortunate event of my death or probably my organs can be donated we can pledge organ even before you know we see a bad end. Let us join hands in this organ donation awareness and save many more lives. Please be aware of organ donation and when either you unfortunately have an accident or anyone in your family has an accident and has severe neurological damage please let your doctors or treating physicians know that the organs can be donated don't bury or burn the organs donate them and save a life it's a true gift of life.


In this section to the course, we're going to start our discussion on the major theme of self-organization by exploring one of the key premises of complex systems theory, which is that global coordination and complex behavior can emerge out of very simple rules governing the interaction between agents on the local level without need for centralized coordination. At the heart of this is the question of how agents synchronize their state or cooperate to create local patterns of organization, and this question will be the focus of our attention during the next few lectures. We see many examples of self-organization within complex adaptive systems that are composed of elements following simple rules. For example, swarms of fireflies who may start out flashing their light in a random fashion with respect to each other come, through their interaction, to coordinate their behavior into an emergent pattern of the whole swarm flashing in synchrony. This type of quite basic self-organization can be modeled using cellular automata where very simple rules are programmed into a computer and out of the interaction between these simple agents we see emerging surprisingly dynamic patterns that are able to stay evolving over prolonged periods of time to produce novel behavior. Solid colonies are another often cited example of self-organization through simple rules. Without a centralized coordinator, the colony as a whole exhibits quite sophisticated differentiation and specialization of its functional organs that then work together to maintain the whole system. Individual ants interact and communicate through exchanging chemical sense that induce other ants to do more or less of a given activity. This type of coordination is the product of what we call feedback loops. We will be discussing how through feedback loops some local pattern or behavior can become amplified to create an attractor state that will draw local elements into a particular synchronized configuration, thus arising some pattern of organization without the need for any form of top-down control system. Lastly in this section, we will be discussing cooperation and competition as another lens through which we can try to understand this process of synchronization. As an example, we might think about the vast complex adaptive system of our global economy, an organization that is capable of producing things like laptop computers and sports cars that no individual could produce in isolation. They take the coordination of thousands or possibly millions of people in order to complete the full production and distribution process, but no one is in control of this whole operation. No one makes these people coordinate their activities, they have done so according to their own local rules and incentives. The elements in this type of system have agency, that is some kind of choice over their actions and thus we can best understand the coordination of their activities through the concepts of cooperation and competition, where agents choose to synchronize their states in order to maximize their individual payoffs. Once again giving rise to local and global patterns of organization.


There's a reason why Xtrades is currently the fastest growing application on the market for sharing financial ideas. With over $2.5 million paid in the last two years to contributors, users are flocking to see what trades the top traders on the leaderboard are sharing in real time. If you're looking to grow your reputation as a trader on the internet, or disgust your trading ideas with other reputable investors, click the link below and get connected with the trading mentor today, completely free of charge. What's up everybody? This is Alex from Xtrades and welcome back to another weekly trade ideas list. I hope everybody had a wonderful trading week last week. It's a pretty crazy week in the stock market. If you're tuned in last week, most of our setups were kind of mixed. SMH didn't exactly work out, I guess there was a couple days you could have scalped it on the gap ups to the downside, but otherwise I didn't open anything on SMH that was new. TLT had a pretty good run up. We actually grabbed some April calls on the dip Monday. This ran up to 24% and are going higher right now, holding a small partial position in that because there's more room to run in my opinion. And then being why we started a long-term position in that added on the first red day that it got last week and just holding that for the long term, looking to collect the dividend. So it's pretty mixed last week. I would say TLT is probably the only good winner and we were able to close out the contracts on that and I alerted my exit on the Xtrades app. But hopefully this week we'll have some pretty good setups, maybe a little bit better than last week. But before we get into any setups, any charts, let's go over the economic calendar real quick. This week we do have a couple big data sets actually. So Tuesday you're going to want to pay attention to ISM services at 10. And then it looks like Fed Vice Chair Barr is also speaking twice, once at 12 and once at 3.30. Wednesday could end up being a pretty important day. We have Powell actually testifying in Congress. And the last couple of times he testified in Congress, we actually did have some mid-session volatility. There was a lot of whipsaw, lots of big range moves. So we'll have that at 10 a.m. And then also at the same time we do have job openings come out. So we have the Joltz job openings at 10 a.m. Exactly at the same time that Jerome Powell comes out to testify. So that should be interesting. And then a couple Fed speakers. We got Dolly and Kashkari both speaking that day. And then Thursday we do have Powell testifying again at 9.40. We also have Loretta Mester speaking, another Fed member, and consumer credit at 3. And then on Friday we do have the big data sets. It's going to be non-farm payrolls. This is the big one of the week. So non-farm payroll is going to be number one, Fed Chair Jerome Powell speaking Wednesday and Thursday, probably going to be important as well. So your non-farm payrolls, your Joltz job openings, and your Fed Chair Jerome Powell testifying two days in a row is going to be your most important data sets of the week, most important events. So pay attention to it. It's going to be an interesting week. And on two seasonality, which we have been defying, we haven't had that bearish seasonality for February. Even last week we were supposed to average a relatively big dip, I would say.  So if you shorted every year from this period last week, 20 years in a row, you would have profited 11% because it's usually so bearish. One thing it did only have though was a pretty much a 50% chance based off the last 20 years. You had 10 winners, 10 losers.  This week we actually have a little bit of an increase. It's still pretty bearish. We have 55% winning trades to the downside. So if you shorted from March 4th to March 8th, the last 20 years, you would have 11 gains, nine losses with a summarized profit of 14%.  But like I said, it is only 55%. So the market didn't just go down every single year for the last 20 years. It was a little bit over a 50-50 chance. So that is one thing you want to keep in mind when looking at seasonality. It's not just going to follow it through the tee every single year. Market conditions change, things change, and volatility changes as well. This year, we really haven't had any expanded volatility to kind of set up for this big move down in February. And usually the last half of February is about the worst of the best six months of the stock market. And we did not get that at all, except for maybe a couple of days. The Nasdaq did pull back about 4% from its highs before we made new highs. So it did get a pullback in this area. It just didn't last very long at all. Pretty much after Nvidia earnings, everything went out the window and we've kind of been consolidating and just going up since maybe a couple of small red days on the daily bars, but otherwise just consolidation heading up for a move higher. Still holding all the moving averages. And we'll go over that later on QQQ and spy. Nothing has really changed. That's your seasonality for this week, March 4th to March 8th. You got a 55% chance the last 20 years with about 11 gains. Nine losses if you went short for this period. So so I would say you have a little bit over a 50-50 chance this week to see maybe a little pullback. It wouldn't surprise me after this big breakout. If we saw some type of short-term consolidation or maybe a mini pullback before trying to make another leg, it's not just going to go in a straight line all the time. You do kind of get those micro pullbacks to set up for another move to the upside. All right, not to the setups for this week. We do have three. I got GDX, CCL and DVN here. All calls to the upside. It's really hard to find value areas in this market right now, especially when you have the indexes at all time highs. Sometimes you got to go down and find stuff that's a little bit cheaper. And right now, GDX, CCL and DVN are all breaking out short-term downtrend line. So we'll get into that now. You see GDX here. You have a test one, a test two, little test three rejection on this one, little small bar and now trying to break out of that. Probably due to gold going higher on Friday, as well as the DXY going a little bit lower. The DXY has been trending up for about a month or two and gold kind of hit a consolidation point. It's been kind of weak while the DXY has been going higher and just recently DXY starting to go a little bit lower. And we are kind of starting to see a bid in metals. So as you can see, the miners are kind of a choppy trade, right? You're probably going to want to buy a lot of time on your contracts for this. If you're going to swing trade it, as you can see, it doesn't just go up in a straight line. You have a lot of foolery, lots of pullbacks back and forth before trying to leg higher. And you might still get that going forward. So there's your supply right there. So a little rally base drop might even be a drop base drop. If you look at the more bigger structure here, but this is indeed a pretty big bullish candle that led to big selling. So something happened in this candle to lead to this downside. That's why you want to go ahead and market to maximum. I can probably see it move up to that. I would have to see how it reacts once it gets up to supply there. If we add in the 50 and 200 EMA here, you can see we're trending under both. That's probably why it's been kind of struggling. You can see a pull up into the 50 right here in the supply zone that it made. Once we put in that lower low right there, that's when the supply zone is created. You also had a big 50 EMA rejection right here. So you will need to watch that 50 EMA maximum. I could probably see it getting back up to the 200 EMA. You could look at that as resistance as well. It will need to start closing over this 50 eventually, though, in order for the trend to keep going. Otherwise, right now you are trending under both and you do need to be mindful of that. So maybe you buy lots of time on your contracts. Let it deal with drawdown risk, any foolery that you get. Metals are kind of a stressful trade sometimes. I mean, they don't just go in a straight line. It takes a lot of consolidation, a lot of lagging, a lot of accumulation to kind of get going. Unless you are in a very extreme market where you will get big moves on the DXY to go down and you'll see that big move up in metals and the miners. So GDX looking at calls, maybe further out expiration. You want to be careful to deal with drawdown risk. As you can see, doesn't just go up in a straight line. You will get pullbacks. You will get kind of get shake out stuff like that before trying to make a move higher. But this breakout looks pretty good as well as you got the KDGA positive up here. So escalator is curling up and green right now. We'll need to get over that 50 to get to the 200. And going on to CCL here, you can see we have a test one, a test two, a test three downtrend. Now breaking out of that, probably because of NCLH earnings. So Norwegian had a pretty good report. They've been going up. CCL really hasn't seen that big of a move as NCLH, but it is kind of getting in a little bit of momentum here as well as you do have the 200 EMA holding as support or a reversal area. You do have a slight close over the one day 50 EMA probably needs another close or two or something more obvious to kind of bring people in for more buying. And they do have earnings, I believe, on the 21st. So this probably will just be a play up into earnings after earnings. You know, you kind of got to figure out what you want to do on your own because it's totally random and I can't really give a projection for earnings because it's totally random. I mean, it can go either way and technical analysis can get invalidated regardless of good earnings or bad earnings. It's all about guidance and really it can go anywhere. So as long as the guidance is good, it can go higher. Even if it's a bad report, if they got higher, you can still see us thought go up, even if they reported below estimates on EPS or revenue. If their guidance is good, it could still go up. If their guidance is bad, it can still go down, even if they had a good report. So that's the downside about earnings. If you really do want to hold through a report, which I mean, if you're going to hold something long term, you're going to have to hold through ER reports by lots of time on your options or just by shares for options, you probably want to go six months minimum. Maybe even a whole year out. They are much less volatile. You can deal with drawdown risk. So if you're wrong on the report, it'll give you time to recover. Come back up, you'll have, you know, six months to a year for your thesis to play out still. Sometimes you just need time to deal with drawdown risk because you're not always going to get a perfect entry. At least 90% of the time, maybe even more, whatever you enter, stock and option, it's going to dip below your entry, even if it's just a little bit. So you got to be prepared for that. Start small by lots of time. If you have to add in later, once it gets some strength, whatever you got to do to lessen risk and make it easier for your psychology. So CCL, looking at calls here. Nice breakout. There is a short term resistance point right here. It's going to be at 1724. So maybe we can get a move up to that and just want to be careful going into earnings. So looking at calls, looking pretty good. Nice breakout, holding up nice. Maybe another close over the 50 EMA. You can see a nice shoot up here. All right, next, we're going into DVN. This is a energy company. So it's really going to want to move with oil, the XLE ETF. You want to pay attention to both of those. You can look at the crude oil futures. You can track the XLE ETF, whatever you got to do. It's good to pay attention to the whole sector because they kind of move all the same, almost, except for maybe a couple. So DVN, it's a pretty obvious breakout here. You got to test one, a test two.  Came down to 43. And now trying to break out just a little bit, but it's kind of struggling on this breakout. You haven't really seen any big follow through yet. And I feel like that maybe could be setting up for a bigger move and you still have some room here to retrace up. Obviously, it would go invalid. If you started breaking back under, even if it started closing back under 43.36, which is this little resistance point right here, you could probably start looking at something else at that point. If it starts closing under that, closing under the downtrend line, et cetera. You also have multiple closes back over the 50 EMA here. Here's your 50 held a support right here. So that's a good sign. You could use that as your risk off as well. If it starts closing back under the 50, you can start looking at something else. So as long as it's holding over this 50 and closing over that 50, I feel like there's still some room up to the 200.  And they did get earnings out of the way. So that's good. And sometimes stocks after earnings, they do need a little bit to kind of consolidate before making a move after earnings.  After earnings, it might take a week. It could take a couple of weeks. Sometimes if it has a good enough report, you'll see it go up straight away. Continue that for a week straight. It all just depends. But lots of times you will see stocks kind of stall out after earnings. So DVN looking at calls, breakouts, pretty obvious. You have closes over the 50, closes over that 43, 36. Once it started closing over that 43, 36, it did confirm a double bottom. So it needed to close over this to confirm that. And we do have that confirmed, as well as some room up to the 200 EMA. And you can see the 200 EMA is pretty strong resistance back here.  So you will want to watch that 200 EMA if price gets up to it. You'll want to see oil coming up, actually coming up the whole sector. That will give you a push in DVN more than likely. All right. And on to the indexes, we'll go over the spy first. So it's pretty much been the same thing as all the other weeks. We are still holding the one day, nine and 21 EMA combo. I've basically mentioned every single week, you do want to add this to your chart because it's the most simple way of reading a trend. And you will know how long this trend lasts as long as it's holding over. Once it starts breaking under, you can start looking at puts, start being a little bit more cautious on longs because you know that your trend is broken. And we've basically been writing it this whole time. You have a test here, a test here, test here, test here, here, here. And a pretty close test right here, but I usually like to add directly at the moving averages. It makes everything a little bit easier and you are getting a pretty good entry. As you see every single test near the 21 or nine, you do get follow through to the upside. And you can see the bigger bounces are usually closer to the 21 for this one, for this one, a little bit closer to the 21 here.  So you won't always get a direct test. Obviously like this, this is just consolidation. Obviously it got close enough to the nine for people to feel confident and it pushed up for another high. We still do have this big gap below. Eventually that's probably going to want to get filled, but right now we haven't tested that gap area. So there really hasn't been any thought to see that flush down because we really haven't tested the support area or the structure low. So nothing's really changed. It's all still the same higher lows, higher highs, close Friday with another breakout and there's really not like a good entry here or anything right. You want to be adding at the moving averages. You want to wait for it to dip into support or demand to get the most optimal entry. Right now we have demand down here at about 494. So this little drop-based rally zone, maybe even a rally-based rally. This is a nice little demand zone at the 494s that you could add at eventually if it gets down there. But otherwise really no demand zone or really anything to add at right now other than this gap support if it can get down there. Maybe this little 510 area if it can pull back into 510, you could look at a short-term back test off of that. I could probably try to hold the support there. But otherwise there's really not much here. I mean, it's not at a discount. It's not at a value area. Your short-term value areas are going to be at support, at the moving averages, at demand, somewhere not at the highs. Right now this is in a momentum phase.  So you trade the breakouts, you're buying into 52 week highs. That is momentum trading. So if you're more of a value trader like myself, this market really hasn't been that good for you. And really the only value areas you're getting are at the moving averages like we've been covering. So these have been your best spots to add at every single time it gets there. We also have a positive KDJ here. So bullish momentum is still good on the escalator and nothing's really changed. We also were looking at a trend line from the dot com bubble up to the 2021 highs. We are directly at that right now. I think we were looking at QQQ. There's also one on spy here. So this little line from the dot com bubble up to the 2021 peak is now a potential resistance area right here. You can see we're trying to briefly break over it, but it's nothing crazy yet. They're gonna use a trend line from the 2000s, you know, one that's like 20 years long. Probably gonna use a monthly close for the candle bars. So you really would not want to short until you get a monthly bar rejection, something obvious, maybe even a one week bar rejection off of it. As well as you probably would not wanna use this as a breakout signal either over this trend line for the daily bars. Use the one week bars, use the one month bars just because this trend line is so old. So yeah, just be careful going long spy. I mean, volatility is at low, as VIX is at the lower 13s again. Spies at 52 week high. It's really not the best entry. It's not a value area and you're probably not gonna get the best entry here unless you're just doing momentum scalps. If you're just scalping the breakouts and being flat by end of day, nothing wrong with that. But for swing trades, I would say that you wanna be adding at the moving averages like I showed you at demand and support. Another thing that really hasn't changed is trend line is still holding this uptrend from the October lows. Get a test one, a test two, basically a test three, four. You have a close back over right here. So really, you can't get too bearish till it starts breaking under that. I said that a few weeks ago as well. Anytime we're holding over this trend line, it really wouldn't be that confident through the downside. Obviously we can get a little pullbacks into it, stuff like that. But in terms of a big pullback, we're probably not gonna get that until we start breaking under that trend line. So right now, if you are shorting or really trying to open puts up here, you are trying to speculate atop. You have no confirmation of anything. This trend line from the .com bubble to the 2021 peak, you don't have a confirmed rejection at that yet. Not in the one week, not in the one month, not even on the daily and as well. You don't have a confirmed break under the trend line yet. Obviously this little brief period under this, this could have been argued as a potential setup. But then you saw it push back up into close and it closed just a little bit above it. And then we had Nvidia earnings push it back up invalidated any bear thesis, defied any bear seasonality, et cetera. So make sure you're using that 921 email combo. Make sure you're using this up trend line and make sure you're waiting for it to fall back under some levels and confirm under some levels before even trying to short. Otherwise you're just trying to call top here and it's a little bit hard to do that. Obviously you do have seasonality on your side this week. But like I said, last week is a 50-50 chance. This week you have a 55% chance the last 20 years. You have 11 out of nine trades that won to the downside last 20 years. And on to market breadth this week we do have a little bit of a change, I guess. It's nothing crazy. We still have stocks above their 50-day moving average holding a little bit low while the spot continues to make highs. So the divergence continues. We obviously had a little pushup, I guess. Like you had these four bars kind of fall through with the spy. But otherwise stocks above their 50-day are kind of still staying lower. It did reverse off this low from February 13th and recovered a little bit there. You also have it trying to come back over the moving averages here. So you have it getting back over the 50. It is over the nine, the 21 and the 200 as well. So you do have breadth trying to curl up just a little bit. You just haven't seen like a big push or follow through like you've seen on the spy which kind of makes me skeptical as well. And it's kind of my thesis the past couple weeks that why I thought a pullback could be imminent just because stocks above their 50-day were going lower while the actual index is making highs. The divergence was crazy. And as I've showed you before, usually these kind of move in tandem and they move together. When the spy goes up, stocks above their 50-day also go up. When spy goes down, stocks above their 50-day also go down. So if you're tuning in for the first time I could show you real quick. We'll get rid of these drawings here. We'll add that indicator we were just looking at. We'll go to new price scale and there we go. So as you can see, stocks above their 50-day in the orange, going higher right here. Stocks also going higher right here. We had a little short-term collapse in breadth right here and this downturn market also pulled back right there. We did that breadth stall out in this period while the market kind of pulled back a few times but also kind of just consolidated. But then when the market got a big move here stocks above their 50-day also went higher. You had a little short-term pullback in breadth and the market right here for this period. And then really when the market wanted to pull back a lot you had a very positive correlation between stocks above their 50-day and the market going lower. As you can see, it's pushing up here with breadth. Stocks above their 50-day going up. Spy also going up. Pullback right here, you got the spy going lower. Stocks above their 50-day going lower. Short-term rally, another leg lower. Short-term rally, another leg lower.  This is when the market movement was the best when you had stocks above their 50-day going higher as well as the market going higher. And then ever since this January period right here we've had stocks going up while stocks above their 50-day have gone lower. Other than this short-term period right here where breadth is starting to curl up a little bit and the market also went up as well. So if you tuned in the last couple of weeks you've already gone over this a couple of times but I just wanted to show anyone knew the divergence that kind of came in. Why my thinking was the past couple of weeks we could see a little pullback maybe. Obviously we did get a couple of days like this one little day right here. Spy was down about 1.4. But otherwise since then, I mean we really haven't had any fall through with this big divergence or the market pulling back. So it defied my expectations. It's defied seasonalities, historic move. And overall I feel like a lot of people are back for that the market keeps going higher. Obviously with semis and chips it's not totally out of the ordinary. You got semis going crazy, tech going crazy, AI. You're gonna have people doubt it. People are gonna be skeptical and that's just kind of what you have to filter out.  But as you can see breadth is trying to curl up here. Market's going higher. Obviously we really don't have that good of a fall through. We still have stocks above their 50 day hanging out down here while the spy goes higher. So I'm not exactly totally convinced yet that breadth isn't the best shape. But we are kind of getting more broad widening in the market like small caps are going up. Bonds are starting to recover a little bit like the TLT last week. Also the equal way index, the S&P equal way index is also marching higher making new highs along with the spot. So that's good. That means there's a little bit more than just big tech kind of carrying the whole market but overall the concentration in large caps is crazy right now. Like the top 10 stocks make up 35% of the whole SPX index. And that's kind of an issue. The last time the concentration was that high was during the dot com bubble and that's kind of a little bit scary, right? You don't want just 10 companies only taking the market higher. You want a wide variety kind of all taking turns bringing the market higher, bringing the market lower, whatever it wants to do. And right now the concentration is just so crazy. It's hard to imagine what will happen when those top 10 stocks do wanna pull back finally. Is that gonna destroy us? Are the laggers gonna be able to make up for the downside on the top 10s? Probably some questions that everybody has. But overall last week we did have Brett starting to follow up with the market. So that's a pretty good sign. Obviously I want stocks above their 50 day pushing up more, keep going higher in order to validate this all time high move here. I feel like the market moves are the best when stocks above their 50 day are going up along with the spy. All right and last but not least we're going over the QQQ. So last week we were kind of focused on this little trend line here. So this was a dot com bubble to 2021 peak trend line. Showed you that last week and we are starting to break out of that a little bit which is interesting. Obviously we don't have a confirmed one month bar over this line yet or a one month confirmed rejection at it. But overall we are starting to get over that now. So obviously you would have to start falling back within it to see some resistance. And maybe you would wanna wait too short and wait for that signal to get back under that before doing anything. Because right now it is looking pretty bullish here. We also had the one week bar closed over so that's a pretty good sign as well. It willing to start closing back under that for this trend line to get back in play. You can see we did have a little short term rejection off of it. This was almost a 4% pullback from this to down here. So we did get a little bit of bearish February seasonality. Nothing crazy. It's mostly on tax by not so much. We did a little short term rejection there as well. So obviously price was respecting this trend line with a exact rejection offer right here. Little rejection right here. Maybe algorithms have the same line drawn. But right now the only resistance point is 440 or 439 14. That's really the only level that you can draw right now on the one day. So maybe if price could pull back into that, that could be a good back test area to try scalp off of. You can see the one day nine and 21 EMA combo unlike spy QQQ actually tapped it's nine day right here and set up for this big push up. And this big move was mostly because of semiconductors. They had a huge day on Friday. Broadcom and video AMD, they all did very well. But I hope you see why I always recommend using the nine and 21 EMA combo on the one day.  Obviously it's not the best spot, while we're making 52 eight highs but these little micro pullbacks and this little volatility is sometimes all you're gonna get. So you definitely wanna watch your nine and 21 EMA combo. Look at them as short term value areas. Obviously this is not an exact value area. Value areas are usually way lower. More into a major support something like this. I'll consider that a value area like this right here. Those are more value areas but you do need to use these moving averages while it's trending and respecting it. So look at these as short term value areas and then look at your horizontal lines, your horizontal lines of support as your real value areas. You also have KDJ still positive. So this actually held all week despite any consolidation or slight resistance. This KDJ did hold positive as well. I'm guessing the MACD is also still positive. So all your momentum indicators still holding bullish. You really don't have a good entry here for anything. You definitely don't wanna just long for a swing up here. Like I said earlier, your nine and 21 EMA combo, best area to add for swing trades. If you're gonna hold for a week, for a month, you usually get the best discount such your nine and 21 EMA combo or the general area. So still bullish as long as we're holding over 439 here, your 439 is your February 12th resistance. We're had this big pullback. So definitely wanna mark that price. It's probably not gonna get bearish until it starts getting under that point. So we'll need to get under 439 and also into the gap to even be slightly bearish as well as break under your nine and 21 EMA combo. You also have your trend line from the lows here. So right there, test one, test two, test three, broke under actually, reclaimed, bounced off of it right here in this exact little zone right here. So we'll need to break under that trend line again as well. If it breaks under this trend line, you probably start entering the gap or at least get close to it and you probably start breaking under your nine and 21 EMA combo as well. But you don't have any confirmation of that yet. So just use your 440 or 439. If it doesn't break under that, I would not try to short it yet. So just watch that level, watch it as support as well. If it can pull back into that, that could be a good area to add for a back test, mark your nine and 21 EMA combo areas if you have to as well. You can draw it out on your short term charts. You can look up the values on the indicator. It'll tell you the exact value and you can mark that as a level or just zoom out to your one day chart. That's what I do. And usually you'll get the best areas to add once it pulls into the EMAs. So like I said, everything's still bullish. Probably not gonna see anything change until it falls back under 439. This falls back under 439. You can start looking for that gap fill or at least the general 433s to get test as a structure low and that's about it. Otherwise I wait for a pullback or some type of micro pullback before trying to go long. Obviously this 439 area could be good as well if it can pull into that. So definitely just mark that level. That's the only level right now. Obviously we can't mark this as resistance. We don't have any confirmed candle, no rejection or anything. So your 439 is your only area of support nearby or potential support and your only area of resistance as well. So make sure to mark it. But I hope you guys enjoyed this video. Make sure you like, comment and subscribe. I know the index analysis the past couple of weeks has been a little bit tricky because we're just making 52 week highs. Hopefully you're getting value out of the reminders to just watch the nine to 21 EMA combo. Use that trend line that we've been looking at the past couple of weeks and just make sure you're marking your short term levels on the one day. Like this is a local top. Make sure you're marking that and just use your one day levels as buy zones, sell zones, whatever you gotta do. But otherwise, I mean the indexes have been a little bit harder to trade. I've been struggling a little bit day trading them lately and sometimes you need to find value elsewhere. Like we found value in TLT last week. We had Neo a couple of weeks ago as well that did pretty good. So there's still value, finding cheaper stocks that can go to the upside. You don't just have to chase these at 52 week highs, but it's a little bit harder to swing trade. And like I said, to make swing trades easier for you, use your nine to 21 EMA combos. These are gonna be your best areas to add for value, especially for overnight risk. So I love you guys. I'm gonna go ahead and get this chopped up, sent out, all that good stuff. So love you, bye.


Well, it's been a few years and Hollywood has been creatively bankrupt for quite a while now, so you know what that means. It's time for another Willy Wonka movie. Cynicism aside, I did go to the film with an open mind, open heart, open arms, and wanted to be entertained. So was I? Well, let me lead in with the intro and then I'll give you my thoughts. Okay, we are just 10 seconds away. We're on pins and needles whether I like this movie or not, but please subscribe to the channel for more movie reviews, movie roasts, live streams, everything movie related would love to have you stick around. That said, I didn't mind this film. I thought it was actually pretty good. Not amazing, but pretty good. This is a movie I could watch again with my family. We just had no desire to see it because the Tim Burton one was terrible in my opinion. I love the original Charlie and the Chocolate Factory. Gene Wilder, just unbeatable, unmatched as Willy Wonka. And I thought Timothy Chalamet. I know that people think he's dreamy and he's cool and whatever. I know nothing about this kid. He was fine and dune.  So yeah, I should probably give him a shot.  I really liked it. He wasn't trying to do a wilder. He was certainly not trying to do a Johnny Depp. He's obviously younger, so he's a Willy Wonka just starting out. But he already has that whimsy, that wonder, that charm, that likability about him, that kookiness, that creativeness. Is creativeness a word? I don't know. But it's Wonka world. Anything can be a word. Anything can be a candy. Anything can be anything you want. It's where dreams become reality. Now let's get into some of the details without spoiling anything. The basic plot I'll say is this. We have a young, untested Willy Wonka who's making his way to this town that's known for its chocolates. There's these three big chocolate companies and they kind of own the town. They're like a mob, a chocolate mob, a mafia if you must. And the cops are in their pockets. They even have the church in their pockets. There's this grand conspiracy. It's all very light though and silly. It's got kind of a Matilda vibe, even though I'm not a big, not a big Matilda guy. My family loves Matilda. That's not my thing, but this kind of has that. It also has the look, a little bit of a Harry Potter film. Not near as great as Harry Potter, but it has a little bit of that look. Now this is a musical, so there is music. There's a good amount of it. I liked almost all the songs. None of them stay too long. They're all very quick and to the point, and there's some great choreography. Visually it looks really nice. It's two hours long. It is definitely family oriented. There's nothing very hardcore going on here. There's no swearing. There's no sexual stuff. It's an all ages affair. There's no real violence. There is kind of like a cheap fart joke or two, maybe. They don't go all the way with it, which is nice. It's not like an Adam Sandler level of joke, but it's enough for me to kind of shake my head, but not get upset about it. There's a few other characters in this film.  So it's a nickname of course. And Wonka says it like non-stop. 24-7 Noodle. Noodle this, Noodle that, Noodle, Noodle, Noodle. There's even a song about it or two. And that kind of gets to be a bit much. And also this character is fine. She's very lovely, very likable. The actress is great. But there's a lot of Noodle in this movie. Really should have been called Noodle and the Wonka Beginnings or Noodle and Wonka Begins or something. Noodle in the chocolate factory. Because much like Charlie, she's basically the main protagonist. It's really a joint operation here. It's half Wonka, half Noodle. Oftentimes they're canoodling together. And I just like Timothy Chalmé's character. I wanted to see more one-on-one with him. He's very interesting. I liked his backstory with his mom. I like how they go into depth about some of the ways he's making this stuff. Another thing I want to bring up, this was the biggest hang up for me. We spent a good chunk of time in this first act, pretty slowly going through the different new characters, building up things that we'll pay off later, which I appreciated. That's good storytelling. But it takes so much time in part one. And then in the second act, it's really abrupt how things play out. Obviously at some point, he's going to get a chocolate shop. Well, out of nowhere, he just has this shop open up and ready to go. There's no build to it at all. It's like, oh, we have a chocolate shop. The very next day, it's this elaborate, larger-than-life affair with moving pieces and staircases and floating clouds. And all I'm thinking is, what? How? And I know it's an imagination-driven film. It's all pageantry and it's supposed to be fantastical and whatnot. But I still have to have it grounded enough because everything up until that point was pretty grounded. Obviously, he has this crazy Willy Wonka machines and he's able to make chocolates and do all this stuff. But he's still kind of isolated into places and he has to sneak out and save up money and do all things regular people have to do. So then when it's a turn-of-the-dime event and it's just boom, all this stuff is made and presented for everyone, it just kind of lost me for a second. I was scratching my head thinking, is this a dream? Is this real right now? Did we just jump ahead like a full chapter or two in this book before playing it out? It feels like there's 20 minutes of movie that's untold on the chopping block and maybe they could have cut some of the earlier stuff and padded this out. I would have liked my rocky montage. I would have liked my ski school montage. You know, I wanted something where they're building this shop and making it happen. Outside of that, outside of those hang-ups, for the most part, this was good. I dug this movie. I have no real big complaints outside of some maybe plotting story points here and there, but for the most part, there's a lot of fun. I think kids will like it. They'll dig all the colorful foods and candies. Could have used more of it though. This is a prequel. This is before the factory. So if you're expecting another tour through the factory, you're not going to get it. This is before that, which I liked. I didn't want another rehash again. Now, will it lead to a rehash in the future? Absolutely, if this does well. But for now, I'm taking this for what it is and what it is, is a nice new story that I think families will enjoy. So I give it my approval. I thought it was good. I thought it was definitely good enough. Not amazing, but thumbs up. Okay, those are my thoughts on Wonka. Let me know if you saw it already. It's out and, you know, as of this review, it's already in theater. So let me know in the comments. Please like the video if you're watching on YouTube. If you're on Spotify or Apple podcasts, maybe you can just thumb up the podcast or if you stumbled upon it, please subscribe there. Share it around. I would appreciate growing that side of things. And if you really want to give for the holiday season, become a Patreon or YouTube join member. There's a join button right here on YouTube. There's a Patreon at Adam Does Movies. There's a $1 tier, a $5 tier. And it's just a way to support this one-man operation. I would appreciate it. All right, hopefully I see you soon.


I really go deep into any of the devices just to show you how are you really happens in the data path from the CPU down to the CPU that is, that is upon the related topics that is pretty much it. So here is the agenda. So look at communication protocols to dynamic devices, talk a little bit about magnetic disk that is known by the device that will be used most. Talk about how to make disks reliable and dependable. It's a great, it stands for the development area of the expensive disks. There is a lot of talk about dynamic memory access and virtual news. We have seen a lot of virtual memory and we look at one way of doing Io and how it interacts with what you do. Talk a little bit about asynchronous Io. It interacts with hash signals. So a little bit about the hardware Io buses. There will be the only slide that talks about the standards and all those things. There are many, so that's here in the summary. Here it lists only a few. It's all the common ones that you see. So you must have heard of the PCI bus. So that stands for very parallel component interpolate. So by the way, before that a particular computer system looks something like this. So let's say this is your last level cache controller. So you have seen that side very much. And most of the same is to look at that side. The process of pipeline and the cache and all these things. We have talked a little bit about memory controllers as well. The name cards that are connected to the memory controller. And then you have your Io controller and this is typically the PCI bus. It connects the Io controller to the memory controller. It also connects to other things. For example, your data interface card. It also connects to the disk controller and to the array of disks that hang from here, etc. This one is often, this particular bus uses some model to the bus like SCSI or ATTA. Also you could be hanging your graphics from the PCI bus. Although nothing stops you from connecting the memory controller directly to the bus. It used to be the case with old internal graphics. They actually connected to the bus. And your Io controller also connects to the other Io devices. Like you can gain an Io device and use it frequently. That's where the most important thing is. Keyboard. Mouse. Little drives. Sorry, what? The printer. The printer exactly? Yes. So where is other things? So this is what roughly looks like. And often this particular controller is called the South Bridge. It's an old moment later. Originally when the personal computers came out, this one was called the North Bridge. The memory controller. And this one was called the South Bridge just based on the location of this. The memory controller today has actually got closer to the LC. In fact, this whole thing will be in a simulchip. So often referred to this particular bus as the frontside bus. This is again of old name coming from the Intel chipsets. When memory controller was the North Bridge, it would connect to the processor through the frontside bus. But anyway, what I really mean is the bus that connects the LC controller to the memory controller. So this is what it looks like. So the PCI. So this is the PCI bus. So the PCI and PCIX. PCIX stands for PCI Express. So it's a faster, it's the next generation PCI bus. Faster than a PCI. It connects the memory controller to various other devices like a network card. So IO bus adapters. So whenever you want to connect, you usually require an adapter or a bridge. That's what it's called actually. When you're connecting a device to the PCI slot of your computer, you need a bridge to translate the protocol from the PCI protocol to whatever protocol you're connecting. For example, here you translate the PCI to SCSI for example. So here are some buses that are often used with the magnetic disks. So IDE or Ultra Hata. So does anybody know what these things stand for? Integrated electronics. Integrated device electronics. What does this one stand for? Advanced technology attachment. What does this one stand for? SCSI. Small computer system interface. So essentially these are popular parallel IO bus standards for connecting to storage devices like this conceding. So you'll often find ATTA comes with two names. Serial ATTA like SATA and parallel ATTA. So you'll probably never see parallel ATTA because when you say just ATTA, that actually means parallel ATTA. Otherwise you'll actually mention SATA. Serial. Atmostic. So PCI buses are much wider. 30 to 60 full bits compared to ATTA or SCSI. PCI and PCI-X are simple as buses and you can see that the frequency difference. PCI-X is the next generation. It can be clocked at a higher rate. And today pretty much all machines routine these PCI-X. ATTA and SCSI are SCI-X buses. So what this means is that these are not only accessed through an SCSI cross handshake. There is no clock that SCSI-X is accessed through. So when it is an SCSI cross, we have clocked through to the top of the frequency. So ATTA throughput can be at most 100 meters whereas SCSI throughput can be 10 to 160 meters. So it's very flexible in terms of the handshake speed. And ATTA can have only one bus faster while others can't have one. So I'll actually stop here about these protocols because they are very important. You can just go on talking about these. The standards, definitions and all these things are there. You can look them up wherever you want. So let's see how actually you do it. There are normally two ways of doing it. One is called a memory mapped I.O. And the other one is called I.O.Map I.O. So let's look like memory mapped I.O. first of all. So I.O. device registers, in this case a map to this CPU memory space. Essentially whenever you talk about, let's say, Fritter's command register, that will actually have an address. So if we map this, we can give some memory address, which the CPU can directly address. So these addresses are usually marked unmapped and these are actually physical addresses, not virtual addresses. So you cannot even translate this. And un-cached is the daily address. So these are never cached for obvious reasons because probably you won't have any use of these protocols. You have to set the command and just fire the device. And of course there's a point caching these, because you really want to talk to the device directly. You don't want to put the store in the cache and be done. That's not going to be done. So if you map the command register to the printer, you would send the bytes to the command register to the printer. So load store to these addresses initiate the actual I.O. operation. So the paths are exactly the same. It will actually start from the processor pipeline. These load store instructions. But since these are un-cached, we will bypass the caches and directly go on this bus. So the memory controller will collect them, these requests. Look at the address and decode it. Find that well. They do not belong to this particular space. It will first find the address. And we'll hand over the address to the I.O. controller to figure out what to do next. So memory controller decodes the address and usually follows it to the PCI adapter for further inspection. And of course on further inspection we'll find out which device it actually addresses. Whether it addresses your GPU or it addresses your mouse or keyboard or whatever it is. And these load store instructions would normally be part of some system called hangers. For example, when you're trying to initiate a print command you'll probably be doing some system calling which would be holding these load store operations to initiate the printer. So system called hangers would write to the data and control registers of the target I.O. device to initiate the process. So for example, to start a printing operation you'll probably send a particular command to the printer saying that start printing. Before that you'll probably send the data. So that the data streams in the printer will start printing. So this is fairly simple. It doesn't require much change in the processor. They look like load store operations. Only thing is that these load store operations when they look up the data for the first time they will know that these are uncached addresses and these are unmapped addresses. So you can allow them to bypass the cache, go to the rest of the bus and the rest of the things you can handle with the remote control I.O. The second type is I.O.Map I.O. This used to be supported in old x86 machines and even supported today in certain machines. So here you expose the I.O. devices to the I.S. So essentially what this means is that you have special opcodes that distinguish I.O. redirect from normal load store. So instead of saying load world some value to some address you probably have a new instruction that would say you know write this particular word to this particular command register. So there will be different instructions for doing that. So the path will still be same, identical exactly. Except that the processor will not really look up the TLB to figure out what to do. Instead the instruction will tell it to bypass caches and the rest of the things will be same on this model. So how do you write or read a stream of bytes? So usually the sys write system call writes a stream of bytes to I.O. device and sys read leads a stream of bytes from I.O. device. For example when you say scan it at some point it gets transferred to a read system from your standard input device. Similarly when you want to bring something to your monitor at some point that will be transferred to a write system call which would write to the video. So the question now is that how do you really synchronize with the CPU? The I.O. device that brings certain things how do you synchronize with the CPU? So first solution is to pull that is you need I.O. device to register continuously. To know whether the particular for example let's say you are reading certain bytes you have to know when it is done. So you pull certain I.O. device to register continuously and find out that the register will change the status whenever the read completes. So that was a lot of cycles especially in multi-programming supported which is always true. Second solution is to send an interrupt. I.O. device sends a hardware interrupt to CPU. So what really happens in this case is that whenever the interrupt drives the program counter will change to something a constant value which where the first few instructions of the interrupt handler has to be written. And from there you can jump to your chosen subroutine which actually do certain things. So that's how we call interrupt subroutine I.O. So the interrupt handler decides what to do based on interrupt number and this is most popular efficient solution and normally used with all I.O. devices. Polling is almost never used. So often for transferring data from into memory you will use direct memory access which does not interrupt the CPU because interrupting the CPU for every binary transfer may be too much. So often I.O. devices come with a mass master known as DMA engine or I.O. processor. So how do we operate the DMA engine? So CPU writes to control registers of the DMA engine with the starting address of the target or source memory block and number of bytes to transfer. So you specify the source memory address this is the target memory access and then it triggers the DMA engine to copy from here to there. So the CPU can work on something else. So DMA engine arbitrates from the front side bus and transfers data on its own. This is also known as bus cycle stream. Do you remember that this arbitration is needed because the DMA engine may have to pay any the caches to make sure that the most accurate data is copied from the source address to the target address. Because certain data may actually be designed in the cache on the processor which may not really be here. Certain things may actually be on this side. So DMA engine will actually send interventions down to the caches retrieve the data right to them and when it is done it sends an interrupt to the CPU to define the completion of the DMA transfer. And makes a panel with probably to some sort of work that completes the copy. Some DMA engines can transfer multiple addresses also known as scattered data. For example, you may specify a list of addresses as a source and another list of addresses at the target. So it will actually copy board from this address to that, this address to there, this address to there and so on. So it can scatter certain bytes and also gather some bytes. Okay, so one of the audio devices that you often use is the magnetic disk. Access latency for a disk is normally broken down into these five components. The first one is the waiting time where the request comes and waits in the queue. Then you have a seek time. So how does the disk look like? So we have a bunch of letters and if I look at a particular track here and if I take each of these tracks on the different surfaces so each surface will have a head. So this is normally called a cylinder that connects not really physically connect logically that connects the same track on each of the surfaces. And each track is normally divided into blocks of data called sectors. This could be called as I-12 bytes or 1 kilobyte depending on how the operating system configures some sector size. So the first thing that you have to do to read a particular data somewhere so essentially there are two things. Suppose you have to read a data here. So the first thing that you have to do is you have to read the head on this particular circle and then make sure that the head comes to this particular point to read the data. So moving the head to the position on this particular circle is called a sector. So this particular mechanical assembly will move to make sure that the head is positioned somewhere on this circle. And after the head does not move what happens is that your disk assembly will rotate to bring this cross under the head. So that is called the rotation. And then you start reading there is some transfer time that takes to get the data from the disk to the disk controller. And then the controller will take some time to send the data back to your memory. So through this particular mass. So that is how you copy some data from this to the memory. So usually among these five components this is the largest sector. So that is what normally comes because this is a purely mechanical activity that causes your head to move to be positioned on this particular track. And there are certain optimizations that if you do one of the common ones is read ahead. So essentially what you do is that if you are currently reading this sector you might want to read the next sequential sector as well. And depending on your data layout the next sequential sector may be on the next service on the same track or may be on the service. A team was next sector on the same track. Depending on how you read the layout the sectors and on the cylinders. Nonetheless, what the idea is that it takes points especially on time. And normally when you read ahead what you do is that you put the data from disk to an area called the disk cache. So that is still here. An reserve area in the memory that is configured to be the disk cache. So this controller would also have some small amount of cache but that is not much actually. And transfer of disk cache is normally much faster. Is there a different locality? There is just one cache. Let us assume that. We are not really worried about the exact configuration. There is just one blob of data. What I am asking is that is there a use that is typical of the calculator. So I am currently reading this particular sector and first it will be read the disk cache and then it will be transferred to the CPU. So if I have a disk cache inside my disk controller should I be doing something smart about the policy of the disk cache fixed by a temporary mechanic? Is there a chance that the disk cache will see some reuse of this? The reason is that the CPU will be pulling out data from here. It does not really talk to the disk actually. And most likely today that even the memory sizes the CPU will make full use of that particular sector of data before it gets edited from the memory back to the disk. So it is most unlikely that the disk cache will actually see any reuse of the data. So this is just solving as a spatial locality agent nothing else. It is just streaming in data putting it staging it there so that before it sees the next request it just pre-pages nothing else. So that is there are many other optimizations for improving disk performance both at the hardware level and at the operating system level. What will focus our attention on a little bit is on disk arrays. Because this is important for reliability as you can guess because if you have an array of disks you can probably produce some redundancy of data. So that even if one disk fails I can get the data from somewhere else. However this adds one more level of control that is the array control. So on top of the disk control there will be an array control which will send commands to disk controllers the array of disk controllers. So what is reliability? Reliability of a system is measured in terms of mean time to failure. So essentially how frequently my system fails that is the measure of reliability of the system. So this measure is quantified as mean time to failure over mean time between failure. And mean time between failure is mean time to failure plus mean time to recover. So here the hope is that the recovery time will be small. So that so that this number is going to be very large. Which means that most of the time my system is large. But if the recovery time is large then essentially during the recovery time my system will not be available. Which is not good. Dependibility of a system can be derived from its reliability and availability. And large storage systems are prone to failure. However user is happy as long as the industry does not use any data. So that is the primary goal of a storage system that a user should not use data. So that's why reliability is very important. Presence of redundancy in storage structure can be recovered from failure risk. So given that storage systems fail we must have some mechanism to recover data in the top case. And we are going to see some other mechanisms. So redundancy is used in other cases also to improve reliability dependability. Not just limited to risks. So again an example from processor design. IBM 390 mainframe offers a good example. So this system is an old system. There are three processors. Some are built in spares to be used in case of processor fails. So not all of them are all the time used actually. Some of them are actually spares. Within each processor certain pipeline resources are duplicated. Like a fetcher, decoder, the name of a function you need to save on gas for instance. Essentially you have two pipelines. And both the pipelines will compute the same instruction. Two results coming out of the duplicate instruction pipelines are compared to text fail. Of course here the assumption is that what is the assumption? Why it is not going to work? I compare two results. They don't match. I compute that there is a fail. Of course one must have failed. That's pretty obvious. I compare both of them match. I compute that there is no fail. Is that correct all the time? Why doesn't it work? So if both the pipelines fail in the same way they will produce the same result. Both of which are not. Although the probability of that happening is very, very low. Which is why most of the time it will work. So if the results match the processor state is checkpointed in case the next instruction fails. So that it can roll back. If the results don't match the processor rolls back to the previous checkpoint which is the previous instruction. And we try the failed instructions many times and it doesn't seem to be permanent. So if really the fault was permanent then hot-sopping takes a second. Hot-sopping means that you solve the failed processor with a spare one. And that happens automatically. That takes about a second. Which is actually huge. So that's the time when your system will not be available. Anyway, so that was just an equation to show that redundancy helps in all cases. Could we improve this a little bit instead of having two pipelands? If I give you three pipelands, does it help? Sorry, say it. I mean to pipeland you know there is a failure but you can't with three pipelands. No, we can recover. With two pipelands we can detect a failure and recover in a transient period. If both of the pipelands we cannot detect the question of the problem. With three pipelands what else can we do? We cannot do with three pipelands. How does it know which pipelands we need? It doesn't know. Does it help in any way? So with three pipelands what can I do? I get three results and then what if they don't match? So suppose the three results are not identical. If two of them match then I can take a majority I can take a majority so if one result doesn't match with the other two I can still go ahead and assume that the other two are correct and take the majority but the question is what way does it help? I will give you more redundancy. Does it help? We don't have time. We don't have time. We don't have time. We don't have to re-execute the instruction. Exactly. So in this case if one fails if they don't match I would actually have to go back and re-execute to get the correct result. If I have three then I can take the majority vote and believe the vote and go ahead. I can save some over it. So regardless of the array of inexpensive risks this is a proposal from University of California and over time it has actually become a disaster standard. So as the name suggests it's basically an array of risks with some redundancy. So the array of risks provides parallelism. That was the main goal of if you just remove the R from the beginning if you just have 8 then it's parallelism. It gives you more trouble. So what you can do is you can strike data across risks to get more trouble. So what will be my strategy? So let's suppose these are my risks. So I would actually disrupt putting sequential data in one disk fully and then move it to the other disk. So I will go like this. I will put a block of hydrolysis here the next block here the next block here and so on. So that I can make sequential accesses to parallel disks and I can get a through-code. I have made a series of such disks because none of the disks are actually any faster than them. So the array doesn't really improve the speed of the disks. They still remain as slow as they were. What's the design advantage? An array of risks has more dependable than a single disk. Why is that? The probability of failure of a single disk is p. What is it for n disks? P by n. P by n? P by n. What options do I have? P to the power of n. P to the power of n. Is it smaller or larger? Smaller. Why? Because it is smaller. So as you raise it to above it the value actually goes down. So that's why it's mentioned here. If you have an array of disks the probability so the probability of failure of one disk is p. So if I ask you if I give an array of n disks what is the probability that at least one disk will fail? This is the probability of failure. Failure of a single disk. If you end disks what is the probability that at least one disk will fail? n into p to the power of n. p into 1 minus p to the power of n. Sorry, second? What is the probability that nothing fails? Sorry, second? 1? 1 minus p to the power of 1 minus p to the power of n. This should be the answer. What is the probability that at least one disk fails? An array of n disks. 1 minus p to the power of n. 1 minus p? 1 minus p to the power of n. 1 minus 1 minus p to the power of n. n here? 1 to the power of n. Which one is larger? p or this one? So this one is failure of at least one. Which one is larger? This one is larger? 1 minus p to the power of n. 1 minus p is q. This is 1 minus q. Which one is larger? q n is less than q. q n is less than q? 1 less q n is larger. 1 minus p to the power of n is bigger than 1 minus p. So this probability is much larger. So the probability that at least one disk fails is much higher than failure of a single disk. So that is what is mentioned here. So, retirement that is tries to bridge this particular gap. It says that well you have an array of disks. So you have so good but you have this good with the problem. The probability of failure goes up. So can I bridge the gap with variables? So essentially what I mean is that there must be a possibility of reconstructing lost data. So good news is that MPTR is much less than MPTF. So let us see can make the probability of 100 disks much higher than a single one. So question remains how to discover faults. So disk sectors called error detection and error collection codes. So a single one would be single error correct, double error detect. So how do you do this? Which means I must be 45 days and such a way that I will correct one error and detect two errors. Can you suggest a simple way of doing that? A simple coding scheme. So what is about this? So let us actually have the details. Let us assume that I will transmit say n bits over a noisy channel. And I want the receiver to be able to do second error correct, double error detect. And I am not worried about how much extra bits I have to transmit to be able to do this. Can you suggest a simple protocol? Counting the number of ones. Can you detect double errors? I flip one particular bit from one to zero other one from zero to one. I mean exactly same number of ones. You can calculate the hash of that pattern. You have to give a guarantee here. I possibly will do that, second. Multiple packets come in parallel. If we have n packets, they come in the number of ones in the first bit of each packet. But I am transmitting just one packet of data. I don't have n packets. The receiver should be able to correct one error detect two errors. So that is one of the simple things. You transmit every bit thrice. And then the receiver checks three bits in blocks. If all of them are not same, then you are sure that there is an error. And if there is one error, you can correct it. You can look at the other two and just know what the correct one is. If there are two errors, can you detect that? Only if you look at the... Sorry? Only if you look at the... Only if you look at the... Only if you look at the... Only if you compare all the bits... No, there is no this. I am just transmitting n bits over a channel. So if I look at... Sorry? You can... Yeah, no, I want to guarantee that. You cannot, right? But can you... You need one more copy. You need one more copy, huh? Yes. Sorry? So does everybody see that repeating the bit thrice doesn't help? You cannot detect double errors. You can detect an error, you can correct it. If there is one error, what else can you do? What if I translate the XOR of all the bits also? I repeat every bit thrice. So I said three bits. I said one more extra bit, which is XOR of all the bits. Will that help? Detecting two errors? We can have that error in that XOR bit also. Then like if there is an error, we send one... Yes, okay. So let's assume that the parity bit cannot... Exert it and correct it. Then you can do that, right? Yeah. So, okay. So there are many other ways of doing this. But a lot... A lot would do that. The point here is that you can... If you attach error detection, correction codes, you can recover from errors. And hot-solving with hot-spaired variables, where you have availability and dependability, which is important for file research. So let's look at some of the rate levels. And also we'll look at some of the coding examples. So rate offers several levels of coordinates. The rate zero is... No redundancy. Plain-striking is used to improve throughput. So this is just very similar to memory-pack. There is no redundancy at all, right? Rate one uses mirroring. Requires twice as many disks as rate zero. So it can reach from the disk with a smaller signal. So essentially what I'm doing is that I duplicate every disk, all right? So that's my mirror, all right? And since I have now the option of reading the data from two possible disks, I'll read the one that has the smaller signal. Now, depending on how you organize the disks, you may get rate one zero, which is straight mirror, so rate zero one, which is mirror stripes. So that's how I have just two databases. And then I mirror them. So this is essentially mirror stripes. I first try the data, and then mirror that, all right? So essentially what I do is I force you rate zero. That's all right? I need rate zero first. And then apply rate one, all right? The other one, which I could do is so I mirror first, and then strike it. So that's basically strike zero. I first apply rate one. Whenever I create a disk, I mirror it first. And then strike. Rate two adds mirror correction codes on top of this. Now here, the original application, there was really no constraint on what kind of error correction codes you can use. So for example, if you use the reputation thing that you have mentioned, if you get twice. And different kinds of codes would give you different kinds of recovery. For example, what I can do is also that, so here's a scheme, which gives you a 50% over it. So let's say I have four data disks. And what I do is I take the pairs and store the parity in a disk. So I have two error correction disks. So this one exhausts the data here and puts it here. And this one exhausts the data here and puts it here. So what kind of error correction detection can I do with this? So let me number these. Maybe A, B, C, D, Q. So B is A XOR B, Q is C XOR B. Can I do single error correction? I can, right? Can I detect errors? What if both A and B fail? It's okay, right? Because the XOR will be same. So I can do single error correction here. I can detect some error. That's all I can do. So there is something called hamming codes. How many of you know them? Hamming codes. I'm not talking about the hamming systems. Okay, so I won't get into details of hamming code. I'll just tell you what it is. So the original data, two people actually mentioned hamming code for this. So what hamming code does is that, normally it's mentioned as a typical income or gain. Where A is the size of the total amount of data, that is, data plus your error correction code, which is typically for R minus 1. So it's an R bit.  And out of which, the number of actual data bits is this, R minus R minus 1. So essentially what it means is that, if you have four data bits, you need three more bits to construct a hamming code. Then those three bits will be essentially error-connected codes. So seven more, for example, in a possible hamming code. And that's all that. On top of hamming code, if you add one parity bit, that is, that exhausts all the data bits, you can actually do double error detection and single error correction. So anyway, so this is a more like a theoretical proposal. And industry doesn't really use this, in any of the commercial disks. Although rate 1-0 and rate 0 are very popular. And of course, the subsequent ones are also. So rate 3 uses a built-in parity. Here you add one extra disk that maintains the sum of all disks, and you add a new two, it's an example. If two disks fail, at the same time it is impossible to do it. So that's what we have already mentioned, in this case also. So that's rate 3. So here's an example for rate 3. So let's suppose I want to do a 512 byte read, which is my sector space. So you read the corresponding 512 bytes from the target disk, where it will be rotated. So you reconstruct the required data from parity disks in all of the disks that you can do. So only in case of failure, you have to access all the disks of this particular sector of data. 512 byte write is actually more expensive. You first read the corresponding 512 bytes from all the disks, except the target one. You copy parity and write parity as well as the original data. So here, for computing the parity, you need all the disks. But actually that's not necessary, because of the property of XOR. So that's what is recognized in the way forward. When you produce the right over it, you observe that XOR is self-manifolding. So for computing the new parity, you could just do the old parity, XOR with the it talks old data. XOR with target blocks new data. That would be new parity. So still parity disk remains a bottleneck for parity websites. Because that will be access, wherever the parity is stored. Rate 4 is here. So this is what is rate 4. So these are my three data disks. And this is one parity disk, which XORs all these data data. So rate 5 uses distributed block, intelligent parity. So essentially what it does is that, it doesn't fix the parity disk. It distributes the parity over it. So P0 is here. P1 would be here. P2 would be here. P4 would be here. Oh, is it good? What does it bind? Sorry? The parity disk it fills and becomes a problem in rate 4. Oh, that's still a problem. If P0 gets corrupted. So that block can't be fixed. Sorry? So P0... So there are some of these disk space. I lose P0, right? Yeah. Do you see the overhead on the parity disk? How? On every access, you need to read from the parity disk. Over here, you don't need that. Like, over here, it's been distributed. Right, so actually no. So reading is not the real problem. The problem was the right. So here, if you wanted to do... to back to that right, when you go in this space, this would be the model. Right? Here, you could allow them to go concurrently. Here, you can go... Yes, you're right. So for reads also, you could do that. But actually, the reads can be read from the disk action. That was not really the main model. At rate 6, it maintains two different parity disks, known as Q plus Q difference. It gets recovery from two errors possible. So here, how we do this? Yeah. So, let's take rate 1. How we do rate 6? Zero? So similarly, it's distributed. P and Q parity. Now, P could be exorbitant of all the data. Q should be a stronger code. If you really want to recover from two errors, because Q is also an exorbitant. You get nothing, but you have a Q. So Q should be a different piece of code, which is code and code independent of P. Right? So I'm not getting the mathematics of that. If you're really interested in how to generate this... the second pattern, you'll be able to understand some papers. Okay. So that's about rate. So, when you do DMA, the one question that we didn't address is, does DMA use virtual address or physical address? So the way we have described it seems that DMA should be physical address, because the CPU sends the physical address of the source and target and the rest happens without any intervention of ways or anything. So you copy the physical address of the source to the target. So let's see the pros and cons of both. If you want to do virtual DMA, it's DMA based on virtual addresses, you'll require a DMA in the DMA agent so that you can generate the corresponding physical addresses. And this DMA must be under the control of ways and it should be kept coherent with your processor DMA. On the other hand, if you have physical DMA, it has several issues including security. So here are just some questions that you should think about to deal with physical data. So the first one of the questions is what if the amount of data to be transferred is more than a page? When I'm done with the page, where should I go now? The physical pages are not continuous, they're normally scattered. And normally when you go DMA, the CPU sets the starting address only. So when you cross the page boundary, you cannot really start right into the next page. You have to correct me now. This is the question. Ways must copy the entire digital distribution page prints before you go to DMA. What if Ways replaces or if you look at physical page prints which is being used by DMA? That means to avoid that, you must please DMA this. So that while a DMA is going on, a page should not be missed. And Ways must copy entire user data to kernel space before DMA is involved with the security issue. A particular user can actually start writing to some other space because once you start the DMA, there is no security check. There is no check done, actually. It's a byte copy from one after space to another. That's it. So to avoid this problem, Ways must copy the entire user data to kernel space before DMA is involved. So DMA also has to be re-filled the caches or data transfer. So that could also the caches are virtually indexed. That may also be a problem in physical data. This is not a special problem. Even in multi processors, this problem may arise because when processor 1 sends a message to processor 2, normally it comes in terms of physical items. And the processor caches are virtually indexed. How do you do it? So we didn't discuss any of these things and we really cannot do that in this course. It requires a lot of prior exposure to certain concepts. But anyway, so these are the problems of virtual versus physical DMA. Seems that virtual DMA may be easier to support as long as you have DMA under risk control. In physical DMA, as long as you restrict your data size to a page, you are probably fine. So until now, we have been mostly talking about synchronous IO that is, whenever you start an IO operation, the calling process gets switched out and some of you have come see that the calling process must wait until IO completes. However, you could do a synchronous IO as well and it has the same philosophy as one of the most. So essentially here, what we do is we allow our process to continue even after making an IO review first. Only if it tries to access some bytes, whatever part of that, how to do this? The process is a program. So let us suppose that I am the program has this code, you have to scan it and then I do x plus plus. If I allow a synchronous IO for the STD you read, the program will continue execution down here and here what we ask is that what is the point where you should do the context switch, not really. How do I know that x is not available? Compilers generate a virtual address and look up the tlv and make it a page font and go to a translation and go and access the physical page and get some value, which is part of the problem. So how do I really achieve this? This is a particular thing. Deep type of IO completion. Yeah, but the process is not a load instruction. How do you trap it actually? The page font can depend on the process that this is IO. This memory map goes to a IO path. So I say the request to the it will create a page font and here it is. Why do you say so? Because this doesn't have a tlv and this is the IO path. Which is the IO path? This one here. This is the IO request. This will generate a IO request. It will generate a system. So that will be via a page font. Why should there be a page font? So how will the IO request work in this case? There will be a system path which will read. So at the lowest hardware level, the bytes will be read from the keyboard buffer to some memory area. They will read the load function. The load instruction. Now, I am talking about part of the system path. System path handle will read from keyboard buffer into some memory area and then copy from the memory area to the user's page. This is the system path handle. This is the IO request. Yes. So it can block all the components. Which components? The components on this there is a list. How does it do that? So process will generate this load instruction which comes out in the address. Now what do we do? You may remember having the in the page table remember that in the page in there was a IO fending to this page and the next time when the IO has completed only then that bit would be 50. On the next at this translation that bit is set or not? If it is set then we have to do a context. So inside the system called handle at some point the handler has to copy the data from the IO of offering the current space to this particular address in physical memory that has to happen because processor will be generating this particular load eventually which will go to that But am I making sense? So what I am saying is that in the sequence of things that will happen there is a need system called which will essentially copy from the IO offer whatever that is and then the next step is copy from IO offer to add in some x. Yes So previously what happened is that the process would get switched off immediately as soon as you execute the system Here what I am doing is that I am allowing the process to continue while this is happening the processor will generate that load instruction eventually So what we have to do is that as you have mentioned in the page table this particular virtual page has an IO pending But to make sure that we actually get to that point before we allow the the process to continue So if you want to do a sequence of IO the part of the system called handle will also have to be nulled to clean with So that the tlv piece will happen and then only the operating system can change the page table and that would be other way also So now the process can have multiple authentic IO requests and sequence of IO to switch off the process immediately after the system as soon as the system is called actually like this The other one is talk here this is the last slide we will finish up next time and then we will next week what we will do is we will talk about hyper-study which is surprising So that's what we are going to invest our time on It's kind of a hardware trading mechanism We have lot about trading at the operating system left So we will see how to bring that down to hardware So that's how we will spend on SP