It is now time for oral questions and I recognize the leader of Her Majesty's Loyal Opposition. Thank you very much, Speaker. Speaker, my first question today is for the Premier. Today there are 430 people in Ontario's hospitals in ICUs. 43 more were admitted yesterday. This is the highest number so far through the entire pandemic of patients in the ICUs from COVID-19. The Premier was warned that this was going to happen, that the numbers were going to rise, but he chose not to take the advice of the public health experts, of the doctors, of the nurses, of the frontline health care workers. He chose not to take their advice. The question simply is, why? Thank you very much, Speaker. Here's the beginning of this pandemic. Our government has taken focused action to respond to this unprecedented public health crisis. I think it's also important that we note that this is not just happening in Ontario. This is happening across Canada. We've seen a rise in case numbers because of the variance of concern. It's happening across the world. We've been dealing with this every step along the way. We have been listening to our health experts, to Dr. Williams, to the public health measures table, to the Ontario Hospital Association, with whom we're in very close contact, to the CEOs of the hospitals. We are in contact with them, and we have been building capacity since this pandemic began, with over 3,100 new beds, the size of six community hospitals. We've been building our intensive care capacity as well. We put $5 billion into our hospitals since the beginning of this pandemic. We will do more. We will do whatever we need to do to protect the health and safety of all Ontarians. Supplementary question? Well, Speaker, you know, the doctors warned, the very people that the minister's talking about warned the government that the variance of concern were going to be problematic, that they were going to spread very, very quickly. We couldn't let them get out of control, that they would cause a third wave. But the government didn't take the action necessary to slow that process down, to prevent that from happening. Quite the opposite, as a matter of fact. The government did exactly the opposite of what was being recommended back in February. And so what do we see today? 430 people in ICUs in Ontario, 23 more people lost their lives to COVID-19 just since yesterday. These are avoidable deaths, Speaker. The government could have avoided the announcement that's coming today in terms of another lockdown, had they only acted in the way that they should have with the advice they were given by the experts. Question? They chose not to take that advice. They chose not to take the necessary action.  Mr. Pax. In fact, we have taken steps at every step along the way, based on the scientific advice and the recommendations of our health advisers, Dr. Williams and his team on Ontario Health, working with the local public health measures tables and other groups. And we have not hesitated when we've needed to to take action, which we did just this past week when we moved London middle sex into red. We've also put on the emergency break as we've had to in Sudbury and in other locations. So if it's necessary in order to stop the spread of COVID-19 and these variants, we have taken steps at, based on the medical advice that we've received, every step along the way and we will continue to do that. And the final supplement. Speaker, there is a tragic, tragic human cost to the decisions that this government has made. 430 people struggling in the ICUs, 23 more people lost their lives just since yesterday to COVID-19. There are over 250,000 Ontarians waiting for surgeries and procedures that have been put off because of the pressure that's currently on the hospitals. They were warned. They were warned by doctors, by experts, by their own science table back in February that this very thing that's happening now would happen if they didn't take the necessary action. Speaker, why has the government let us here? Why have we ended up in this tragic, tragic place? Thank you. Well, any loss of life due to COVID is tragic, but we have taken numerous steps along the way to build up our hospital capacity to make sure that any Ontarian who needs to be in hospital is going to be able to receive the care that they need. We have invested millions of dollars in building capacity. We have also invested in building up our health human resources to be able to care for people. And more than that, we've been moving actively into vaccinations, which of course is our best case for dealing with COVID-19 and these variants of concern. We've actually completed over 2,276,000 vaccinations. And the news is that we received today that we are receiving the AstraZeneca vaccines. We should receive them today. They will be shipped tomorrow. They will be available to be put into people's arms as of Saturday in communities across Ontario in at least three pharmacies in this public health unit, as well as in primary care offices. We are moving quickly in order to deal with these variants of concern, but also providing the capacity that we need in our hospitals. I'm not sure what else the leader of the official opposition expects that we should be doing in a circumstance. The next question, once again, the leader of the opposition. Thank you, Speaker. My next question is also for the Premier. It is very clear now that the Premier ignored the advice that was provided back in February, rolled the dice on the vaccines and led us to exactly where we are today.  Well, in fact, Speaker, here's what the ICU doctors across Ontario are saying. Over 150 of whom sent a letter to the Premier, to the Minister of Health, and to the Chief Medical Officer just today. And I quote, even if we had unlimited ICU capacity, allowing these COVID-19 variants to spread exponentially is unethical. Why did the government let this happen? Minister of Health. Our primary goal since the beginning of this pandemic is to safeguard the health and safety of every Ontario and wherever it is that they live in the province. And we have taken steps in order to do that by, first of all, building up our capacity in our health systems by making sure that we make the investments necessary to build that capacity in our intensive care units. We've also bought 10,000 ventilators because we know that many patients have to be vented. We've created over 3,100 new beds. We've also enabled the Cordellucci Vaughan Hospital to be opened as quickly as possible in order to carry over with some of the overflow from some of the other hospitals. We're ready to create field hospitals. One in Sunnybrook is ready to go with over 80 spaces for patients. We have another hospital that we will be mobilizing in Hamilton as well. We are creating spaces that we have available and we've asked hospitals to participate in that. And we're also building up the health human resources in order to be able to deal with that in addition to our vaccination efforts. So we are moving on all fronts to protect the health and safety of all Ontario. Leader of the opposition. Speaker, it is horrifying that the Minister of Health is acknowledging that the government's plan is just to let people get sick and see what happens. This should not have been the case here in Ontario. But here's why these 153 doctors are raising the alarm bells in the province. Here's why they said the decisions that the government's making are unethical and I'm going to read the quote from that same letter. Four in 10 patients who come to ICU with COVID will die. Four in 10. I guess that's one of the odds that the government's okay with.  Why does the Premier? Why does the Health Minister? Why do these folks? Why does the government think that this is okay? Thanks for the help. Thank you, Speaker. And I'd like to say to Leader of the Opposition, through you, Mr. Speaker, that what I find shocking and horrifying is the words that you're trying to put into my mouth and any suggestion that we want to, we are prepared to let people get sick and not worry, is absolutely incorrect. We are here to protect the health and safety of all Ontarians and we are taking every step that we can. We are in daily contact with the Ontario Hospital Association with the Critical Care Command Centre as well. And while the situation Ontario's hospitals is concerning, it is under control and we are working with them constantly to build capacity and to make sure that people, if they need ventilators, if they need extra care, that we are there to protect them and to provide for them. That has been our goal since the beginning and will always be our goal is to protect the health and safety of every single Ontarian. Great answer. Your final supplement, please. The Premier was warned by the experts that their framework was not going to work. That's what they were told by the experts. In fact, they're being told the same thing again, but they are not listening and they are not acting. Here's what the ICU doctors say. We cannot rely on the public health measures framework. It did not contain the less infectious, less deadly original variant in Wave 2 and it will not be enough to protect us in Wave 3. Speaker, how can it be that with the advice of the experts, with the warning bells that they've been ringing, that we still ended up here again? And the Minister of Health. Speaker, well I can tell the leader of the official opposition that we have been relying on the recommendations of the medical experts since the beginning. Somehow the leader of the official opposition, Mr. Speaker, seems to be suggesting that we're just making this up as we go along. Not at all. We have been listening to the medical experts at every step along the way. Dr. Williams, the doctors on the preventive health measures table, the Public Health Ontario, Ontario Health, the Ontario Hospital Association, the heads of the hospitals, the heads of the doctors who are the local medical health experts in all the 34 public health unit regions. We have been constantly listening to them, consulting with them, and listening to the recommendations and abiding by their recommendations. That has been the case ever since the beginning of this pandemic. And we'll continue to be our response. We will continue to listen to them and act on their recommendations as we always have. Thank you. The next question, the member for Waterloo. Thank you very much. My question is to the Premier. In the last year, Ontario lost over 74,000 businesses. That's tens of thousands of families who lost their livelihoods. That's thousands of main streets that have lost their hearts. This government promised support that never came. Many businesses are still ineligible for support while others like Davenport business owner, Brandon Selly, has been waiting for 34 days for his grant. We're on the eve of another shutdown. One in six businesses are considering closing their doors for good. If this government isn't going to actually step up with the supports that businesses and workers need, this third shutdown will close thousands of businesses forever in the province of Ontario. Premier, how can you stand by while businesses close at the very least? Will you expand the eligibility criteria for the small business grant so that they have a fighting chance to get through this third wave? To respond, Minister of Finance and President of the Treasury Board. Thank you. Thank you, Mr. Speaker. And thank you to the member opposite for the question, Mr. Speaker. The last week I tabled the budget 2021 was protecting everyone's health and protecting jobs in our economy in this province. Within that, I announced that we would double the amount that small business over 100,000 businesses. That's 100,000 businesses who've successfully applied. But we also continued that by expanding eligibility to the tourism, to the hospitality, to the accommodation-type sectors who have been hardest hit in this province, to the tune of another $100 million grant program, plus a $100 million recovery program for the tourism sector. And the business education property taxes in place, the electricity supports are in place, and the property tax supports. So, Mr. Speaker, this government is protecting the small business of Ontario, and we'll continue to do that. Can you supplement your question? Mr. Speaker, in that same budget, you left out thousands of businesses. You did not change the criteria so that they can apply for the small business grant. You doubled down on a flawed plan for small businesses. This government seems to be going out of their way to make life harder for business owners across the province. Restaurant owners just shelled out thousands of dollars frantically getting organized to open their patios this week. Salons, gyms, personal care businesses were staffing up, buying new safety equipment and booking appointments. But today, once again, they're left scrambling to shut things back down again. And the only answer from this government when it comes to support, other than a broken grant program that most businesses don't qualify for, is that they're out of luck. They're on their own. Speaker, again, to the Premier, what does he have to say to the thousands of business owners who won't get a cent of support from this government during this shutdown? How do you expect them to survive? It's a very simple question. Mr. Grant. Well, Mr. Speaker, thank you again to the member opposite for that question. Of course, I wouldn't want to be the member opposite telling all the restaurants in this great province who are benefiting from the small business grant program. I wouldn't want to tell all the hairdressers and barbers and all the personal service shops that have benefited from the small business program. Mr. Speaker, over 100,000 businesses have successfully applied and we've expanded it. I'll say that again. We've expanded the program so that tourist travel agents, accommodation, small parks, camps can benefit because they've been hardest hit. They've been able to operate but they haven't been locked down but they have no revenue. So, Mr. Speaker, we are helping those in need. We'll continue to help those in need. You know why? Because small businesses are the economic engine of this province and, Mr. Speaker, beyond that, the small businesses of this province are often the identity of our community. And that's why this government, this premier, this government will continue to stand up for small businesses right across the province. Thank you. The next question, the member for Chatham Kent Leamington. Thank you very much, Speaker. My question is to the Minister of Long-Term Care. Speaker, for the past decade, our long-term care sector has been sadly neglected. Many of our homes were built to now outdated standards. The previous liberal government built 611 spaces from 2011 to 2018. That is an abysmal 0.8%, translated 8 tenths of 1%. Increase, while the population of those 75 and over grew by over 20%. Mr. Speaker, more than 400,000 people across the province were on the wait list for long-term care as of December 2020. The investments the previous government made were simply not enough. We need to build modernized spaces in our long-term care home speaker, something the liberals failed to do. Mr. Speaker, with the Minister of Long-Term Care, please tell this House what this government is doing to fix these capacity issues. Mr. Speaker, and thank you to the member from Chatham Kent Leamington for the question and for his good work on behalf of his constituents. And the member is right when he identifies the neglect of the long-term care sector under the previous government from 2011 to 2018. It's our government that is working around the clock to rebuild and repair the long-term care sector. And on March 18th, I was pleased to announce 80 new long-term care projects across the province, which will lead to an additional 7,510 new and 4,197 upgraded long-term care spaces. This is the single largest allocation in Ontario's history. Our government is investing $933 million in these projects on top of the $1.75 billion already dedicated to the delivery of 30,000 new spaces over 10 years. Combined with the previous allocations, this brings us up to 20,161 new, 15,918 upgraded spaces in progress. Thank you, Speaker. Thank you. The supplementary question. Thank you, Speaker. And thank you, Minister, for your highly informative response. This is great news for all seniors across our province. And I know that my constituents will be happy to hear all the great work that our government is doing to modernize the long-term care sector, including our progress in the long-standing, staffing issues, crowding, capacity issues, and issues with the wait list. This work will address many of the challenges our province faced entering the pandemic and that were only made worse by it. Well, this great news for the whole province is wonderful. My constituents would like to know what progress is being made for them specifically with the Minister. Please tell the House what this progress does for my constituents in Chatham-Kent. Mr. Long-Term Care. Thank you, Speaker. And thank you again to the member from Chatham-Kent Leamington. So in Chatham-Kent Leamington, Arch Long-Term Care is being allocated 40 new spaces and 120 upgraded spaces. The project will result in a 160-bed home through the construction of a new building in Leamington. In this tranche of allocations alone, our government will create more long-term care spaces than the previous government did. After decades of neglect, it's a conservative government that will repair and rebuild long-term care. Our government is addressing staffing. Our government is upgrading older spaces to modern design standards. And our government is building new spaces that have been needed for many, many years. It is a conservative government that is repairing rebuilding and advancing long-term care for Ontarians. Thank you. Next question, member for London West. Thank you very much, Speaker. My question is to the Premier. On the verge of another province-wide lockdown, everyday Ontarians are once again wondering how this government managed to mess up so badly. At the same time, Speaker, everyone except for the Premier and his cabinet seems to understand exactly why we are in this position once again. The government refused to give workers the support they needed to stay safe, and the support they needed to stay home if they were sick or if they needed a COVID test. Mr. Education Governor. Speaker, when is the government finally going to listen to the health experts, the business leaders, the workers, the mayors and councils, the boards of health, literally everyone who isn't a conservative MPP, and give people the pay time off they need to stay home so we can finally end this pandemic? Good question. I'm going to ask the government. The government hosted it. Thank you very much, Mr. Speaker. And I've answered this on a number of occasions, and I'll do it again. And I will continue to stand up for those workers who are getting 26 days right now through a plan that this Premier, the Premier of Ford, negotiated with the federal government. I simply will not. And I know no opposition comes to order. We'll support the NDP plan to reduce those sick days from 20 down to 14. It is irresponsible. We will not do it. We will hold firm in giving the opposition the proper access to 20 paid sick days. Only the NDP are suggesting that we should reduce it from 20 down to 14. We won't do it. We'll continue to stand up for workers. And the supplementary question. Speaker, it's not only the NDP. Dr. Peter Juni from the Science Advisory Table just today has reiterated the need for paid sick days at a provincial level in this province. Yes. Without a provincial program of paid sick days, Speaker, without paid time off to get vaccinated, without any help from this government, workers won't have any other choice but to keep going into work where they will keep getting sick. Speaker, how many more times are we going to do this? Is the government going to wait for a fourth or a fifth lockdown before they finally recognize the urgent need for paid sick days for Ontario workers? Thank you very much, Mr. Speaker. And we did recognize and we have recognized how important workers are to the province of Ontario. It is because of the hard work of people across this province of Ontario that we have had the resources that we have needed to invest in healthcare, to invest in long-term care, to have a return to school that has been so successful. It is these workers that we will rely on to rebuild an economy that will be even stronger than it was before the pandemic. Mr. Speaker, that is why it was this Premier and this government that was so forceful in ensuring that there were 20 sick days available to the people and the workers of the province of Ontario that was negotiated by this Premier. Opposition come to order. So that there could be a program through the opposition come to order. The country for our workers, the NDP are asking us to reduce that to 14 days. We simply will not do that. We will stand firm 26 days for the people of the province of Ontario and for all Canadian workers. Order. The next question, the member for Ottawa. So thank you very much, Mr. Speaker. Today there are 430 COVID patients in the ICU, the highest level in this pandemic and that number is rising. Today we'll likely hear there'll be a third lockdown in this province to begin on Saturday. And for weeks, the Ontario Science Table has been warning the Premier about the risks of the new variants and the third wave. Dr. Peter Juney described the situation as completely out of control. And yet the Premier's priority last week was to get on radio and Windsor and go to Brampton and ask people to vote for his candidates. Ontarians deserve a Premier who is giving his undivided attention and focus to this pandemic and the public health measures. Not a Premier who's content with business as usual. So through you, Mr. Speaker, can the Premier explain to Ontarians why he's taken so long to take the advice of his advisers and do what's necessary to protect them? Just the opposite. In fact, since day one, this Premier and this government have been working hard to keep the people of the province of Ontario safe, Mr. Speaker. When it comes to the third wave, I remind the Honourable Gentleman that it was this government and this Premier that was begging the federal government to close the airports so that we could control the variants of concern that were out of control. It was the federal Liberal Government that refused to do it and this government was forced to act unilaterally, Mr. Speaker. The reasons why we have the toughest, the toughest public health measures in this country, Mr. Speaker is because for 15 long years, the Liberals did nothing to improve ICU capacity. They did nothing to improve critical care capacity. They did nothing for long-term care. They did nothing for a strategy for workers in our PSWs, Mr. Speaker. We have had to catch up every step of the way and it is because of the hard work of this Premier, this Minister of Health, the long-term caretakers, the Minister of Finance and all of our caucus members that we have been able to lead the country, Mr. Speaker. The job is not done and we will not let up until we see the back of this pandemic once and for all. I stop the clock. Order. Restart the clock. The supplementary question. I'd like to remind the House Leader the contact rate is 1.1 percent. So the Premier and his House Leader need to stop blaming other people for a problem that's of their own making. We're always two weeks behind, right? And what's evident now is that the Premier and his Cabinet banked on the vaccine rollout to prevent the third wave. Yet since day one, this government has struggled to get vaccines into the right arms and the right places in Ontario. Quickly. That's this government's job. Government's side. They need to step up. And now when the pandemic is once again raging. Government's side. Some to order. Our biggest battle against COVID with new variants. Okay. The head of the Task Force leaves with no one to replace him. And as the House Leader said, the job's not done. So through you, Mr. Speaker, can the Premier explain or tell us who is now going to head the Task Force as we head into our biggest battle with COVID-19? Homer Tien is going to be the head of the Task Force going forward. The head of Orange, who's done such a remarkable job with Operation Remote Immunity. Dealing with our fly-in communities and making sure that our First Nations partners are receiving the vaccine. Dr. Tien has done a remarkable job with Orange, with Operation Remote Immunity. And I have no doubt that he's going to do a remarkable job as the new head of the Task Force. Thank you. The next question, the Member for Chatham Kent, thank you very much, Speaker. My question is to the Minister of Children, Community and Social Services. You know, this past year has been difficult for everyone. Ontarians have stepped up, made sacrifices, and worked hard to curb the spread of COVID-19. By doing so, has challenged families across the province, especially those caring for children with special needs. Even before COVID-19, families in some regions face challenges to accessing care for their children, such as outdated facilities or clinical services that were scattered and disjointed. This difficulty has only been exasperated by the pandemic. So Speaker, with the Minister of Children, Community and Social Services, explain what our government is doing to address these challenges that family of children with special needs are facing. Thank you. Parliamentary Assistant and Member for Ottawa, West Nippian. Well, thank you Speaker, and thank you to the Member from Chatham Kent, Leamington, for this important question. Speaker, supporting children with special needs and their families is a top priority for our government. For these families having a safe, accessible and modern facility to access services and treatment is crucial. In many regions, service is limited by aging and inaccessible buildings. In my own riding of Ottawa West Nippian, my constituents have dealt with the added difficulty of accessing clinical services from locations scattered across Ottawa. That's why I am extremely happy to say that last week, our government announced that we are supporting the construction of new purpose-built facilities at the Children's Treatment Centre of Chatham Kent and at CHEO in Ottawa. I know that the Member of Chatham Kent, Leamington, has been a strong advocate for this new facility in his community. And Speaker, I will have more to say in the supplementary. Supplementary question. Thank you very much Speaker. You know, I am very glad to hear that our government has announced these new capital projects, including a major investment in my own riding of Chatham, Kent, Leamington, to establish a modern, purpose-built and accessible 55,000 square foot facility. Now when completed, this new CTC will serve nearly 30,000 families in Chatham Kent and its surrounding communities, while creating more than 300 new jobs. Now this is great news for the families with children with special needs across the province, as well as their communities as a whole. So Speaker, would the minister, with PA to the minister, be able to provide this house with more details on how these new facilities will improve available services for these families? Well thank you again Speaker, through you to the Member from Chatham Kent, Leamington for that great question. I know firsthand just how difficult this pandemic has been for families with children with special needs, particularly of course in the Ottawa region. Speaker, our government is committed to making access to these critical services more accessible and seamless for families. This new investment through Ontario's action plan will reduce wait times and improve care. In the case of CHEO's One Door for Care project, a project close to my heart, services from seven different locations will be brought together under one modern purpose-built roof that will make it easier for parents and families to access care for their child. As well, this infrastructure project will benefit my community and the Ottawa community as a whole by creating a staggering 3,000 new jobs. This is a game changer for Ottawa. Speaker, our government is never going to stop to work to improve services and make life easier for families of children with special needs and we will continue to do so. Thank you, Speaker. Thank you. The next question. Remember for that one. Thank you, Mr. Speaker. And my question is to the Premier. Speaker, families woke up to news this morning that more restrictions are on their way for much of the province but when it comes to schools it's just more confusion and uncertainty. Earlier this week we saw conflicting messages about whether the spring break would be moved again or cancelled outright. Now more conflicting messages about whether schools will be open next week or closed. If folks happen to be catching the minister's tweet this hour he says schools will remain open. I guess that's what we have to do now as students and staff stay on Twitter all day. I don't know. Mr. Speaker, which is it? Can the Premier tell us if schools will in fact remain open and if they are how he intends to keep them that way when more are being forced to close every single day because of outbreaks. Thank you very much Mr. Speaker. We believe that students deserve to be in class and on the advice of the Chief Medical Officer of Health Ontario Schools will remain open in this province. April break will proceed for students mental health and their development and further learning. Students will be in class today exactly where they belong. And we've built a comprehensive plan fully supported by the Chief Medical Officer of Health cohorting, medical quality masks, enhance cleaning, screening, testing all of which has helped ensure that nearly 99 percent of schools while we deal with the third wave and these variants have concerned that 99 roughly percent of schools are open today. Nearly three out of four schools have no active cases at all. And I want to thank Ontario educators, the students and parents themselves for coming together at this critical time. We will continue to monitor the community rates in partnership with the Chief Medical Officer of Health and the Minister of Health. We will not hesitate to act to protect students, staff and our families. We are grateful that students are in class and that they belong in this province. Thank you. Thank you, Mr. Speaker. You know, the minister is great at spinning numbers, but right now what students and education workers and their families need is leadership and certainty. What they're getting instead is dwindling supports. These so-called enhanced supports, where are they? Supports are dwindling. The testing plan is a mess. One in four schools has a COVID case in this province. 63 schools are closed right now. Today alone, 249 new cases. Children have COVID-19 and it's happening with the minister's so-called enhanced protections. Speaker, I'm going to give the Premier another chance here. Will he put a stop to the half-measures, the confusion, the mixed messaging and take immediate steps to ensure that our schools are safe? I will provide a few numbers to the member opposite. First off, 99% of schools in the province of Ontario are open. In the members community of Toronto, which is a hot spot as we all could agree, 98% of schools are open today as well. I mean, Mr. Speaker, we appreciate this is a global pandemic, a challenge that is not unique to Ontario, recognizing the British and British Columbia, the new Democrats have imposed restrictions and locked down, likewise in Quebec. This is a global challenge we are continuing with, but we are proud on this in the side of the House. We're proud of our students and the system of education that has worked so well to keep COVID out of our schools. The fact that three out of four schools in Ontario have no active cases at all underscores one truth that our parents and our educators and kids are working together and our comprehensive protocol is working every step of the way. We'll continue to consult and work with the Chief Medical Officer of Health to achieve one objective which is to keep schools safe and them open in the province of Ontario. Thank you. Next question, the member for York Centre. Thank you, Speaker. My question is to the Minister of Health. A year later, we'll learn so much about this virus, but this government continues to ruin millions of lives. Instead of protecting the vulnerable and long-term care homes, this Minister logs down 15 million Ontarians and makes them sick. A quarter million surgeries postponed, a million cancer screenings that didn't happen. 60 to 70% of Ontarians are experiencing mental health issues. Our children are anxious and regressing. CFIB says that one in three small businesses may close. And for what reason? We're told that this lockdown is to prevent ICU from being overwhelmed. But today in Toronto, the COVID hotspot, ICU occupancy is 80%. 10% below the goal of 90%. Province-wide, ICU occupancy is also 80%. A surge in COVID patients can be managed with transfers. Instead, the lockdown is in response to modeling by Stiney Brown, which always overfactors the number of ICU patients. He meets the case projection, but the ICU factor is off by two to four times. My question to the Minister, capacity is fine. Will you please look at ICU data in front of you, acknowledge the ICU modeling errors, and stop ruining millions of lives. Please. Minister of Health. Thank you very much, Speaker. Well, in fact, the modeling that has been done by Dr. Brown and his colleagues has informed many of the actions that we've taken to date. And we will continue to follow both the modeling as well as the medical recommendations from Dr. Williams, the public health measures table, Public Health Ontario, and the other medical advisors who have been providing us with their recommendations. The fact of the matter is that we are facing some concerns in our intensive care units, but they are under control. But that is something that we need to continue to work on. We will have more to say about our response to some of these recommendations later today. However, we are continuing to listen to the doctors. We are continuing to listen to their medical recommendations. We've already made changes. We've already put over $1.8 billion just in this budget alone in order to support the extra beds that we've created to make sure that we can deal with some of the backlog of surgeries. $300 million. So as we're dealing with the cases, increasing cases of COVID, we're also trying to work on the backlog of surgeries. We're doing all of this plus increasing. Thank you. A supplementary question. Speaker, to the Minister of Finance, the third lockdown is continuation of the same lockdown we had in the GTA since October, but now province-wide. It's great, which the Premier loosened in response to pressure, not science. None of this is about science. It's about re-election. It's about polling. It's about disagreeing. It's about not disagreeing with the medical officer because to quote the Premier, that would be like tying a noose around your neck and going off a bridge. But the measures imposed are completely absurd. The Costco in my writing allows 500 customers. But gyms, restaurants, beauty industry, dance studios, and kid sports are closed. Why? We have so much data now. These destitute businesses are not a major source of outbreaks. They don't lead to deaths or hospitalizations. Gyms, dance, and sports are safe and good for people's health. Restaurants and salons are safe and good for mental health. The MPPs are collecting a paycheck. Some of them laughed at the prospect of collecting the Serb. But they ruined the decimated millions of lives. Will the minister have the courage to look into the camera and tell these small businesses they're not essential even though they're safe? Minister Kelle. Thank you, Speaker. Well, as I've indicated earlier, that the health and safety of the people of Ontario has always been our paramount goal and always will be. We know that we can't have a healthy economy without healthy people. That is what we are working very hard on in both in terms of creating more space for people to be cared for in hospital if they need to be hospitalized whether that's for COVID or any other issues heart attacks, traffic accidents, whatever it happens to be. We're also working on the vaccination side. The good news is today that we are receiving the 583,400 AstraZeneca vaccines that are going to be distributed as soon as we receive them to all parts of Ontario including in at least three pharmacies in every public health unit region and to primary care offices. We are doing whatever we can to protect the health and safety of the people of Ontario. That has been and always will be our primary and first and foremost concern. The next question the Member for Chatham Kent Leemington. My question is to the Minister of Infrastructure. Last Wednesday that was March 24th the Ontario government presented its 2021 budget Ontario's action plan protecting people's health and our economy. It is here where I learned and I quote the 2021 budget commits and historic new investment of 2.8 billion dollars in broadband infrastructure to ensure that every region in the province has access to reliable broadband services by 2025. Now this proactive approach excuse me is the largest single investment in broadband in any province by any government in Canadian history and will be pivotal to Ontario's long-term economic growth. Speaker I can't tell you just how important this is to the people of my writing and for so many others throughout Ontario to know that they will have high speed internet connected to their homes. Will the Minister of Infrastructure please tell us how the government came to this monumental decision. The Minister of Infrastructure Thank you Mr. Speaker and thank you to the member for the question. Last week's Ontario budget 2021 showed that this government is serious about getting things done for the betterment of all Ontarians. We are all aware of the pressure COVID has placed on us and we have seen the shift in the way we live and the way we do things emphasizing our reliance on being digitally connected to the world. I am proud to say our government is committing an additional 2.8 billion dollars for a near total of 4 billion dollars to accelerate broadband expansion ensuring all regions of this province will know that they can count on us to deliver high speed internet to their homes and to their communities. This also benefits regional economies farmers who can connect and use new technologies for their industry mining and forestry companies and their communities entrepreneurs and many more businesses communities and municipalities as they expand digital integrations and it gives support to greening our economies with less commute times and emissions. Mr. Speaker it's clear Ontario's decision to do so speaks for itself. Supplementary question. Thank you to the minister for that very informative response and I thank you for that and speaker you know this pandemic has shown us exactly why broadband is so important to the people of Ontario. I've had constituents write and even phone me asking when will I get reliable internet service to my home or to my business. That's why I was thrilled to learn of the close to four billion dollar investment to connect my community and the rest of Ontario. And as the minister has said investments alone can't connect all of Ontario. Mr. Speaker can the minister please tell this house about the other issues we face as we work to get 100% of Ontario reliable access regardless of where they live. Minister of infrastructure. Well thank you for the question and like the member opposite mentioned earlier we've all heard the stories and these challenges have only been magnified by the pandemic. There are very real barriers to expanding broadband in Ontario this includes costs and delays when attaching to hydro poles delays in access to municipal rights of way and Ontario's rate for hydro pole attachments and other costs. But we can't afford to let unnecessary barriers and cumbersome processes stand in the way of achieving access to broadband for all. That's why we introduced the supporting broadband and infrastructure expansion act 2021. And if past this legislation would help connect communities to reliable high speed internet sooner by accelerating the deployment of provincially significant broadband infrastructure projects across Ontario. Later today we will continue third reading debate on this bill and we need the support of every member in this house to connect Ontario. I'm counting on you. The next question member for London Fanshawe. Thank you Speaker and my question is to the Premier. Since the Premier has taken office wait list for families waiting to access services through Ontario autism program has ballooned to 42,000. That's 42,000 kids who have who have whose lives have been put on hold because of the government's actions. For over two years families have been forced to go into debt remortgage their homes or to work multiple jobs to ensure their kids don't fall behind. Yesterday I spoke to Natalie a London mom. Her son has been on the wait list since April 2017. Your government has shown time and again that you do not intend to support families like hers. What else are they supposed to think when there's no mention of autism in your latest budget? The Parliamentary System and Member for Ottawa West-Napien. Well thank you Speaker and of course making sure that we are supporting our families with children with special needs is a key priority for our government both during this pandemic and throughout our term in government. Implementation of the new needs based on Ontario autism program is well underway and we begun issuing letters inviting families to move into the new program's core clinical services. At this stage we are focused on gathering important feedback from these first participants as we continue to invite more families into core clinical services. I can tell you that we are continuing to follow the over 100 recommendations of the Ontario autism advisory panel as we roll out the new program including their recommendation that we rely on the clinical and research experts on the implementation working group who are providing key input on key element of the new program. We are also going to continue to support our families. Thank you. Thank you. Thank you. Thank you. Mr. Speaker it's a little too late for after two years the best they can do is 600 kids when there are 42,000 kids on the waitlist. The OAP pilot project was announced over two months ago and why is the ministry still has no specifics about it. There are no metrics for success. There's no northern strategy. No appeals process. No staff. No families. Invitations are not enrolments.  In honour of world autism day tomorrow can you commit to listening and actually learning and implementing from the people who have lived those experiences? Will you accept your responsibility to ensure Ontarians with autism have access to the service they need to succeed? Will the premier commit to public reporting on the pilot's program success and failures? Rejecting unfair impacts ensuring that clinicians and not untrained bureaucrats get the final say in funding and allocations and continue interim funding for all those families who are still on the waitlist. Thank you speaker and as the member opposite knows I do have lived experience in this area and I know how important it is that we get this right and that's why I'm proud that our government is implementing all of the recommendations of our Ontario autism panels report. More than 34,000 families are receiving support through their existing behaviour plans through childhood budgets and interim one-time funding as we continue to implement our new needs-based autism program. That's three times more children receiving support than at any other point during the previous government. We have also been working hard on the other key elements of the panel's recommendations including the launch of foundational family services which includes family and peer mentoring caregiver workshops and coaching so families can support their child's ongoing learning and development and a variety of early-year supports focused on younger children to help them build skills in social communication engagement speech and language and emotional Thank you. The next question the member for Scarborough Gilgill Thank you speaker My question is to the Premier. We just heard from the health table that Ontarians at high risk and vulnerable living in hotspot neighbourhoods are not getting vaccinated at the same rate as Ontarians in lower COVID communities. Homebound and disabled residents in my riding of Scarborough Guildwood are waiting for mobile teams to receive life-saving vaccine. These residents turn to my office every day to look for assistance assistance that they are not getting from their government. Some struggle to get to clinics on their own and it's really shameful. The Toronto Public Health is going to launch a limited pilot program for these these residents who are in need. Why have they been forgotten from this government's plan? Justice Rosalie Abela pleads with us that we should view society through the lens of the vulnerable. Question. Speaker Will this government appoint a person who's sole focus and responsibility is managing the coordination of life-saving vaccines to people with disabilities and homebound across this province? Minister Pelt. Well I thank the member very much for the question. This is a very important issue and I can assure the member that we have in setting up our vaccine distribution plan reviewed it through the eyes of our most vulnerable making sure that we will have a variety of options for people to receive the vaccine. We know that the mass vaccination clinics are not going to work for a large number of people but we also have now we're expanding into pharmacies we're expanding into primary care facilities where some people with disabilities or with comorbidities would rather receive the vaccine but I can also advise that our paramedics are now doing home visits to see people who are homebound and disabled to ensure that they receive the vaccines as well. That plan is already underway. The teams are already working on it. I just spoke to a person with disability who had a very poor experience when he got himself to a clinic because he did not have a lin code that he was supposed to have to receive this vaccine so more needs to be done in that respects. Speaker Ontarians are reading and watching the reports of vaccination clinics sitting underutilized. Worse is the report of large amounts of vaccines sitting in Premier Ford's freezers over 600,000 the rollout of this vaccination program has been frustrating for Ontarians to navigate and with many barriers and incentivizing people to get the vaccine younger workers especially low paid public facing workers in frontline medical staff are now at greater risk of the variants and you know they risk their lives each and every day many of these workers cannot afford to take time off work to wait in lines to get vaccinated or if they have any adverse side effects jurisdictions like Saskatchewan have introduced special vaccination leave and I'm asking this government today to provide a paid vaccination leave for these at risk workers so that they can get vaccinated in. Thank you. Minister Pell. There are two points I believe that need to be answered here one is the any suggestion that there are hundreds of thousands of vaccines just sitting in freezers that is absolutely not the case every single vaccine has already been spoken for it's already been booked for someone's mother, father, grandparent there they are allocated they are going to be given with respect to the AstraZeneca vaccines that expire as of April 2nd 194,500 that we had I can advise that as of today there are 300 left so they will be used before their expiry date not one vaccine is is is going to be misused or wasted we want to make sure we can get every vaccine that we have into someone's arm with respect to people that are vulnerable that are not able to take time off the answer isn't always giving them paid time off to do that another answer is to take the vaccines into the communities where they are which is what we are going to do with some of our community vaccines in the hot spots where we know that there are people that are having trouble because of work issues language issues being home bound for example thank you thank you the next question the member for in Thunder Bay at a coca thank you speaker my question is for the premier the ongoing COVID-19 crisis in Thunder Bay has led to the suspension of in-class learning and that has gone on for a couple months now and currently there are only two child care centers open for our front line and essential workers what is this government going to do to help those families that need child care those essential workers that need child care in Thunder Bay minister of education well thank you very much Mr. Speaker we are obviously aware of the decision made by the medical officer of health due to rising community case numbers in the region of Thunder Bay to close schools on a temporary basis likewise that decision was made based on the best science given that schools were not places of transmission overwhelmingly but they but the medical officer of health believed it was best to close schools for that period of time we have worked hard to make sure child care remains available to all families in all regions of the province recognizing the most recent budget additional supports for child care spaces as well as for child care fees a 20 percent top up of care with respect to what is permitted to be opened in your public health unit that is dictated by the public health authority we're following their advice we accept the recommendations they make but at the government level from a funding perspective we provided significant increase of supports for child care the overwhelming majority 96 percent are open today there's an additional 20 percent top up of the care tax given by the minister of finance that at least it gives on average $1500 per family of savings will continue to be there for the family for the operator for children in Ontario so thank you so thank you speaker and back to the premier and so what I've heard in that answer is there's no help for those families of essential workers in Thunder Bay and that's a sad thing but I have another problem hundreds of constituents are very upset that they cannot get a vaccine in Thunder Bay as soon as the lines are open the those those those appointments are booked and people are desperate they watch while others in southern Ontario have far broader access and even this morning the medical officer of health didn't know about the vaccine roll out when asked a question by a reporter she said well we're not sure how that's going to work people in my writing are begging for vaccines what are we going to do what is the government's plan what is the clear and transparent plan to get vaccines in the correct numbers to Thunder Bay and when is this going to happen Mr. Hill but we do have a clear plan for vaccinations and the vaccines are being allocated equitably across the public health unit regions all 34 of them based on population and based on risk factors we are very fortunate now that we've received a significant supply of the AstraZeneca vaccines which will allow us to open up more widely across the province three pharmacies at least in each public health unit will be carrying them as well as primary care providers there are 583,400 of them coming they will be available for vaccines to distribute and to start putting them into people's arms as of Saturday the Pfizer vaccines are still coming in as well they are going into the mass vaccination unit so there's a variety of ways the people will be able to allocate and access vaccines across the province but certainly it's very good news that we have received those AstraZeneca vaccines which will be available this weekend for people the next question to member for Glenn Gary Prescott Russell thank you Mr. Speaker Mr. Speaker my question is to the minister of children community and social services tomorrow is World Autism Day and it's an important time to remember the challenges that families with children with autism face and Mr. Speaker we have a government that has actually put up more barriers to support the government should be supporting and making life easier not delay delaying and dittering while literally a generation of children go unhelped Mr. Speaker will the government use this opportunity to change course take these challenges seriously and provide parents with the support they need to member for Ottawa West Nippian thank you so much Speaker and as I mentioned in a previous response this morning implementation of the new needs based on Ontario autism program is well underway and we've begun issuing letters inviting families to move into the new programs core clinical services at this stage we are focused on gathering the important feedback from these first participants as we continue to invite more families into core clinical services and this is through the determination of needs process which was a recommendation of the autism advisory panel that in determination of needs process be implemented by a care coordinator who will work with families to understand their child's strengths needs and priority goals this process which was developed on the input of the clinical experts on the implementation working group will result in a funding allocation for core clinical services and we're excited about the work that was done by these experts on this world class determination of needs process and I'll be pleased to speak further and thank you the supplementary question thank you Mr. Speaker Mr. Speaker the government's slow progress when it comes to fulfilling their promises is shameful Ontario was one of the fastest growing jurisdictions in the world for ABA but due to the careless and frankly cruel decisions made by the previous minister capacity has been decimated Mr. Speaker the government has raised hopes let parents down then raised hopes again and let parents down again parents are rightly fed up will the minister commit to actually spending the whole budget this year and rolling out a needs-based system that serves all families not just a select few the parliamentary system again well let me be crystal clear Speaker our government is absolutely committed to our increased investment of $600 million per year in services and awards for children and youth on the autism spectrum we are excited to launch core services under the new program and we will continue to work to get funding into the hands of families as quickly as possible to date to reiterate Speaker more than 34,000 children are receiving support through existing behavior plans childhood budgets and interim one-time funding more than three times the number of children receiving support than under any previous government we're going to continue to work to get this right so that children with autism and their families get the support that they need in this province thank you Speaker Thank you the next question a member for Hamilton Thank you very much Mr. Speaker my question is to the Premier no matter what sector they're in essential workers have faced immense pressures stress and anxiety over the past year Tammy a long-term care worker at Grace Villa in my riding has PTSD from her time working during the horrible outbreak Josie a grocery store worker from Toronto caught COVID-19 at her workplace and now is experiencing symptoms of PTSD as well both Tammy and Josie shared that their co-workers are experiencing similar mental health challenges from working during this pandemic these are our front line heroes and they need your support my bill access to mental access to mental health support for essential workers act would provide Tammy, Josie and other essential workers presumptive access to WSIB mental health benefits question will the government support my bill and help take care of the workers who have taken care of us thank you very much Mr. Speaker look we will certainly take a look at that bill I'm surprised to have the question from the member given the fact that the bill was scheduled to be debated last night in this chamber but as you recall Mr. Speaker the NDP forced the earlier German of the House thereby wiping out the opportunity for the member to present her bill yesterday so I am surprised to hear that it it remains a priority with the NDP given that they were unexcited to hear about it yesterday Mr. Speaker but we will of course do what responsible members of parliament do and use the opportunity for private members business to reflect on it and if it is a good bill as we have always done we support them if it is not a good bill then we won't support it thank you


All right, quiet rainy day. So I have some good news. Had a meeting with Ashvin yesterday, so Lab three, or sorry, yeah, Lab three is pushed back another week, so you have three weeks for it. Lab six is deleted, so there would be no Lab six. And then what we're gonna do is I'm creating a new Lab four that is going to be on pipes and making processes and all that fun stuff. So this will be my creation of a Lab, so hopefully it will be fun and doable. So I guess we'll see, so you'll have a flavor of what I do for Labs and then for the last Lab, the web server one, we're not gonna make them depend on each other anymore, so we'll give you a threaded server with maybe a bug in it and then you'll have three weeks to do the last Lab, which is like a combined Lab four and five that's currently on the website. So that will hopefully make things more doable, it stops there being a Lab due when there's a quiz. So also the other class is kind of behind, so the scheduling stuff is not going to be on the quiz, so the quiz is going to be processes, threads, locks, and all the fun questions you can ask for that. So next week we have kind of free. So early in the week I'll do like a Lab four primer where we'll have an example, we'll use a pipe and we'll kind of see how to use some of the tools you'll need to use for Lab four and then other than that for next week we can do review or just let me know on Discord what you wanna see. I'll go through Ashwin's stuff again to make sure we're not missing anything, but if we want more practice on threads, processes, locks, we can do that next week. But while we're at it, let's just wrap up scheduling. So after the next week, when we have our quiz, we can go into virtual memory and all that fun stuff and actually learn what an MMU is. So we talked about scheduling before, it was fairly basic, we ended off doing round robin and today we're going to, one of the comments last time was, well, what about if we added something like priorities? So we can add priorities, that seems like a good idea, but it's also going to complicate our life. So if we add priorities, that means we want to favor some processes over other processes. So if you sign each processes priority, then you have to decide what you want to do with that. Do I always want to run processes at a higher priority or do maybe I just want to run them for longer or what does that even mean? So if you do decide to just run higher priority processes first, you could just round robin all the processes of equal priority and then after those are all done or sleeping or blocked, then you can move down to the next lowest priority and round robin all those and go through that and that is one valid thing you could do. So when you add priorities, you have to give them a number, the easiest thing to do is just assign a number for a priority, but then you have to pick, does a higher number mean a higher priority or does a lower number mean a higher priority? So the way Linux decided to pick it is they decided that the lower number means it is a higher priority. So for normal processes in Linux, if you see a minus 20, that is the highest priority for normal processes and a 19 is the lowest priority. So when you have priorities that also might lead to starvation that we touched on last time. So if you always schedule processes with a higher priority, then you may starve lower priority processes. If there's enough higher priority processes that take up the entire CPU time, then you might starve lower priority processes because they just might never run, which would not be fair and you can just starve them out. So if you want to avoid that problem, if you're the OS, one thing you could do is you could dynamically change the priority. So if a low priority process hasn't been executed in a very long time, you could temporarily bump up its priority until it finally gets to execute and then after it executes, you can reset it back to its original priority or you might lower the priority of a process that's been hogging the CPU. Either way is a solution. Yep, just because. I don't know why they picked this range. It's a range of 40. We'll see it gets weirder. We'll see it like a normal range. We'll see it. Weird historical reasons. I don't know why exactly it was 40. They figured 40 was enough. So now that we have priorities, another new issue we have is something called priority inversion. So you can accidentally kind of change the priority of a process. So you can accidentally change a low priority process to kind of behave as a high priority process and that's caused by dependencies. So if a high priority process depends on a low priority process, well, if it just yields its CPU time away and you always prioritize the highest priority process, well, it'll just get woken up again and again and it's waiting on a low priority process. The only way to actually break that dependency is if you schedule the lower priority process as a high dependency process because a high priority process is depending on it. So that's one solution and it's called priority inheritance. So if you detect that one process depends on another one, then you would want to make both processes have whatever one has the highest priority. So you just inherit the highest priority number between the two processes. And the kernel is going to be able to detect this because if there's a dependency between two processes, they must be communicating together and we know that all communication has to go through the kernel. So the kernel can actually detect a dependency. So if there's two processes that are communicating together, then it would make them the highest priority of the two. And then of course it would also have to do this recursively to chain across multiple dependencies if they're needed. So if A depends on B and B depends on C and C depends on D and A is a super high priority process, then the kernel would have to make all the processes temporarily a high priority. And then whenever that dependency is broken, it could revert them back to their original priorities. So that is how we would deal with priority inversion. So another thing you might do when you do scheduling is well, you might want to separate the processes into two categories. A common historical way is to change them into foreground processes and background processes where a foreground process is connected to a terminal which is something that you type on and you see the results for. So any foreground processes are ones you are literally typing into and you would want them to be more responsive. While background processes are something you don't interact with which is probably gonna do computation. So maybe you don't care about response time for those and you actually just want them to be completed as quick as possible. So maybe you want to reduce the average waiting time. So you separate your processes, one cares about response time, one cares about average waiting time. So you could use a different scheduling algorithm for both of these types of processes just because you have different needs for both of them. So that's one thing you could do. And then if you do that, you essentially have multiple cues for each processes and you schedule them differently. So for all your foreground processes you could just use round robin because you want good response time and for all your background processes you might just use first come first serve just to make the scheduler as easy as possible to implement and just make decisions as quickly as possible and then reduce the number of context which you have to do because it's just some long rank computation you don't actually care when it finishes. But now you only have, you'll still only have like one processor on your machine and now you have to schedule between cues. So maybe you round robin between foreground and background process or the foreground and background cues and or maybe you want to do all the foreground processes as a higher priority than all the background processes. And so your foreground cue is a higher priority than your background cue. There's all types of options you can do once you try and optimize things in scheduling because there's no clear answer and every process has different demands in what they care about. So there's no right answer, only trade-offs unfortunately that is our lives as engineers. And we haven't even talked about scheduling for a system with multiple cores on it because it gets even worse. So we'll assume symmetric multi-processing so that's SMP which is what the kernel says so it's SMP preempt. So what SMP is, it assumes that all CPUs are connected to the same physical memory so they all access the same physical memory and that they have their own private cache at least at the lowest level. So at least they have their own L1 and L2 cache. There are systems where CPU cores are not all connected to the same memory and programming them is very, very fun, not really. Oops. So we'll just talk about a normal system that assumes all CPUs are connected to main memory because that just makes our lives infinitely easier. So if you have multiple CPUs now, well I could just use the same scheduling algorithms we talked about and just tweak it slightly. So I just maintain only one scheduler, it could be first come, first serve, it could be round robin. And instead of just picking one process to run on one CPU, I will keep picking processes off using the normal round robin and giving them to the next available CPU until I utilize all my cores. So that's one easy solution, yeah. So the question is, is there a kernel that just takes over a single core and just stays there? Yeah, so you could I guess have the kernel just only execute on one CPU core forever? Would you use that system? Would you install an operating system that if you have like a four core machine, you can only use three now? Yeah, the goal of the kernel is just stay out of the way and let you run your applications because really that's all anyone actually cares about, right? The whole, yeah, the kernel's job is just to be transparent and let you run your stuff and essentially get out of the way. But that's something you could do but I don't think anyone would use that kernel, unfortunately. So if you do this and just do round robin or something, just chuck it on CPUs as they're available. Well, you get good CPU utilization because you're just feeding all the CPUs any running processes they can and it's pretty fair to all processes. Like you could just use round robin between it. But the disadvantages of this is it's not going to be scalable because we only have one scheduler. So there's essentially one global lock around that scheduler that is divvying up, putting the processes on all the CPUs so there's only one thing making the decision. And the other problem is it has poor cache locality because when you context switch processes they might swap what CPU core they're actually executing on which would invalidate all their caches and it would have to repopulate them again which is going to be slow. But this scheduler is the first real schedule we'll see. It was used in Linux in 2.4 which if you look at the timeline that's probably like, how old is it at this point? It's probably like 40 years old at this point but this is one scheduling algorithm that was actually used. So we've seen our first real scheduling. But, oops, better solution would be that hey, if having one scheduler is bad and that creates a global lock and if I have a bunch of CPUs maybe I want a scheduler just runs independently on each CPU so then I don't have to put a lock or a mutex along it. I know only one CPU has one scheduler and it doesn't have to fight their completely independent. So you could do that. So each CPU just has a round robin scheduler that it keeps track of and then when there's a new process the scheduler's only job is to just assign it to a CPU. So if you have eight or four cores and eight processes then the global scheduler would just put two processes on each core and then they would stay on each core for as long as they're running. So this is easy to implement. It's just, you just do the same scheduling you just did but just once per core and you just have to decide what core process goes to. So also scalable because everything's independent it's got good casual quality because all the processes stay on their CPU. So if you had like a super long running process that's doing some computation and it gets context switched out and it switches in something like LS that doesn't do that much. Most of your cache would still be intact so when you context switch back in that process it's doing this big computation. A lot of your cache would still be valid and it could just keep on running and doesn't have to repopulate the cache so it would be actually really, really fast. Disadvantages of this is you might have some ridiculous load and balance over time as processes come and go. So if you just have one CPU core that's happened to get all the very short running processes on it it might be that it finishes all those processes and all the long running processes are on all the other cores and if all the processes to stay on their core there'll just be one core that's idle now that's not used. So it's not gonna be able to use all your CPU resources as they kind of come and go. But you can make a compromise. That sounds like it has a fairly easy solution. You can detect if there's an idle CPU so you'd have a global scheduler that essentially rebalances the per-CPU cores so if one of the CPUs are idle it can just take a process from another CPU which is called work stealing and just give it to the idle CPU so it has something to do. But if this happens you might actually want some say as into what processes can actually switch cores. So you might want some control. If you have a process that you know is really, really sensitive to its caches then maybe you don't want that process to switch cores and you would prefer that if it's stay if it executes on a core it stays there and maybe you have some other process that you don't care about if it switches. So the configurable option for that is called processor affinity which if people are using Windows at some point if you go into task manager that's one of the options you can see if you right click on a process you can set its affinity and basically that means the preference of that process just to stay on a single core which will essentially get you some better performance. So if you have, I don't know like a game or something you really, really care about performance you could just essentially set it to only run on one core and not move and then it would maintain its cache better so you're sure it doesn't move. So this is another scheduling technique that is actually used in the Linux curl. This is a kind of simplified version of the 01 scheduler and that was used in Linux like 2.6 which now we're like only 30 years old at this point which is actually pretty good. Oh, okay and now an aside if you get into like super high performance computing there's another strategy called gang scheduling which is another unfortunate term. So you might be in the situation with high performance computing where multiple processes you have to schedule them all simultaneously. So the scheduler on each CPU can't be independent because I have eight processes I want to run all at once and all together. So gang scheduling is also called co-scheduling and you need to schedule all the processes simultaneously so they essentially just act as one big unit. So it just requires a big global context which across all CPUs to change them all more or less simultaneously and that is something you'll only really see when you get to like high performance computing. So another thing, another difficulty is something called real time scheduling and that's yet another thing yet another problem and real time just means that there are some time constraints either a deadline or some rate you need to maintain. For example, like audio there is a set frequency that you need to maintain in order to fill up some audio buffer on like your sound card. And if you don't maintain that your audio will just sound like garbage.  And so that's a really common one. Another one is like any auto-piloting software like on a plane, if you need, if you know you need to make a decision within a few microseconds or a few nanoseconds that's something you actually care about for a plane. If you miss the deadline and the plane crashes you can't just say, oops, sorry, I missed the deadline my software ran a bit slow. So you actually need to provide some guarantee that you can actually hit your deadlines. So a hard real time system does provide a guarantee and you have to guarantee a task completes within a certain amount of time. Typically this will only be done for like little embedded chips where you can actually count the clock cycles for everything and it's doing something really, really simple. So you actually have to count the clock cycles and it would be a simplified processor where you can understand what happens with the cache. So you'd have to assume like all the caches are cold. I count the number of cycles that it could take and hey, it runs within 10 milliseconds or something. So I know I can hit this deadline. That is really hard and kind of annoying. So what people typically do and you can imagine counting cycles especially with something running on the Linux kernel or running on a modern CPU that has multiple levels of cache, associativity for the cache, different pipelines and all sorts of stuff going on. You can't actually provide any guarantees because it is going to be way too complicated. So for anything, essentially anything running on like the Linux kernel, it's something called soft real time where it's just always hit in practice. So you just give critical processes a high priority and you just figure out, hey, the deadlines always met in practice. So when you have a system that's essentially overkill so you have like a five gigahertz chip on your machine and you only have to fill in a few hundred bytes every few microseconds to your audio chip, well, it's going to be fast enough that you don't really have to argue about it. It's always met in practice. And so Linux does let you do soft real time and we'll see kind of examples of that because there are some threads on your system that are running as this real time, this real time priority. So Linux, in addition to the scheduling we've already talked about, it actually implements first come first serve and round robin and they're actually useful scheduling algorithms and are in use. So if you are sadistic enough like me and you want to search the Linux kernel source tree, you can look up sketch FIFO, that's first come first serve and then round robin is sketch RR and you can see exactly how they implement it or you can even change your processes to use this type of scheduling if you want. So what they do is just they use a multi-level queue if it's like a soft real time scheduling for all the processes of the same priority and it lets the kernel itself dynamically adjust the priority to be a bit more fair. But the way there's going to be on Linux, there's going to be two types of processes. There's going to be soft real time processes and those are always scheduled first. So they always schedule them at the highest priority and they'll use something simple that you can argue about like first come first serve or round robin and then normal processes are going to kind of essentially adjust their priority based on aging and use at least back in the day the two strategies we just discussed. So this is where it gets weird if you, oh yeah. So you get the choice. On Linux your process can be soft real time or it can just be normal scheduling. So first come first serve and round robin are choices for scheduling soft real time. Yeah, you can say what it uses. So I think by default uses round robin but you can change it if you want and you can set priority as a process and we'll see what some processes are doing. So the real, the soft real time processes are always going to be prioritized and this is where it gets weird if you want to read the priority numbers on Linux. So soft real time the scheduling policy will again either be first come first serve or round robin and historically there are 100 static priority levels zero to 99 with zero being the lowest and 99 being the highest. And then annoyingly the normal scheduling that applies to processes so they'll be under the name sketch normal. The default priority is a zero and the priority ranges for those processes are negative 20 to 19 where negative 20 is the highest and 19 is the lowest which is kind of bad. And then because of this if you're a process you can also change your own priorities with system calls so you can use the nice system call to say how nice you are and we'll see what that means and the schedule set scheduler to figure out if you want first come first serve around Robin. So let's go ahead and pop over to our VM because we should actually be able to read this now. So at least the first few columns. So the first column there is our process ID can everyone read this by the way? We're good. Okay so the first column is the process ID again it's just a number we know number one is fairly important and then we can read the second column that's just the user that the process is running in and then the third column PRI is the priority which is doesn't correspond to any priority I've shown you so far annoyingly. It's like kind of a unified Linux priority and then the last one or the next column is the niceness which is NI which only applies to normal processes. So this is where it gets kind of weird to explain this stupid Linux specific thing. So how it works. So at the bottom is Linux priorities and the Linux priorities are always the lowest number is the highest priority. So and then it divides them up into two regions that kind of have a unified priority. So if you have a normal process it essentially shifts the negative 20 to 19 to be like a positive number on the number scale. So it will shift it up in this number line. So if you're a normal process you will be between zero and 39. So if I look here quickly at the third column there the PRI if that zero or above it just means it's a normal process it's not a soft real-time process. So if that's the case then I can actually use the niceness number and the niceness number is gonna be the priority number just minus 20. So the niceness is just gonna be so a niceness of minus 20 corresponds to a unified Linux priority number of zero. So does this make sense? Cause it's kind of weird and this is really only so you can read output of top. So that way annoyingly well so that so what they do is any real soft real-time process is then represented as a negative number. So they took the old priority which had zero as the lowest and 99 the highest and they just take the minus of that and then subtract one to it to put on this kind of unified Linux priority. So an old priority of zero would correspond to a negative one which is here and then an old priority of 99 which was super high corresponds to the next priority of negative 100. So negative 100 is the highest priority and you know from reading the priority number if it's negative it's soft real-time if it's negative 100 it's as real soft real-time as it gets and if it's positive it's a normal process and then I can read its niceness number from negative 20 to 19. Why it's like that I have no idea but does that kind of make sense? Again there will never be like a question like this this is just really so you can read the output of top and it makes sense. So let's go through it and see what we can glean from all of our processes. So everything in white there on the right side column that's a process and any green text means it's a thread. Yeah, yes. Yeah so PRI is priority which corresponds to this Linux priority at the bottom the unified one. So if it's negative it's soft real-time if it's zero or above it's a normal process and then you can read its niceness which would be negative 20 to 19 but it's gonna be the same thing just shifted by 20. So the default niceness is zero which corresponds to the priority of 20 so all the processes I see here and all the kernel threads are all just a default priority which is fairly boring. So let's go ahead and look through them to see if we have something interesting. So here this RT kit demon has a slightly different priority it's 21 so it is a lower priority so whoever made this program it doesn't seem to be that important except that one of its kernel threads so it is two additional kernel threads that are here in the green and one of them its priority is RT and that I don't know why that corresponds to negative 100. Yeah so RT is real-time so negative 100 is as real-time as it gets and then at that point I'm pretty sure the niceness number is meaningless if the priority is negative. So the process apparently is not that important but one of its threads are so important it should schedule it before literally anything else. So that's kind of interesting. Let's see what else we got. So GNOME shell is like kind of your desktop display so one of the processes aren't that important it's 39 it's as low as it gets so it essentially doesn't care so I have no idea what that thread does but apparently they deemed it not important. So we can go through, there's another one in Alacrity which is the terminal I'm using right now so apparently that's not that important either. See if we can find anything more interesting. There is a lot of garbage here. All right so TrackerMiner apparently not that interesting. VS Code using 44 gigs of RAM. Hell yeah. So the question is well how is it using 44 gigs of RAM? Well it's virtual and we'll figure that out later. So it has 44 gigs of valid virtual memory space it can use obviously it's not using that because my computer is not, that doesn't have that much RAM but it could access it if it wants to. Why it wants to access 44 gigs of RAM? I have no earthly idea but hey it does. Let's see, yeah they all want to use 44 gigs, who knows? But they're all kernel threads, right? But yeah, so who wants to program, so everyone thought threads were bad and kind of a pain with all the data races and stuff. Who wants to code VS Code that has like, how many threads, like 20 threads all fighting over stuff? I don't know, VS Code likes to do stuff. I don't know. So that's a good question, why does it do that?  Now, so now we get to more interesting ones. So here priority of zero, negative 20, so that's the highest priority but still a normal process. But oddly this one is process ID two and it is not its parent, which is kind of weird. So this is an internal kernel thread that only exists in the kernel. So it schedules it like anything else but this one is always in kernel mode and it is the kernel. So it has a few high priority ones here. I don't know what they do. So negative 20 and I, so it's zero in priority which means it's a normal process and negative 20 is the highest priority for a normal process. Yeah, no this is just the tree thing. Here is parent-child relationship. So like this, if I scrolled all the way up it's parents and knit. Yeah, kthread is like an odd one because it's actually only lives in the kernel. So it's parent is technically process ID zero which does not exist. So it's kind of a weird exception and it's just a normal kernel thread but that's the actual kernel. And it's a user process. Yeah, and we know what a knit does, right? It forks and waits and it's just a user process but kthread is internal to the kernel. But we can see here, so there's a few good ones. So there's this which is real time which is negative 100 and it's a thread that does migration. So this actually I believe does the actual context switch because there's one of these for each of the CPUs. So I have four CPUs on my machine. This one's real time priority to do the context switching for CPU zero, then here, CPU one, then CPU two, then CPU three and I only have three CPUs on this. So by going through that we can kind of see how, you can deem how important each thing is. Yeah, so the migration ones are all real time. So the priority there. Yeah, yeah, yeah. Yeah, so htop, so I'm using htop right now and it's a process like anything else. I don't know where it is because this list is gigantic but htop would be here. So this is the current process I'm using. So it's other columns here, this s column is the state it's in, r means it's running. So it's running because I can display myself sleeping. Yeah, but because it's being context switch in and out but because it's displaying itself, whenever it's running it would read what it's doing which it's running, right? So yeah, htop would all, if htop doesn't report itself as running that's something really, something really weird's going on because your process that's displaying itself isn't running doesn't really make sense but everything else is sleeping because all my cores aren't really doing anything. They're at like 1% usage so something's waking up and doing something quick and going back to sleep. All right, any questions about that? We can now kind of read this now and understand most of the columns. So we'll understand vert column later maybe why, well we'll never understand why VS Code wants 44 gigs of RAM, that's weird but we'll kind of understand more what it means, yeah. Which is zero. Yeah, which basically means it just never ran. Yeah, so you can, yeah, I mean you can create threads that do nothing and wait on something that never happens. Okay, so let's wrap up so any questions about, we can now read top and see the priorities so that's kind of neat. So to go back to the Linux scheduler, so we already saw the ON global queue and the O1 scheduler that has like a per CPU core. So now we'll talk about the actual algorithm that they use. So it's something called the completely fair scheduler and it's fair which allows for pretty good interactivity. So, oops, so the kind of O1 scheduler has really bad issues with modern processes. It wasn't that bad when it was easy to detect what foreground processes were and what background processes were because you just had a dumb terminal so you knew if it was connected to the terminal or not. But if you have GUI applications, you have no idea what is actually in the foreground because maybe you think oh whatever window is focused is in the foreground but that doesn't mean the user can't see it and it just kind of gets really, really hard. So the kernel could try and detect which applications are kind of user applications through some heuristics. Maybe you think a process that sleeps a lot may be more interactive, like it does something with keyboard input and then goes back to sleep after it updates its display but it's kind of ad hoc which just means you're just guessing in the dark and it could result in kind of unfair scheduling. So to introduce fairness for different priority processes, what you could do and what they do is use different size time slices based off the priority. So the higher the priority, the larger time slice you get and if you are a lower priority task you get a smaller time slice. So there's also situations where this could be unfair but in practice it seems to work quite well. So if you have ideal fair fill scheduling where you assume that you have an infinitely small time slice, well then that's simple. If you have end processes you just give them all one divided by N of the CPU time. So if you have one process, one CPU, it gets it. If you just have one processor and three processors or in three processes then they all get a third of the CPU time. So it's just evenly divided. That's as fair as you can get. So here's an example of that where four processes come in at the same time at T equals zero and they have some alternate burst times or complete time they need on the CPU. So two processes take eight units to complete, one takes four and process three takes 16. So here if we draw that out in kind of a Gantt chart where we're assuming a fair scheduler we'll just make every column here represent four time units just so it's easy to divide everything. So in the first four time units since we have four processes active to be fair we just give them all one fourth of the total CPU time which would be one time unit. So they each execute for one time unit here. And then for the next eight time units they still all exist, they still want to use the CPU. So we all give them one time unit again and we do that a third time and then we do that a fourth time. Then at this point process two and process four are done executing because they only need to execute for four time units. So now if we're being completely fair with our four time units of CPU time we would give each process two time units. So process one and process three would both execute for two time units because there's only two processes now. So they'd go from four to six time units of execution and then you do it again. So now process one's execute for eight and same with process three but now process one is done. So we have four time units of work only one process left. So it would take them all execute from eight to 12 and then go from 12 to 16 and then we'd be done. So this is what you would do if you had four processes with varying times and you want to be completely fair. So any questions about how that works? Yeah. So at that time it's the only process left executing. So each of the columns is four time units so it's just taking them all. It's taking four units of time. So this is all a single CPU. So it's just, I just divide it up just so that's easier to show it being divided. So yeah. So the first four time units I'm just assuming it can switch like infinitely fast. So after four time units they've all executed for one because I'm being completely fair. So then after that, when there's only P3 left it just executes for all four because it's the only one left. This is ideal fair scheduling where I just want to be completely fair to everything. So that's the ideal fairness but it's also terribly impractical because yeah. So every process gets an equal amount of CPU time. It would boost interactivity and has ideal response time since you're assuming that you can switch infinitely fast but in practice this would require way too many context switches. And you also have to constantly scan all the processes which is order N which takes a long time especially if you just want kernel to do something quick and get out of the way. So this is, but it's a basis for the completely fair scheduler. So this is what the kernel actually uses now. So for each process on your machine it assigns it a virtual runtime and then at each scheduling point when where the process runs for some like time slice T you increase the virtual runtime by the amount of time it ran for and the weight which would be based off the priority. So this is why they use a lower number to represent a higher priority. So if you are a very high priority process you would only increase your virtual runtime by a little bit and if you are low priority process you would increase your virtual runtime by a large amount. So the property of the virtual runtime is it monotonically increases which is just a fancy math word of saying it never decreases it always only grows over time so it never gets any smaller. So what the Skeldruler does as soon as it keeps track of this number to schedule a process it just keeps, it just selects the process with the lowest virtual runtime and that's it. And then it computes its dynamic time slice based off how many processes are running on your machine and what you would do in the case where it was, you made the ideal fair decision. So in this case it allows the process to run and then it would run for whatever time slice it decides and then when that time slice ends it would have increased its virtual runtime by some amount and then the Skeldruler would just pick the process with the next lowest virtual runtime. And to do that we, I think you just learned this in another course, red block tree. So here's where it's actually used. So you get a practical application already, right? Great planning. So completely fair scheduling is implemented with a red black tree. So it's a red black tree and it's keyed by that virtual runtime. So whenever a process ends or you create it or it terminates and you need to delete it, that's a log logarithmic operation which is quite fast. And whenever you want to schedule a new process you just pick the one with the lowest virtual runtime. If it's in a red black tree, it's 01, right? It's constant time so it's nice and fast. So in this red black tree, all the virtual runtimes at a nanosecond granularity which just means that's the smallest time unit it keeps track of, it doesn't keep track of like pico seconds or half nanoseconds, just goes down to the nanoseconds. And using this approach it doesn't actually need to guess the interactivity of a process anymore. It just kind of falls out of what happens. So if you have an interactive process that typically does a lot of IO and completely fair scheduling favors those by default.  So you would voluntarily put yourself back to sleep. You wouldn't use much of your virtual runtime at all so it would only increase by a small amount. And then that way whenever you have new data you're likely to be picked again whenever you're eligible to run because you still probably have the lowest virtual runtime. And then because of that and your process exists for a lot longer it would also gradually over time if you're trying to model the ideal fair situation you'd get a larger and larger time slice and then you would catch up to the ideal so if you need to do a lot of computation after you get all your data you would already kind of have built up your time. So this is actually used. Any questions about this? Yeah, but eventually if they never get to it and they never get to that virtual runtime they'll be put to sleep and then you'll probably have no other option but to run the 22nd one. Yeah, but you also kind of base the time slices based off the fair policy and then you might just fudge it a bit with increasing their virtual runtime by a lot. So there's some fudging details to get around but this is actually what they implement and you can see the details if you want to poke around in it. All right, any other questions? Because that's, yeah, like the issues just pointed out the actual implementation is going to be a bit trickier than that but at the core it just uses a virtual runtime picks off the lowest one and that seems to work quite well. Okay, so we saw today scheduling got even more complex. We introduced priority but also introduced priority inversion. Then we figured out A, processes probably fall into two categories where some need good interactivity others we only care about how fast they finish and then what you could do separate queues for both and then you have to schedule between queues. Then we saw what you do for multi-processor systems that may require poorer CPU cores which is kind of what links used back in the day. We also saw kind of real time that requires some predictability and has some timing constraints. Then we finally saw the completely fair schedule that tries to model ideal fairness and that's the actual scheduling algorithm that your kernel uses today. So just remember, I'm pulling for you. We're all in this together.