It's been a while long times.  You know what man? I know Sykes before Sykes with Sykes I know him before he's his big trader guy persona.  He's a really nice guy But then he became famous because he created his alter ego You know it was this douchebag guy and it worked It worked dude. He he became a very big big guy.  That was by design his personality is by design Oh flip the camera.  He built a couple hundred schools around the world special Asia, so I I might M. I see actually might build schools along with that M. I see actually donated some money To his cause which is the Afghanistan. So go to the Tim Sykes Karma Walga, whatever and how you pronounce it And donate for a good cause guys as much as you guys may hate Tim Sykes He's the guy that got most of you guys into the game. You know I'm saying marketing wise He got you guys thinking about trading and so that's how you end up in my seat a lot of the students from From Sykes program goes in my seat, too.  Why is he so why people know him instead of us, right? And so a lot of the times guys is you know, it's kind of jealousy Envy whatever you want to call it, you know, I'm a big enough man to admit that, you know I was wrong about him back in the day Just like a lot of people have been wrong about me and M. I see and Alex and all that So, you know that I've been friends with him before the persona that he blew up and then I realized that that was just his persona That's not his real thing, right?  Oh, that is what I do to teach you guys because you know It helps me exercise.  So that's my online persona. When you look at me, you know, oh, this this guy drinks a lot He parsed a lot. Maybe I do maybe I don't but the point is if I could do it guys, you guys can do it, right?  It was just me trying to help him because I used to be his friend And he I thought he kind of went the wrong path. And so now he came back to the right path You know, and so it all worked man. That's how friendships happen You all fight with siblings brother sisters, but then at the end of the day, you're still brothers and sisters, right? So that's Sykes man Tim's gonna be my friend forever Because I know his true self. He's one of the most generous guys in the world man He set up a car for me to go to post a tunnel He laid out the red carpet. The house was amazing. He paid for it. What can you say about the guy, right? So look past what you want.  So it doesn't matter Bottom line is this okay when it starts there.  Where's my hat? Yeah, as I was away from vacation Damn, this is ugly. It's gonna see me, right when I was with you on vacation. I Had so much formal guys. So what I did was this I actually did quite well I traded three days on vacation three days. I Made three thousand dollars each day Walk around just like this in Paris. You saw me. I posted on that.  I mean my phone You know what I did I use Alex's watch list once again because I'm lazy, dude. I mean I should be around vacation. So I don't know what the hell's going on So I'm actually so Alex at least each day in his watch list along with Tom diesel some other moderators They're watching this basically they tell in detail The plays that they're looking at so they scour all the scanners for you And so I'd use that as a cheat code right a cheat sheet And so I'm like, okay, these are the players that are happening I'm gonna pick the place I like and they're gonna trade them and I did one thing further guys I eliminated the day one place. I stuck to the highest probability Place which is for short trading is called a low-hanging fruit. That's what we created We actually created this strategy called the low-hanging fruit It's a day to continuation breakdown kind of play and so that's all I did because I don't want any stress day was you can get trapped You can trade day ones perfectly, but then if you overstay and if you're on the mobile phone And something happens your Wi-Fi which happens all the time when in Paris goes dead, right? I can get squeeze But the highest probability for a low-hanging fruit. I'm telling you like 90 something percent But when it doesn't work, I stopped out so I stuck to the low-hanging fruit I made three thousand dollars each and every day walking The streets of Paris guys Think about this. I made nine thousand dollars During the three days. I was in Paris 9,000 bucks guys That paid for the vacation You know So I was very blessed and the reason I'm able to do that is I've been doing this for a long time we share and we The strategies that I use strategies that Alex uses The members learn and all I'm doing is I'm pulling up the watch list I'm seeing what the low-hanging fruits are and I'm avoiding day one place and I'm making three thousand dollars a day guys placing fantasy orders on my phone and then when they fill placing the covers You can also use OCO orders So you don't have to check your phone at all the OCO to order we talk about the conditional trigger order where it says if you feel You're gonna just do this at the entry price The stop price and the exit for profit price all in one order. It's called OCO. We talk about this We teach this it's called trigger OCO order. We have videos on this in our video library People can claim they have the largest library in the world, but without search. It's useless We actually have a search on our video library. So if you want to learn about OCO orders trigger orders, whatever you Go search that up. Okay. So while it's on vacation think about this man. I mean 9,000 bucks Trace both sides. I'm also in the big size.  So can you do that?  And so I limited all the risky place I did only the low hanging fruit shorts You can make a living off of that. I think about this. I made $3,000 every day Well, I was there three days. I was there make $9,000 guys trading the plays that people forget The the plays I played it was not the ones are on scanner These are the low hanging fruit that broke down for the day before and we have this part of our watch list guys We teach you how to trade these so if you want to trade one set up If you are short by starting you want to trade one short setup It is the low hanging fruit that M. I see teaches guys And it's like dude, I was so I'm you know when you make money that easy guys Seriously, be honest.    I'd be nervous wreck. I would not have enjoyed my vacation So I walked around me to grab I made that within the first 15 minutes of each day first hour of each day And I'm just walking around. I'm not even refreshing my phone because the low hanging fruit I'm so confident because I put a stop loss out there right so you can put a stop loss out there as well, so How do you currently use hard stuff? We have videos on how to properly take a stop. Like you guys you guys have no idea you join M.   I don't use those obvious stops I use time based off says one. That's one thing that no one talks about time based stops We talked about them another thing is you can see percentage or whatever So the common thing that people do is okay if it's bricks if it breaks the seven dollar line I'm gonna take a stop loss. So what happens is the algo goes hits you similar to it comes back down.  But so we talked about this guy's you guys do not be cheap at Alex. We still have that cell for 99 bucks Alex likes putting the cell I don't I don't want to devalue and my seat But you know, I've had people don't believe that M. I see works guys already my seat does M. I see work Does the process work here in the M. I see every day tell everybody that's not in the M. I see How am I see it? So, you know people think oh, there's no way about mixed money. There's no way out to make money. I Not gonna wait.  I made three days of three thousand profit, you know today I came backs and I made money and the scary thing Alex we sell the cell 99 dollars go to our website guys sign up for the 99 bucks before it's too late Because when that site is gone, maybe we're gonna change our race because Alex wants to raise race because it's kind of pissed off You know, like we do so much work and no one appreciates it. Seriously. I mean I am even on vacation I'll go on vacation. I mean in my seat chat on my phone on my slack You can ask the M. I see guys. I'm answering DMs on my vacation.  You know what a million dollars a year is $4,000 a day $4,000 a day That's it man.  You keep your day job.  So we picked the easiest stocks to trade It's never easy. I'm talking about easier trades easiest trades of the hard bunch and that's why different in Paris Right, so I walked around click the few buttons and made money Um Zombie rule saved us from SPRT. I posted that in Twitter take a look at my charge on Twitter I covered it right at 10 30 zombie rule and from 10 30 right on so zombie rule helps short sellers Avoid being squeezed like SPRT as well as it helps long-bites traders make money guys If you're a long-bites trader do zombie hour is your hour SPRT I even told the guys when I covered I posted a charge This is gonna zombie, you know, I didn't go long. I'm not the best trade in the world.   I don't need to make 10 million being stressed out So and then when I come back from trading guys, it's very important because I today man, I find had good sleep I was jet lag and I woke up like oh my god. I want to trade.   That is the remedy for most Traders that are inconsistent because they First of all, they don't know what a stop-loss is don't use risk management They wait don't wait for the lines, but one of the key things is size downs guys Well, you have problems size down and why do you risk? Let me see what else I want to bring on a oh, yeah one last thing man There's a lot of people that are having difficulties in this market Last year when there was a pandemic Soxies went up and up and up and up people thought I was gonna go down there's short squeezes So you just make mistakes break rules and get away from it.  They used to be so arrogant I'm the best. We the best. Why are you in my room?  I'm a thousand percent win rate. Whatever the hell it may be right and then boom Night and day. Oh my god. It's manipulation. There's algo.    All I can do is a layup Nothing else. No free throws. No three-pointer.     I'm the best. I'm the best join my service I'm you see how many how many fake traders Started a service last year because I have one good year or one good month.  It's me the 12 year bull market run wait until The bear market comes I've been there man I see a lot of motherfuckers because of the dot-com when everything went up They thought they were great.  How many guys are still alive and still doing this? Not many me one of them, you know during these giant runs It's not my style to make tens of million in one year.  You know man I make more money.   I'm good enough, right?         Oh, oh, oh The algos the algos the algos manipulation it's it won't bounce. No shit won't bounce donkey You have no risk management You think Doc should do what you think it does you would be a billionaire by now Why is it that your best year is in the year of the pandemic where it was a layup? think about this I Made money through the toughest markets in the world and I'm still here These guys make money in the easiest markets in the world And then they cry when it doesn't do whether Man, I don't know why you guys paid these fuckers man. Seriously.        They have money.  They're ruining the lives of so many so many. Oh Man my hair nasty They're ruining the lives of so many people and then we have to fix it.    Can you have free?  Where are you Steve? Alex we sell the 99 dollars.   They're busy.  Take a look at what you spent today on this month guys.    I love it Steve. Where are you man? I? Want to tell the amazing story of Steve? Steve Steve is he okay? Watch it. Okay. I see it Steve They they they grouped it with some other guy. Okay, Steve Travel guy. There we go Go, Sam request. I'm gonna I'm gonna tell you who Steve is okay before he comes on Hey, welcome before you talk.    I actually know Steve from back in the day, but it was not corny. I swear this is all I'm like holy shit, you know and Steve I remember Steve from a long time ago.     I think we he was on IG live to and then I mean, it was not overnight.  This guy went from To learning and the reason we made him a junior moderators not because he came consistent and good trader It's because he started to help so many members. I'm like, dude, this guy's a good guy.  He's living his dream.  I gotta hold on for the years to congratulate something that and so So so now he went so now I wanted to I talked about that dude this this guy needs a promotion So, I mean, this is not a corporation actually where he's making thousands of dollars 100s of thousands of dollars a year This is more of like a ceremonial thing And uh, he's gonna be trading for the rest of his life now see if you are all your way to trade for the rest of your life We are promoting you to a full flow moderator, man. So congratulations. Wow. We love you. Thank you. Thank you brother. Yeah So so so uh, tell tell them what what's going on. So tell them about yourself and awesome And what you do and all that says go sure. Well, first of all, I really appreciate that I I appreciate you guys to support My passion is obviously traveling Uh trading and I love helping people. So this is like a perfect fit for me I want to get to more countries do more meetups I really want to meet more of these members and do fun stuff and cool stuff and I'm really excited And I really appreciate the promotion. It's just awesome Um, so right now I'm in Marcos got Croatia. Here's the view for my balcony It's a beautiful coastal town If you've never been to Croatia, I really recommend it. It's just amazing Um, this weekend I'm planning a trip. I'm going to spain Not sure where pama visa Alcantar, maybe I'm I'm really not sure yet, but I'm I'm going to book the ticket today or tomorrow. So yeah, I travel funded by your trading Sorry, oh, yeah, so I I basically like I quit my we did a youtube interview about this like, uh, I don't know A while back, but I quit my job a couple years ago. I left the us I kind of had enough of the rat race and I'm like, man, I'm just gonna like You know do follow my passion. I love trading and traveling. I'm just going to follow it So I just left the country and I've been doing it ever since And I found a home at him in my seat Like I said, I brought a lot of bad habits But after so many charts with EMAs and bow and all the guys are slapping me.  I mean You know, it's just it's life changing. M. I see is the best thing that one of the best things that ever happened to me I mean, it's just let me ask you where where I've never asked you this. So like today. Are you green today? Oh, yeah, you're green yesterday Uh, yeah, I think I had a red day.  Um, I mean honestly, I I want to say like between one and three maybe four But like the way I really The thing that really helped me is not so much focusing like Profit, it's just like making good charts making good charts process. So it sounds yeah, like it sounds crazy But when I was focused and I mean taught me this like if you're if you need the money and you're focused on the money You're not gonna make much money So now like I do track I save all my charts I take a photo of my pnls and just to put it in the records And I go back to my charts and I study them later But really like I just try to trade well And and I tell new people all the time like when you come in and you say I need to make money I'm going to make so I'm like man. You got to slow down focus on your education first And money second because when people are focused on their money first They're not going to make money And I mean taught me that and it was a kick in the ass, but it's it's dead on true You need to focus on process and education and that's where mic comes in And if you think you could join for a month and learn everything and then go make money I mean you've really you got to dedicate yourself to mic and I keep saying this again and again And some people listen some people don't But you know monthly you could you could check it out.  You know it adds up quick Yeah, I mean when you don't have these big losing days and when you lose You know your days are not big either They're not big losing days because you have proper risk measures. I see that on your charts. Yes. Yes. Yeah, I keep I keep a max daily loss I've got a max daily shares. I've got stop losses I've got an auto liquidation For one stock versus a daily loss. I mean you that's smart, you know, it's all about risk management It's all about risk management without that.  I lost a month of work, right? Yeah, yeah, it's tough.  I take one step forward and three steps back So I beat it. I beat into all the members who's team including myself and newly alec risk management risk management max Daily loss No one teaches that except m-i-c and everyone else is revenge training revenge training They have million dollars of losses, right?   Because of one bad trade. So right, right? Yeah, my opinion, sorry go ahead good My opinion two things you need in trading and especially if you're new but you need it no matter what Education and risk management Yep, that's it. I mean people are like, what's the secret sauce? What you know, what do I do and that's it Education risk management. So that's the thing. So you've been doing this.  I call everyone's work straight, you know, I I don't know any single Yeah You Yeah, whatever but but but so Steve actually trade off a laptop Tell us about your laptop. Yeah. So like what I do is I've got here it is here. I've got a little laptop And what I do is I I don't want to carry a big setup when I travel So I htmi it into a tv And then I split screen it and then I could see everything there this place I'm only here a few days. So the tv is not so big But usually when I go to an airbnb I want to see like a big big tv and I usually pick that one How much of your rental today? So here's the thing like I Generally and people are usually surprised what I've been traveling around europe in the middle east for the last little over two years And I basically my monthly expenses are between two and three thousand bucks Now if I trade a lot but that's a lot though for over there Well, no, but that's like everything. I mean that's rent. That's food. That's like taxis Uber I mean if you could think of it, those are all my expenses dialed in Alcohol that's going out. That's dinners. I mean that's like everything now When I'm in some areas like turkey or eastern europe like not crecia, but nearby here Crecia is expensive, but I could spend even a thousand or 1500 a month So it really depends on where you were. I'm just saying like an average But I'll basically now so now you kind of stress free training because you know, yeah Only takes a few days to make your buck, you know, if you do it, right, right?  Keep it So I mean you're you're fucking living the dream that people want so this is the thing guys We always talk about you know, man supplement your income Steve right now is basically as a u.s citizen his supplement his income Which is no income to travel the world But I mean now but now that you're you're stacking now, right bro I mean you must be stacking now saving some money up and then You know, I yeah, so my savings actually I've got I left with about what I thought would be two years of Of uh, you know money to survive and I figured hey if I make it I make it If not, I'm gonna have an experience on my life, right? But right now my bank accounts have a little bit more than what I left No, including yeah, yeah, so you not only save money you are living your life, bro So I could probably survive out here if I stopped trading right now for another two three years maybe That's awesome, man So people ask like when you're coming back. I'm like, well, I'll come back to visit I don't know if I'm moving back So it's only been like what a year since you won the lifetime. Um, I don't remember. I think it was yeah less than a year Yeah, shit, man. So all that time You you you so tell us the real learn of learning curve. Okay, so the thing is steve has a worst learning curve It has to unlearn all the bad things about the bullshit. Yeah. Yeah, exactly. So talk about the what they can expect What can people expect to get from where you got? formal bad Experience if that happens all that to be where you are today You mean like how I got here or what changed so tell tell the people like if they were to join What can they expect in terms of time frame in terms of studying what they need to do So, okay, here's the so here. Okay. So here's my opinion if you join like fresh and you never belong to another service like Some services I think they're not so bad, but I keep hearing I got my foundation there, but couldn't get the next level.  Like it doesn't work You use it you use the I know because I so I had to learn all this stuff like in my sees process is really simple Like but the thing is people don't believe right?  No, they don't believe it and they want to keep you I see they send me charts with all these indicate. I'm like, why can't even see your chart? You gotta people think it's complicated because you're making money. It should be hard But when you over complicate things like the thing is scammy services They they oversell these indicators or they sell you the indicators because They want to make you think like it's easy if you just follow this a b and c you'll make money But it's not like that. You've got to learn a process. So when you join m. I see Fresh without any of that baggage Um, I don't know. I mean it depends on you, but I've seen people Start being consistent three months could be six months. I mean it could be a little bit longer But when you join with all these bad habits The quicker you dump your bad habits the quicker you'll get consistent in my opinion If you hold on to them for a year and just forget about it if you Can't use basic risk management and aren't dedicated your education Then honestly like I hate to like I hope this doesn't hurt, but just don't join them. I see it's it's just You're you're looking for pumps.  It's a thousand times easier than being a doctor But it still takes some work Yep, and the thing is man now now you learn a skill for life, bro Right and no one can take that from you. Yeah, you don't need you don't need To have to be pumped to you don't need to follow anybody You are now a self-sufficient trader can wake up This is the thing I love the most to power someone because this is the feeling I got when I became consistently profitable To be have I call like an x-man superpower to be able to make money, dude I'm serious. I wake up when I wake up in the morning.  What the hell's going on? You know, I don't know what's going on. I expect to make money. This is how good This is how good the process is, you know, you you don't make money all the time obviously But you don't wake up like before thinking Oh, I I don't know if I'm gonna make money gamble right gamble So so you actually now can go anywhere in the world with a laptop I'm not giving money, dude.  This isn't something that isn't accomplishable I mean, you could accomplish it. You just need to if it's your dream You just need to follow it you have to use You don't need to use the money to travel you could follow like whatever dreams you have I mean, even just supplemental income is great. Who doesn't want to make another 500 or grand or two a week Yep, I mean like That's like that's like changing money for most of them And and things you have to be realistic, right? These guys are being scammed by the lifestyle Services. Yeah, it was driving an embo. I mean so when they so I get guys that coming from these pump services And the first week they're complaining to me I'm like bow. I'm not consistent.  It's like they join they say where's lambo? Where's lambo? It's like bro, uh, it's been one week. You have not watched a single video All you're doing is gambling You know, I mean it doesn't work like that guys. You get what you put in so there's two ways to trade Actually, there's one way to trade that works, but uh The way is to learn edge key like Steve says edge key and risk management the other way I don't call a trade I call it gambling and that's the lambo. Yeah, the lambo expectation you extra. It's like being a doctor You know, I like dude we make more you can make more money trading within one hour Most doctors think okay, but doctors go to school for 12 years And you expect to become a doctor, you know by by what by reading a wikipedia one page Yeah, so you have Expectations so Steve, how long did it kick you tell people like real estate like Your your four experience and then the m-i-c experience and the game you really have it like months. How many well, yeah so so for me, I mean I traded like crypto and forex, I don't know I want to say You're in a half or two years. It's so embarrassing, right? But like six months I know yeah, I'm stubborn like I'm just stubborn. I'm it's just the problem for me It was a year. It wasn't stubborn. It would have been faster. It was me screaming.  Yeah, so probably yeah, like six months things got better probably a year I started like during the lot, you know pretty good. I mean something like that But like I said, I'm the most stubborn guy I mean even when I joined at first I was like, okay, but let me let me solidify this forex thing Once I can make money there. I could also make money here and just I'm like I need to learn from my mistakes Like I can't somebody can't tell me and I'll learn. I need to do it So it's good and it's bad That's because you're too smart man the smart people always think they know what they're doing So, you know, it takes a lot of The smarter you are bigger ego you have the longer it takes you to unlearn bad That's it. Yes, you know, like I still I still a lot of bad habits, bro So so so how long it takes you to unlearn them? Oh to unlearn it. I want to say A good six months. I mean I remember sending some charts to mean before he was a moderator And I would say like because I saw his trading was awesome and he would like give me some pointers and he's like, bro Don't send me any of these EMAs Take these off your charts and I'm like Is the exponential moving average by the way? Yes. Yeah It doesn't work for a style. So yeah, I mean if it works for you great, but for most I think it's just you know It clutters your screen. So EMA EMA is actually for longer term trading. Yes swing trades long term But we are not for stopping intraday intraday day trading EMA doesn't work swing trading it's yeah, they could use it for that It's great, but I was showing him scalping charts with the EMAs and all this crap and I mean He was blunt because he was like, bro, don't send me any charts with this stuff So I'm like, okay So I took it off But yeah, it took me a little while because I'm stubborn So six months you started to take it off and then how so so what so what happened once you took it off What did you start doing? How how'd you start? Yeah I I honestly just gave up on like the other stuff I learned and I started following the process I mean, it's sad to say but even six months into it. I was kind of like wait when this hits this EMA I'm gonna shore, you know, it was like Why don't you just follow the lines bro?  I didn't believe that it was that easy.  It cannot be this simple You know, it's like so my so I tell everybody small size tiny size do it repetition over and over until you believe it You know, so it's kind of like The thing with your kid, right? You touch the stove was You keep touching until you bring your whole Yeah Right, right, exactly Yeah, so now like I'm a thousand percent dedicated. They might see process I don't have any issues with with any of the old habits Um, the only thing that I learned before there was beneficial is like a little bit of volume Like understanding volume a little but honestly 99 of what I learned is all wasted time Just wasted waste because you because you know what man?  But for us we have the advantage. I mean Making a thousand dollars a dream for many people But make a thousand dollars if you notice man, this doesn't doesn't take that much size You know if you it adds up very quickly guys So so that's why these indicators it may work for you But that's why I don't use them because first of all the key the key to anything in life is simplicity You know, I was an engineer the best designs are not the over complicated designs.    What is your goal for trading? Like do you have plans to like how do you increase size? What is your goal to to get to the next step or to be honest? You don't need to get to the next step guys most people are happy making what they're making Don't get into this belief that you have to compete with anybody else except yourself You know, so go ahead. Yeah for me a lot of people might think it's strange, but I Like when you travel you're kind of a nomad you can't really Be attached to material things because like My car I I left it and my parents took over the payment and it's theirs now I mean, I I don't I can't like travel my most valuable possession is like my laptop, right? Like I don't have Anything valuable because that's the life I want to live right now. I want to travel and I want freedom So that being said keep it simple keep it simple and I I don't like a lot of stress I mean the reason I quit my job was to get away because I I used to develop real estate, right? I developed shopping malls and condos and hotels and I it's uh Fun, but stressful, right? So I wanted to get away from all that I wanted to simplify my life Honestly, I had some AFib, which is like a heart palpitations a couple years back And I said man, I got to get rid of the stress So they did a surgery they fixed it And I said man, I just need to like live my dream and have like as little stress as possible So for profit life life is short, man Yeah, like it's all about your freedom and enjoying your life as far as I'm concerned So for profits, I don't even have this crazy goal to make like a lot of money. I just want to bank Two to five grand a month. I could do whatever I want with that. I could put a little in savings I mean, even if I ever got to like a really high level of trading With skill, I probably won't even put a lot of size on because I just don't need the stress It's just it's based on your personality. Some guys could handle that stress well But I just need a little money to to just live my life five grand a month Maybe a little more You're a little money is a lot of money from mc Oh, right? Life is all about being it's perspective. So let me tell you my story So that when I was young dude, I was I want to make the most money bank bank bank bank And I actually went down in size I'm like Steve now.     So But uh So I I doubt sign it and so basically I'm trading to support my drinking habits or whatever it may be We should still line up like today I mean, I made somebody last weekend today, you know, so I mean my drinking habits are larger than most but uh I'm just joking about the drinking bit maybe but um, but you know, man, you trade to your own lifestyles There's no competition and that's the problem before because in trading you can never be the top You make a million dollars a day Million dollars a day every day You will be nothing compared to Steve Cohen who makes billions of a year, right? So so there is so I realized in life I mean, dude, I my biggest day. This was Jesus This is like almost 10 years ago. That's a lot of money 10 years ago. Okay, like 1.4 million one day four hours You imagine with inflation how much that would be back then right like three four million, right? So I mean nowadays it's so basically that that that actually was a One of the happiest of trading days, but also the saddest because I'm like now what I didn't mean it did not make me happy.   I was the richest of my life Making more money.    Yeah, you know, I mean you need a little bit more for sure, but like generally Yeah, so average, I mean That's that's what I'm trying to tell you guys man So when I'm looking at my P and L seriously when I make some days I make it so easy guys like you make five grand so easy, right? And I'm a five grand within 15 minutes.  I'm like, why can't I make 10? Why can't I make 20?    Um, and so I'm looking at these iPods, huh 150 bucks Eh, I'm like dude 150 dollars. That's my low-key bill. Yeah My commission's these days already like 500 800 dollars a day, right? And so I'm like but then in real life Hmm So that's why so the alice keep the section one dollars on his desk for that reason remind him But that's also because uh, some other reasons that he needs one But that's exactly what it is man, you have to follow yourself guys You know when I was making that much money back then I was looking at guys making more money.  That's what keeps you from blowing up, you know You have goals you have payments to you know my goal to make a thousand dollars So I can pay my payments this year whatever it may be right this month So when you make it lock it up things like that so But great any last advice see Yeah, I mean I do so like And I I say it all the time like to people i'm gaming or in main uh after hours, but here's the thing If you're struggling, I mean, there's no secret.  You are trying to reinvent the wheel the wheels already been invented It's it's and it's easy Yeah, it's simple not even simple yet the hardest thing is the mental right the mental The mental the risk management part that was probably my biggest struggle and and I struggled with that for a while Uh, it's not easy.  Sorry bad connection. Yeah Croatia, bro So so I showed so I told I was talking about Humans cannot be trusted man You have to put the broker checks in it's like having a seat belt and an airbag and a bumper in front of you If you want to go racing put on your seat belt I'm telling you that the seat belt won't work. You need an airbag and a bumper Yeah, so you need many forms of checks Right, so so Steve not only has tell us tell us all your your checks before we log off. Ah, so I've got uh max daily loss Auto liquidation and then I've got max loss per ticker Right, and that's a different amount. Yeah, so I can't lose more the next amount on one ticker Then I can't lose x amount in a day. It all auto liquidates me. Okay Uh second. I always use stops. Sorry That's good.  So I use the max shares. Yeah Yeah, I do that too. I have max shares on my account, so um You don't want to hit the wrong key. Yeah So how why is your max loss that how many days of losses? To So it's two for my max It's two for my max and it's like a little or around one for my each ticker That's smart, bro. That's smart. You see how he does it. Yeah on his worst days He does not want to give back more than two days of hard work And that's how you do it and not more than one day on one ticker. Yeah, if the ticker's not treating me right I'm done with it. You know what I mean? Like it's it can't hurt me that bad So that I just want to notice what steven. This is what changes Trading in my opinion.  You don't need to think you're so smart You need to humble yourself come in fresh learn everything you can dedicate yourself to my C Be in it for the long the long haul. I mean if you just join on a month I don't know what you're going to learn in the month. You got to dedicate yourself to the community Dedicate yourself to education risk management first p&l is later The more you focus on it before you know what you're doing the more you're going to get in trouble Yep, so all right. Thanks, Steve. We'll see you back in the room Appreciate you. Congrats. Congrats, man. You're now with the misc forever. So I appreciate it brother. Thank you very much. I appreciate you guys's support All right guys, thanks guys if you're on the fence give him misc a shot Yep, and we get in steve is probably the first guy to say hello to you. So that's that's why it's awesome. I am That's me Thank you. Thanks steve man.  I appreciate it brother. Thank you. Bye. All right. See you. All right guys. That's it We'll see you back in the room You heard it from the man progressive. He's he's one of the best human beings out there, man He helps everybody in misc seriously man. He's always happy. So He's living his dream and you guys can too. See you guys


Hey everyone, welcome back to another Python programming tutorial. We're still looking at the Npy screen module. In the last video we were checking out different kinds of forms. As you know, our Npy screen module works kind of with three different core objects and classes and things that we work with, which are the form objects, the application objects, and the widget objects. So we've got an application manager that manages all of our forms, forms that are what we kind of see on the screen, and of course the widgets that the things we interact with and work with on the screen. So we were looking at action form and split form. We were checking them out in a documentation and seeing the differences that they had from each other and from the normal form. Now the action form was interesting because it allowed us to create both an okay button as well as a cancel button, and we had these two nifty little functions that we could, there were pretty much callback functions that would interact with and they would run when the user pressed the okay button or the cancel button. So when we worked with this in our code, what we set it up was that just so we could visualize and see what button you had pressed, we had turned off the next form, next active form attribute, and so that way we would never exit the program really, but whenever we press the okay button, the first text box that we have up on our form here, that would display oh, the okay button was pressed. If we press the cancel button, the second text box that was displayed in reform would say oh, the cancel button was pressed. So that's how it worked, and this is it when we actually run the code. Like if I hit the cancel button, you can see cancel button is pressed down there, and if I hit the okay button, okay button is pressed up there. But the thing is normally these will exit our program. They will exit the form, and if we don't have any next active form set, then we'd kind of stop executing the program. We'd be all done with the code. But since we've turned this off, that was just for learning purposes, of course. We never actually want to leave the user stuck at this infinitely running program. So we have to control C to get out of it, and in this video I want to use this as an interesting segue to talk about notification messages and dialogue pop-ups, and that sort of thing within end-py screen. So I'm going to use action form as a way to kind of take advantage of that. I'm going to save this as a new file 08.py. You notice that I've already kind of gotten started with it, so I'm going to replace that. And in our documentation, right up here at the top of the link, it's actually, it's pretty far long in the documentation, but URL is messages.html. So I'm going to fire up that, and I'll get us back to where we were, hopefully. Good enough. Hope you guys don't mind seeing that gray bar up the top. It's whatever. So yeah, these are the functions that allow us to kind of display brief messages and choices. So these functions do just that. There's a big long list of them, and we'll kind of walk through each of them, but you'll notice that a lot of them have a ton of optional arguments here. Typically, they all have a default value, so we normally don't have to worry about them, but I want you to know that they exist and you have the capability to change them if you so desire. So, okay, this first function, notify, is really simple. All it does is it displays a message on the screen. Now it does not block and the user cannot interact with it. So you can use it to display message like please wait while other things are happening. So if we use this as a small little message box in our on okay and on cancel functions, it tells us that this function doesn't block and the user can interact with it. Now the fact that it doesn't block, I mean that it's going to go right on to the next line of code immediately after this is run. So since we've pressed the okay button and by default the okay's button functionality will go to the next screen. It'll exit the current form. It'll just go on to the next form. We actually have to turn that back on remember. So re-uncomment what we had up here in our after editing function for the form object. So let's go back to our notify function though. The message is of course the first argument that we need and that's the string that it's actually kind of displaying and the title is going to be the title of it. The other arguments for like form color will get into colors real real soon. There is wrap if the text in the message will wrap around if it's too long for a single line and wide which I'm wondering if there's any description for. I think wide would mean that it would take up the entirety of the screen. Let's actually take a look at it and see what it does. So I'm going to supply the title to be okay button and And We'll copy and paste that same functionality for the cancel button. I'll remove these small comments But remember like I was saying since this does not block If I press one of these buttons You'll see oh, hey the okay button was pressed I can see that message up there and we can see this like kind of blue box acting as our message box But I'm way back at my terminal prompt like The program exited I wasn't able to see that box for real so What else can we do with it actually? Yeah, I'll look at the wide tag on this next one or notify wait Notify wait is another function that displays the message on the screen and then blocks for a brief amount of time So the user still can't interact with it, but it's just going to display it out on the screen Let's try and change these functions to that notify wait and notify wait Now when I run this I hit the cancel button and says the cancel button was pressed You see there's no buttons here, and hey it closes the program after a Brief moment of time. I think it was what three seconds Yeah, and we can interact with it. There's no button there, but it's just a notification message. Okay What's next? Oh Let's actually let's take a look at that wide function that wide argument wide tag so Since these are keyword arguments or at least to have a default we can it jump to that just by entering wide equals true Rather than having to have to enter all of these default variables Yes, I think it'll work with that functionality. Let's see Yeah, okay, so wide will fill up the entire width of the screen Nice Now you know knowing is half the battle According to GI Joe Notify confirm this is very simple It'll display a message and the okay button the user can scroll through the message if needed edit w I would assume this is edit widget that is a is a command line argument Oh, sorry not a command line argument But an argument to the function that controls which widget is immediately selected when the dialogue is displayed So zero there aren't any widgets that it can kind of look at but if you set it to one and the okay button will already be Active it'll already be focused on when the message pops up. So I'll show you what this looks like in the code Simple we'll just change our function name to notify confirm and now this will block infinitely until we press that okay button right so you can see the okay button is right down here at the bottom right corner if I hit enter okay is now in focus It's have probably would have done the same thing doesn't really matter as long as you're interacting with the form now I'd enter again now we exit of our program because uh All that really did for us was kind of confirmed that we read it Hence to notify confirm Now if we said edit w To one Like it told us in the documentation by default Okay, we'll already be highlighted See now okay is already in focus. I just have to hit enter once now so that's kind of handy if You know you kind of want your users to be able to breeze through things What else have we got notify okay cancel this one is good because it has a similar functionality as the action form and That it just displays okay as well as cancel But you can kind of do a little bit of logic testing here because it'll return true if you press okay And it'll say false if the user selected cancel so We can we can play with that right? What is that notify okay cancel is the name of the function see now? We got those two options and Is edit w in there yeah edit w is I kind of wonder which numbers for to what edit w One might be the okay button No, it's cancel And then edit w probably to We'll refer to The okay, but nice So it probably goes like from left to right in the order of the buttons being displayed so that's a good thing to know and Yes, and no has the same sort of functionality except yes and no and they'll return true or false depending on what you answer So those are the ones that I want to talk about now. I also kind of want to show you A little bit more. I guess we can do some of that logic testing So we can notify confirm that say Form has been saved if you hit the okay button and let's do notify. Yes. No Are you sure you want to cancel so since this will return? Yes, or no So if exiting Then we'll say I want to say We can notify Form has not been saved and the title can be Or something and then we can do else So if they say no, I'm curious how we can get back to our Original form without having to have to actually exit the form exit the form. Can we do that? I'm kind of curious if we can Set the next form rather than doing it in the after editing function. We can do it in our okay Which means that okay? Yeah, we do want to exit we have saved it the form but if we say and Then we can do it down here as well So if we are exiting if not, then we'll notify confirm like you may continue working and then Hopefully It'll let you stay in the form. Let's let's try it. Let's check it out Zero eight. My name is John Hammon, so if I say okay form has been saved Okay, and then we exit of the program cool if I say John then I cancel Are you sure I want to cancel and if I say? Yes, then it says okay form is not been saved. Goodbye.  That's kind of nice So the way that I got that to work was because The set next form has only been set when we actually okay out of it or cancel out of it So that's when we actually want to exit the program So I took it out of the after editing function from our form object and just kind of set up that Functionality instead in the on okay or on cancel function calls So that's a little bit of a I don't know shift around that I mean if you want to do you certainly can do That's I think one of the simplest ways to kind of Confirm whether or not you want to stay on the form or not if you hit cancel or okay It's just determining what you want to do But a good thing to remember is that notify yes. No and notify. Okay cancel these two Choice functions that have a little pop-up message. They'll return true or false So you can just do an if statement and test with those guys if you want to exit or not if you do agree to some terms and conditions if you I Want to copy or move a file you can set up all of these choices however you want them to but I wanted to show off that functionality to you those are the Brief messages and choice functions in the end-by-screen module. Thank you guys for sticking with me I know this probably turned into a bit of a longer tutorial just for showing off these small functions But hey, hope you enjoyed it and well. I'll see you in the next tutorial


All right, good going. I've been drifting later and later. So today, I thought I would actually start. 9 AM, give everybody their money's worth, all 10 of you guys that showed up here. I hope that there's an asymptote to this curve. That's not zero, because the attendant seems to be dropping, but I hope there's some basement. Or maybe the bus is just running late today. So it's Friday, and we're going to try to finish up file system kind of basics today, so that next week we can talk more about the specifics of a couple of different file system implementations. So this part I think has spread out a little bit more than I anticipated, which is fine. It's been, I'd rather go slowly and make sure everybody understands things. But next week, I want to talk specifically about a couple of file system implementations, and then maybe some stuff on data recovery and sort of crash recovery. So today, we're going to get through basic file system operations. How do we locate data blocks? How do we associate data blocks with a file so that it can grow and shrink? And then finally, we'll talk about caching. A little bit about caching. Where does the cache go? What's the interface to the cache? And some brief little bit of discussion of what are the applications for file system consistency? No announcements today. I think everybody knows what's going on. Assignment two is due on Monday. Remind you, you guys have five late days for assignment two and assignment three combined. Five total late days. So I suggest that you use those late days. I mean, there's no point not using them. The question is, do you want to use them on assignment two, or should you wait and use them on assignment three? So if you're done with assignment two, fantastic. You've got five late days in the bag waiting for you for assignment three, where you will probably need them. So anyway, any questions about assignment, sort of course, logistics, anything? We've gotten some of the old lectures up online. I think maybe we're like one or two behind at this point. But I'll work on that this morning. So they'll be up. We'll be current as of today. So we'll have all the old slides and video online. Questions about course logistics? All right. So on Wednesday, we talked about iNodes and about how we implement directories. Questions about this material? Any questions about iNodes, iNodes structure, iNode location? Directories, what are directories? How do we implement directories? How do we find things on the file system? Go through an example of path name translation today. So we'll get a little bit more reinforcement of this stuff. So who remembers? Remember, file systems are systems. So systems like numbers. Systems don't like names. Systems don't like characters. Systems like numbers. So iNodes are the index nodes that store information about every file on the file system. But when I request an iNode, I do that by requesting an iNode number. So how do I translate? How does the file system translate the iNode number into an iNode structure? How do I find the iNode structure if I get the file system and iNode number? So super, right. So super block is part of the answer. But what's the general approach? Where do I store the iNodes? It could be spread across the disk, but what do I need to know about, if you give you an iNode number, you need to be able to translate that into a what? Into a disk block or a location. So essentially, I create all my iNodes when I create the file system. So when I format or initialize the file system, I create all my iNodes. And I put them in locations that are well known. Either the locations are stored in the super block or they're in the same spot every time. So you can imagine if the simplest approach to this would just be to put all the iNodes at the very, very, very beginning of the partition, starting with block two or something, and a big array of iNodes. So that way, I could translate an iNode number very, very easily into the data block and the particular piece of the data block that stores the iNode. But what's the consequence of this approach? I allocate all my iNodes at format time. And so what can happen? You miss that class. What about down here? No guesses? What can happen? I allocate all my iNodes right up front.  I'm drifting over here to the savers corner. Are the savers in the playoffs? If they win tonight? Oh, wait, OK. Capitals. All right. No idea. Scott? Right, so there's a fixed number. Well, there's two consequences, right? One is if I put the iNode in, you know, when I format the file system, I have no idea where the data blocks that are associated with the iNodes I'm creating are going to be. So it's possible that those data blocks might not be located near the iNode, right? And that could be a problem. Why? What's that going to create? No clue. Sean, slow y. Right, so I have the disk head. Yeah, the disk head's going to be seeking back and forth between these iNodes, right? So how do I access the file? You know, we're going to talk today about how I find data blocks, right? But the first step is I find the iNode for the file. So I find the iNode, and then the data blocks are over here. And maybe I updated the data blocks, and then I need to update the iNode.  Remember, we don't want to move the heads. The heads are slow, OK? And then what's the other consequence? Scott alluded to this, right? I've got a fixed number of iNodes meaning what? Ben? If I have a fixed number of iNodes, what can happen to the file system? And what would that mean? I can't create any more files, despite the fact that I still have space on the disk, right? So if I run out of iNodes before I run out of data blocks, too bad, right? Your file system may have, there may be a lot of data blocks that are still left unallocated on the disk, but it doesn't matter. The file system is out of the structure that it needs to create new files, and so you're done, OK? All right, directories, right? So directories are just special files that contain a series of path name to iNode map names, right? And I don't know what else is on this slide. Oh, OK, here we go. A description, that would be a set of directories here, right? And I'm showing you, if I list the contents of the directory by iNode, I can see the mapping between the relative path names and the iNode numbers, OK? Any other questions about this? Somehow this was all that we did on Wednesday, although it was a fun class. Any other questions about this? We can keep going. All right, great. OK, so let me go back. I know I showed you this stuff on Wednesday, but let's just review it a little bit. So remember, the file system superblock stores all sorts of interesting information about the file, and there are tools on Linux that will allow you to access this information. So we looked a little bit about the quite detailed output of the debug.fs command shows super stats, right? So this reads the superblock and parses information out of the superblock and puts it in a human-readable format, right? And again, this tells you all sorts of things. It tells you what the volume name is, where it's mounted, what kind of file system it is, where the iNodes are, what the iNode size is, what the data, what the block size is, et cetera, et cetera, right? So this is kind of a neat view into the internals of how these things actually work, right? And then here's another page of it. It shows you, in particular, where the different data structures are on disk, right? So my freeblock bitmap, which I need to figure out which data blocks are free so that I can allocate them. It shows you where that is, shows you where the iNode bitmap is. What do you think the iNode bitmap is used for? John. So the block bitmap is used to allocate blocks. Therefore, the iNode bitmap is used to allocate iNodes, right? So when I'm looking for an iNode, if I'm creating a new file, I'm going to look in the iNode bitmap to figure out what iNode structures are unused, right? Then my iNode table starts at a certain block, and this kind of shows you the statistics for this particular group, right? And you can see here there are no free iNodes in this group. Now, I don't know actually where these groups map to on disk, but it's interesting here. You'll see that both group 1 and group 0, and I wish I would have shown more groups here, are completely full, right? There are no free iNodes in either one of these groups. And so what I'm wondering is, are these groups in a good spot on disk, meaning that EXD4 is allocating from them first, right? So who remembers based on the disk geometry, what's a particularly good spot on disk? Spinning disk, right? Where would I, what is the part of the spinning disk that I might want to use first? The outer edge, why? Carl. Well, no, no, no, I think this doesn't matter, right? Because what's true on the outer edge of the disk? Constant density of data storage, right? There's more data on the, so one way to remember is, there's more data on a track on the outer edge of the disk because it's longer, right? But yet the seek, the head spins, it takes the same time for the head to make one revolution, whether I'm on the outside or inside of the disk. Ergo, when I'm on the outside of the disk, I see more data per revolution than I do when I'm on the inside of the disk, right? Meaning that the achievable bandwidth of the disk is higher on the outside edge, right? Does that make sense, Carl? Well, but again, if I pack everything out to the outside of this, that's OK, right? Because remember, seek time is always lateral, right? So if I can get everything out to the outer edge, then I'm only seeking on the outer edge. If I get everything out to the inner edge, then I'm only seeking on the inner edge, but my bandwidth is lower, right? OK, yeah, yeah. So this volume is actually not full, right? But my question is, what's the EXT block allocation strategy? And what I'm saying is, I think based on this evidence, and I wish, again, I had shown a couple more groups, that it looks like the first blocks, and I know it's being allocated on this particular volume, are being allocated from the lower numbered groups, right? So again, there were 64 different groups. I wish I had shown some other ones, but maybe I'll do that for next time. OK. All right, so again, when I call open, the process hands a path to the file system, OK? And the file system needs to translate that path to an inode number. Remember, I think the file system thinks that I know numbers, right? So this could be a file or directory. I'm trying to open it, and I need to figure out what's the inode number corresponding to this path, OK? So for assignment two, you guys aren't bothering with this, right? You just pass this into VFS open, and you're done, right? But what is VFS open doing, right? So what's the process of translating this path into an inode number, right? So there is a unique inode number on the system for Etsy default keyboard, right? This is a file. I don't know why I chose this file, maybe just because it wasn't that deep, and it was actual file, right, rather than a directory, all right? So what's the first step? What's the first thing I need to do? How do I bootstrap this process? Who remembers? I'm going to go through a process of translating pieces of this path name to inode numbers, right? Find the root, and how do I find the root? Inode number two, right? Remember, I put the root in order so that I can bootstrap this process, I put the root directory at a well-known inode number, right? So any EXT4 file system will have the root directory as inode two, okay? And that's how I bootstrap this process. Otherwise, I'm stuck, right? Otherwise, I need an inode to translate the path, but I need a path to produce an inode, right? So this is what helps me get started, okay? Let's start with inode two, right? So I use this fixed agreed upon inode number like two. Now what do I do? I have an inode number two that corresponds to the root directory. What's the next step? What do I do? I have an inode number two. Now what am I going to use that inode number to do? Well, right, so I expect that inode number two points to a file that is a directory, right? But what am I actually going to do, right? I've got an inode number, now I can tell the file system, I can give the file system an inode number, which is what it understands. But what's the next thing I need to do here? What's that? So I need to find the inode for ETC, right? But that's a good point. So why ETC? Why not ETC default keyboard? What's the other baked-in assumption that you guys are operating under when you're solving this problem? What's that? Well, so what's a special semantics that's built into this file name? It's an absolute path. You guys are getting closer. Again, you guys are so programmed that you don't even realize what? It's hierarchical and again, what sort of special formatting is going on here? For the forward slash is being used as a separator. So the forward slash is what standard Unix hierarchical file systems use to divide components of the path, right? Is there any reason why forward slash is necessary for this purpose? What else could I use? What's that? Anything, right? I mean, I could use a period, right? I could use an underscore. I could use a carrot, right? And you know, I mean, this is just what we're used to looking at, right? It does mean however that using backslash as part of your file name gets to, or sorry, forward slash as part of your file name is problematic, right? Because that special character has a special meaning to the file system, right? So if I use period, then I wouldn't be able to use period in the actual path name components, right? But anyway, so, okay, I wanna look up, I need to figure out what the I know number is for ETC, right? I know the I know number for the root, which is two, okay? So what am I going to do, John? Okay, yeah, so this is close enough, right? I'm gonna use I know number two to retrieve the contents of the root directory, right? I tell the file system, give me the contents for file with I know two, right? And I expect that I know points to a directory and so the contents of that directory are going to be a series of path name component I know number pairs, okay? And so yes, I'm gonna open this directory, I'm gonna read in the contents and I'm gonna parse the contents, I'm gonna, you know, and it turns out there's a special structure to directory files as you would imagine that is understood by the file system. And I'm gonna look for the path name component ETC and if I find ETC, then there will be an I know number associated with ETC. What happens if ETC is not in there? Then this file doesn't exist, right? If the path name component isn't in the directory, then there's no file on the system with this name, right? Okay, so now what do I do, right? Let's say I do find ETC and it's got this I know number 393218, now what? What's that? Where do I look for default? I'm trying to get you guys to go step by step here, right? So yes, I'm going to look for default, that's the next path component. But what do I do? I have this I know number 393218. What do I tell the file system? I read the contents of the file with I know number 393218. And again, it's another series of path named I know number pairs, right? And I look for default, right? And I keep doing this, going down the file, translating I know numbers to path components until I exhaust the entire string, right? And then what I've produced is an I know number corresponding to ETC default keyboard, all right? And let's see here, if I go back and show you this, well, I didn't go this direction here, but this gives you an idea of how this works, right? I mean, I start with two. Let's say I was looking up home challenge, right? I would start with two. I would list the contents of two, right? I would see that 393219 is home and then I would go into home. And of course, again, I'm asking the file name, I'm asking for the file by the file name here, but in reality, the file system would be looking at it by the I know number, right? Because the file system doesn't understand file names, right? All right, maybe I actually have a, nope, okay. So this is how I translate paths, all right? Any questions about path name translation? This is not a terribly hard thing to do. What about, what happens if this path is not a absolute path? What happens if it's a relative path? I have to work with the current working directory, right? So if the process asked me to open dot, dot, slash, ET, sleege, slash, default, whatever, right? I perform the same process, but instead of starting with the root I know, I start with the I know the corresponds to the current working directory of the process, right? What do I do with dot and dot, dot and path names? How do I treat those? Does anybody know? What's that? No, no, dot, dot is parent, but how do I, do I need to do anything special when I translate those, Ben? Yep. Yeah, and it turns out I think that, again, if you go back here and look at this, well, this isn't showing dot and dot, dot, right? But if I printed off this entire directory, dot and dot, dot are just in there. They're just path name components, right? They're just a string that, a special string that the file system interprets either is pointing to the parent I note of the directory or is pointing to the directory itself, right? So there's nothing really that special about them. The only thing that these file system might do with dot and dot, dot would be what? What could you not do to dot and dot, dot? In order for things not to go a little bit weird, right? What's that? You can't remove them. So if you try to do, if you try to, I mean, you can execute a remove command on and but it operates on that structure. So you can't take dot and dot, dot out of the directory, right? Carl, you're looking skeptical. So, okay, so we talked about this, right? We talked before about wanting the hierarchical file system to not have cycles, right? And that is true and that is something that's enforced when you move files around, right? So one of the things that happens is when you move a file on the file system, if the file system detects that you've created a cycle in the directory structure, it will fail, right? And the reason for that is what we talked about before. We want files to have unique names, some unique canonical name that points to that file, right? Once I introduce cycles, then that requirement is gone, okay? Yeah. How do I handle symbolic links? How do I handle symbolic links? Okay, shoot, I forgot to put a slide in this. Okay, so there's two linking tricks, right? So how many people have used links on UNIX? I think you guys probably have done this. How many people have used symbolic links? How many people have used hard links? How many people know what a hard link is? Okay, so one of the things we can do, right? Remember, my directories just contain translations between a path name component and an I know number, okay? So let's say I want the same I know number or the same file to appear in two different directories. What's one way I could do that? I could just have the I know number in two different directories, right? So I could have Etsy default keyboard, point to I know number 1000, and I could have foo bar keyboard, also point to I know number 1000, right? So that's what's called a hard link, right? What it means is that when the file name is translated by the system, what it gets out is the same I know number. And so the contents of those hard links, those hard linked files are identical. It is the same file on disk, okay? What's, but what is one consequence of this, right? So I'm translating the path name to an I know number, right? What is the I know, does an I know number make any sense when I cross file systems? Let's say I have two different partitions that are formatted with the same kind of file system. Does file, does I know number 1000 mean anything on the other system? No, I know it's always relative to the file system that you're on, right? It's, they're created at format time. And what this means is that hard links cannot cross different parts of the system. So if you have two different file systems mounted in different places, you can't create a link that spans them, right? Because the hard links are just by I know number, right? A simple way to fix this problem what's called a symbolic link, right? So this is what you asked about. What symbolic links are is a symbolic link is a special file that simply contains a path name, right? The whole contents of the file are just a path name. How do I, so what do I do? So again, I wanna use this as a link. I wanna use it to allow one file to point in another file. So how do you think I translate this? Let's say Etsy default keyboard is a symbolic link, okay? So I translate Etsy, I translate, I go root Etsy default keyboard, finally I'm at I know number 394692 and it's marked as a symbolic link by the file system. I open it and I get a new path name. Now what do I do? How do I open the file? I mean, basically I just open that path name, right? So if I give you a file that's a symbolic link to open, the first step is you do this and you get an I know number and you read in the contents of that I know and you identify it as a symbolic link and it's just another string. And all you do is you pass that string right back into open, okay? This string can be anything, right? It can be a relative path name. It can be an absolute path name. It can be a path name to something that's on a different file system. So essentially these are completely, there's really very little semantics associated with these other than it's a file name and that's how it's interpreted, right? So for example, one of the things that can happen with the symbolic link is if you move it, it might break. So if I create a symbolic link to, if I was in, if I create a keyboard as a symbolic link to dot, dot, dot, foo keyboard, which meant that Etsy default keyboard would point to Etsy foo keyboard. If I move that, then it breaks, right? Because it's a relative path name, right? It's relative to where I am and dot, dot, might point to something else, right? All right, so I should have put this on a slide. I'll do this next time to get onto the slides, okay? So let's talk, so we've talked essentially about how we do open, right? Today the goal was to talk about file system operations. So we've talked about how do we do open, open takes in a path name and wants to, wants to locate an unknown number, okay? How do we do read write? Now I have an inode that I know that I'm operating on and how do I do read write? So essentially what read write is doing at the file system level is it's taking an inode number, which the file system is going to remember after you call open and it's giving you an offset, okay? So what do I need to do to this offset? It's right on the slide. I shouldn't have asked that. So one way of thinking about this is that open translates path names to inodes. Read and write translate offsets to data blocks within given an inode, right? So I give you an inode, I give you an offset and the goal of read or write is to find the data block, find the portion of that file that corresponds to that offset, which essentially means find the data block that corresponds to that offset, right? And any other data blocks that are involved. If I do a read or write that spans multiple data blocks I need to find all of the data blocks involved so I can either load the contents or modify those contents, right? But one way to think about this is simply translating an offset to a data block within that file. All right, and there are several different ways of doing this, right? Essentially the problem we have is how do I associate data blocks with an inode, right? I found an inode, we just talked about how to find inodes. Now, how do I find the data blocks that are associated with that file? So here's one solution, right? We're gonna talk about three different ways of doing this and then we'll compare them to each other, right? And actually this ends up looking a little bit similar to something else that we've talked about. Now I'll ask you guys if you remember in a minute, okay? So first solution, the ino number contains a pointer to the first data block associated with the file and I just maintain a linked list. Every data block contains in some sort of wrapper a pointer, excuse me, to the next data block and maybe also to the previous data block for simplicity so that I can walk through the file either forwards or backwards, okay? Does everybody see, understand how this would work? What do I do if I want to append to this file? How do I do that? I add another data block to the end and I just link it into the linked list, right? Pretty simple, okay? So what are the pros of this? What is one of the pros of this approach? It's simple, right? Quite simple, right? I mean if you can implement a linked list you can implement this. It might not be the simplest, the simplest one might be the next one, but it's simple, okay? And the ino doesn't have to store that much information about the file contents. It just stores the pointer to the first data block, okay? What's the problem with this approach? How long does it take? Let's say I give you an offset. How do you translate that offset?   Doesn't sound like a fire alarm, it's not loud enough. All right, so translating an offset requires walking this linked list and that's slow, right? So this is a potential con. Oh, and lookups, right? So here's another solution. I use a flat array. The inode contains an array of data blocks and it's just a flat array and essentially I allocated it when I create the inode and then when I create data blocks, I just add them to this array at the appropriate index, right? So what's the pros of this approach? Right, so it's very easy to translate my offset. It's also simple, right? And offset lookups are really fast, right? I essentially take the lookup, I do a modulo by the file block size when this case would be 4k and that gives me the index into my array that I'm going to use to find the data block. What is the biggest problem with this? So the size of the inode, right? Either if I use a small inode, I've got a small file size because I just can't put that big of an array in the inode and if I have, if I wanna support the largest possible file on the system, let's say I wanted the largest file to be like four exabytes or something like that, right? Which new file systems support files of that size, okay? If I do that, then it means I need to have this gargantuan array in every inode, right? And what do you guys remember about most files on the system? Are most files huge? No, most files are small. That's why EXD4 can get away with an average file size of 16k because most files are small, right? There are some big files, but a lot of files are small. I wish I had a graph with this. It probably is a good one I could pull up. Maybe I'll do that next time to give you guys a sense of what the distribution of file sizes is because this is important for file system design, right? And again, so because of this huge difference between the largest possible file and the smallest possible file, a large portion of the array, either a large portion of the array might be unused if I support huge files or I can't support huge files and I have a smaller, right? So again, our observation here is that most files are small but files can get big, right? We want to support very, very large files. All our file systems had these irritating limitations. So how many people, for some reason FAT32 is still around. I don't know why. How many people use FAT32 or are forced to use FAT32? So FAT32 has the largest file size, anyone know? Four gigs, right? I'm sure when they designed FAT32, they were like four gigabytes. Who would ever have four gigabytes of data in a single file, right? Well, now everybody does, right? And it's a real pain in the butt to work with FAT32 because you end up having to split things across multiple files and it's just kind of a disaster, right? So newer file systems, again, I can't remember what the max file size supported by EXD4 is, but I think it's actually in the exabytes, right? So it's massive, right? At the same time, I do wonder if we'll ever have exabyte files. That's just me. I'm just gonna put that out there, right? And probably, you know, 10 years from now, I'll be saying like, some people thought, we never had exabyte files, right? And what do you put in them? Okay. Maybe by that point, we'll all be watching movies. That'll be like 18 hours long, you know, in like 10 billion by 10 billion resolution or something. Okay, so the way that we support this on most file systems is through what's called a multi-level index. And a multi-level index has the inodes store several different types of block pointer. The first type of block pointer I point are what are called direct block pointers. And these, as they sound like, point to blocks, okay? Remember, average file size, 16K. That means with a 4K block size, with just four direct pointers, I can already get up to the average file size, right? So that's good. That means that a lot of times, all the blocks that are necessary to read for a file have pointers that are stored in the inode itself, meaning that access time's very fast. I also, however, allow the file to grow bigger by storing some pointers to blocks that themselves contain pointers to data blocks. I call these indirect blocks. So I contain, I don't worry, I have a picture. I just like putting this up here, because it's fun. Because it gets even better, right? I also store a couple of pointers to blocks that contain pointers to blocks that contain pointers to data blocks, all right? And I won't try to do the next one because I'm just gonna get tongue-tied, right? So I call these doubly indirect blocks. And I can also store triply indirect blocks, right? So pointers to blocks that contain pointers to blocks that contain pointers to blocks that contain pointers to data blocks. I think that was right, all right? So it ends up looking like this, right? So this is just showing one level, right? So this is just an indirect block. So here's my inode, and I stored a couple of direct pointers, meaning that the inode has a couple of pointers to actual data blocks. But because this very, very bizarre inode only stored two of those, I wanted to let the file grow bigger. And so I added another special data block here that just has more pointers. And so as I add data blocks to this file, what I do is I would fill up this indirect block. And then what happens when this indirect block gets full? What do I do then? Okay? So then what I would do is I would allocate another block down here, and then I would have it point to other blocks with pointers, and I would start allocating from those, right? And I would just essentially keep doing this until I ran out of space again, and then I would allocate more. And then maybe I would allocate the block points to the block. You see where this goes, right? So this is this nice clever way of, again, being able to efficiently support small files, right? So most files will have all of their data blocks pointed to within the inode itself. But, you know, that one exabyte file that you just created, I can still support that file, right, through doubly and triply indirect blocks. So the pros here are obviously that the index scales with the size of the file, which is nice, right? That's what we want. And offset lookups are still pretty fast, right? Especially in the common case, right? So in the common case where I'm just doing offset lookups within the direct blocks, they're very fast, right? It's essentially 01, right? I'm looking up in this array. Once I start to look up, once the file starts to get bigger, what starts to happen? What do I have to start doing in order to translate offsets? I have to keep following these pointers, meaning that I have to read more data blocks, right? So for example, a one byte read from this file, if it's in the first, you know, 16K, is gonna cause me to read the inode and then go directly to the data block. Once the file gets big enough that I need an indirect block, then I have to read one block, two blocks, three blocks, right? And then if it gets really, really big, then I have to read one block, two blocks, three blocks, four blocks, right? So the number of blocks I have to read to get one byte of data out of the file goes up slowly, which is good, as the file gets big and big and big. All right, so that's nice. And again, I mean, I can keep my small file small and I can keep the metadata associated with them small, but I can allow files to get really huge, okay? And they're right, I didn't really come up with any cons of this approach, they probably are, all right? Okay, so questions about, oh, goodie, I've got time to get through cash. Questions about storing file data. And now I'll come back to my earlier question. What did this start to look like for a minute? Page table entries, all right? So we had a similar data structure design problem when we addressed page table entries, right? With page table entries, we came up with what I would, I would think that's a different solution, right? So why did we come up with a different solution for page table entries? Because the address space is, now the number of pages in use by the process is not a fixed size, right? But the address space that we have to span with our data structure is a fixed size, right? And there's the sparsity. Files don't have this problem, right? Files, if I store four gigabytes of data in a file, I don't store it sparsely into a 16 gigabyte container, right? I store it into a four gigabyte container, right? So it's a little bit of a different problem, and that means we came up with those in solution, John. Yeah, yeah, yeah, and man, I didn't put in a slide for this, but I wanted to talk a little bit, I guess I mentioned this last time. So that's exactly right, right? And extents are another way that file systems address this issue, right? So I mentioned this last time, and it's a feature of newer file systems, and actually, EXT4 actually uses extents. So if you print off the information about files using debugFS, you can see that they have extents. And yes, one big goal of file systems is to allocate things contiguously whenever possible, right? And that's because, you know, the number, you know, if I need to read 16K from a file and it's all on one track, I'm great. If those four data blocks are in four different locations, you know, I'm on the struggle bus at that point, right? It's gonna be slow. All right. Okay, so now we talked all the stuff about on disk data structures, right? But the real stinky thing about file systems is we don't want to use the disk at all, okay? The disk is slow, slow, slow. I mean, disks are getting faster, flash is helping, but disks are still, you know, orders, the spinning disks are orders of magnitude slower than other places where we can store information, right? So how do we do this? We have our, you know, we've talked about some design principles. What's our, what's the canonical way that we make a big slow thing look faster? We use a cache, right? We put a smaller, faster thing in front of it and use that thing as a cache so we can avoid using the big slow thing. And in this case, also with file systems, the other thing we can do is we can avoid using the big slow thing inefficiently, right? So we'll get to that maybe in a later class. But using a cache allows us to store information temporarily and defers the point where we actually have to make a decision about how things are gonna end up on disk. And that deferral can help the file system better allocate on disk data structures. Okay, so in the case of the file system, again, I mean, we're gonna use memory. And the memory we use to cache file system data is referred to as the buffer cache, right? And buffer caches have this really dramatic improvement in performance, right? One of the things I guess that is sad about the fact that we've trimmed assignment four from this class was that a portion of assignment four used to be to implement a buffer cache for the simple file system in OS 161. And one of the reasons that, you know, I decided to align this particular assignment is because that process of learning buffer cache shares a lot of features with assignment three, right? So I didn't think there was really a lot of new technical details there. However, implementing the buffer cache just produces this massive boost in performance, right? So when people actually got it to work, it was like, whoa, you really noticed, right? I mean, a test that would take 10 seconds before it ran in like 0.1 seconds, right? So it's really, really dramatic because disks are so slow, right? All right, but I'm gonna be calling this thing the buffer cache, right? I don't know why it's called that, but that's what it's called. It is a cache and it's caching, you know, buffers. It's buffering data for the file system, right? Okay. But you might say here, and this is an interesting observation, right? Well, aren't I already using memory for something? What am I using memory for? I'm using memory for memory, right? Like I gave processes access to memory, you know? So why, now I've got this buffer cache that wants to use memory, right? So yeah, operate systems provide memory to processes that use it through the standard memory interface using standard instructions and virtual address translation. We talked about all that good stuff. Now I'm also gonna use it to cache file data and I'm gonna do that to improve performance. But, you know, these two things are competitive, right? I've got a fixed amount of memory on the system and some of it, you know, now I've got two uses for it. Before I had this fantastic world where the only thing that was competing for memory were processes competing for memory with each other. Now I've made things more complicated because I have the buffer cache competing for memory with the memory management system itself, right? And you can imagine what happens here. So let's say I say, okay, I'm a file system person and the file system is the most important thing on the system and the disk is really slow and so I'm gonna allocate this huge buffer cache and I'm gonna take that small sliver of memory on the system and use it as main memory. What's the problem? What will happen here? Well, I don't have, like, you know, again, I can use swapping, I can use other tricks. I don't have to run out of memory but what's gonna happen? I'm gonna swap more, right? I might start thrashing in my memory subsystem. The interesting thing here is that if I limit the amount of main memory, what starts to happen? I have to use the disk to swap, right? So I was trying to avoid using the disk by making the buffer cache really big, right? But now the main memory system is hammering the disk because it's gotta swap all the time, right? So this is not good, okay? Okay, so now let's say I'm the memory subsystem maintainer and I'm saying, okay, the buffer cache isn't that important, small buffer caches work pretty well, now I need lots of memory, so what's the problem here? The file access is slow, right? File access might be really slow, especially for a certain workload. So this decision about how to partition memory between the file system buffer cache and the memory subsystem is usually not made static, right? This is something that is allowed to evolve over time. And most systems have an integrated buffer cache and memory management subsystem, meaning that there is one pool about, it's not like I say at startup time, okay, memory system you have 50%, file cache you have 50%, based on the access of the system, the buffer cache is allowed to grow and shrink and the amount of main memory is allowed to grow and shrink. And on Linux, there's this parameter that I've always loved, I mean, whoop, whoop, swappiness, right, what does that even mean? So it turns out, apparently what it means, this is one of these like black, little black box magic numbers, is it controls how aggressive the kernel is in pruning unused process memory pages, right? So we talked, when we talked about memory management about the fact that operating systems don't just trim when they run out of memory, they also trim constantly, they're constantly looking for unused pages, pages that haven't been used for a while, they're running the clock algorithm, they're spinning the hand, and they're writing those pages to disk and potentially evicting them, right? Preemptively, we talked a little bit, when we talked about memory about the fact that this happens because I wanna prepare myself in case an application starts and I need a big gob of memory. The other reason that it happens is because the file system buffer cache is using pages that I'm evicted. So if the memory system has a bunch of unused pages and it can evict them, then the buffer cache can use that memory to buffer files, right? So this is another reason this happens, and on Linux, this swappiness parameter controls how aggressively the operating system is doing this, right? And essentially, hence, it controls to some degree the balance between the memory usage and the buffer cache itself. And you can control this on your system and I don't know what effect it has. It's probably set to some reasonable default. But for certain cases, there are times when you might wanna set this differently, depending on if you understand the features of your workload. So the other question with the buffer cache is where to put it? So I haven't put up this slide before, but I think we should stop and talk about it for a second because you guys are starting to see some of this, right? So we talked about how the file system interface on Unix and Linux-like systems is designed to allow multiple file systems to use, be used. And the way it's done is it's done by providing a virtual file system interface that presents the appearance of all these different calls that the file system could use and then having individual file systems implement that themselves, right? So when you call VFS open, what happens is that that call to VFS open is translated to either a call to SFS open if you're using the OS 161 simple file system, which you're not. So actually it's a call to MUFS open. And there could be an arbitrary number of different file systems that are here, right? So Isaac could decide that he wants to do assignment four and write a file system himself and he could write Isaac FS right here and then in October when he's finished, he could come show it to me, right? So again, having this virtual file system interface allows an arbitrary number of files to file systems to be implemented and the way that you implement a file system is you implement this interface, right? You implement the VFS interface and then VFS translates, we'll send you calls that are appropriate depending on what kind of file system is mounted, right? So when I mount a simple file system on the system, the simple file system code starts to receive opens and closes that are appropriate to its files, right? At the end of the day though, all the file systems are essentially that are using disk or using this block level disk interface. So all of these calls, the simple file system is gonna decide what kind of data structures I'm gonna use, where am I gonna put things on disk? But at the end of the day, it's reading and writing disk box, right? And MUFS, well I don't know about MUFS, maybe that's not true because MUFS is only using the underlying file system. This might be a lie. But in general on a, if I had systems that were using a real disk device, rather than running on top of another file system, they would all be using this low level disk interface, right? They're using different parts of the disk, but they're all reading and writing disk blocks. So there are two choke points where I can put a cache, right? So my goal is I wanna write a single buffer cache that can benefit all the file systems on the system transparently. I could, so one approach here is I could have every file system have to implement its own cache. And you know, that would become a terrible, right? Because now you're pushing all that work onto the file system developers when you could consolidate it at the system level, right? So where are the two choke points here where I could put my cache? Two places in here where things come together, yeah. So right, so I could put it down here, right? Between the disk and the file system and where's the other place? There's somebody over here. So I could put it up here, right? So I could put it under the virtual file system or over the virtual file system layer, right? And if I put it here, so here's the implication, right? If I put it here, what's the interface to the buffer cache? What is, it's the file system interface, right? It's open, close, read, right? Like those are the calls that the buffer cache would see, right? Because what would happen if here is I would make the call to the VFS layer, it would pass it to the buffer cache. The buffer cache would try to perform those operations out of memory. And if it failed, it would pass them down to the individual file systems, right? So this is one approach. And the other approach has been pointed out. I can put it down here at the disk level, okay? And what that means is that it's gonna use the disk interface, it's gonna read and write blocks. So, you know, my file system operations are gonna go through the file system invitation and when it says read block, it's gonna say read block 15 or whatever, the buffer cache is gonna try to find that block in memory and if it can find it, it will return it from memory. If not, it's gonna pass those calls through to the disk, right? John. No, no, no, so yes, devices themselves also will do caching. But disk caching is actually done in the system itself, right? So John's exactly right, I should have mentioned this. When you buy disks, disks have small caches on them that they use themselves. So it's possible that, you're right, it's possible you could send a request to the disk and the disk might have that block cached as well. So the disk might not actually do a seek, the disk might actually fulfill it out of its own cache, right? Operating systems are a series of caches, right? Cache, cache, cache, cache, and then you might actually do something, right? I don't actually know how file, how disk devices use those caches. That would be really interesting to find out about. My guess is from what I've read is that a lot of times disks store, like if a disk is just, like let's say a disk is trying to seek one block or one sector. So it moves the heads and then it's sitting there waiting for the sector to come under the head. Hey, I've got data flowing under me. Why not just read it and put it into my cache, right? So in cases where the drive is operating and it's waiting for something to happen and it's a position to read data. When I'm seeking, I can't read data because the head's often stabilized over a track. But once I've stabilized the heads on a track and I'm just waiting for the data to come underneath the heads, if I've got a little bit of memory there that I can read data into, why not just read those blocks into memory just in case the next thing that comes through? But there's probably smarter ways of doing it, okay? But yeah, so we're not talking about the disk level caches. We're talking about a system level cache. All right. Okay, so if we cache, let me see how much time I have, I might have to abort. Okay, I'm gonna take two more minutes. If we cache above the file system, what are we caching? Again, open, close, read, write. Like what are the things that would be in the cache? Carl, you're looking like you know the answer and you're just, well, yes, yeah. No, no, but like what are, semantically what are the things that we're caching, right? Like it's gonna call open and the file, the process is gonna call read and the cache is gonna satisfy that request. So the cache is operating on what? It's operating on files, right? So I call read and I'm supposed, the cache needs to be able to find the file that that read is associated with and return some of the contents, okay? The buffer cache interface, as we talked about, is the file system interface. It's open, close, read, write, right? Let me see. I'm gonna come back to this on Monday because I'm out of time and this is too much to go through the rest of class. So on the rest of class, Monday we'll finish this. This is like another two or three minutes just talking about the implications of putting this in different places and then we'll talk about the Berkeley Fast File System and how it locates data structures and essentially kind of, again, state-of-the-art 1970s design based on future suspicions, all right? Have a great weekend, guys. I'm sure you have nothing to do this weekend other than enjoy the sunshine and go out for a drink with friends and watch a couple movies and sleep in and things like that. So have fun and we'll see you on Monday.