of eSports, a show devoted to all things eSports. I'm your host, Katharine Noor. Today we're talking about litigating disputes in eSports. My guest is Irene Scholl Tadevosian, an attorney with Nixon Peabody Law Firm. Welcome, Irene. Hello, thank you, Katharine. Thank you for having me. All right, so we have kind of a special show today because I'm a litigator and Irene's a litigator. So between the two of us, we can tell you a lot about litigation, whether you're in the eSports business, gaming business, or you're just interested in litigation. So let's start out with the litigation process. So Irene, why do you think an eSports company should understand about litigation? You know, as with most companies, and especially now that the eSports industry is booming far more than it has before, things are getting contentious.  And we're also seeing a greater focus on the eSports industry, by let's say some serial plaintiffs, and whether it's in the employment context, or the, you know, disability context, we're seeing companies get hit more with suits now that eSports has really entered the mainstream of the U.S., the United States, and honestly the world. So we're seeing more and more things cropping up on the litigation dockets, both nationally and internationally. Sure, and you know, I think any business really needs to understand litigation and how it works, even if they aren't involved in litigation, they may find themselves in litigation at some point. So are there things, Irene, that you would recommend that companies do to help them prevent litigation? The, you know, depending on the subject area, there could be lots of things, right? One, the top of my thing is to either have inside counsel or outside counsel that is advising you on your deals, on your contracts, on your employment relations with your employees, and another big bucket would be the regulatory compliance, you know, privacy, depending on if you're a private or public company, whether you're touching on the gambling space or not. You know, the really hot button issues that could get you into big trouble with regulators, make sure that those are buttoned up. So that would be number one. The second thing is on just the contractual side to make sure your contracts are well, both internally and externally, internally with your management and employees, and externally with any third parties you do business with. Sure, and you know, nowadays, a lot of people think, oh, I can Google and find a contract online, and it's probably a good idea rather than doing something like that or drafting up your own contract, find an eSports lawyer who actually has expertise so that your contract actually will help prevent expensive litigation. So Irene, should a company put an arbitration or a mediation clause in their contracts? I think, good question. Let's separate those two out a sec. I think all contracts, if you don't have an arbitration provision, should at least have some sort of mediation clause, right? Before you go to litigation, those sometimes are helpful and sometimes aren't if the parties are not willing to mediate in good faith early on. On arbitration, there's lots of pros to arbitrations. There are some cons as well. And so it's really up to the company to decide, and depending on the dispute whether arbitration is something that they should put into their contracts. For business disputes, it generally makes sense to have an arbitration clause. In the employment context, you may want it, you may not want it depending on who you're dealing with. Generally, we recommend arbitration clauses and employment contracts, but sometimes it depends. And so you just have to look at the type of contract you're dealing with, understand the pros and cons of arbitration in that specific context to decide whether to put it in the clause. So for example, in the employment context, at least in California, if you put it in arbitration clause, you have to know as the employer, you're paying for the arbitration fees from beginning to end, the employee's not gonna front any part of that arbitration cost. Sure, and I have sort of special experience in this area. I'm actually a former judge and I am an arbitrator and a mediator in the eSports space as well as a litigator. And I find in most of my litigation cases, we go to arbitration or mediation, sometimes both. And mediation, usually the requirement is that the parties split the cost. We have a couple of different arbitration systems in Hawaii. One of them is free, well, it's free to the litigants and it's a court sponsored arbitration program called CAP arbitration, but that's not the case in most jurisdictions. But I feel that the uncertainty of trial it kind of makes it worth it to arbitrate or mediate depending on the situation. If you have a binding arbitration, there's more of a concern about the care of selecting the arbitrator with a mediation. You still want to make sure that each party is very, they have a buy-in and they trust the mediator because if they don't, they won't listen to the mediator in terms of what the mediators recommendations are. And then you also have to look at what type of mediator that you're getting, whether it's an evaluative mediator or whether they have another type of means of or style of mediation. So that's important. So let's, now it's really important for companies to know how a lost suit gets started. What happens? How does a lost suit begin, Irene? If you're the one filing the action, you need to actually write a formal complaint and file that. If it's in court, you file that with the court. If it's an arbitration, you file it in arbitration. But once you do that, then the lawsuit typically needs to get served on the opposing party. If you are the defendant in a lawsuit, then once you get served, then you have a certain number of days, usually 2130 or whatever it might be if you're in the state court, whatever that time limit is in that jurisdiction to respond. And there's a number of ways you can respond, but that's essentially how a lawsuit begins. Sure. And I always call a complaint, a hot potato, because a complaint, you have very little time before something has to happen. So within 24 hours, you need to be taking action. One of the first things you need to do is find out if there's insurance that covers the defense and indemnification. If there is, I mean, certainly contact your insurance company to find out if there's coverage, because if there is coverage, your insurance company has, they require you under your policy to provide them with the lawsuit within a reasonable time. They won't provide coverage if you don't, if you delay. And if they're going to be providing defense, they're going to be hiring their own attorney. But if you don't have insurance coverage, then you really truly need to be hiring an attorney and hiring the right attorney. And that attorney will need to file the answer to that complaint within the correct time, which could be depending on your jurisdiction, like you said, Irene, 20 to 30 days, but you might not be able to get an extension and if you don't file the answer on time, you might find yourself in default and have to pay. You don't want that to happen. So it's a serious issue. Yeah, one of the things that's a very wise thing to point out, one of the things that we recommend that companies do is put a ticker so that when something is filed, they know immediately that it's filed against their company. You could have your internal folks to this or your outside counsel do this. We do that for our company, because the time of responding starts from when you serve, not when it's filed. So that gives you a little bit of a buffer to figure out and respond quickly, but you're absolutely right, Catherine. It is hot potato because you do have to think and act quickly. Sure, and for anyone dealing with eSports companies, they just, they really need to know this and they can't, they will be stressed about it and you can't let that stress cause you to set the complaint aside and think I'll deal with it later, because that would be kind of a potentially a human behavior, but you can't do that in this situation. But okay, so once Irene, once a client retains you and you start talking with them, is there a privilege between you and your client? Yes, and again, it may vary in some jurisdictions, but generally as soon as you begin talking to an attorney or your attorney for the purposes of obtaining legal advice, that communication is privileged. The one caveat there is the client holds the privilege. So if whatever I tell my client, they go out and then say to the public or someone that's not in management within their company, right, the folks that have to guard the privilege, as soon as that is released and the communication is not protected anymore. And by privilege, we mean confidential, right? So anything that someone contacts me, they've been served with litigation, they have a conversation with me about what to do, that communication is privileged and confidential, of course, unless the client goes and releases like let's say to the public or someone outside of the company, the conversation that we've had. Sure, and we do have a question and this is from a viewer who has actually been a guest on the show before, Tom Leonard. If someone is setting up an eSports business in California, do they need to involve an attorney just to set it up? And if so, how important is it that it be an eSports attorney and is it important for that attorney to be local? So first of all, you need an attorney to set up the business and should the attorney be an eSports attorney and local? So you technically, in order to incorporate a business and get the basic business formation documents going, you technically don't need an attorney, there's other services that can provide the form documents for you. Now, typically I don't recommend that because depending on what you're trying to do with your business, whether it's to sell it later on or what have you, you can find a firm, including ours that can provide pretty good rates for those formation documents to have them be right from the beginning versus you having to fix them later on. I will say if you're setting up any business in California, I recommend getting a California attorney because California is one of those states that has a lot of laws that are different from other states. So if you don't know it, you could get in trouble pretty quickly, especially with its employment laws. And then in terms of do you need an eSports specific attorney? There's no eSports law, the eSports industry is its own industry, you just apply the laws of different practice areas to the industry. However, it is useful to get someone who understands the industry because they know it well. And just doing work for my clients, I find that I am also able to connect them with other stakeholders in the industry that become beneficial to them later on. So you just get the benefit of working with someone who really knows what they're doing within the space. On the technical legal side, sometimes that does make a difference, sometimes that doesn't, depending on the specific thing you're looking to do. Sure, and if you already have an attorney that you've worked with before, but they're not really that familiar with eSports, you can use them, but I think it is helpful to have people that know your business. And so an eSports attorney probably makes sense if you can find it not as easy. Yeah, especially on the litigation side, I can say generally it makes a difference because someone who operates in this industry needs to understand the very public nature of the industry. And craft your litigation strategy in such a way that you're always thinking about that as you are making decisions as to what to do in litigation. You know, I think that the same is true with selecting an arbitrator or mediator. If the arbitrator or mediator understands eSports, you go a long way towards having the right arbitrator or mediator. Because keep in mind, if you go to trial, your jurors may know nothing about eSports at all. They might have to Google it to find out. The judge will probably not know much about eSports. So let's move on. After the pleadings are filed, there's something that we call discovery. Irene, tell us about the discovery. So this is where things get very, very expensive very quickly. The US system and like most systems has a really intensive discovery process. And the discovery process, what it means is that each side can essentially get a host of information from the other side that's relevant to the litigation. And that relevant can be defined very broadly. And so the other side and your side gets to ask questions of the other side, gets to ask for documents, gets to ask for certain individuals to be deposed into litigation. And it's a very exhaustive, very drawn, it could be very drawn up process where you have to turn over information in litigation that you might not necessarily want to turn over, but if it's relevant and really pertinent, then typically you have to turn that information over. I mean, we can go into lots of examples, but it just ends up, it could end up being the most costly part of litigation. So there's requests for answers to interrogatories. Those are written answers to questions. Then there's requests for production of documents. And that's what requires the other side to produce the relevant documents. And if they don't comply with those, a motion to compel can be filed and the court can issue sanctions and even attorneys fees and costs if the party doesn't comply. But then we get to the deposition. Irene, walk us through what a deposition is. Sure, and it might be, excuse me, best to do it by way of example. So let's say we have an employment lawsuit and an employee sued the company for let's say discrimination. And the employee asked to take the deposition of the manager that they say discriminated against them. What that means is that a manager has to show up and essentially probably be on video and probably have everything that they say be transcribed. I think almost all the positions you asked for a court reporter. But essentially it allows the other side to ask questions about the lawsuit and sometimes even questions that are only tangentially related to the lawsuit to the person who's asked to be deposed, which in this case would be the manager. It's a stressful, I mean, if I've defended and taken many depositions I've never been deposed myself. I mean, it's a pretty stressful situation to be in. So you wanna make sure that your counsel when prepares you adequately for it and that you will retain good counsel obviously to defend you in the deposition or to take the deposition of the other side. And you know what's interesting now is that before depositions were generally taken in person and I would travel to different states to take depositions of parties or witnesses. And now I think it's the trend is to take them by Zoom or other platforms and I'm possibly having the court reporter be in a different place. And so it's, things have changed, they've evolved because I used to take the position that a video deposition wasn't as good as an in-person deposition. But now that we have so much, we're so used to being on video, I think that may have changed, but I still would like to see them in person and get a feel for them in person. I think I can get a better feel for their credibility. What do you think about that, Irene? Absolutely. The primary parties, you know, absent the pandemic, you want it to be in person. The main players, you want it to be in person. As you're saying, Catherine, you get a better sense of the person and a host of all other things that go into it. If it's not a main party that someone you might need just for an hour or two, maybe you do it via a video and if their testimony is not gonna make or break the case, that might be an appropriate circumstance. But personally, I would like to take in the depositions of any party and other pretty relevant after in-person. Sure. And so, Irene, what is the role of the client in litigation? What do they have to do? So, I mean, the client is essentially the boss. I mean, we, as litigation counsel, we're there to advise the client and make recommendations and update the client as to what's going on in litigation. And the client will then, what the client will make hopefully the best decision that there is. I mean, with the clients I work with, I consider the clients, my partners in litigation, they might not be doing the litigating like I am, but together we are forming a plan and together we're making the decision as what to do next or what's the best strategic decision. And ultimately at the end of the day, it's a business decision, because litigation can get expensive, it's a business decision and it's up to the client to decide whether, am I gonna see this case through? Do I wanna go to trial or do I wanna settle it? Is there a point earlier than trial that it makes sense to not have to deal with the action anymore and settle it hopefully favorably for them? So most people what they know about litigation is on TV and the primary message that we get from the media is that all these cases go to trial and that the trials are very dramatic and everyone's stomping their feet and their fists on desks and things like that. And so in real life, Irene, do these cases actually go to trial? I think the number is less than 3% of cases go to trial and I think that number might be even less now after the pandemic and the backlog in the course. And really what folks see on TV is really so different from what occurs in real life. I find it interesting and I don't blame the general public for having this idea that your litigation team should be hyper aggressive and crazy.   You want your litigation counsel obviously to be very good but if you are dealing with someone who's a bulldog for no reason, it's actually gonna be more expensive and costly for the client.  It happens, the litigation has to be very measured and strategic if you want to get certain results. I completely agree with you. In Hawaii, we have a very civil environment for litigation, in fact, it's required. And what I've noticed and I think the plaintiffs attorneys notice it if they are civil and work well with the other side and with the insurance company involved, then they can resolve cases faster and they can do better. The more contentious things are sometimes don't have as good of results. And with regard to the case is going to trial, I think we'll absolutely write about that 3%. It's actually true of Hawaii. We have about 3% of civil cases that go to trial and we are talking about civil cases rather than criminal cases here today. So the next question is, what should a client expect if the case goes to trial? Depends on the type of trial. So there's essentially largely three buckets that can fall in. There's a jury trial, there's a bench trial and then there's arbitration or some administrative proceeding. The jury trial, which is what a lot of trials fall under unless you're in an arbitration tribunal, is the trials gonna be judged by a jury of however many jurors, the jurisdiction says, 8, 9, 12. And so essentially the fate of your case is in hands of folks that are not necessarily lawyers or judges, as you were saying, Catherine, or arbitrators who understand the industry or the nuances of what's going on. So you have to essentially educate the jury at the trial, not only of the law, but of the facts. And then the jury makes the decision. In the arbitration or bench trial setting, you have one or maybe a panel of people, but typically one arbitrator or one judge making the decision based on the facts they see in the law. And as you said, Catherine, there's benefits of being before an arbitrator or a judge and not a jury. Depending on the type of dispute, the trial could be very long. It could be anywhere from a day to sometimes a month or longer. And it's a really drawn out process. I mean, when you go to trial, at least your counsel is looking at sometimes 10 to 15 plus hour days. It's really expensive. It really takes a drains a lot out of both parties. With that said, sometimes it's worth it, depending on the dispute, you need to go to trial. They're rare, but they do happen. And in some cases it's necessary to do it. Sure, and it's expensive. I mean, definitely, I think that's a really good point. So you have to be, and the outcome is completely uncertain. You can't expect, even if you have, believe you have a great case, you're gonna prevail. So let me ask you, Irene, what happens after the verdict? Can the parties appeal the decision? Let's just break it up again. If you get an arbitrator's decision, it's very difficult to appeal that decision. It has to be, the standard is very, very high. So in the arbitration context, and this is one of the pros, and you could say sometimes cons of arbitration, but I think it's largely a pro, is the decision you get is largely final. Now, obviously that's not great if you're the one who lost in arbitration. In the, before the courts though, you have a right to appeal at least once. And so even if you get a, let's say you're the plaintiff and you get this amazing verdict, it's not over, it can be appealed and that verdict can be overturned. Sure. So Irene, how can people find you if they're interested in retaining you or your firm? Yeah, I mean, you can just Google my very long name and you'll find the Nixon Peabody website, but you could go to the firm's website as well and my information is listed, both my email and my contact information. Terrific. Well, thank you so much, Irene. We learned a lot today. Yeah, thank you, Katherine. And thank you for essentially pitch-hitting this with me. All right, so anyway, thank you to our viewers for joining us today and thank you for our viewer who sent in a question. Make sure to tune in next week. My guest will be Brendan Busman to discuss China's gaming policies. See you then.


Okay, very good morning Thursday 19th of December. I hope you're doing well Usual routine. I'm gonna run through a couple of the major headlines An overall opening sentiment here for the UK European session Then I'll hand you over to Sam and he can have a look at the charts for a more technical perspective but first off looking at the Well, you might have just seen there a glimpse of the headline Trump impeached by the house And as you can see on the charts absolutely zero impact as we had been saying from the beginning He is almost Certain to be acquitted by the Senate when they then hold their trial, which is Republican predominantly run There's no way that he's going to get impeached Officially in terms of exiting the White House. So as you can see on the charts Absolutely zero reaction as one would expect to that news from Donald Trump So looking else what's going on the pound actually has had a little bit of a jump higher this morning Perhaps I mean some people I've been talking to talking about just Closing out a bit of short covering going into the Bank of England rate decision. I mean bearing in mind We've had a pretty disastrous run for the British pound If we start looking at here that chart we had before and we've been using referring back to throughout the entire week Let me just Remove this so you can see it a bit more That's the the journey of the pound. Of course since the night of the UK election when we did print a 135 handle, but we've got down and pretty much found technical support yesterday The pivot level is working quite nicely with that low scene on the 12th And we just kind of went sideways there after before then just seeing a bit of a pushback probably a decent level of resistance Actually, just looking at this chart now at the R1 that does bring in a couple of nice areas of some of the election post-election price movement But also some of the support levels that were seen on the 11th and the 12th as well Before that main event So nothing really too much else behind that move. There's certainly no other fundamentals other than perhaps just a bit of Shortcovering given the depth and scope of the the plus three percent sell-off that we've had Since the beginning of the week on this pricing in the fears of a no-deal Brexit back on the table from Boris Johnson's toughening of that legislation Elsewhere equity markets pretty flat overall US 10 year just coming down to retest the low that was seen during the London afternoon yesterday 2802 gold just coming back to pivot as well So just a fraction higher in the European index futures to get things underway But as I said fairly quiet open not too much going on oil is basically flat and going sideways Very tight price action seen overnight in the Asia-Pacific session So straight into the headlines Trump Being impeached by the House of Representatives on charges of abuse of power and obstructing Congress As I said just a short while ago the Senate will hold a trial early in 2020 to decide whether the president should be convicted on these charges and removed from office, but it's almost certainly the base case scenario be that they will acquit him and So actually as I've said, I think on Monday's Outlook It's almost like that phrase from Star Wars strike me down and you make me stronger I think that couldn't be more relevant for Trump. I think this is I Don't agree with the Democrats approach with this I think all they're doing is giving more strength and more support to Donald Trump by taking the action that they're Doing Trump's gonna be Loving life at the moment and I know that sounds a bit perverse He's the only the third president in US history to have been impeached But this absolutely plays to his strengths and where was he last night? Holding a campaign rally, of course whilst they were counting the votes on Congress He was there doing his usual kind of pumping up a stadium crowd And he was saying that the impeachment shows a deep hatred and Distain for the American voters and they would pay at the election At the end of next year, of course and so again It's this it's this whole notion of global politics like with Brexit us against them People versus Parliament the establishment versus the people in the US now Trump It's the Democrats or Congress versus you the American people in your rights and look what I've done Perfect timing couldn't be better Stop market record highs at Christmas. I mean All this does to me this impeachment from the house is just further fuel what will be Just a really strong message for Trump and I think it just galvanizes his base even further And no better timing than the seasonal period of where we're at at the moment So although I know I sound like a bit of a Trump fanboy I do look at this, you know hundred percent from a strategic point of view and I think once again He and his team have played a blinder as Sam would say and Yeah, I think this just plays in his favor I don't see any risk at all from this only upside for the president the other thing, of course that I did I did tweet this Just going on this theme. I know it's a bit off Market topic, but I did see a really excellent graphic because I was looking at the stats behind the frequency of Trump tweets and Donald Trump. I'm not sure if you caught the tweet that I did he's tweeted. Well given another day now He's done north of 850 tweets 850 tweets so probably how much I would tweet over I Don't know four months five months. He's done in basically two weeks In the months of December so far, but this was quite interesting And I do think it definitely is true about how he uses Twitter as that vehicle to To create these different types of things. So here Diversion and deflection are probably two of the biggest things The other two are when it comes to financial markets. I think the trial balloon is is perfect That's when he will start Testing out the waters on the market's reaction and perception of the trade war and also the criticism of the Fed You know, how far can he push it? And then there's the preemptive framing of course, which is getting ahead of the curve And you know one of the things that I think he's being very good at is And I've said this in a few conversations to with the guys here is that I mean what what can you throw now? At Trump that could bring him down They've tried to throw the Russian thing at him. They've tried to throw now obstructing Congress abuse of power I mean from sexual harassment to racism Everything that would have downed any normal political figure He has confronted and the fact that he has confronted it so face-on He's pretty much bulletproof at the moment And and so yeah, this whole notion of the witch hunt And the more that you throw at him the stronger he becomes Like a Sith Lord as I said, so yeah, I'll move on other things that I think a warrant a mention And a few other things to be aware of we had the Bank of Japan interest rate decision last night I'm not gonna spend a great deal of time talking about this. No surprises at all. They left interest rates on hold This comes after the Japanese government under Shinza Abe have announced a large-scale stimulus So hence the kind of calls from the central bank to get the fiscal situation To lend more support given the lack of real ammunition that the central bank has now in its toolbox The BOJ did say they no longer Described overseas risks to the economy as increasing so they have kind of improved very subtly their outlook about the future But they did say significant Risks to remain so that they remain on guard so to speak They did say though that central bank that the domestic demand would be supported though by this Active government spending and to give you a bit of context BOJ officials see a sizable impact from the government spending expected to boost the economy by just short of 0.4 percentage points So that was Japan overnight, but the currency reaction Minimal if anything at all the other currency that has moved though is the Australian dollar And this isn't so much based on any update on the trade side and any potential ramifications on China This is directly the implications from domestic economic data where the Australian jobs numbers employment jumped 39,900 last month. This is employment figures that was compared to expectations of just 15,000 so more than double Expectations and if you look at your Aussie chart that will explain the little spike on the candlestick that you can see And then the graduated move we've had and we're all the way trading up at the R2 in the futures in the Aussie this morning on The back of the number so at the moment the RBA you could say justified in taking those three Step-cutting action that they have done over the course of this year But right to hold and stand pat for the moment to let That feed through into the economy and so far so good In that approach the other thing of course coming up the Bank of England interest rate decision not expecting any real Great movement on the back of this so very much so expected to hold rates Even though markets are pricing in as you can see on this graphic an Interest rate cut is the more favorable pricing by markets at the moment. You can see then when we get to really around May-June of next year an interest rate cut is priced in now. I don't forget Pricing has seen a little bit of a shift obviously since Boris has got a little bit more Aggressive we've been focusing on the pound coming under pressure, but the rates market also reflecting this and Given in mind then he's pretty much got a strike a deal in just a matter of months He's given that deadline of he's not now going to Extend the Implementation phase or transition and so hence the reason why when we gets to kind of end of Q1 beginning of Q2 You're pretty much going to know whether or not that is going to be withheld or or indeed He is going to have to change tax So all of that meaning more political uncertainty more risk to the economy and hence the reason why timing wise That's when a rate cut is priced for around that point of time for the moment Otherwise elsewhere a couple of other things that people are looking at If we go back to here, this is the Bank of England Dove Hawk Barometer if you like looking left at the doves all the way going to the far right the hawk So you can see the overall composition of course of the the members of the Monetary Policy Committee would be leaning to the left Because of the estate of the economy and the risk associated with with brexit Most importantly though, we have seen seeing a pattern of seven to splits That meaning seven to hold policy as it is at the moment, but to Saunders and Haskell Being more minded of taking more preemptive action to mitigate any ongoing downturn now Would they be right in doing that? Well inflation as we saw yesterday has been relatively steady But as you can see it has been drifting away from target at the Bank of England 2% as as general demand in the economy has dissipated with the The significance of the impact of the uncertainty surrounding our economy so things like manufacturing activity has been declining Construction the worst in a decade so on and so forth the other thing though GDP and this is looking at it on a Product rolling three months total has surprisingly held up However, you could say stagnating. I mean growth is pretty much flat lining at this moment But albeit we've managed to divert the initial dip that we saw in the in the summer but growth fairly precarious so in that Reasoning hence these two likely to vote for a rate cut again and some speculation that this chap here Flager is potentially going to join and you could have a 6-3 Split now would 6-3 lead to a big continuous set off in sterling I would say no, but if we were trading at a sensitive Lower bound level and now we've moved away from that. I'd say it's maybe a little less the case a 6-3 vote I think you would have a little bit of a downside reaction in cable But in terms of retesting the lower bound of this now quite important level of the 131 handle You've got close proximity the s1 on daddy pivots and the low on the 12th I I don't think we'd get down that low But certainly coming back to pivot which does start to encapsulate some of the Asian Pacific low I mean in the in the area prior to this this area here This is quite a good strong area of support or potential target in that type of setup So at the moment you can see we're forming a bit of a range I think that any short covering that was happening this morning is done And now it's kind of this price movement up until we get the actual announcement Whether or not we can breach that and push lower down to here You know if we got a surprise maybe if it's five four Then there's a little bit more emphasis to get back through pivot and retest down at those levels, but Other than the vote, I don't think there's going to be too much there That's going to be shocking information to be quite frank. Okay. I quick look at the calendar. What else is coming out today? Let's just have a quick look. So you do have the Bank of England retail sales report So, yeah, let's go back to that sterling chart with that in mind then What you would want to see from a fundamental perspective if you're looking at the short is given where we are at the moment We get retail sales and let's say retail sales month-to-month expected at my 0.3% that's plus 0.3% month-to-month the range on the low is minus 1.5% It's a bit of an outlier because the top end of the range is 0.7 So it's definitely someone on the street is quite bearish on that figure potentially is a bit of an outlier against the median estimate With that being said if we got a very negative retail sales I'd say that could bring us back a little lower towards that pivot and overnight top end of the Asia range and then if we got a six Six three or six five four split excuse me something as drastically dovish as that Well, then yeah, then we could get test back down in the potential breach of that level But you're looking at I would say fairly lower Probability scenarios, but again, this is what you do right as a good macro trader You should be thinking about the plausible scenarios You know, let's flip it on its head. Let's say we get a strong retail sales report Likewise, I'd be using the price action then that really defined the sell-off that we've had Over the last couple of days and then looking for where with the subsequent targets be if we were riding the move back higher And I think there's a couple of good spots that I'd probably keep an eye on so if I just get my Lips back so if we break where we are at the moment probably target these levels here So if I was gonna put circles And then perhaps up to the next level then you've got the R One and then some areas here from the previous highs that was seen before the gap up on the election So like I say, I don't really Have too much of a bias right now. I think that the no-deal stuff is kind of priced in To the point where it's reflecting Boris's legislation So I think now the data and the BOE could have some implications But you know, they've both got to go in the same direction and what I mean by that is Particularly strong or particularly weak or dovish That's what you're looking for for a more cleaner clarity and then looking to manage the trade through those technical levels Either on the up or downside accordingly Okay back to the calendar Other than retail sales Bank of England us afternoon. You've got your weekly jobless claims as per usual You got your Philly Fed number existing home sales also coming out Speakers No one no one really to be aware of but do be aware in WTI crude at around the Historical clothes later on this evening. You've got the Jan futures contract Exploration so hence the reason why on our charts when Sam's talking we're looking at the FEP contract, which is now Got the main volume Alright, that's it for me. Have a good day. How'd you ever say? Hi guys, good morning, I'm good Let's have a quick look over the deck So she's just pushing down to its lowest level of the week so far but key level has to be said going back here now to Last Thursday To the tip pretty much bang on the the S1 and that low So keep a watch on that was also the high if we had Back on the fifth of the month as well So a bit of a line in the sand that I would have marked up Today just for the decks in general, but of course just the the first 30 minutes doesn't always guarantee that the Direction is going to be that way and it is a key level of support in in what has been Relatively choppy it has to be say has to be said decks over the last month or so We had a couple of instances where it looked like it was going to break the bottom part of that range before then Eventually getting above there and then reaching a new high for the year only to now start drifting down Again, but yeah, certainly keep a watch on that and then if we put this on to the 15 minute chart You know this area is to hold and we get back above the the triple bottom from today's Two lows and yesterday's one as well Then you are looking for price to get back to 13,220 that kind of area here where we broke through So some interesting resistance points just above where we're trading key level tested on the low here now as well Has it had much impact on us equities? Not really, but you are just starting to see certainly in the S&P perhaps a bit of a trend develop from those lows of yesterday So given the time If you were to get like a 15 minute close below that maybe you would feel a bit more comfortable about Being bearish on this market down towards what has been the lower point of that range and just below there The S1 is where that comes in 31 92 So still the same levels of support below there that I'd be keeping an eye on 31 88 previous all-time high We are as you can see in a bit of a range of this week still so those lows Just after we did the briefing yesterday Held and then the higher that we were talking about at 30 202 has held as well 3200 level in in stocks or in the S&P We may well look back at this and just sort of see similar price action that we saw to the 3100 And it's not until we really get a close of the day above that that we can get a bit more excited So 30 202 and a half to the upside Still an area of resistance. You can see here some really big tests and This will be on the daily and of course any other time frame as well So keep a watch on that little intraday trend lines as well to keep focus on and then I would say 31 96 as well The impeachment and then said has not really done too much the US data in the afternoon Unlikely to move things as well I think the range bound trade from the lows is a nice one even the top part But personally I'd be looking for you know a confirmed break to retest that area for a further push to the upside But we'll see we will see it's have a look over the pound. We should have a little jump this morning And I mentioned some nice resistance points You can see that the high of the day is the high that we have from 630. Yes, say 31 65 And then even if it is to get through there, you've got some really key levels as well that I would have as points of interest to See if they can hold up. Obviously we've had a big move lower It's just incredible. That's all you could see wouldn't think the Consapish one the election, but of course no deal Supposedly is back on the table ever you think that's actually gonna happen or not I don't know. That's why I actually do think it's gonna be a good buy soon again Which is kind of what we were saying in the you know the election that we come lower to then perhaps push on I guess the timing of that could be key However, yesterday's low is that low that we had back on the the 19th and you can see just the Significance of that and quite a few pound pairs have come to an area of support Euro or Euro pound resistance where price has turned round and perhaps that is just gonna be such a good opportunity to buy Saying that if it does get below that and it could do of course from midday today Then the floodgates could open perhaps a further move lower So that is just a massive level for the day and the week That low from yesterday, which is the low from the the mortal by the afternoon. I should say Into the evening of the 12th, which of course with the general election this time Well a week ago, it's almost literally a week ago that we're exactly where we were What a difference a week makes but yet that resistance holding up for now If we if you are sure I would be looking to target, you know just around that pivot point I would say is your key level you can see the resistance held so firm here from the 230 to 215 this morning before breaking through a quarter to seven thirty one twenty eight on the futures I don't see why that can't really come into play there as well Euro yesterday Just continued to slow a drift down But you know did finish down to a level which again like the the pound found some good support You can see here the low of the yep You guessed it the 12th finding an area where the buyers came back in for this market So again really important and as we put this on to the 240 we were talking this week about the the idea that once price Develops these trends what happens when it breaks well break retest You've got to have that on as usually when this happens the euro then does drift lower And makes a new low for the year however quite a lot of the end of year reports You know coming out and saying it's gonna be the euros a year next year Which again will be interesting to say so if we do You know to put this on to the daily chart quickly before we move over have a look at gold and oil You know you still got this massive absolutely massive trend channel that we're in and yes If that breaks the upside, you know, it's not far from basically a break of 113 when that's on You know what an opportunity that could be to get long euro However, if we put this on a longer time frame and look weekly if that trend line from 2017 low breaks with the double sort of bottom if you like from September time well could be bye bye Well, we'll have to wait and see for that next year when Maybe more volume comes back into the market gold yesterday. You can see here.  You guessed it exactly Exactly where it was the amount of times it does this but you know, it did take a while, you know, it's what 1135 to Half-free but that has proven to be a strong resistance point So still have that mark to us back to the 60 minute now and you can have that range back on. Yes We spiked lower side still, you know have 1470 1477.4 as a level on that As well, of course Still going through the days have the trend line on from those lows of November and December if it breaks through 1490 for me is to such a key level, which I will like the idea of a winter rally above that We'll definitely take my attention if we can get a close of a day above there To you know target up towards even 1524 25, which was the first of November there quick look at oil Yes, they which surprised the market with a draw You know that API DOE correlation completely broke down so look like a in hindsight Anyway, what a lovely trade that would have been to sort of got in and obviously we found some resistance on the high of that week And that's held quite well Despite a little break through $61. So to the downside obviously pivot is important and probably more importantly 60-63 would be a level of interest that I'd have marked up and then sort of start to draw these trend lines on which you can see Well, we're all respected. Yes, they are the noon starting here on the 17th as well So keep an eye on those levels the Daxus have a quick look How that is trading on that point still holding up on that s1 it looks like We almost came down for another test of that here. We did so looks could be quite strong on yesterday's low So key point and that could determine what happens really for the morning session a break below this point here Which was the 12th around 515? Could see a quicker move down. Hope you will have a good trading date Bank of England and see On at 12 their last ever Interest rate decision of the decade witness in history. Hope you will have a good trading date and I'll catch you all in the chat


Hey what's up you guys welcome back to my channel if you're new here. Hi, hello, I'm Lydia and I'm into health videos here on YouTube Today I wanted to talk about my experience with antidepressants Now I've been on a lot of different antidepressants in different combinations of antidepressant But before we get into this video I should clarify that I have bipolar disorder So antidepressants don't generally work anyway getting on with the video The first antidepressant that I ever tried was fluorosity and also known as Prozac. I had issues with Prozac. It may be really shaky, so shaky that I couldn't function. I had to time off college because of that medication When there was camombs, he actually told me to stop taking it. Prozac also induced me into a manic episodes Which just wasn't great. I got the idea that I could complete an entire assignment in a day when it was a three-week long setting. The second antidepressant I tried was Sitalopram Sitalopram had a similar effect. It didn't make me shakey, but it didn't even make me manic I was working at the time because I did a seasonal job. It made me unbearable to be around because I'd just talk and talk and talk and talk and talk and talk and talk and talk and talk and talk and talk and talk and talk And everyone hated me for it.  Now Sertraline didn't make me manic It made me into brass. It launched me into a depressive. Honestly, it made me into a depressive. I mean full-on depression. It just wasn't great. It made me It made me suicidal and that medication was the first one that I overdosed on So Sertraline was not a good mix for me Next up we have Metazepine. And Metazepine helped me with my sleep. Deep has been a problem for me my entire life I've always had problems sleeping. They've just got worse as I got older Metazepine did help me sleep. However, it did null it from my mood It didn't get me out of the depressive episode And I was on that when I started uni I started uni when I was on Metazepine back in 2016 Wow I've been doing uni for a long time Jesus This is going to be my sixth year Oh my God But yeah, it didn't get me out of the depressive So again, I did overdose on it Luckily Metazepine is a very safe medication If you overdose on it, it's not harmful really I'm not saying going overdose on it I'm just saying it's not as lethal as other medications I got hospitalised for that And they switched me back to Sertraline While I was impatient And then just pushed me to pay for down I was already at rock bottom It just, it felt even worse So they stopped that And for a brief time I was off for antidepressants And then at that time I got myself back up and functioning Then the next uni year, 3070 I always started on when the vaccine Now when the vaccine for me was okay I took it for Four years And I had no significant side effects It helped my mood a bit It made me a bit more cheery to be around It didn't change my life or anything It's not a life saver But it didn't send me back It didn't send me to bed And when I moved down to London I got hospitalised So I got overdosed on antipsychotic I got hospitalised And I was in miltoquines I got started on trisodone alongside The valence vaccine then Which helped a bit The trisodone made me very sleepy It just moved back to London And then they stopped the trisodone So I was only on it for a short period of time I feel like I'm atypically as an antidepressant I was on 50 milligrams of atypically It helped what I see massively However, it made me very slow It made me very slow down Too slow down to function and do normal things I was basically in bed all the time When I moved to the last year While I was inpatient I got started on vortexetine Which has helped a bit Again, not massively It's not been a life changer But it has helped And I still say that to this day For me, the only life saver Two life saver medications That I take The first is to have a paradigm The second would be a theme And then my life change in medication So, yeah There are lots of different antidepressants And different types of antidepressants For people to try And when I make videos like this My intention is purely to share my experience Not to put people off trying This is just what I went through So don't be afraid if your doctor recommends One of the medications I spoke about Just because I had a bad experience Of what doesn't mean that you were I know plenty of people who take All the medications that I've mentioned And they're doing amazing Medication is a game of trial and error Medication is not a one size fits all If it was We wouldn't have people in psychiatric hospitals So if your doctor recommends something Try it You never know It could change things for you It could change your life And if you went to Lithium When I was first mentioned I was very reluctant to try it again I had a bad experience with it in the past But when I did try it And it was done properly An increase, gradually, not just Whack on all those It worked really well for me Lithium changed my life And that's what my message to you is An anti-depressant could change your life So don't lose hope Thank you for watching this video And if you're new, subscribe We just hit a six train I'm going to be doing a giveaway soon Thanks for watching And I'll see you soon


All righty, welcome back to operating systems. So, lab three is now out. So, hopefully you have learned something from the labs and time management maybe. So, just as a guideline, the labs are meant to be like 10 hours if you have two weeks since five courses, eight hours a week per course, minus three for lectures. So, you have like five hours a week. So, the labs being two weeks means you should spend around 10 hours, eight to 10, something like that. So, it seems most people fell within that ballpark, but if you didn't listen to me and didn't, you know, check for errors and immediately crash, you might spend like eight hours debugging a single thing. So, listen to me. So, next lab should be a lot easier. The code is like, if you are good at writing concise code, you should have it done in under like 80 lines, something like that. And it's mostly thinking you won't have to deal with threads or processes or anything like that. You have to deal with page tables. So, you should be able to start it after today. So, page tables, always fun. So, how we left off on Tuesday, if we remember, we just had this gigantic page table full of page table entries, and that is how we actually translated virtual addresses to physical addresses. So, that page table was absolutely gigantic. It was a gigabyte, which is not something you want, a gigabyte page table for a process. So, let's think of brainstorming together. What should we do about this page table size? Because most programs don't use 512 gigs of memory. Your programs probably use like a few megabytes or something like that. So, what should we do in order to not have a gigabyte page table? Any ideas? Use a hash? Oh, use the cache. So, a cache just makes lookups faster. It wouldn't reduce the number of entries we have. So, it still would be a gigabyte. Read ahead the lecture and make it fit on a page. Or in general, let's make it smaller, right? I can just make it smaller. So, if I just make it smaller, that's a solution. So, if I made it such that one nice thing to do would be just make it fit on a page. We'll see why we do this in a little bit. But, turns out that a page is a nice number. Your operating system can just allocate pages nice and easy. So, if we only had a page for a page table and we try and make it fit on a page, well, we can do some math and work backwards. So, our pages are to the 12. So, that would be the entire size of this page table. And if our entry size is eight bytes, which is two to the three, then I can fit to the 12 divided by two to three entries in this page table, which would be two to the nine. So, I would need nine bits for my index and then that's it. So, now my page table is only four kilobytes here. And when I am translating the address of MMU, all you have to tell it is where to start, where the page table is physically located in memory. So, there would be a register that says where your page table is. And that would be a physical address. And then in this page table, it would look it up, do the same translation we did before, but instead of 27 bits, now we only have nine bits. And here the physical address would still be the same because our page table entry is the same deal. Everyone on the same page for this one? Yeah. So, this is not the same amount of output. So, I can only fit into the nine entries in this case if I make the page table small enough such that it fits on a page. But everything else stays the exact same as we had before. All right. So, we're good so far because, yeah. So, the obvious question might be, the next obvious question might be like, well, so two of the nine entries, if each of those represents a page, then my program can only use at most like two megabytes of memory. So, what happens if I need more memory? What about if I have a program that actually wants to use all 512 gigabytes or a gigabyte or something like that? And that leads us into our solution, which get ready for it because this is where everyone's brain starts to break. That is our solution. So, we have multiple levels of page tables and we will spend the rest of this lecture talking about this. So, how this works is it has the same idea where you just kind of cascade a bunch of smaller page tables that fit nicely on a page altogether. So, up in the virtual address before we had 39 bits, now if you add all of these together, you get 39 bits. So, luckily our offset doesn't change. Page, it's related to the page size, we're not changing the page size at all. So, it is 12 bits and in L zero, one of the lowest level of page table, it is nine bits. So, that's just because it was like before, we want to fit each level on a single page. So, here, if you count up the number of bits, we have to have three levels of page tables. So, now, when we translate an address, this root page table register just points to an L2 page table and then the only difference in here, this page table is still full of page table entries, but the physical page number actually is the physical page number of the L1 page table. So, the entry here tells you where to find the L1 page table and then in the L1 page table, you take this L1 to figure out what index you need to look at to get the entry and then once you get the entry, it has a physical page number that tells you where to go in the L zero page table. Once you're in the L zero page table, that's the same as we had before. That page table entry has the physical page number that corresponds to the actual physical address of that virtual address you're actually interested in. So, any questions about this? Cause this is, and this is how your page tables work. Yep. Yeah, so cache is named the same way. So, this has nothing to do with cache. They're just different levels of page tables. So, they're named the same way. The only thing here is that you might consider it backwards, but L zero is like that is the page table that has the entry you actually want, like in this step, where we just look it up and we get our physical address directly. So, no matter how many levels of page tables, once we get to L zero, that will have the actual physical address of whatever we're interested in. Yeah. Yeah, so in the L zero page table here, you can only have two than nine. Cause it only has two than nine entries, but in this table, right, it can point to two than nine things and then each of those can point to two than nine things and then in there, they can point to two than nine things. So, this is, we need to map to the 27 bits for the virtual page number here. Yeah. So, we're still representing that 512 gigabytes of virtual memory. And yeah, isn't this just more steps? Yeah. So, this two to the nine, so all these are gonna be two to the nine because we want to make our page table fit on a page. So, this two to the nine, why there's two to the nine entries is because two to the nine, the number of entries times the size of the page table entry needs to equal our page size. So, our page size is two to the 12 and our page table entry is nine bytes or nine, or two to the power of three. So, yeah, so here you can, here I can write that. So, I'm not bold. So, if our page size is, whoops, two to the 12 and our page table entry size is two to the three, which means eight bytes. Well, it means that the number of entries we have that we can fit on a page is equal to two to the 12 divided by two to the three, which is equal to two to the nine. All right, yeah, two to the three bits is a byte. So, that's two to the three bytes because the page size is also bytes.  Oh, yeah. So, this keeps the number of entries the same. So, when we had that big, large page table to translate a single address, how big did our page table need to be? Yeah, so, before it went with one big page table, that one big page table is a gigabyte, even if you just need to translate a single address. In this case, if I need to translate a single address, I only need one L2 page table, which is a page big. Then I need one L1 page table, which is a page big. I need one L0 table, which is a page big. So, that would be 12 kilobytes instead of one gigabyte. Yeah, so, inside the page table is just the same page table entry. And in the page table entry, that has the 44 bits, right? Because the page table entry is 64 bits, so it's big enough. So, yeah, yep, what works? So, we're shrinking, each of these page tables is way smaller. So, each of these is only a page. So, the only thing we're saving is space if we don't have to do a lot of translations in a program. So, in the worst case, it's actually waste more space on page tables. But we're going for the common case, which is most programs do not use all the address space, right? So, in here, in order to translate a single address, we only need one L2 page table to point to one L1 page table to point to one L0 page table. So, we only need three pages to translate an address. So, that is 12 kilobytes instead of one gigabyte. So, in the worst case, we would have one L2 page table pointing to two of the nine L1 page tables if we wanted to use everything, and that would also point to two of the nine L0 page tables, and then each L0 page table would point to two of the nine, and you'd actually waste more space than a gigabyte, slightly more. But the case we're trying to optimize for is most programs. Most programs do not use 512 gigabytes. All right, any other questions? Because we're going over this all day, yep. Oh, that is a good question. How much slower would the lookup be? Yeah, so, how slow is this? So, in order to, whoops, in order to access memory, how many times do I have to access the page table to actually find my address here? Once, right? I just look it up so I need, instead of like, if I was just using raw memory, I would just have one memory access I actually cared about. For this, I need to look it up in the page table, which is one memory access, and then do my original one. So I'm making it twice as slow over not having one, and then in this case, yeah, you're right, this is way worse. So, in order to translate a single address, I have to have a memory access in L2, and then I have a memory access in L1, then I have a memory access in L0, and then I have my original memory access, so I have four memory accesses. So we'll address that next time, but the solution is your solution, just put a cache in front of it, but we'll see that later. All right, any other questions? All right, then we will just hammer this home. So, the reason why it does this too is page allocation. If you have fixed size blocks of memory or pages, writing a memory allocator is dead simple, it's just a link list. So, whenever your computer boots up, the kernel can just divide all the memory into pages so that everything is nice and aligned and starts at address zero and everything, and the operating system just treats them as pages and can create a link list of all the pages. So, initially, every page would just point to the next page over and over again because you're not using any memory at the beginning. And then, whenever you want to allocate memory, one page is just as good as any other page, so you can just take the next pointer in the free list, that's just a link list, get it from the head, nice and easy, and if someone deallocates a page, it's the same thing, it's not used anymore, you could put it at the beginning of the free list and you can reuse it again. So, allocation becomes dead simple once we have pages, we don't have to have some complicated memory management, anything like that that we'll talk about later. So, dead simple once everything's the same size. So, and yeah, this was our insight, is just to use a page for each smaller page table, it saves us a lot of hassle because you know where everything is on a page, if it fits on a page, everything is the same, it's nice and uniform, you don't have to argue about different page boundaries or figuring out how big a page table is if it was dynamically resized or something like that, you just grab another page, it's nice and easy. So, some people get tripped up on like the size of page tables, it's really easy if you just think of it as an array, so I assume you could do this, so if I gave you an integer array of 512 elements, can anyone tell me how big that is in bytes? 512 times eight, next? 512 bytes? 256, 256 bytes? How big is an int? Yeah, an int is four bytes, so what is four times 512? Yeah, 2048, so this is just 2048 bytes. So, one question might be also, well, what's the offset of index two? So offset, remember, is just the number of bytes from the beginning, so at index zero, well, the offset is zero, it's at the beginning of the array, and in this case, since every element is four bytes, they're divisible by four, so it'd be like zero, four, eight, da, da, da, da. So at two, that would just be two times four, so it should be at index eight. So, it's the same thing for page tables, just substitute an int for page table entry. So this would be something you're always given in a question, if you're not given it, a good number, it's eight bytes. So, by default on your system, it's eight bytes right now. So, if the page table entry was eight bytes, and our page, then we had 512 elements, it's the same idea, how big would that be? Well, now it's eight times 512, so it'd be 4096, which is, guess what, the size of a page, everything makes sense, right? So, you should also double check these numbers, so page size was 4026, which is the size of the page table I got, and remember the size of the page table, it's just the number of things in it, or number of entries, times the size of the page table entry. So, all these numbers should be consistent, if something doesn't jive, you have screwed up, there's lots of ways to double check your answer. All right, let's translate a fun address then. So, say we have, let's just write it out. All right, so say we have some crazy address, we'll have the address in hex, three f f f f zero zero eight, zero zero eight, and we will assume that we only have one hex, like two levels of page tables, so we have an L one that points to an L zero, and then in the L zero, that's where our actual lookup is. So, if we take our address here, and then divide it up, well, it should be something like, we have 12 bits for the offset, and then it's gonna be the same scheme, our page table entry size is eight bytes, and our page size is at four kilobytes. So here, if we write it out, we have nine, we have nine bits for our L zero, which doesn't nicely go in there, so I have to write in binary, and then nine bits for my L one. So, because it's the same thing when we're translating the address, this part, whoops, so this part is the offset, I can just, it's 12 bytes or 12 bits, so I can just keep it in hex, I don't have to translate it, it stays the same. The rest of it, to figure out what indexes I need to use, unfortunately, I have to do something like I have to put in binary, which for this, luckily enough, everything is just a bunch of ones, so one, one, one, one, one, one, one, one, one, one, one. So, if we write it all out, this is our L zero index, this is our L one index. So, if you have nine bits and they are all ones, and you want to bring it to decimal just so that we can, I don't know, talk about it like actual humans, then this is the same as 512, so that's just 512 in decimal. So, in order to translate this address, you would need our root page table in like an SAP register, something like that, and it would just say the physical page number of wherever the L, in this case, there's only two levels of page tables, so it would say where the L one page table is. So, it would say something like, I don't know, say it's at physical page number seven. So, if it's at physical page number seven, that means our fancy L one page table here, it means it starts at address 7000, zero, zero, zero, because that would be the beginning of a page, and it would go to address 70FFF. So, you don't need to tell where to go because it fits on a page, it has 512 indexes, so it uses the entire page. And to double check, if you do that math, whoops, if you figure out what this address range is, well, you know, it's 10000 in hex, which guess what, is 4096. So, everything kind of makes sense. So, in order to translate this address, there would have to be an entry in this L one page table at index 511. So, at 511, there would need to be a page table entry, I'll put some columns here like the physical page number, and then like a valid bit or something like that. So, in this entry, the physical page number could be something like 08, and it would have a valid bit, which means it can actually use it. So, in that case, what address do I go to to access my L zero page table? Yeah, so, because my physical page number is eight, it means it would start at address 80000, because it fills up a whole page and it goes to address 8FFF. So, my L zero page table would be there. And this way, it makes it flexible. It didn't have to be right beside it, right? And question, oh, could I go over how I drew this page table? So, I just draw the page table that every row inside of it is a page table entry, and I just write the index outside of it because it's not stored in it, just to the left. So, I just show what the index is, and then each row in this page table is a page table entry. So, in this, in order to translate this address, there would need to be something at 512, and then it could have a physical page number of something like C-A-F-E with the valid bit, in which case, if that is what is there, then I could translate the address. So, I keep the offset the same, so my physical, so my physical address, well, I would keep the offset the same. The offset is 008, and the physical page number just comes from the L zero page table, whatever the entry is. So, my physical address would be C-A-F-E-008, and that would be my physical address. So, any questions about that translation? So, we found what entry that is from the L one part, from the L one index of that address. So, it was the same thing here except we didn't have an L two. So, we had a 30-bit address, so we only had up to L one here, but you can see how this gets extended. So, you could have a 30-bit address, that's one, if we add another page table on top of it's 39, then the next extension is if we have four levels of page tables, well, the next size of virtual address space we can have is 48 bits. So, we just add another level on. Yeah, and then we have a question, what happens if V is zero? So, V is zero, which is the valid bit. It means this entry is not valid, so that's when you would get a page fault or you can't access the memory, your process. If you guess a random address in your program and try and dereference it or something like that, you're gonna get a seg fault, which segmentations don't exist, but basically just a memory fault, you're accessing memory you're not allowed to have. So, that would just, by default, if there's no valid entries it'll just be zero and it'll just fail the translation and your program will probably die. All right, any more questions about that? Okay, we can translate a address. That was two levels, doing it another time isn't too bad and doing it a fourth time, not too bad. So, in this case, the savings aren't that big if we had a single, like, if we had a 30-bit virtual address and we just had one giant page table, well, then we wouldn't split it off, we would have two of the 18 entries. So, that would be two of the 18 entries if we just had a giant page table and then each of our entries are eight bytes. So, in total, we would need a two-megabyte, you can make up numbers, that should work, yeah. Okay, so that was only two page tables, nice and small and that's it. So, we can have an example that we can play with and we can understand, so we can play around with stuff to see and this will be closer to lab three. So, any questions at all?  So initially your L zero page table, if there's no valid mapping, it would just be full of invalid entries and then if the MMU tried to translate it, it just wouldn't translate it, right? Yeah, so if, here we go. So, it would look something like this, right? So our L one page table, these are all the entries, it would have a single entry that points to an L zero page table and then here it would have 512 entries and eventually if this all fills up, well then we have to put a new entry here that points to a new L zero page table, whoops, and then it can hold more entries, right? And go on and on and on and then of course I could have, whoops, I could have two of the nine of these, I could point to two of the nine L zero page tables. Yeah, yeah, to translate a single address, I just need one L zero page table. So, if I had to translate two addresses, it could be like you said and they're beside each other and that would be nice because I wouldn't need an L zero page table. You could also get insanely unlucky because it just depends what the indexes are, right? So, I could craft it such that for two addresses they correspond to two different entries in the L one page table, in which case to translate them, I would need two L zero page tables because they don't correspond to the same one, right? Yeah, no, so it would just, so like the indexes just need to line up and your operating system, if that's a valid address, just has to make sure that it can follow the page tables until that address is valid. So here, we can do an example too. So we have a little simulator and guess what? That's what lab three is anyway, so we may as well see it. So, in this case, let's make this bigger.  So, this is a pointer to a 64-bit entry so the page tables, they're just 64-bit numbers, 8-bit numbers correspond to the page table entry. So, here I create a new L2 page table and then the MMU, the only thing it needs to start off the translation is it needs a root page table which would be an L2 page table if I have three levels. So, if I have three levels, I have to tell the MMU what my root page table is so it can start off using that for the translation then pass that, it just follows the levels until it translates the address. So, I tell it what it is, then I create an L1 page table and then here at index zero of my L2 page table, I create a page table entry to essentially point to that L1 page table. So, this is, and this macro just plays with the bits in order to get essentially extract out the physical page number from that address and does that for you. Then here I have to create a L0 page table or an L, yeah, an L0 page table and then in my L1 page table, I just pick index five because I felt like it and I make it point to an L0 page table. Then the L0 page table, I create something at index 188 and then this is where I put in the physical page number directly. So, it doesn't play with, you know, doesn't assume that that address is a page, it just uses it directly. So, yeah, and then another question, do programs fill by row or randomly anywhere? So, ideally if the addresses are right next to each other, that would correspond to addresses that are sequential, right? The pages would be the same, so they would be next to each other in the L0 page table, which is good because we wouldn't be making a bunch of page tables if we don't want to, right? So, that would be good. So, in this case I'm going to translate two virtual addresses. I don't know why that looks weird. Okay, my shell dined, cool. So, if I do that, I get a valid translation and I get the page fault, which just means that it couldn't translate the addresses. Yep. No, so those are little helper functions. So, you'll have the same ones available to you in lab three. Yeah, I wrote them. It's essentially simulating that free list thing, although it just asks the kernel for memory. So, the kernel doesn't. All right, so, can we figure out why this translated properly and this address did not translate properly? Yeah, yeah, well, let's see. So, if I were to translate the address A, B, C, D, E, F, that's as far as I know my alphabet. Thankfully, I work with computers, so I don't need to know any more than that. So, if we had this address A, B, C, D, E, F, and we had three levels of page tables, well, it would correspond to the same thing, right? We have, in my virtual address, I would have nine bits for L2, that index, nine bits for L1, nine bits for L0, and then my offset is going to be 12 bits. So, again, I do not have to translate D, E, F, and then for the rest of it, I can just write it out in binary because that's the thing we have to do now. So, what's A in binary? Do we remember our shortcut from last time? Yeah? One, zero, one, zero, 10, 10. All right, so A is one, zero, one, zero. Do we know what B is? Can we add one to it? One, zero, one, one. And then adding one to that again, one, one, zero, zero. So, that is A, B, C in binary, and then I have to group it in groups of nines. So, that's four, that's eight, and this is nine. So, and then, of course, there's a bunch of leading zeros all over the place. So, in this case, what would my L2 index be? Zero. What would my L1 index be? Five. What would my L0 index be? 188, hopefully. Well, it worked, so it must have been that. So, that's why that address translated successfully, because given a virtual address, I know what entries I need to make valid in order for it to translate correctly. So, my L0 page table, that's where the MMU, like that was given to the MMU, and then how the MMU translated, it looked for entry zero in the L2 page table. So, entry zero points to L1, and then in L1, given this, it would have looked at index five to find the L0 page table. So, it pointed to this page table, and then at 188, mercifully, it had an entry, so that's why I was able to translate it. All right, well, what about if I wanted to do, let's do a brain buster. So, what happens if I put an entry to there? So, what address would I need to have to use that? Yeah, instead of A, B, C at the beginning, it should just be A, B, D. All right, I'm just increasing it by one, same as going to the next index, same thing. So, if I do that, hey, I get two different addresses that correspond to the same physical address, which is fun, isn't that fun? Yeah, isn't that a problem? That is a good question. Is it a problem for you? Yeah, it's sometimes a problem, but sometimes this is useful. So, you can ask the kernel nicely to do this in two different processes and you can share memory between them and then communicate like that, which is pretty fast. There are other reasons to do this, even though you might think it's a bad idea now, but if you get into research or like you get a job where you have to be a wizard, this could be useful. So, we'll figure out ways to play with this, but any questions about this? Cause this is fun, right? Yeah. Yeah, the fives it index at L1. So, if I just go backwards, this is my L0 index, this is my L1 index, and this is my L2 index. So, the offset is just where you are within a page, right? So, you don't have to translate it because it's gonna be the same. And I don't need an offset or anything when I'm pointing to the next page table because it always starts at the zero boundary and it fits exactly on a page. So, if I need to index something, I know where to go, I don't need an offset. My index is given to me by the virtual address, and then if I know the page entry size, I know where to access memory to find it. Yeah. Yeah, so that's the question. So, here we're given a virtual address and then the question might be, well, how does it figure out what virtual address you need to start anyways? So, if we remember back in lecture two when I made that example, you hard-code the address. So, I had a starting address there, and if you remember, I told you I just picked this for no reason. So, I picked it for no reason. That was true because it's a virtual address and then it's the kernel's job to map it for me. So, the kernel figures it out for me. So, yeah, you having the problem of given a virtual address, you need to figure out which page table you have to figure out the page tables and get memory for, that's the kernel's problem. So, a lot of your programs will just, like your global variables, minus some compiler options will basically, the compiler will just pick a virtual address for you and then the kernel has to figure it out. So, this is how it works and you can do lots of fun tricks with virtual memory that we'll see later too because, hey, you can just arbitrarily map things to whatever you want. All right, any other questions? Yeah. Oh, so the, oh, so here, so this part is like the offset. So, I don't need to translate that, I don't need to do anything with that, right? Then here, I just wrote eight. So, up to here, this is A, B, C in hex, right? And then above that, it's just like if we were doing numbers in decimal or whatever, there's implied leading zeros there. So, in this case, it's like a whole 39 bits. So, it would be like a bunch of zeros. Everything else would be a zero, right? It's just, I skipped a few numbers. So, it's just leading zeros, everything would be a zero just by default. Oh, yeah, so I just shortened it. So, this would, technically, if I wasn't as lazy as I was, this should be zero, one, two, three, one, two, three. So, I was just, yeah, nine bits and then this would be nine zeros. I just don't wanna write nine zeros. All right, any other questions? All right, well, lab three is you're essentially copying what is going to happen on a fork. So, if a fork happens, well, if you just copy all the memory, you have to copy the page tables and then for every bit of memory it's pointing to, you have to copy the page and make it point to a new page and then copy all the memory. So, in order to implement a fork, copy all the page tables and for every entry, you point out a new address and then make the two pages the same and then they're the exact same as the fork but independent, same virtual addresses, same everything. Different physical addresses, lots of fun. So, good. Ish, I see concerned faces, I see ish faces, I see whatever. All right, well, we have time left over so, well, we don't have that much time but start working on the lab as questions. So, this lab is mostly figuring out what the hell is going on and the actual code you have to write isn't that bad, this one's more thinking. So, don't worry about whatever the hell happened in lab two, you get to revisit that pain again in lab four. So, yeah, we also, we haven't hit the hard part of the course yet, we're like, this is, at least in my experience, the second hardest thing. Yeah, no, but you can come talk to me about them or whatever if your thing doesn't work or I can spend, yeah, I can't post them because I have to reuse them and it's a thing. Yeah, I can do something with it. I can either just answer questions of people or just do a non-recorded thing where I just go through it. I don't care. All right, cool, just remember, pulling for you, we're all in this together.