Process now everyone's talking about process everyone before was just trying to Pump and dump and try to figure out what the ears guys all these years people are asking me why what was your secret? But I was being so consistent right it was process guys The moment that we talked about process everyone's like oh shit. That's right. It was building a repeatable scalable system Let me walk outside.  I prefer my office Deal not ready.  That is the secret to trading This the secret to trading is not making one-time big giant P&L It's like some of these guys think they brag they brag and I just laugh and laugh You know the you know, they make money on one day to lose money the next day That's not the way you are supposed to trade Well, you can trade if you want if you're gambler, right? That's that's basically the gambling mentality So we created this whole concept called the process and now everyone's implementing that type of Mindset when you trade it's not about the one-time P&L's It's about being able to make that P&L over and over and over again I mean, I'm pretty I mean, I don't want to chase myself and I want to be an asshole, but When was the last time you lost Alex? You know, I'm saying it's been a while since we had a red day, right guys We did fantastic today yesterday was fantastic Alex made a hundred five thousand dollars today I thought I know I thought I did well. He did me did super well, you know, um, you know He happened to trade a Robin Hood, which is great. I didn't yeah, it's been weeks Alex I mean, dude, I can't I mean when we lose is not even big. That's the thing.  You're making up P&L's. I'm like, dude I guess I'm sitting here every day with 2,000 people in in the MIC chat room making a fake charts I think I haven't I haven't assisted right? I think I have an assistant that goes and and draws a photoshop charts for me every day I mean we post our charts every day guys. I mean, it's nothing to hide. I mean The I mean James James when was the last time you lost so Alex lost weeks ago James James is one of our moderators He came in and now it's consistent profitable trader, right James James was last time you lost And when you lose it's like it's a day of losses two days max I mean some of these guys are losing like millions of dollars and hundreds of thousand I mean, I mean, dude, that's not the way we want to teach guys Because I see James here, so I was gonna ask him like Mr. James What was the last time you lost James? When you saw I mean you pretty much see it man the consistent traders at MIC so James lost two three weeks ago It was two books I lost more at the bar I mean So I mean that I don't know what else to tell you guys the process the MIC process works The reason it works is because of this it is based upon Proven winning strategies that we've developed across decades. I mean and we have to roll around it It's not just the strategies guys I can tell you the strategies But if you do not understand the the MIC process on how to implement those strategies you're lost Okay, I basically strategies like a tool. Okay, I'm gonna give you this tool. How do you use that tool? I can give the hammer to a gorilla. You'll either hit you with a hammer or himself It depends on you know, if he knows how you use the proper tool, right? So same thing is also risk management. We were the first. It's our talking about risk management Now everyone's talking about risk management.   The reason it works is we're all fucking humble guys I mean we I Don't even post what I make and I do where I do well I mean Alex does the best the best brag for me is seeing the students make money Alex is making huge amounts of money Members James is making tons of money. He bought his dream car last year. He bought an i8 and BMW Congrats again I look. I hope you're still enjoying that car I mean People that really truly want to learn make it work they made it work in 30 days And I'm gonna bring in a person. So this is the reason I called this IG live guys We love we love it when members Study hard and dedicate their time and their Their resources and just do just just being a family environment, which is MIC, right guys So where are you where you at Nancy? Her name is Girls that trade girl that trade. This is this is great.  So I'm just waiting for it for Nancy Her name is Nancy and I don't make a huge announcement girls that trade. I mean this this is a phenomenal I mean I've seen her work so hard here with those girls that trade view requests. I Actually never met her So you're really a girl that trade Because no online to be honest like online a lot of their I don't want to be like you sound creepy But there's a guy that pretend to be girl. And so when I see such a great Aggressive go-getter like dude you you made it happen. You basically went to MIC study Watch all the videos started making comments on the videos that started to take it to your own hand and make stats about it So let me tell let me have you introduce yourself first to everybody then we'll get into why you're here because I MIC fucking love you and I see thanks you and this is why we want to give back and thank you Everybody this is Nancy I'm Nancy. Hi everyone girls trade too. And you know, I'm So grateful that you invited me to come on today to this Instagram life I just wanted to add something really important to what you said already about process and Risk management and it's more even so about the community that you've built here this community is What keeps everybody going and keeps us in Check with our risk management and you know without that feeling of being with like-minded people That are really passionate about this trading You're gonna go nowhere and and you guys built this here You are making tons of money as you've described today on this Instagram live and Yet you give of yourself all day long all of you all the mods that are making all this money They don't what do they need to be here for? Answering DMs all day long and spending all of your time in the room teaching us. It's your passion is just Unbelievable well now you're Nancy now you're one of us So we we put on Nancy's the junior mob position because of of that mentality I mean basically our whole thing is When we kind of make it I mean I never I like using that term But you know we made it in terms of we understand the stock market better than most people do now Right and so now it's kind of like I wanted to spread the knowledge everything and now it's I call it pay What I've been doing this for like two decades of paying it for it So, you know now you you're paying for it. You're you're helping other people and so Alex I mean Alan brought you to my attention, but when he goes my god, she's helping so much You have so tell us like when you live in your your background because you have a degree in like analytics So it's very very very cool I'm actually a nurse practitioner But okay, I have two masters and a PhD so Education is my thing. I'd love to be educated and you know, that's kind of why I've Been so involved with doing these notes from the videos is like that's how I learn and I Think it's just a wonderful way to expand my knowledge, you know in the nurse Where where where do you live? I live in New York, New York City? Okay, so tell us your degrees No, I don't have time for you to brag about all this because you know, I love education I mean, I'm an agent obviously Asian love education. This is the reason why we created MIT to educate others So I would love to hear your background other people because you know, we see names on the screen I always see with numbers and charts and stock stuff. We never see the individual So I love coming to Instagram live because it's the first time I see face to face People I've talked to for years online never see them, right? So social media is great in this aspect when you use social media for the for the betterment of Society in terms of getting to know people on a personal level seeing face to face is totally different like my idea when you look at I thought you were Asian by the way I thought you were Asian I don't know how that came to me because I'm like this girl is so so like organized and diligent She must be like stay sister. We have another a female called Bay her name is Bay and she did she you know She used to do a lot of great things, you know, but now she's busy to work obviously, but uh, so I thought you were Asian for some reason So what are you bragged about you who you are and your education? I'd love to hear what's about all of that I'm not really much of a vinegar Honestly, but you know my professor I teach nursing now. Wow, that's probably why I do do Such an extensive job on the notes You know, it makes total sense like they're fantastic. Oh my god. We're actually not worthy.  I mean But what you know in nursing I'm able to you know I have this intuition where I can look across the room and know which patient is sick and which patient needs help right away and I'm trying so hard to build that intuition and trading and I think by writing these notes from the Educational videos that you all put out is what's making me a better trader. So in helping others. I'm actually also helping myself You know having the opportunity to be here and honored and Humboldt that you have invited me on today. So thank you We we trust me. We are the ones who's being humbled right now. It was like whoa, we didn't know we're gonna start calling you up professor now Right, that doesn't cool nickname for you. You know, this is a we're very honored I mean, how did you find MIT? Tell us tell everybody how the process started yet? How long you've been trading? How do you even get to where we are today? Well, I like to call myself a COVID trader But in actuality, I have always been interested in trading since I was in high school and School always came very easy to me and I used to tutor all of my friends and one of my friend's father's was on Wall Street as a trader and After I graduated he kind of tried to recruit me to become a trader and my parents were like, you can't do that You are too emotional of a person, you know, you're spending somebody else's money if you should lose that money You're gonna be too upset about it You're gonna never be able to separate yourself. You can't do that You need to go into the caring profession, which is what I did Eventually with with COVID of course like many I became even more interested in trading and I You know, I went back to the bedside in the emergency room to I wanted to do my my share for for COVID and I Said to myself, you know after seeing all that death and it gives you a new perspective on life and the importance of Being happy and doing things for yourself So after that I said, you know what I'm gonna spend some of that money that I did make Going back to the bedside for that time period and I'm gonna teach myself to trade Wow Like many people here I found all those free places on the internet because there's tons of them out there And I said, you know, I'm a professor. I can teach myself What do I need to you know, have anybody teach me for right and I was in many many rooms some good some not so so good and you know, just trying to teach myself but never really I'm getting any consistency and And but I did meet some friends and one in particular Really kept saying and really really saying you have to invest in your Education you have to invest in your education. Take that money and invest and I said I'm not gonna spend money on more education You already got PhD a master's and a nurse I said the dreaded thing I said once I make money Once I make some money then I'll look into seeing if you know if I can do that But I still wasn't getting any consistency and then at Christmas you guys offered that 50% discount and I said, let me just give it a go and you know, see what this is all about and You know, I said how long I'll join for a month and I'll watch all the educational videos I'll get that training because you know, I'm gung-ho I can do this and I Once I got in and realized there was hundreds and hundreds and hundreds of videos No way I could do it in a month. I Just said I have to stay and then it was the community that kept me I immediately felt like family and I felt that Passion from everybody that was in there and it just It just keeps you it just keeps you you can't leave once you once you feel that community And that you feel like you could reach out and ask anybody anything any time of the day and that they answer Where do you know that the boss the CEO of a company can that you can just have direct contact with them Who's who's the boss? I think I think Yeah, that's the thing. It's like it's weird cuz I don't we don't really consider ourselves as the boss Because it's all member driven as well. That's the key members the whole point is members helping members So I think that's the that's the uniqueness that we offer because I've been I've been around for a long time I mean, I may look young and stuff, but I've been from the inception of the very one of the very first trading chat rooms and MRC you know things like that and that One thing I saw is the fact that everybody was so competitive and they didn't want to share anything They thought that just because they shared information that it would hurt their own trading and so I wanted to create a community where You know what man that billions and trillions of dollars being traded that they don't really care about you $500 Okay, and so we wanted to share have a sharing aspect and so that's why we've had no pumps You saw that right no one's pumping any stock like any other room. It's the it's like I hate that to the moon to the moon I hate that right and that people are sharing their information and that's what makes it the in my opinion The greatest feeling is when that's the family family want to help you families want to help each one another I'm not here just to get rich and then watch you not get rich And we all eating together and so you know is like I share my charts Alex all the mods Even the members are sharing they turn immediately after they make the trade and the reason we do not alert before because I don't want anybody copy I don't anybody to lose. I want you to learn by looking in real time you learn you're forced to learn and We share all the information we have like all the filings and what we really think so this is So it's kind of good and bad is bad in the sense of it's hard to grow Business from money monetization like that because people want to get rich quick, right? They want to learn they want to be pumped They're they're lazy. And so as real educators like ourselves We this is you know, the education market is not where the money is Education is tough. I mean, I We are not making money. I mean people think I'm making millions of this. I to be honest I can make it but I we don't I Mean we give it all back We just want to to train people that we do well, but I do well trading on my own Al's does well people do too well We make more than enough money to live a very comfortable life without M. I see so if this is our passion project It just so happens when we launched it people there's a lot of people out there like us So M. I see is definitely a passion project. And as we grow we are always looking for great people like yourself That's me. So I love the fact that you're here.  I mean, that's what it is.  I love it.  So this is great So I love it. So talk about what you're trading. So how's it going good bad?  It's great. I'm consistent. I still trade very small But I'm consistent. You're consistent. Oh, wow. So you were not when you started, right? Not at all until that friend kept saying invest in your education and I finally took that lead So tell us What what are you trading? What are you learning? What is your style? What is your strategy? So how can people get to where you are right now? I'm long biased and pretty much most of my money is made on first bounce great the best strategy and Your risk management like you all preach every day is key. I Make sure that my my losses are small, you know that you're gonna have losses It's just part of the the nature of trading but as long as you keep them small You know, my my wins are better than my losses and They add up, right? If you do not have some crazy swings of losses, they add up very quickly. I Mean, what is small to you may actually be someone's dream, right? Because we always say $200 a day supplemental income at $50,000 a year I mean, I'm pretty sure you do well, but there are people out there that would love just to make that Right, so so our small is all relative like my small is you know, I think I'm small, but I don't see small It all depends right guys So the key is the blueprint which is the process to make a thousand dollars a day begins with a hundred dollars a day $50 a day. So now that you are consistent It's up to you to get comfortable to a point where you're sizing up a little bit each time and then you know That's all it is the comfort zone.  You're fine to be to be honest. I'm happy where I am I don't need to be making a hundred thousand a day, you know If I think you know maintain my lifestyle, whatever it may be. So that's the thing people understand trading trading can be Super good and it could be super bad It killed me back in the day when all I was chasing is money is an endless game, right? You make more and more is an empty thing.   So guys, I guess You'll be getting a lot of questions about help now, I guess we have doctors in the In the club as well doctor on now you have a professor Nancy so that is amazing guys. So Anything else you want to add? I mean huge phenomenal. She's she gathered the stats for the Watchlist talk about that real quick. What would you do for a watch list and the staff that you came up with? so I decide, you know, I noticed that the watch list each day is pretty pretty accurate just watching it over time even though You know, I haven't necessarily been trading the things that were on the watch list I did decide to, you know, do some data analysis on it as you know, as a researcher myself I am very comfortable with data analysis and When I did the first month of August, I mean July, sorry, I was very very very impressed with the the accuracy and You know reported on it and now of course I'm refining that over time to Include a little bit more structure as to how I'm gonna code that but with Alex with an 88% accuracy rate and Tom, I believe was 90 or 91% Tom beat your Alex That's awesome, you know, also that is When members do better than us that is phenomenal guys. That's what we love to hear So I mean it works so the watch list can be used so we put out the watch list So that you can reverse engineer and to learn on how we came upon those lines those entries those exits So as a long bias trader, you can also use the watch list to know the area of the lines of where you should be selling Because when it comes up there, you know, we will be shorting it And if we are shorting it other top traders are shorting it there, which is also top algos So if we are making 91% 88% accuracy, you know where the algos are they're right there with us So, you know, they're smarter than us. So so this is so Alex step up your game, brother step of your game But now I've received so much feedback from the members in the room About continuing it. So of course, I'm gonna continue doing this, but it's almost like Curious to see what August is gonna bring now This is amazing. So anything else you want to add you can talk about anything you want Nancy This is your stage right now. So I thank you very much. I I just want to say I'm so grateful for finding your community And I cannot believe what you've built here. It's just amazing and Everybody should should be part of your community.  Where else could you go and have movie night and You know, see what people are cooking for dinner every night and you know, seeing what Tay is growing on her farm It's just an unbelievable community and I right away felt at home And I'm so proud to be part of it I I think M. I see has helped a lot of people terms of personal Connection because during COVID everyone's at home, right? We're stuck at home for two years now Two years almost right stuck at home not not talking to anybody So when I was a trader back in the day, which is still today I've never saw anybody. This is my office. I'm just I'm just by myself. I mean you imagine just No human being should be by themselves like this. It just messes up your mindset, right? And so you everybody wants to talk to someone so having community. I'm telling you it's just it's not just about trading It's about human connections. So especially during COVID, you know, it's like just I have people that just joined my team Not to even trade but to maybe meet friends, you know, or just to have a network to talk I have a lot of people like that, too You know, it's like where can you meet like-minded people like yourself? It's very hard nowadays to meet people like ourselves What do you go, right?   So but where can we meet like professionals that That basically have the same common interest as us So this is the greatest in my opinion the greatest social network type of environment It weeds out everybody that's not like this because every community has an Aspect right a character. And so you don't match that character you were basically, you know, you leave So it kind of filters on his own. So, you know, we you see is weird, right? We don't brag much. We don't see people saying what the bad It's kind of, you know, we make our trade we move on we help people because well, we have respect of you If I make money shorting Alex makes money shorting. Someone's losing that money You know, it could be a member or whatever. So you have to you know, be conscious of that, right? So we're you know, the best thing to do is help someone else And you have a tab Nancy, I do but he's sort of ditching me because he's moving to the short side Who's your champ? I don't worry. I think you're gonna have like a thousand requests to be a tab now So this is great guys so and that's even now Anything that you we can help you with Nancy, let us know. Thank you very much for coming on I don't want to wake anybody's time anymore, but this this is amazing. I first of all met you You're wonderful person. So thank you very much Big round of applause for her because she's helping COVID. She's on the front lines of COVID as well guys I mean, I don't know what to say you need like a humanitarian award Maybe we should start one of the words for our community the humanitarian of the year, right there, that's the professor Nancy Thank you so much. I really appreciate being part of your community. Thanks. Thank you very much. All right guys There you have it. Thank you. I want to introduce the newest moderate to the MIT family. Thank you, Nancy Appreciate it. All right. See you back in the room guys. Bye guys


Good morning. Okay, so today we're going to talk about a case that I got to see the first week that I was here Which was pretty exciting for me. We had a 49 year old Lady come in. She was previously healthy. She was a retired business professor Had retired at 49 because they they'd sold some type of pharmaceutical company So she'd done pretty well for herself and she had a two month history of lower extremity weakness hearing loss and Nuan set decreased visual field loss in the right eye So this at all began about a couple months prior August 2010 She kind of seen sir been seen at several different hospitals She presented initially to Provo, Utah with some weakness and sensory loss in her legs Urinary incontinence Vertigo and gait instability She had an MRI at the outside hospital and that showed some increased T2 flare signals in the deep cortex She also had an EMG there that showed some decreased amplitude in the tibial nerves She was diagnosed there with Guillain Bray. She was treated with five days of IVIG Discharged with physical therapy and she thought for the the next six weeks that she was improving She had from then she had an onset of gradual hearing loss in her right ear Worsening gait instability. They started on started her on prednisone and BAM cycle of ear She also had a new onset of a severe Biotemporal headache some increased weakness and Kind of numbness in the lower extremities worse on the right. She had another MRI at that time which showed Some more signal in on T2 flare, which looked like MS And she was experiencing some pretty severe vertigo at that time and she was transferred to a Colorado hospital She had an INO. She was hyper reflexic She had an LP there, but the CSF showed no oligoclonal bands, but did show some elevated protein Pretty much pan normal lab work up as you can see Kind of got the full full spectrum line HSV Rocky Mountain spotted fever and she was treated with three days of IV steroids at that time So she was discharged. She was still having some of the symptoms She got a dose of IV IG didn't really improve And then she started having some confusion some word-binding difficulties some cognitive slowing And so when she presented to the University of Utah She had a right foot drop She had hearing loss on the right side and she'd woken up the day prior with some decreased visual field on the right side There was no pain with Extracular movement her acuity was great. She was 2020 with correction and over top As far as past medical history as I mentioned at the beginning She was previously healthy had some gestational diabetes and a bout of Acute gastroenteritis while traveling in Ireland pretty recently her only medications were a multivitamin She'd been started on Lyrica a couple months prior for The worsening headaches for migraine and one of the physicians had started on doxy for a suspected Lyme disease Ocular history she'd worn glasses since the age of 12 And notice in quotations it says ocular migraines because that's those are the patients words I know that's not a preferred term here and past neurological history just the migraines with or since age of eight but Maybe one every six months and pretty good relief with ibuprofen One episode of I lost the consciousness when she was nine due to a skiing accident and she was out for a couple days there Family history was significant for a cerebral aneurysm and a sister at age 40 and a maternal grandmother who'd also had a hemorrhage No family history of a mess So on exam again visual acuity was really good. She'd 2020 OU pressures were great kind of really the only abnormality there is stereo and then fields to confrontation she had peripheral also central sparing and No deficits in the left eye and she did not have an I know when she presented here So here are her prior scans This was the first one that we have and you can see the a couple of hyper intense signals here This is the scan the next scan that we have the second MRI that she had and you can notice a little area of hypo Intensity right here in the corpus callosum She continued to have several hyper intense regions This is when they started really seriously considering MS and then the scan that she had when she presented here Again, you can see these areas of hypo intense regions. I think also kind of here You can start to see those Again, several hyper intense lesions on MRI kind of scattered throughout and then fundus photographs So right eye and she's got an occlusion right here left. I look pretty good initially And I'm got FA and some clear abnormalities here these areas of hyper intensity and then you can see the Articulation left. I also showed the areas of hyper intensity and in the periphery another occlusion We were able to get her records from I Believe was Colorado where they got this study and it showed Wyoming And it showed low frequency hearing loss and so differential diagnosis So kind of on the list at that time was multiple sclerosis Atom Lyme disease. She'd been diagnosed previously with Guillain-Barre and then to sex syndrome So she actually kind of meets all the criteria for Seuss X syndrome. It was first described in 1979 There's at least 200 cases reported It usually affects young women and it favors women three to one The classic triad is encephalopathy Hearing loss and branch retinal artery occlusions. They're usually bilateral and so we see all three in this case The pathology of it is it's thought to be an immune mediated endothelial apathy It affects the brain the retina and the cochlea on a this is From a paper where they were able to do a retinal biopsy of a patient who unfortunately passed away while they were experiencing Seuss X syndrome in it You can see these serious deposits kind of in between the the membrane and the vasculature Interiorly and those are found Kind of intermittently throughout The arteries and also there's some thickening of the walls in the areas where there's not the serious deposits And so that the thickening is noted to be different from diabetic thickening. It's serious versus Aglaculated PAS positive with diabetes and not all vessels were thickened with Seuss X patients There is no evidence of thrombus in any of the occluded vessels It looked like it was just from the endothelial swelling and some of the articles actually kind of compared it to juvenile Dramatomyositis, which also has occluded vessels from endothelial swelling and it kind of hinted at maybe some glial cell dysfunction With the sequestration of the fluid None of the brain biopsies showed any necrosis in the vessel wall so it's not a vasculitis It's a vasculopathy And the mechanism is still really unknown But some of the theories that have been put out have been either Antidethyloantibodies or a T cell attack or maybe compliment mediated damage the classic findings on MRI Really the corpus closer Is patho mnemonic and then cephalopathic patient it's best seen on a sagittal T2 flare Which may not always be ordered so if you suspect Susak you want to get a sagittal T2 flares MRI the micro infarcts and prefer the the central portion of the corpus closum and it's described as snowballs with Evolving to holes and it occurs only in Susak Another finding is the string of pearls and it's a studying of the internal capsule by micro infarcts I've got the pictures of that best shown on diffusion weighted imaging Leptomine and geol enhancement is also classic in gray matter involvement So here are the snowball pictures in the corpus closum and that Evolved into the holes, which we saw actually with our patient and the string of pearls Picture here on diffusion weighted imaging So an FA you'll see arterial wall hyperfluorescence. It's often multifocal With Brent's retinal artery occlusions, and they may be peripheral again as we saw in our patient and left eye There was one at the far periphery If it's normal initially and you suspect Susak they recommend doing repeated FAs At differing intervals another unusual feature of this syndrome is are the gas plaques and they're actually kind of mid-segment Plaques in the arterials which are different from the hole in horse plaques, which are usually at the bivocations Then cephalopathy evolves subacutely Often these patients will present with psychiatric features. They may be found in the psych wards They'll have extensor planter responses may have seizures and frequently have headaches hearing loss due to embarkation of cochlea Frequently associated with vertigo much like our patient presented with low frequency hearing loss and this is one of the in terms of prognosis one of the the main residual Factors for Susak's is that they often continue to have hearing loss and they'll require cochlear implants So often the the patients kind of get worked up for atypical MS or atypical atum And so some of the differences between that In MS and a them the closer involvement is usually under the close them and in Susak's the central fibers of the close and more involved and It's demyelination versus microembarks MS doesn't usually have leptomeningial enhancement And deep gray matter involvement is usually also rare in MS as is deafness So there's a lot of a lot of words on the slide, but kind of The the basic is the traditional treatment is usually pulse treatment with IV methyl prednisone Followed by high-dose oral prednisone and then IV IG And then cyclophosphamide or or micro phenylite some papers discuss a differing treatment plan for those patients who just present with out encephalopathy Although it follows this a similar pattern IV IG steroids They it may be at a Slower taper, but they caution that that you know with the unpredictability of encephalopathy that you may still want to treat pretty aggressively for this Additional treatment options are Ritux Mab, which is a monoclonal antibody to just CD 20 positive B cells and those are found only on mature B cells not on the stem cells or the plasma cells It takes about eight months to replace those cells If patients aren't responding to conventional therapy, you might want to consider plasmapheresis For those patients who were initially diagnosed with MS and were treated with interferon It has not been shown to be successful for treatment and often those patients worsen clinically Monitoring includes serial ophthalmology exams Following with audiology neuro psych testing and repeat MRIs The prognosis can vary it can be monocyclic there can be remission after a couple of years and they never have another episode of this It can be polycyclic where it recurs again kind of in a short period Or it can be chronic where they have prolonged continuous course in which the disease is active They frequently see that for the patients who just present with Branch retinal artery occlusions there was one patient that had a kind of a chronic course over about 30 years So in summary C-section syndrome, it's frequently misdiagnosed It's a triad of encephalopathy hearing loss and branch retinal artery occlusion the pathology is thought to be an autoimmune endothelial disorder and the treatment is usually with steroids With the length of treatment depending on patient response The newest therapies for tuximab and you want to follow the patients closely if during the steroid taper They're decompensating You want to increase the dosage prognosis again varies from complete remission to Continued cognitive impairment and hearing loss But blindness is actually rare So for our patient her clinical course She received a three-day course of IVIG and developed some leucopenia pretty severe Her husband was kind of concerned at that time and actually wanted to work back up for Lyme disease Which they did and got an infectious disease consult But it was all negative. She didn't they didn't agree to steroid treatment and she got three days of solumedrol And I was going to be started on retuximab therapy closer to home as Far as her condition on discharge. She was still having pretty unsteady gait. She's still at the right of her field visual defect and was Still having some weakness in her legs Questions. I didn't show the visual fields, you're right And I didn't because they were not very reliable. She when she came to us. She was she was very very tired very confused and I Think kind of fell asleep during the visual fields actually. I believe they're from the the vascular occlusions Yes Any other questions, okay, thank you


Hi, so it's hump day, I guess, Wednesday. Just want to point something out, if you guys haven't noticed, which is that it's really nice outside. And one of your enemies this semester, when you're working on the assignments, you can imagine that the world is against you. Your kernel will crash. Clearly, it's our fault. Or something will go wrong, and the one time we rerun the test on your kernel, it won't work or whatever. But you have a new enemy this semester, which is the weather. So the weather is normally kind of an enemy, but it normally doesn't really start to kick into April, where it gets really nice outside. And you think, I've been inside all winter, and I don't want to write kernel code indoors anymore. I want to go outside and play. But the problem is it's 60 degrees now. So I would suggest you guys finish all of the assignments by next week, because then you can enjoy the one. OK, anyway, just want to point that out. Yeah, all the assignments, including all the ones we haven't released yet. We started talking about fork last time. Today, we're going to finish talking about fork. And then what I've done is, rather than kind of slog through the process-related system called interface, what we're going to do is stop and talk about synchronization. And one of the reasons to do this is because Assignment 1, which we'll release later this week, does a lot with synchronization. So it's helpful to talk about it now and do some examples in class so that when you get to Assignment 1, you have some idea what's going on. So this is one change we've made to try to sort of synchronize the course content a little bit better with the assignments. So we'll talk about fork. And to some degree, this is not a bad place to stop and talk about synchronization, because fork is one of the things that creates synchronization problems on computer systems. It's not the only thing, uh-oh. It's always one thing you forget. But it's one of the things. Are you going to come back up? No. One more try. It's so weird. Like it wants to, but it's not quite there. Oh, there it is. OK. Thanks, Chrome. I don't know what's to be over there. OK, done. Makes me want to listen to that song again, but we won't. OK, so just to announce, OK. I lost what I was, my train of thought, clearly, but we're going to introduce you to synchronization today. So just quick announcements, please. If you're working on Assignment 0, it's clear that people are, which is awesome. How many, well, anyway, I'll ask these questions in the forum later.  People have been in office hours, which has been great. OK, so I have a couple questions about the setup this year. Is discourse working out for people? Are people happy with that? Seem to work. Please, like, change your profile with a picture and your actual name. So I don't have to, like, look at your UBIT name and try to guess what your name might be, because that's kind of a fun thing to do, and I have better things to do. So like, set up your real name or something you want to be known as on the forums, I guess. OK, what about the screencasts? Does anyone watch those? I've got some people have seen them. Yeah, are they useful? You might want to turn them on in, like, HD, because otherwise it's kind of blurry. I've never done this before. Next time I'm going to make the fonts a lot bigger, but right now the type's a little small. And the last thing, I put something up on discourse. So it occurred to me that Stack Overflow would be, like, a great tool to provide for you guys to use for the class. Does anyone think that would be nice, like a Stack Overflow type forum? I think it's, like, so discourse is kind of nice, but it's like these conversations or whatever. And Stack Overflow has this benefit where the good answers sort of flow to the top, right?  But yeah, so I think it would work. The problem, anyway, we'll talk about this more on the forum. The problem is Stack, I was thinking, oh, this is great. I'll just install the Stack Overflow code. It won't be a problem. It's not that simple, right? There's some, like, vetting process that we have to go through. But I think if we cooperate, we can probably get through it. Yeah. Screencasts are on the assignment. They are on the assignment. So if you reload the assignment, they're just embedded into it. Yeah, so you get to hear my surprisingly whiny voice. I didn't realize how whiny my voice was until I started listening to it. I was like, oh, terrible. I don't know what to do about that. Probably take some lessons or something. I can start talking in an artificially deep voice. OK, so any questions about the material we covered on Monday? So Monday we got through talking about fork. What fork does? Kind of an important moment in the history, in sort of the history of your process, the moment it's created from something else. Any questions about fork? Just a few slides of review. So remember, this is sort of the updated process model that we got to where we introduced a level of indirection so that we could share some things between the parent and child after fork, right? And we had these three levels of indirection from file descriptor to handle to object, right? Again, this is something you guys will know a lot better after assignment 2. And that allowed us to share a couple pieces of state separately. So the file table, which contains the file descriptors, or index is into the file table, is private to the process. The file handles are private to the process, but they're shared. They can be shared after fork between the parent and child. They don't have to be. And the child doesn't have to use the file handles that are shared with its parent. If the child process wants to disown its parent, doesn't want to communicate with it, doesn't care about it, it can just close everything in its file table and move on with its life, right? There's no thing that requires it to share file handles with its parent, but it can. And then the low-level file objects save state that's used by the kernel. That's for the file system in specific state. And that stuff is shared sort of transparently between multiple processes, and that's managed by the underlying file system layer. Processes don't even have to worry about this. OK. So remember that fork copies the thread of the calling state. Fork copies the calling thread by default. The address space, the process file table. And so after fork, my child has whatever thread called fork, an identical address space to the parent, and an identical file table. So that means that that file table points at the same file handles that the parent had opened when it called fork. OK. So fork returns twice, remember? It turns zero once. What's the other thing it returns? The process ID of the process that was just created. So that's what's returned to the parent. And this is how you distinguish between whether you're the parent or the child when you use the fork call. OK. So any questions about fork before we plunge on? Yeah. So with fork, you said that it returns the return zero if it's the parent or the process ID of the parent. Can you explain again what fork returns? Ah, OK. Good question. So fork returns two values. If fork returns zero, I am what? Child. If fork returns, OK. So I just want to point out one thing. It's good to be accurate about this. This is on success. If fork fails, then fork will return some negative value. I think it's negative 1, and it sets air no, and that's done by the C library for you. So this is on success. On success, fork returns zero to the child, and to the parent, it returns what? The child's process ID. And this becomes important because there is a system call that the parent can use where it has to identify its child by the child's process ID. So it's specifically weight. So if I want to wait for my child to exit, I need to pass the child's process ID to the weight system call, so that's how the parent finds out of it. Does that make sense? Cool. All right, any other questions about fork? Fork returns twice. I think that's so cool. It's just weird to think about. All right, so now let's go back and look at one cool way that we can use fork. And this is a very common use of fork to create these process pipelines that we talked about last week. So a canonical way of programming on Linux and Unix type systems is to create pipelines of processes where the standard output from one process is passed into the next process of standard input, and that's done without the processes really having to do anything. So that's a really nice, again, some of you guys are so used to because you've been doing it, but it's a really nice model. It's just a very nice way of being able to build up more complicated programs from fairly simple problems. OK, so another system call that a piece of functionality that the kernel provides to processes is something called pipe. So the pipe system call creates an anonymous pipe object. Now there are ways to create what are called named pipes. Has anyone ever used a named pipe before? That's when you know something is really bad, right? Like when you have to start using named pipes, like there's just something about the world that's not right. So a named pipe is like a file, but it's actually a pipe. So there's no contents of the file. It just allows you to communicate between two processes in a pipe-like way. But by calling pipe what I get is an anonymous pipe. So it acts like a file, what pipe returns is a file descriptor essentially that can be passed to read and write in other things. And actually it returns two file descriptors because a pipe has two ends. So on one end, I write, and on the other end, I read. And I think people have corrected me and I haven't corrected the slides. I think Unix pipes are now bi-directional. So technically, there are two ends, but there's no read-end or write-end. If you read to one end, you will get the contents that are written to the other end and vice versa. That make sense? So you put things in one direction and they come out the other direction. So ignore the write-only end. I think you can set up a one-way pipe, but I think they're also bi-directional pipes. So anything written to the right-only pen is immediately available at the read-only end of the pipe. And to allow processes to use this effectively, the kernel will buffer a certain amount of information in memory. So when I write to a pipe, that write can complete before the next process, nor the next process calls read. So this is interesting. This is not necessarily something that's always true of this type of communication primitive. So for example, Go provides channels that don't have this feature by default. So if I write to a channel, the other side has to read it before the write will complete. The buffering allows the two processes to sort of act more independently. OK, so why is this useful? Well, so let's look at how we can use fork and pipe to set up a simple pipeline between two processes. And this is something that's essentially what's done by the shell every time you run a shell pipeline. So here are the steps. First, I call fork. But before I call fork, I create a pipe object. So now both the parent and the child have this pipe object. Remember, the pipe creates two file descriptors. So those file descriptors are in my file table.  So the parent creates the pipe. It's got two entries in its file table now. It forks. The child has those same two entries, and they point to the same pipe. And now I have to do this little sort of delicate dance here where the parent has to close one end of the pipe and the child has to close the other. And what will be left over is a one sort of a pipe that leads from the parent to the child. So it allows the parent to write data that the child can then read. And the nice thing is these look exactly like files. So if I want to take input from a file, I can do that easily. If I want to take input from this pipe as part of a shell pipeline, I can also do that very easily. Happily, I have a diagram here because that would be hard to understand otherwise. So here's my pipe. And let's just imagine I have a read end and a write end. The parent has opened this, so the parent's file table is updated with references to this pipe. Now the child, now I fork. So this is what the child has. The child has these same two file descriptors that point to the same file handles that identify each end of the pipe. And now I just need to make sure that the parent and child close the right ends. And now here's what's left over. So I have this nice anonymous buffer that the kernel is maintaining the memory that leads data from the parent to the child. Are there any questions about this? Yeah. So I don't have to, right? If I left it like this, this would actually allow both the parent and child to communicate data to each other, right? So the parent could send data to the child, the child could send data back to the parent. If you think about how most UNIX, my example here is sort of based on how UNIX command pipelines are structured, they're one directional, right? So I start with one command, I pipe its output into the next command, which pipes its output into the next command, right? The stuff doesn't flow upstream. But no, as far as I know, there's no reason why you couldn't leave both ends open and allow both the parent and child to write and read data from each other and just use this as a form of IPC. Yeah, Ron. Yeah, I don't think so. I think that semantics of a Piper that when I write to end A, it emerges on NB, right? And if I write to NB, it emerges on NA, right? So there's no loop back here. I'm confused. Yep, which end? And then you've designated to write it. So that's the point, right? I mean, the data will flow, right? So if I write to this end, it will be readable on this end. If I write to this end, it'll be readable on this end. If I write to this end and try to read from the same end of the pipe, I'm not gonna get the data that I just wrote. I don't close those up. Is that true? Ah, that's right, okay. Now, you're totally right. So this is going back to your point. You guys have successfully flummoxed me. So that's completely true. So the pipe, so what the two questioners have been able to point out is that if I don't close those ends properly, if the parent read wrote here and read there, it would get the data it just read, right? That's how the pipe works. So in order to allow this to work, I do need to make sure that each process closes one end of the pipe. Now coming back to your question about can I use this to exchange data both ways, yes, right? Because remember, there doesn't have to be a write-only end and a read-only end. I can read or write. This is a file descriptor, right? So it's like any other file. I can read and write from it. So for example, if the parent writes to this end, let's say that this is what I have right now. If the parent writes to this end, the child will read it here. If the child writes to its end, the parent will be able to read it there, right? So this allows me to exchange it. Yeah, sorry, that's... Which end is for the read end? So again, this is a legacy of my slides. There's no read end and write end, right? The only thing that's critical is that the parent and child close the different ends of the pipe, right? So for example, the parent has to set things up so when the child runs, it knows which end to close, right? Because for example, if the child and parent close the same, like let's say that the child closes the same end as the parent, then the pipe essentially is not attached anymore, right? It's a good question, yeah. What sort of information would be something to talk about? So it could be anything, right? I mean, this is just an unstructured stream of bytes, right? So typically you guys are probably used to programs that send text through pipes like this, right? Standard Unix commands at output text. It doesn't have to be though, right? I mean, as long as the parent and child agree on the format of the data, it's just like a file, right? It's a stream of bytes. How you interpret those bytes, totally up to you, right? Yeah, good question, though. Any other questions about this? Okay, so here's an example, right? So, and this, I think this could almost work. I run, ooh, sorry, thanks. So I run fork right here, and now I've got two processes, right? So who's executing here? The child, because my return code is zero. So I close one, I close the one end of the pipe, right? Pipe essentially returns two file descriptors into this array, and now I can read some data, and the parent is gonna close the other end and write some data, okay? So this, and this is unstructured data, right? Unstructured character data that's being exchanged between the two. Okay. All right, so before we talk about synchronization, I just wanna point out a couple of problems that you guys might have sort of observed with fork. Or maybe you guys can help me observe some of these problems. So fork ends up having to copy a lot of state, right? Particularly, what is probably the most expensive thing that fork has to copy when it forks and creates a new copy of the parent? What do you think is probably the most, creates the most overhead? Yeah. Yeah, the address space, right? Remember, when the child starts executing, its memory content should be identical to the parent, but is it shared with the parent? Better not be, right? Yeah, so when the child begins to execute, its address space is supposed to be identical, but it's supposed to have a completely different set of, the contents are distinct. So if the parent and child, if the parent forks and the parent and child both write to the same location and memory, those two writes should end up in different locations in physical memory. So we'll come back to this when we talk about virtual memory, but yeah. So the address spaces are quite expensive. Why is this particularly problematic? So remember, I've got this command called fork, and the only parameters I've given you so far are fork, which creates a new process, but you might assume that, how interesting would your machine be if all you could do was create more copies of the first program that ran, right? You just have lots. It would be like a more broken version of those old Apple computers, right? Like you can create more copies of the same game that you started the computer with, but you can't create anything else, right? So clearly there's a way for processes to change. When does that frequently happen? Yeah, well before, yeah, I mean it's in between fork and exit, right? So if you think about what your shell is doing, your shell is repeatedly calling fork, and then trying to execute a command that represents the thing that you typed. That's what it does over and over and over again. It calls fork and then it tries to execute that command. So here's what fork does. I copy all sorts of state, and then I've copied all this memory, and then the first thing that the child does is it says I don't want that memory anymore. Because what happens when you, one of the things that happens when you run exec is that exec completely destroys the address based on loads of new program. So for example, when I forked the shell, all that shell code that gets copied is completely replaced by whatever the shell is trying to execute. So this ends up being pretty wasteful. Does this make sense to people this problem? So fork spends all this time copying all the contents of all the code for bash, right? That was one of the things that bash had in this address space when we looked at it using PMAP. And then it's trying to run bin true. So then bin true says, oh by the way, I don't want any of that code anymore.  So there's a couple of different ways that systems have worked around this problem. So this is very clever memory management trick that you can play, and we'll come back to this when we talk about VM, because it's like a really neat way to sort of convince yourself that you understand how virtual memory works. So it turns out that I can actually set up the parent and child so that they do share memory after fork, but it's safe because if they try to modify that memory, I make a copy. So this is something that's called copy on write. Now the common case here is the shell forks, and the first thing it does is run exec, and so it doesn't actually modify any of those shared pages and therefore there's no overhead to do it, right? The other thing I can do is there, so there's this new system call that at some point that was introduced which is called v fork, right? And v fork is the variant of fork that you use when the first thing you're going to do is call exec. And so what v fork will do is unless you immediately call exec, it'll fail, right? It'll just, because, and you can kind of imagine what v fork didn't do, right? v fork is like fork's lazy cousin, right? So what did v fork not do? Didn't copy the address space, right? Or didn't copy very much of it, right? So the point is if I tried to start doing anything that would require that address space, I was like, no, no, no, no, no, you can't do that. I didn't set you up with an address space that allows you to do it. Okay, yeah, and then, so as I pointed out, over the years as the system called API on Linux and Unix systems has evolved, you've seen a lot more fork-like variants. So clone is something that you can use now to create threads within your own address space as well as new processes, and clone gives you a lot more control, right? It allows you to determine what parts of the parent and child are shared. It allows you to, so for example, if I want to specify an entry point for the new process or the new thread that I'm creating, I can do that using clone so they don't have to start executing in the same place. So it's a lot more flexible. This is something that came along a bit later. Yeah, and if you look up the man page for clone or any of these system calls actually, that's a good way to find out more about them, more than you would ever want to know, right? Okay, so one last little game with the standard Unix utility. So fork establishes this relationship between a parent and a child process, and this starts right when I boot up. And there's no real way for the child, and that the child can choose to ignore its parent, right? As many of you have potentially chosen to do, and you can choose how much you want to pay attention to your parent, how many things you want to share with your parent, but that relationship doesn't go away. Your parent's your parent. And so if you run this utility on a system, maybe inside your vagrant virtual box, this is kind of a neat thing that will show you the tree that's essentially been generated by all the forks that have taken place and the result in execs that happen later, right? So this should allow you, by looking at the output you should be able to tell, what is the parent or grandparent or great-great-grandparent of every process on the system? In it, so, and you may wonder, where does in it come from? I mean, it's like a chicken in the egg, right? How do I get a process before I have a process? So in it is set up, sort of, especially by the kernel, right? Once your kernel finishes booting, it sets up, and this is not true of your OS 161 kernel, but this is true of real kernels. It sets up the first process by hand, and then that process is responsible for creating everything else, right? What are most, so in this case, what are most of the things that in it created? If you guys are sort of familiar with Unix Linux like servers, yeah. Yeah, so these are like daemons, right? So I mean, you guys may have experience with Etsy in it, right? That's where all your in it scripts are located. That's what in it does, right? I mean, in it is responsible for starting things like the SSH program that allows you to log into the machine, web servers. I've got, I had Git daemon running on this, which provides public access to Git repositories. This is a mail server, all sorts of stuff that's running on the machine, right? Once these services get started, then potentially you have the ability to log in. Again, I've got an SSH, and you can see the PS tree, of course, like PS, PS tree has to report itself. So it's in this tree, its parent is bash, and its parent is SSHD, and I don't know why SSHD, maybe SSHD forked off a couple of copies of itself to accept new connections, right? All right, any questions about fork? Yeah. Oh, good question, okay, so what are some of the things that you think could cause fork to fail? What's an obvious one? Yeah, if I'm out of memory, I don't have enough memory on the system to actually perform the fork, sure. What else? Yeah, so hopefully if you ran a fork bomb like, experiment in your virtual, I don't think this will happen in your virtual machine, but hopefully if you ran it on a well-maintained system, what will happen is that your user cannot create an unlimited number of processes, and that's for obvious reasons. So what would happen is eventually that fork bomb would start to fail because there's a limit that's been applied to the number of processes, and you start to hit that. Now the problem with fork bomb is it will still generate so much system call traffic that it can still be a pain. It's still chewing up a lot of cycles and creating a lot of overhead because it's kind of like a denial of service attack. I mean, even an unsuccessful connection to a website consumes resources, right? But yeah, so fork might fail because that reason, you might have given it bad arguments, right? I mean, there's all sorts of reasons that fork can fail. So if you want to find out all the different reasons that fork could fail, what would be a good way to do that? What's that? Looking at the source code, okay, so that would be an awesome way to do it if you're in an operating systems class and or have a lot of free time, right? So I would certainly encourage you to do that. By all means, go read the source code for Linux fork. I mean, it's out there, it's readable, maybe. What's potentially a little bit more of an expedited way of doing it, yeah. What's that? Oh, wow, that's worse actually. So he's gonna hook up a debugger to Linux, which is also an awesome thing to do and something that is totally possible. And fun, right? But I will see you in a couple of days, yeah. What's that? Look up the error codes. Look up the error codes, and where would I do that? Yeah. Man fork, right? Exactly, so, and actually this would be very interesting. So if you run, if you look at man fork, it'll show you all the return codes, right? And it'll say here are some of the, and it may not show all of them, but it'll probably show some of the common errors and what causes them. Great question. Any other questions before we go on? Okay. All right, so now we're gonna, like I said, we're sort of jumping ahead a little bit. We're getting out of the flow of talking about system calls, but it's a good point at this, it's a good moment to talk about a problem that we've created with this whole fork idea, which is we now have multiple things that are running on the system at the same time. And this is normally a really good thing. And what I wanted to sort of give you a primer. So we're gonna come back and talk about threads in a week, maybe a little bit more. But what you need to know to start thinking about synchronization, and particularly to start working on assignment one, is the idea that the operating system, so up until very recently, concurrency was always an illusion, right? Why is that? Yeah. Yeah, so until like pretty recently, your computer, well, I guess that's not gonna be true forever, sadly. So anyway, until relatively recently in the history of computing, machines had one core, and that core did all the processing on that machine. And then I think it was about the time that my, maybe like early 2000, like right around 2000, I think you started to see the first multiprocessor machines, right? Now that's actually an important distinction. So today's processors have multiple processing cores on the same die. The early sort of multiprocessing machines had two processors in them. So you've got like one processor that did one thing, and then the way that you got multiple things to run at the same time is you just bought more of those, right? So if any of you guys had put together a machine, imagine that you'd buy like four core i7s or something like that, right? Which you would never do because A, I don't think you'd get a motherboard for that and B, you would be out like several thousand dollars, which is probably more than you wanted to spend. So yeah, so those machines had actually two processors, but at that point concurrency went from being an illusion to being real at least to some degree, right? Despite the fact that your computer, normally unless you have a gazillion cores, probably still provides you with the illusion that there's a lot more going on than it can actually do at the same time, right? At this point, you know, here we are in 2016 and your smartphone now has four cores. So concurrency now on modern systems is very real, but the illusion of concurrency is this idea that the system can be in the process of doing a lot more things than it can actually be doing it once, even if the number of things that can actually be doing it once is greater than one, right? So threads are the abstraction that I used to multiplex the CPU and I think you guys are sort of familiar with the idea that there can be multiple threads that are running either within the same process or across multiple processes on the system. Once I have two processes, I have at least two threads, right? There's no real, it's kind of an interesting idea. What would a process be like without a thread? Just a blob of memory, I guess, right? Kind of boring. Okay, so now when you guys, how many people have done a lot of sort of multi-threaded programming in the past who didn't feel really comfortable with some of these concepts? Okay, not enough of you guys. So concurrency is, let me just rant for a minute here, concurrency is super, super important for you guys to understand and it's not just because of multi-core. It's also because concurrency allows you to make even single core machines go way faster because your computer has slow parts and really fast parts. So give me an example of a slow part, the disk. Disk is super slow. Give me an example of a really fast part. The processor, right? I mean, that thing is like zipping along and the disk, okay, so disks have gotten better but still we're talking like Earth to Pluto, right? In terms of the distance between how fast your processor is and how fast the disk is. And so if you can't write concurrent software every time you have to do something with the disk your process is going to sit there for like decades, ages like the universe will warm and cool and warm off again before you get done, all right? So being able to write code that is concurrent which also is not quite the same as parallelism we'll get to that in a minute, is super important today. So if I was you and I were living in 2016 I would say I need to learn how to write concurrent software right now, okay? And this class is going to help, all right? And so that's the biggest thing today, right? Is that despite, and you also have multiple cores out there. So you're telling me, hey, I wanna work as a software developer for you. You have a four core smartphone, I'm sorry I can only run software that runs on one of those cores. What am I gonna do with the other three, right? I don't know what I do, what the phones do with the other three to be honest with you and I study this stuff, so. But so what's hard about writing concurrent software at least on some level is that once you start, so a lot of times until you've written software in this style, until you've written things like this you're used to a model of programming which is kind of step by step by step. So here's how my program runs, it starts in main and then it runs the next line and the next line and the next line and maybe there's an if statement so maybe it goes here or there and maybe I call a function so it goes there and comes back, but you've gotten used to thinking about your program as doing one thing at a time. Once you unloose, sort of unleash the hounds of concurrency, all sorts of things start to happen at once and it requires a lot more coordination in order to make sure that things happen correctly. And so the challenges when writing concurrent software boil down to a couple of things, right? One is coordination, which is essentially how do I ensure that I split up what I'm trying to do in a way so that I can do it efficiently and make use of all the system resources, okay? And this is an interesting problem and it's something we will talk about. This is something that operating systems have a little bit to do with in terms of how they schedule resources. The second thing is correctness and this is what usually people struggle with more when they start to write concurrent software. So correctness problems manifest themselves in a bunch of different ways. One is the system crashes. That's actually pretty good because that's easy to detect. The other problem can be stumbling doesn't happen properly or everything stops happening, right? And your software just sort of sits there. So concurrency creates a lot of issues and what we're gonna talk about for the next couple of lectures are primitives to enable efficient concurrent code, all right? And we're gonna focus mostly on correctness because that's the most frustrating thing to get right but we will come back to coordination, all right? So the operating system is, you might be thinking, well, why are we talking about this in this class? Well, there's two reasons. One is it's almost too late, right? And you guys should really learn this stuff before you graduate. The second reason is the operating system is kind of important when it comes to concurrency. So why? Yeah, right, exactly. So remember, the operating system is a program. That program provides this interface that's used by processes. How many processes are there on the system? Like more than one, right? Like a lot, hopefully on a good system. So the operating system is inherently concurrent. The operating system has to be able to handle a bunch of different requests from a bunch of different processes or the threads that are inside those processes at the same time. So you can look in certain cases and say, well, the program doesn't really need to be concurrent. It's just performance optimization for the OS. It is inherently concurrent because a non-concurrent operating system can only support one process, right? And if you look at the development of Linux or other things, one of the things that the people who develop those systems spend a huge amount of time worrying about is this idea that they might have to stop everything to do something. So in Linux for years, I think there was this idea there's something called the big kernel lock, right? The big kernel lock stopped everything. And so the part of the goal was reduce use of that. Because if I have to stop everything in order to handle one type of request, I've got all sorts of processes that are trying to do things that get slowed down, okay? All right. And a lot of times, even internally, the operating system has a lot of threads. So there are certain threads that are created in the operating system to respond to requests by user programs, but the operating system itself, in order to sort of do things in the background, frequently spawns off a bunch of threads. And so even the OS, when it's not handling requests from processes, is multi-file, okay? And then as Ron pointed out, lots of shared state, right? You know, all the shared state that records stuff about the file system, all the resources that I'm multiplexing, whether it's the CPU cores, whether it's memory, all of that has to be tracked in the operating system. And negotiating access to that between multiple processes requires a lot of shares, okay? And then the final reason that this is super important is because if I get it wrong, it's bad, right? If I get it wrong, it's blue screen of death, its system gets really slow and unresponsive, whatever. You know, if a user program messes up currency, that's okay, we'll just crash, we'll just restart it, right? No problem. If the OS crashes, it's bad, right? A lot of things get affected. Okay. So probably the most coherent, you know, I'm not sure I even really understood this distinction, but there's a, how many people have heard of Go? Oh, that's awesome. Where did you guys hear about Go? Google, yeah, okay. So Go is Google's new program. How many people have programmed in Go? Oh, okay. So Go is awesome, you guys should learn it. And Go is a language that's really designed to allow programmers to unlock concurrency. And they have this great description, and they have, there's a whole talk by this guy named Rob Pike about concurrency and parallelism in Go. And I think it's kind of an important distinction. So just let me sort of point this out. So, you know, what he's trying to point out is the fact that parallelism means that multiple things are actually happening at one time. So without, for example, multiple cores, I can't really have parallelism. It's not a physical reality. Whereas concurrency is about, is they put it dealing with multiple things at one time. So for example, you could have an operating system that was concurrently handling a bunch of requests from a bunch of different processes despite the fact that it was only running on one core. And so what that means is that I'm switching back and forth between things and I'm trying to make sure everything makes forward progress, right?  And I would encourage you to watch it, it's very cool. And this language project is extremely cool, right? It is, if you guys like C code, and of course you will love C code by the time you're done with this class, and you want like a modern version of C that isn't terrible, Go is it, right? It fixes all sorts of things about C, it's just really nice. Okay, so those are things that are good about concurrency, that's sort of why we have to do it. Concurrency really makes, it's an incredibly powerful tool for making things perform better and unlocking all these system resources that you have, right? But concurrency creates these problems and this goes back to your mental model about how different, how your program executes, okay? So when you start having multiple threads, or in the case of the operating system supporting multiple processes, what you need to think about is the fact that those threads in general can be run in any order, can be stopped and restarted in an arbitrary moment of time and once they're stopped, can remain stopped for arbitrarily long periods of time, okay? And again, the normal reason this happens is because the operating system or the thread schedule for your application is trying to make good use of resources by switching back and forth between things and allowing a lot of things to happen at once, right? But these realities create challenges that make it important to get things right, okay? So let me see if I have time to get through this example before we're done. Oh yes, okay, perfect. All right, so this is probably the canonical example of the synchronization and it's designed to make you care about it because it involves money. Maybe I should have put more dollar signs or more zeros on the end of the dollar amounts or something like that, but this is me, okay? Like I care about a thousand dollars, right? Okay, so then here is the code that you wrote or that I wrote, you can blame me if you want, to update the balance on this particular piece of banking software. So what does this do? This calls this function that retrieves the balance in my account, it updates that function, it updates the amount by adding the amount that you're depositing and then it writes that value back and then there's this little thing down here that tells me, maybe sends me a little text message letting me know that you've deposited money, right? So let's imagine that this is what's happening, right? So one of you guys is giving me a thousand dollars, right? This is like B-level material, right? I said I had an unlimited number of A's, so if I have an unlimited number of A's, then in theory I can charge whatever I want for them, right? Or actually maybe in theory that means that the price for them is driven to zero, right? I don't know, anyway. And one of you guys is depositing $2,000, okay? So that's better, not perfect, you know? So what can happen here, right? So now remember, these two, so again, I mean this code looks fine, right? And until you have multiple threads, this code is not a problem, right? The problem is when you start having multiple threads, this code can go wrong in some unfortunate ways, all right? So how many, just to sort of jump to the punchline here, how many different values can my balance have if after this code runs? Two, someone wants to say two, do I hear three? All right, do I hear four? Okay, let's see. All right, so here's the best case scenario, right? And this is pretty much what would happen if you didn't have multiple threads. So let's say this is not a multi-threaded application and these two calls to this function proceed synchronously. So they minus student deposits the $2,000, now I've got 3,000. The B student deposits $1,000, now I have 4,000, okay? So I'm good, this is what we want to happen. This is the version in which there's no money that is inexplicably destroyed, right? Like an invariant here should be that there's the same amount of money before as after, it just moves around, right? Okay, so a different option. What happens if the A student gets to this point in the code? And remember, one of our assumptions was that your code can be stopped at any point in time. And it turns out that this is the point in time that the OS chooses to stop your program and run something else. And the thing it's running is this deposit. So now what's going to happen? So now the B student runs, and this is the point of the code they're at, and now let's say I go back to the $2,000 deposit. Or actually, no, let's say we do the B student first, right? So now I've got $2,000. What's my final balance gonna be here in this example? $3,000. So you guys deposited $3,000 into an account that had $1,000 in it, and the result was $3,000. So $1,000 is gone missing. Okay, now what else can happen? So what's the worst case scenario? I get caught for selling grades, I guess. So let's say that that doesn't happen. This is just slightly worse, right? So the A student gets started, the B student gets started. Now what happens? A tries to put the balance, okay? But then B puts the balance, oops, right? So this is funnier, I guess, because the balance went down, right? But it's equally wrong, right? Now there's $2,000 that have gone missing, right? And so look, like I said, this piece of code works fine in a single threaded environment. If this piece of code is not executed in parallel, there's nothing wrong with it. But once you start executing in parallel, and once you start to have to worry about all the different ways that two threads can interleave with each other, this code has a problem, right? So just my last statement for today, so this is something that you guys may have heard of, this is called a race condition. When the output of a program depends on some detail of how the threads are executed, in terms of what order they're executed in, that's something that we refer to as a race. This is not a feature, this is a bug, okay? And on Friday we will talk about how to fix it. I'll see you guys then.


Well, hi there, it's Sandy Allnag, artist and crafter here on YouTube, and today I'm going to talk about the Copic numbering system, as well as later on in this video, the blue green blending groups, and talk about how some of the numbering system things play out in a color family. This is a free handout that you can download over on my teaching site, and it comes in both the colored version that has my numbers on it, as well as a black and white version, with no numbers so you can fill in your own colors. You may not have the colors that I have, and you might have different favorite color blending groups than I have. These are just some of the ones that I can recommend, because I've used them before, and I find that they work, but there's no rule that says this is the color blending groups. This is just one iteration of them, and I had to recolor mine because I lost the original one, I have no idea where in the studio it is, so I recolored it based on the list that I give you in the color sheet that has all the numbers on it. And it has, in addition to this little rainbow section, it also has a section for neutrals for skin tones and hair, and that sort of thing. There's also a completely separate human rainbow handout, and you can download that one and get tons and tons more combination ideas, and fill out another chart, because yeah, we'd like to do charts apparently, I guess. So for the chart lovers, there's a link in the doodly-doo down below to the whole charts page where you can get lots of freebies. But let's talk about what's on this sheet. This section is all about the naming convention. There's letters, and there's numbers, and there's either one or two letters, and then the numbers, there can be usually two, but sometimes four. But let's talk about the letters. It's the color family. It's R for red, B for blue, Y for yellow. YR is for yellow-red. They don't call it orange, because that would be O21, which would be weird. So it's yellow-red. The numbers that follow have a pattern to them, and it's not 21, it's 21. The two means something separate. It means it's the blending group number two in the YR color group. The color family. So the group itself tells you how saturated it is. If it's a low number, a zero, one or two, it's very bright and intense. If it's a really high number, it's going to be grayed out and desaturated. The one or the last digit will tell you how light or how dark it is. So a low number is a light color. A high number is a dark color. That's why a whole bunch of zeros means it's a super, super light color. There's a couple different kinds of groups. There's natural groups, and in those kinds of groups, the letter and the first digit are the same.  You know they're going to work together, because they're all in that same saturation level in the same color family. But there's some like this one, a Y11, Y17, and a YR16. They all have that first number as a one, but there's a yellow and a yellow red. And they're next to each other on the color wheel. So you can go, aside from the color wheel, one or two steps over to find something that will blend with them. But if they have that same first digit, they're going to be easier to blend, because that means they're the same brightness. So you can look at nearby groups, or you can look at natural groups. The bottom section, I give you kind of a basic rainbow of colors. So this is just, as I said, a smattering of the different kinds of color combinations that I use. And I tried for in the main hexagons here to have numbers that the first digit, the light, the saturation of it, is going to be around a 0 or a 1, sometimes a 2, that sort of thing, in order to get a rainbow that kind of matches, because they're all going to be the same saturation level or close to it. The second digit, I tried to also keep the same in most of them. There's a few where the number is off just because of the visual of the color is different, and there's no science to it. It's art, remember that. But I was trying for something that kind of made sense to me visually, to make a rainbow, and then give you a color combination for each one. As I said, this is just one of many options for color combinations, and you can choose one. And I'll be using the blue-green combination as a jumping point in the second part of this video. And then there's, of course, this neutrals section, just a few ideas to put a few down on paper. If you're brand new and you're looking for a couple of colors, choose what kind of objects you like to color and that you like to draw, and then pick some colors that apply to that. Don't feel like you have to get the whole rainbow in order to get started. I'm going to show you now some different blue-greens and how they relate to each other, and we'll do a little bit of blending. So the first color combination is going to be the one that's on the sheet. This is the one that I have chosen to put there for my blue-green combination. Notice that middle color is a BG05. It's a little more bluish, and I don't have a color that's super light in that combination, and you'll see why in the example I give you later. The BG09 is brighter than the BG18. Remember, I said the lower the number, the higher the saturation level, same thing with these middle colors. And then, of course, those both have O1, those first colors. The lightest color that you're using will depend on a lot of different factors. What color is the object, et cetera. So we're going to look at what it's like when you color something with a super light color as your base or a not-so-light color. These bottom three, notice, are more grayed out. That's because they are BG7s. 7 is a higher number, which means it's a more grayed out or desaturated type of blue-green. If you're somebody who likes desaturated colors like I do, I make a lot of things in very natural colors. You're going to want a lot more of the desaturated colors than the highly intense and bright ones. So I'm going to show you the flick. The flick is a motion that is very common in coloring with Copic markers.  The lighter the color is, the easier it is to make an edge that kind of disappears. Sometimes you'll need to fuss around with it and a colorless blender marker to try to lighten that and make it go to white, et cetera. But this is the basic motion of making a flick. Sometimes it'll just take evening after evening of sitting in front of the TV set and just practicing the flick over and over again to get the feel of it. I'm going to flick the other direction with the darker color and notice the two of them come together in the middle. And in the first example, they're not so far apart. So there's not a vast difference between them. But look at these second ones. There's a huge difference between the really light and the really dark. That's going to need more work in order to get a blend to happen. And sometimes it's going to need more colors in between. And then this one as well. There's a fairly good difference, not as big, but a good difference in the BG7s between them. So the middle stroke that you'll end up doing to join those colors can be what I call the pendulum. So you're basically swinging the marker back and forth, starting above the paper, hitting the paper in the middle, and then lifting up again, almost like a plane landing and taking off again, landing and taking off, or like a pendulum swinging back and forth across the paper. And then you can go in with the light color again and flick back into the main section. Well, now everything looks the same. There's no difference because you darkened the light color. And then when you color over the dark color, it starts to lighten. So you'll have to add potentially another layer or two of the darkest color. Wait in between, let them dry first, because if you just keep adding more moisture over and over and over again, when you try to add more of a dark color, you're going to end up just saturating the paper and it'll start bleeding. So sometimes you just need to wait. Next up, I'm going to try the blending of the second one, which, remember, has a very, very light color into a very, very dark color. So it's going to be a little more challenging. The edges in between are going to be a little fussier. And now that I've added a couple layers of strokes to the BG11, it's kind of made everything disappear. There's just not a very light color anymore. So there's a lot of different ways you can get back to achieving that, but for the most part, your best bet is just to start working back into the darks again and adding more of the dark layer. When you add in your mid-tone, you can also start right over top of the dark. Instead of starting in the middle and doing that pendulum, you could just start there, but it also will lighten the dark area. That's just what colors do. When you take a lighter color and color it over a darker color, it starts to erase what's already there. So there's a lot of back and forth to play around with. Well, here's one thing not to do, which is to start your mid-tone color and end up with a line like I do on that right-hand side. That's not going to work, because you need to either work that pendulum so you're starting and ending up in the air, or you need to start by coloring over the dark area and start moving toward the light area. Again, this one, as soon as I went back in with the BG7II, it all went to flatness. That's natural. Don't feel like you're not getting it, because that happens to you. It happens to everybody. It's just the way things go. My normal way of coloring is to start with a whole block, though, of the lightest color. Just color the whole thing solid, then add in the darkest, work my way toward the medium by going over the dark area. Because I know I'm going to potentially add another layer to it, but that's going to help me to start building toward the light section and then go back in from the left with my lightest color and start working that blend. And then I'll just go back in, if I need to, to darken the darkest area again. Sometimes when the paper is really wet, when it's nice and saturated, you won't have to do any of the back and forth blending. But you also risk bleeding outside of the lines if you're coloring in a stamped image or something, too. So let's try this in a real-world example. I've got a stamp set from Avery L that I'm going to color each one of these two flight vehicles in different ways. First is the combination that was on the chart. So it's the very first one I showed you in the last little graphic. And I've got a lot of different colors and I've got that blue-green color for the base color. The dark color is the BG09. And then the second color, the one in the middle, is going to be the BG05. Remember how blueish that was? Watch what happens to the overall color because I'm adding that element that has a little more blue in it. It's going to change the tenor of the blue-green color. And you can change any color out and make that kind of an adaptation. You can change the BG13 to something else as well. And that will have an effect on the entire color combination because each color layers over top of all the other colors. They start to blend together and they create new colors as they're all together in the same picture. So I'm now going to go back in with the BG13 to start smoothing out some of the areas that I've already colored with the medium color. And notice that I'm not doing a direct flick back and forth. When you're talking about small objects like stamps like this, it's really hard to keep an exact flick going every single time. That's one of the reasons why flicking isn't really helpful sometimes for beginners because you expect there's going to be a large area. And a lot of stamps are very, very tiny and they're really hard to do that. I'm doing little flicks in different directions. Just trying to get less ink on the side that I have to blend with and more ink on the side where I want the shadow. And then just trying to use as few strokes as possible for any final blending steps. And that's kind of the secret of it. The more strokes you put in there, the more chances you have for things to get crazy and messed up. So now I'm going to do some blending on the wing by putting the dark color on the edges of the wing on both sides. And then I'm going to use the BG05 to start blending the edges of those even further. I'm just using a flick stroke toward the center. And then the BG13 going over it with the lightest color again to join them. Now let's use a different angle so maybe that will help in seeing what the flick mark looks like. And I'm going to start by coloring with the BG11. And here I'm going in with the BG18. And the bottom part is going to be solid. And I'm using the side of the marker to make nice solid strokes. And then as I get toward the side that's going to go up the plane and start to blend, I'm lifting the pen up as I get to the top of the stroke. Same here now with the BG13. As I move up and start to try to get to the area that's going to be light, then I lift the marker so that I get a softer edge. It's going to make it easier to do any blending on the other side of it. Now some new colorists like to put all the shading on the outside edges of whatever they're coloring. And while I understand that because shading is a little complex to understand sometimes, it does make it harder to blend because now you're limiting the area where there's highlight because you have two shadow sides because you're coming in from all sides of the image. And it's sometimes easier to just have a highlight on the top and a shadow on the bottom and leave it plain and simple that way. Don't worry about the light. Just give it a one direction for the light coming from the top. And you may find your shading goes a lot easier because you have more room for that gradation to happen. So now I'm going to use a tiny gradation, itty bitty, that's just like the wings for the above plane, but I'm doing it in a very, very small area, not room for nice, big, long flicks. But I make very short marks with the marker instead so I can still get that same kind of blend. And then we'll color this little dunce cap on the top of the chopper. And then I filled in the rest of this with purples just to have another color in there. I am using some flick marks with the BG72 and the BG11 to make some kind of shiny window glass on it. And these are literally just flicks back and forth from both sides layering the two colors together until I make something that feels like glass. So each one of these is saturated to a different level of the paper. So you can see the bleeding through on the top one has more pleasant blending. The bleeding through on the back is stronger because of that. A lot of people get really worried because they think it went through the paper. I want paper that doesn't bleed through and Copic blends in the fibers of the paper. The better the blend, the more the bleed through. And that's okay. Don't stress out about that. I needed little characters to put inside my plane. So I cut out the fox and glued him into one. But the sheep I decided to stamp into the window on the chopper. And I'll show you how I did that. It's kind of a little quick bonus technique here. I fussy cut it out with scissors and then I used two post-its to block it off. And I got my Inkon 3 no-line ink. And you could use any kind of a really light gray type of ink if you want to do something like this and stamp the sheep inside the window. So he's there waving through the glass. And in order to make him look like he's really there, I took the BG72 and just started adding a few strokes here and there. Not everywhere. You don't want to make it look like he's outlined. But adding a little bit of shading around each part of the sheep makes him more visible inside the window. And he just looks really cute peeking out. I kind of like that. You just see parts of him. And it's kind of what you would see if you were looking through glass. So I cut out a bunch of clouds from a dye set from Ellen Hudson and airbrushed them. But you can use inking techniques if you want. And just make a design out of them. I used blue-green paper for one and purple paper for another. And I did color a plane in the BG7s as well. And I used an orange color, a very rusty kind of antique orange to go with those very neutral types of blue-green colors. But for most people, the BG1s and BG0s are going to be much more pleasing for card makers because y'all like really bright colors. So that is it for this video. But I do want to let you know something's coming up very soon. I have a birthday coming up on March 27th and I'm going to do a livestream here on YouTube. And I want to show off all your cards that you make.  The address is in the doobly-doo down below. You can just drop that sucker in the mail. I'd love to see what you're creating and share your work here online. And then we'll do a little artwork that day too. I don't even know what I'm going to do yet. But I thought I'll throw my own birthday party because we still have a pandemic. So I am going to have my own party. I'm ready. I will see you guys again in another video very soon. Thank you for sticking around for this extra long video. And I'll see you in a couple of days with another one. Bye-bye.