Good afternoon, ladies and gentlemen. My name is Larry Baterman. I'm the chair of the Ambassador's Speaker Series and thank you for coming tonight. This is our last event in this academic year. And before we introduce our guest speaker, I would like to recognize some members in the diplomatic corps, the ambassador of Norway, her Excellency Mona Brother, the ambassador of Sweden. The ambassador of Sweden is Excellency Tepo Torian. The ambassador of Georgia is Excellency Alexander Latsavitz, the ambassador of Kazakhstan, Konstantin Tegolo, and the ambassador of Poland, his Excellency Martin Moszaki, who I think is the most recent to arrive. We have representatives also of the embassies of China, Turkey, Yemen, Japan, Ukraine, of course, and the delegation of European Union, and the Department of Foreign Affairs, trade and development, other ministries and agencies of the government of Canada, Carlton University, the University of Ottawa, as well as those from the private sector and some of my former colleagues and good friends who are former ambassadors abroad like Craig McDonald, Devin Mann, and Chris Westall, whose ambassador to Ukraine and to Russia. And have I forgotten any other former? No. And the last but not least, the ambassador of Chile, his Excellency who I just want to say, oh, and I'll just say that the ambassador of Chile who's been here some four or five years and a close friend has just been named the new ambassador of Chile to Peru. So we only have him for a few more months. And finally, and not least, former ambassador of Canada to Kazakhstan, Margaret Skalk. It is my pleasure to ask the Dean of the Faculty of Public Affairs of Carlton University, Dr. Andre Furot to introduce our guest speaker. Thank you, Larry. Welcome to, on behalf of the Faculty of Public Affairs, welcome to Carlton. This should be a very interesting evening. Ambassador Vadim Pristayko graduated from the Kiev Polytechnic Institute in Computer Science and then studied for his master's degree at the Ukrainian Academy of Foreign Trade. In 1994, after working in the private sector where he founded one of the first Ukrainian Internet providers, he entered the Ministry of Foreign Economic Relations following his family's tradition of government service. In 1997, Ambassador Pristayko joined the economic section of the Ministry of Foreign Affairs responsible for developing trade with Asian countries. His first foreign post in 2000 was at a consul in Sydney Australia. In 2002, he returned to Ukraine where he was assigned to the Foreign Policy Directorate of the presidency of Ukraine. In 2004, he was posted to the Ukrainian Embassy in Ottawa as political counselor. Four years later, the Ambassador was appointed Deputy Director General for NATO in Ukraine's Ministry of Foreign Affairs. In 2009, he was named Minister Counselor and Deputy Chief of Mission at the Embassy of Ukraine in Washington. And on November 12, 2012, the President of Ukraine appointed him Ambassador to Canada. Welcome back. Ladies and gentlemen, please welcome Ambassador Vadim Pristayko. Thank you very much. Thank you to all of you for gathering here today. It's great privilege and honor to be here and to be able to talk to you and tell you a couple of words on my own and listen to your questions and try to talk to those questions you have. I will try to be short. I have like 20 minutes that was told. Maybe, maybe a bit more for the Q&A. So I will try to save the time for Q&A's and I will focus my today's presentation around three wide major and quite logical points as I believe. First, I will look up a little bit of what Ukraine is going on right now and how Ukraine changed over the fall of the Yenakhovich regime and how we tried to reset ourselves and the democracy and European integration path and how the first political government in our history trying to make reform is hopefully for the events of all Ukrainian society, Ukrainian business and our partners around the globe. Second, I can just a word talking about Russian, Russian invasion, invasion to Crimea. I will try to give you some some things so you'll be able to consider whether the Ukrainians, events in Ukraine are opposing threat to sovereign democracy in Russia and whether aggression and extation of Crimea and encouragement of separatism in Ukraine intended to prevent our European boss with just the effect of what he is doing. The third one is about international community. How the events in Ukraine are perceived by international community, our partners with the whole globe. Whether the international community is taking this last example of the execution of rights of stronger, whether it will take that the old international mechanisms being built and carried by all of us are so easily destroyed to the to the wish of some of the Security Council members, nuclear powers. So the major points for those of you who've been hibernating during the winter of 2013-2014 and the first part of spring, basically not all the parents were hibernating all this time, some of them were proved to be quite, quite effective. I'd like to remind you what actually happened in Ukraine. So our government was about to sign the European Association Agreement on 28th of November, but just a couple days before government decided to change the pass and opt for the $15 million loan from from Russia, the Russian Federation. It's still within the powers of the government to decide the course, although this course was was the key, key course of the Ukraine's 23 years of independence to Europe to West, he decided to change so that brought people on the streets for the peaceful demonstration, which turned ugly after in the 30s of November when the government decided to dispel the students from the major street of Ukraine, which actually just infuriated Ukraine, especially Kievans. Close to one million people came on the streets to show that it's not acceptable. We won't be accepting, we won't be tolerating this. In turn, government decided to go even stronger. So by the end of February, the stubborn demonstrations were met by force, with force, with law enforcement agencies and eventually was authorized on the streets of ancient city of Ukraine, of Kiev, which brought 103 people dead and more than 1,500 injured and wounded. We are talking about military injuries, less arms abutated, eyes closed, serious stuff. What happened next days? Lithuania and Russia fled the country and resurfaced in Russia, read the prepared statements, calling everybody in Kiev fascists, neo-Nazis, and expectedly invited aggressor to come to Ukraine to help to reinstate him back on the struggle. This event, I know that the more than since then are much more well known to the public. I don't want to play the captain obvious, but just wanted to bring the very important crucial moment to you right now for the sake of our next conversation. That's so-called the issue of legality of the Ukraine government has been used by Russian propaganda very extensively. So what we have now? People according to this government we have now in Terry, it's a mistake, even our Canadian friends are calling this government Terry. My point is that we still preserve the parliament we had over the two years and this completely legal parliament elected the new prime minister and the government itself. Only two ministers are in Terry. Minister Foreign Affairs, my boss, and Minister of Defense, who is supposed to be appointed by president and expecting the presidential elections on May 25th. Also, Russian friends already hinted that they won't recognize it. The interesting point here is so-called agreement in sign between three leaders of position. It's another question, how they represented the people on Maidan, on the major square of Ukraine. But let's leave it aside for a minute. This agreement was signed by Mr. Yanukovych, the leaders of position, and co-signed by ministers Foreign Affairs, who came as negotiators and interlocutors and intermediates, intermediaries, friends, Germany and Poland. Russian representative was also in the room, but refused to sign the agreement. Decided that it's too much. Also, Russians forget about this particular point and now they're referring to the agreement without even taking any care to the fact that they didn't sign it in the very first moment. Mr. Yanukovych, on the next day in the morning, when he signed it, he will reinstate the constitution in Ukraine 2004, which means that his powers will be balanced by the parliament's power. He didn't fulfill this first close of the agreement and he fled. By this, he was the first one not to respect the newly signed agreement. Since then, ever since starting, you know the history, I just tried to explore it in a bit of a couple of words. So the first positive results, like reinstating the constitution, bringing back the presidential parliamentarian model, I have to say that's important now part of the globe. Out of 16 countries of the Soviet Union or republics of the Soviet Union, only three introduced the parliamentarian system from the very beginning. Three Baltic nations and there were the most successful ones. All the rest, 12 of us, took the presidential, strong presidential powers and all of them, all the republics came to the same more and the same point when these governments and this president became more and more tyrants, circus style of government. So we managed to make many, many political things but all the issues were outshadowed by the submerging economic performance. The GDP falls 3% at least. Huge debts and balance budget and social complications. These things are serious. Separatism, the huge territory of Ukraine, it's not as big as Canada, but still biggest by square mileage in Europe. Divided loyalties, you can see only on streets and you can see from TV that's how how divided loyalties of Ukrainians themselves. Ridiculization of certain, certain sectors of society. That's also true. What task were assigned to the new government of Mr. Yatsenyuk? He himself, as we call his own government, is a chemicatic government. So these tasks are simple. Take unpopular and painful steps to avoid default in Ukraine. You see, Baltic state budget reduced public spending, cold, very transparent presidential elections, begin national political reforms and so on and so on and so forth. Proposed by many, including Russians, the federalization of Ukraine and second official language will hardly enforce Ukraine, Ukraine statehood and frankly it's not Russian business to what to introduce in Ukraine. But we'll definitely will have to draw the lessons from the from the past and we already decided to introduce the model close to Polish model, we do this as a very good example, how to give more powers to the to the regions. It's not federalization, it's rather decentralization. We're talking about budgets for information, language, education, many many things how the regions will self-govern themselves. Stabilizational state finance system, we have to sharply cut the expenditures, save the budget, review the taxation system, cut subsidies to the to the vulnerable centers of economy. It's a very painful decision. By now we already cut 10 percent of subsidies to mining region, which is Eastern region, which is less loyal to a government, but that's the only the only pass we can take. I have to tell you, I feel it myself, we now we're cutting our state staff by at least 10 percent, which is we're already talking about 24,000 people to be fired next month. And these people are well-educated bureaucrats and it's not easy to to find a job for these 24,000 people immediately. We're selling all the state cars and residents, official residents, all the stuff we can we can live without. In return, we hope to have a, sorry, we are not reducing, we have a couple of things to increase, for example, taxation and domestic territories. These things will probably hopefully bring us the loans from the IMF and other financial institutions. We are talking about 14, maybe 18 billion dollars immediately. That's that's the the big chunk of money we have to have to divert the immediate crisis to the finance of Ukraine. We managed to sign this association agreement with the European Union partially. We have to, you know, we enjoy it in as a sour fruit of real politics. The European Union was ready to sign the agreement with government of Yanukovych, even after they ever since started, they were reminding Yanukovych that the association agreement is still in the table. By a couple of days ago, we were able to sign part, political part. It's complicated, I am not going into details, but we have to sign the rest of it properly after the presidential elections, if we manage to have them on the May of 2016. It's not easy, but that's the way. Although I also have to admit that the European Union made a very good step by opening, you know, literally the markets for Ukrainian companies. We are talking about 500 million dollars by the end of the year in benefits of the opening of the European markets for Ukraine. To ensure the independence energy independence, which is extremely important in Ukraine, we have to talk with the European Union and try to find other ways to how to resupply Ukraine. We need around 50 billion cubic meters a year. We are individual biggest consumer of Russian gas. I know that the European Union is very much preoccupied with Russian gas, but I have to remind you, we are the biggest consumer of the Russian gas. We end today, from today, they actually decided to raise the price at least $100. I will come to this just in a second. We have to do a lot of reforms. I don't want to bother you with things that are like judicial system prosecutors, officers, security service, police. We have to do something with the police, especially how to deal now with police forces, those people who are shooting at their fellow countrymen. And of yesterday, we decided finally to give it order to each and every paramilitary structures to return, to discern and return the weapons which they have in their positions to the internal military, internal affairs. All the things we are doing, we are doing for us and for our integration in Europe. Some believe that all the things can seem to be perceived in Russia as a threat to the system they have, and that's why it can be ignored, can be avoided, and so it has to be dealt with. I'm not sure if it is the case, but what we see, that's what we have now in our hands. The regardless, the rhetoric they are using, the one fact is obvious. They are not only just betraying the brotherly nation, they're close, they're probably the closest nation they have historically. They're showing again that there is still a rule of stronger in this world and it's still in full effect. We have to admit these things, the steps which are taken by Putin, that's the proper government, that's so-called Putin's tourists in Ukraine, the commanders which are coming secretly to Ukraine's territory. It's always working to some extent. The system, the Ukrainian government, is put to the stress. We have to, instead of going through the reforms, we have to pour our limited resources in the army, trying to prepare it for the battles. We are digging up the anti-tank ditches, you know, in the middle of Europe it's quite unexpected, for me there's wide ditches, we didn't want, nobody would expect to happen in this part of the globe. About economics, or what happens and the effects. What is Crimea? It's two million people, it's a huge, huge island, it's actually peninsula, which is connected with just one road. Two million population. In Ukraine's term is 3.7 percent of GTP of Ukraine and 4.3 percent of Ukrainian of Ukraine population. Expert in program 1.5, 1.6 percent, not significant to our survival. At the same time, the energy independence and survival of Ukraine has actually been hurt, and quite significantly. We lost the fields of oil and gas and gas concentrate around around the Ukrainian territory. We're talking about 170 billion millimeters of gas, 47 million tons of oil, 18 million tons of gas condensate. At the end of 2014, Ukraine developed only 4 percent of these of these deposits. Our companies were exploring and were extracted around 7 million cubic meters of gas annually. We should be in turn consumption of Crimea around 1.4, 1.5 million, so the 4 million cubic meters were exported to the mainland of Ukraine for the use of the whole Ukraine. Again, to the prices. I can't just avoid it to call it hypocrisy, sorry. We had this agreement with Russia that we will pay less $100 for this, we will allow them to stay to station their fleet in Crimea. Today, just today, Mr. Medvedev mentioned that because of the changed geopolitical reality, we called it this way. They don't need any more to pay Ukraine this $100 for keeping definitely, because they are not keeping fleets in Ukraine. That's their own territory from the day yesterday. So we have today from today the price increased for $100 again. Close to Canadian to Canadian reality. We have to postpone the launch of the satellite which we built with MTA, the Canadian company, and we paid $260 million for the satellite, because we lost communication system which was in Crimea. Now we have to rethink where we can, where we will be able to control this satellite and then probably we'll launch it later on as soon as we find out how can we operate it. What it brought to us, I mean all this, you know, there are some some positive things which brought all this nightmare or the conflict. That's the maturity, that's a great maturity of the Ukrainian society. We went through very painful changes and there are some very interesting things like, you know, the propaganda is talking about the Ukrainians, Nemnazis, Antisemis. They're touching all the sensitive streams around the globe, understanding what people can react to, to which signals they will react. I have to tell you interesting facts. For example, one of the of the squads in Ukraine, in Maidan, in the central Maidan, was just Jews. They decided to have Jew hungry or absolutely unexpected thing. The Muslims in Turkish, the Turks, the Tatars, Crimean Tatars, invited Ukrainian Orthodox to have services in their mosques because they deprived from the churches they had before, chance to make them, to have their services in Crimea. For example, in the statement of the Ukrainian Jewry to the President Putin. Most likely you have mixed Ukraine and Russia where Jewish organizations have noticed the growth last year of Antisemism. Our few nationalists are under the control of the society and we can take care of. And the new government in Ukraine, which cannot be said about any Ukrainian government, which cannot be said about the neonism in Russia, which is encouraged by your intelligent agencies. Many, many things I don't want to to waste much of your time. I just want to come to the last point of my presentation, the international community and the approach to what's happening in Ukraine now. We, that's very bad signal for so-called threshold countries. I'm talking about now the Ukraine, as you remember, in 1991 decided that we inherited the third biggest arsenal of nuclear weapons. Our weapon arsenal, nuclear arsenal was bigger than Chinese, French and Britain combined. In return, in 1994, in return for giving up this nuclear arsenal, we were promised to be protected by five nations. One of these nations just was an aggressive, aggressive to our territory, occupied piece of our territory. This signal was picked up by many threshold countries, at least Israel already mentioned. Look at them. The only chance we can protect ourselves is to expand our nuclear program. And, I believe me, the Iranians are thinking the same. Maybe they're not doing it quite publicly, but they're thinking about the piece of paper in which the agreement signed, and the real nuclear powers. We sent to all the countries who supported us, and especially the UN resolution. The UN resolution showed that this time more countries were trying to be united and protect one of their members against the invasion. 100 votes to support Ukraine's integrity independence. 11 voices against. Russia, Belarus, Bolivia, Venezuela, Armenia, Zimbabwe, Khurba, Nicaragua, Nostria, Sudan and Syria. That's the list. Just one last word about the Canada. I really grateful myself, and I'm proud to be representing Ukraine here in Canada. The only member of G7, leader of G7 countries, it was Sima Harper, came to Ukraine in very, very difficult and delicate moment to show that the standing behind Ukraine, trying to help, he brought 220 million dollars as a loan. If you compare it to the billion which has been promised by, for example, United States, and compare it to economies that proportionately Canada, who spare more money to help Ukraine, even in these difficult difficult situations. We have a lot of different programs. I don't want to bother you and bore you with all these names of ideas and the reforms and everything. Believe me, there are very interesting things. I just discussed with the Ministry of some, the Ministry of Immigration and some of them. So the Canadian government and the Ukraine government working hard, and we understand that we don't have much time to to proceed with that. And why sincere graduation go into Ukrainian community, which was, as never, strong, united, and helpful. Trying to push and pushing all the initiatives, and the standing behind all the initiatives, gathering money, sending delegation, pushing people out, having the beautiful programs like providing medical treatment to those injured on my down. Hundreds of people. Instead of bringing a couple of dozens here, they decided to send a mission and mission is leaving tomorrow. Doctors, equipment, people are working problem. This and many, many other projects are now on our consideration of our work. So thank you very much. I will stop here and give you some time for questions. The ambassador is open to questions. I would ask those who wish to ask a question to come to this microphone, identify yourself, and proceed. Who will be the first person to ask a question? Yes. Mr. Krzysztof, I'm Dennis Kowalski. You know me well. Could you please enlighten us on what is happening in the border regions with in Eastern Ukraine, Luhansk, Kharkiv, the Netsk, and Odessa? And so on, Mikolayev, the protesters, pro-Russian protesters going on. I haven't heard much on it. Could you enlighten us on both that, please? Thank you. We are talking about different realities here. One reality is 100,000 troops. And today Mr. Lokrov mentioned, OK, why all this fuss? Just simple, simple exercises, military exercises. And you know, some of our colleagues, for example, Foreign Affairs Russian, they mentioned their statement. For those who consider seriously the invasion in the Ukraine territory, it has to be prescribed with painkillers. They're even using this new type of diplomatic language, which is painkillers. Another reality is the protest movement in the cities, in the southeast. As I mentioned before, there are many factors divided loyally. People are still calling President Yanukovych to come and to restore order. They still don't get the lesson from the history. This guy stole so much from them. He was building the palaces and all the gold and everything. And people, simple miners who are spending their life, wasting their life on the ground for the couple of dollars, they're coming out of it back and voting for the guy and asking him, begging him to get back and to restore order. They believe that this guy, what he was doing was to make an order. In other realities, Russian so-called Putin's tourists, we, our security services have to pick them up very quietly because it will, you know, ignite the call process much more. One by one, sometimes with weapons, sometimes with materials, sometimes just with the documents of Russian, Russian military, Russian army. So there is a mix of people. Those who are sincerely don't understand what's going on, sincerely believe the propaganda. The figures who just came to me recently and it's really bothering me. 39% of Ukrainians, I haven't the news, daily news about Ukraine, about their own life from Russian TV. I'm not talking about 92% of Ukrainians here to be encountered by TV. It's different. I'm talking to people taking every word of what's going on next to them, from the TV, from the next neighbor. That's, that's very interesting and it's very unique, I believe. You also have a chance to listen, to access to the United States media. At the same time, you are quite well understand what's going on next to you. Imagine people 39% of them thinking and seeing through the eyes of Moscow, Moscow TV. These people seriously don't understand what's going on. They seriously believe that there are neo-Nazis who took over the power in Kiev and they're coming. I was just to give you an example how it is working. The mayor of one of the cities was talking to the crowd and he was using two examples just to tell them how better the European Union is. First example, that they're making cash flows out to Ukrainian women in Europe. Second one, that a million army of neo-Nazis was just stolen by brave Donetsk region people from entering Donetsk, a million. And both of these states were welcomed by the crowd. I'd like the women to part more in this California. You know how seriously you have to be valued. You know how seriously you have to be open for this sort of propaganda even to take it seriously and say come on, we're just talking about it. Next question. Yes, Ines? Hi, I'm Stephen Dump from the University of Geneva. I was wondering, as Switzerland is making a lot of great efforts to try and get some of the money that's been laundered into the country by some of the main figures in this movement. But I was wondering if you could comment a bit on that, if you think the money will be recovered and what are the plans for it? Thank you. You know what, I will take a close example, Canada. Canada already introduced the law signed in the law of 19% of Ukrainian previous Ukrainian government with an idea this time, not just to locate this movement, not just to freeze, but if they are located here to return to Ukrainian economy. That's different from what we saw like 10 years ago when one of our corrupted politicians, Prime Minister at the time was picked up by FBI and he is now still in California and in jail. Unfortunately, these funds were not returned to Ukrainian economy and being seized by American authorities. This time we tried to be clever and we talked before and the ideas to fight and to repatriate. Canada, European Union, United States, and some other countries on bilateral agreements that are doing it. Hopefully they will find, I still wait to hear the results. Hopefully they will be able to find this money. It's not easy to understand, but we will count in on at least some of them. Hi, thank you for joining us today. I'm a remorse and I'm an alumni from the Northern Patterson School of International Affairs. As you mentioned, energy security is a primary concern to both Ukraine and the European Union. Although there are a number of options on the table regarding supplementing natural gas supplies, it seems unclear at this point exactly how that can be done and who will be involved. I'm a quote from Whitney Stanko where she argues that spurred by Russia's takeover of Crimea, we believe the foreign policy arguments in favor of energy exports are gaining momentum on Capitol Hill. Nevertheless, it remains unlikely that Congress will coalesce around the plan on liquid natural gas exports and highly unlikely that Congress will act on crude exports in the near term. So given that you have these barriers to supplementing this energy shortage, what do you envision Canada's role to be? During your interview several weeks ago on the CBC, you implied that Prime Minister Harper's visit was not just to show him support, but an opportunity to enhance specific arrangements and agreements. I don't know if you can answer this, but was there any discussion on Canada's role as a natural resource supplier? If not on the expertise exchange, how does that help our relationship going forward? Thank you very much. Thank you. You know that we are putting a lot of hope on the share of gas. We are currently producing a third of the natural gas ourselves, but we are also producing one of the biggest items on our expert list is the fertilizers. Mostly they are taking the gas as the pipeline. So that's not about burning it and people are thinking, why don't you burn less? Yes, we can burn less, but it's not about this. We are using this gas to create the fertilizer. So we'll be able to sell less, to expert less. So that's the whole vicious circle. At the same time, what we hope to have is the share of gas as our friends in Pond are doing, and we are sharing the same geological structure. We believe if they were able to find, we will be able to find. We're now exporting it to two fields, two international companies, Royal Dutch Shell and ExxonMobil, United States ExxonMobil are now they want the tender and now exporting the gas and trying to find and understand whether it is good for business or not. In this particular business, we see the Canadians right away. And we have, there are Canadian companies which can provide their expertise in how to deal with share of gas or be used as a subcontract. So they are doing it, it's already set and done. Another one is about the really LNG bringing to Ukraine. You know the LNG working this strange way that you can transport it for the short distance, which is very logical, but that's how it works in the business. By this price we have now is becoming feasible, economically feasible, to bring the gas from Canada and the United States. They will be ready to export around two, three years both Canada and the United States and we believe that it can be done. If it is done, honestly we have to think how to get the gas to Ukraine, how to make our friends from Turkey to allow our tankers to go through, which is not very easy. How to use the system's pipeline system, which are already existing, or to build new ones. How to get this gas up, up north to Ukraine. That's another question and believe me we are dealing with it right now. Thank you. Antonis Klasny, I work here in Ottawa speaking in personal capacity. Ambassador, let's talk about the May 25th election, a very important election. I'm wondering, is Ukraine planning to invite international observers, for example, to help out countries like Canada, some large delegations. And also a second question, if you have time. What can landmines in countries or out, you know, countries that are interested in Ukraine's future, such as Canada, what can they do today, tomorrow, in the short term, to help out with this crisis? Dr, thank you very much. Thank you. Elections of 25th. Canada actually said twice, what a record of sending the biggest of the nation. So when I talked two weeks ago of this Prime Minister, he mentioned that I'm not going to be there, but let's see. So we hope that the last time it was 500 people, it's considerably more. And it's considered two big, big jugs. The one is Galneta and Aswan, supported by the Ukrainian community, which is doubling the number of observers. Again, Ukraine is a pretty big country by itself. This, even this big number, it's not enough to cover all the polling stations. But I understand the observers are becoming much more clever. They are coming to places they knew before, had problems over there. They know how to observe, how to pick up all the small and big things. And I have to tell you that Ukraine is, because sometimes we are shortening this cycle in 2004 and now, it allows us to make more cycles and the society is maturing much, much faster. What I'm bringing, where I'm bringing it, we are sort of trying to make the system fair, not because people immediately turn and it's becoming fair, no, because we are having the political competition. And then people do not know who will be their boss next day. They're becoming immediately very sort of loyal Biden citizens. And this is a very good sign, because in Canada, for example, over 200 years you went through ups and downs, we just had 20 years to decays, which is, I mean the situation is different. Imagine in 20 years we came from the system where we have just one party, one newspaper, one TV channel, to the 80 parties in the parliament and 15 people, candidates for the president. Today we refused one very particular candidate, Darth Vader. The guy changed his name to Darth Vader. The government, all including the government, and came to and then put in the raising documents. We had some lawyers had to work out to, you know, to sort of derail the idea. But the guy was serious. So now we have around 15 of them, which is, you know, now this case is good because we have two million, two million grievances you have to put on a table when you're trying to get in the parliamentary, in the presidential elections. If you are out of the post, at the end, the money stays with the, with the government budget. By this we are reaching, anybody wants to become a great president? Please, by all means, just two million grievances about the help of, of Canada to Ukraine. Some things I already mentioned. There are 200 millions through the, through the IMF, another million to National Bank. To 20 millions a year we are receiving as a technical assistance. That's by the way, the only European country who is still in the program of SIDA. Over all the 20 to 23 years, it's mounted up to $410 million. Military exercises. We, this year we'll have seven exercises in a half of them. Grenadiers will take place on Ukraine and so on, and they will educate Ukrainian military officers here for the peacekeeping languages. There are medicines. I don't want to, to skip any. I don't want to offend anybody. But believe me, there are so many things university degrees. A lot, a lot of things. Thank you.  One of the important, perhaps losses is the ports in the Crimea that are open 12 months of the year. It's used as a strategic point and after the loss of the Baltic fleet, Belmys News and Black Sea fleet would be paramount. So it's a question of what your plans are for shipment afterwards. And then the second question is everybody is very focused on energy as they should be. But when I was in Ukraine in the last couple of years, one of the statistics from 2010 is that you have 43 million hectares of arable land. Major exports of grain, mostly wheat, but also feed grain. Some barley go to them in mostly Russia. I was wondering about agricultural economic reform. Ports, ports are strategic importance and Ukrainian ports are the only so-called world water ports. As with the big Soviet empire, Russian Empire, Soviet Union, their just support was the only port which is opened for navigation the whole year. To lose this port it was, I mean, greatest advantage for the Soviet Union, for the Russian Empire. And sometimes port of Odessa was responsible of 11% of the whole wealth of Russian Empire over some 200 years old. This Odessa port is on the mainland. In Crimea we do have ports, mostly military ports, naval ports. They are important to us, not as much as Odessa port, which is a number of ports scattered around the Black Sea banks of Ukraine mainland territory. To lose that it would be a real disaster. We can live without ports in Crimea, but Odessa port is extremely important to us. That's why we're hearing that Russia and France are going to liberate the east and southern part of Ukraine because that's important. And I have to remind you the, for example, meters in fact, the Crimea is supplied by Ukrainian water, by mainland water. We have 400 kilometers channel going from the major river to Crimea to supply 82% of water. They cancel out without this water. Niza agriculture, not just domestic consumption. So they depend on this water on energy. What we decided at some time where we are continuing seriously, how can we, how can we supply these people with our water? And then we decided just to open it was 19th of March. We had the season of opening the channel. We just opened it. We can deprive people from this water. Regardless of what they choose as, whether they choose to say in Russia or in Ukraine. About the agriculture, just a couple of words. You're right. And on some of the things we are, it's like, back with, I know it's not very important, popular here, but in our part of the world, very, very important. That's, you bring us number one exporter in the world. Sunflower or number one. Weak, number four. So we are, we are in a very serious business in agriculture. And the most important thing is how to privatize the land or the land. This, this very painful issue we're still not in the position to resolve it right now. We know that it's important for the business. It's not there yet. What we are considering now is how to help business, micro-creating, all the things, transportation, how to build up with the abilities of this, of the farms, how to, how to bring people to this, you know, historical understanding of value of this land. We do possess the strength of the black soil, soils in the world. And we check with this, gross gift. And we're trying to, to make it not maximum today. I probably have to take it from Carlson University. Ambassador, thank you very much for all these detail answers. Part of my own ancestry goes back to the Ukraine. During the height of the Cold War, when a lot of new states were emerging, they were forced to choose one side or the other. But many chose not to do so and emerged as not aligned and then benefited from both sides. Why has it been a situation where for the Ukraine is either or, instead of both Europe and Russia in the past and assuming we survive this crisis period? Is there a possibility that in the future the Ukraine will end up being a partner of both Russia and Europe? We can change our geography. We are attached to this piece of land and there is nothing we can do nor our, our neighbors. And that's we will be there and we will reset our relations with Russia as soon as the possibility is open. That's, that's quite understandable. At the same time, each and every time I hear about taking or not taking lines is I have to remind you that in our surrounding in our neighborhood surround no, no bloc countries, more or less. Russia itself had a part of the bloc of the military bloc. Every time they ask us why would you go for any military bloc? Why would you stay no bloc? Yes, it's a good question from the country which is already part of the bloc. Stashken Park. So there from one side is NATO from the other side is Stashken Park and everybody asking so why would you stay neutral sort of? But history is saying for example take the neutrality of of Austria which been breached twice by Germans during World War II. In interesting, interesting fact why we've never been neutral in our constitutional oil documents? We never had it. Regardless of despite all the things where you might hear we never had this part of the constitution. Because each and every time we were considering neutrality even theoretically we have to think what we will do with Russian base on our territory. Because you can be neutral having somebody else military base. Now the decision is all by Russians. We don't have any base on our territory because this territory belongs at least in their hands to Russian themselves. So immediately today they restarted this conversation. So guys why would you be neutral? Because before we were talking about non bloc which you know there is no such thing in the non bloc state. It's very difficult to to even address what you mean. You're not aligned to any bloc and how it is how it is written in the in the international documents how it can be protected defended as as a status itself. For maybe I'm wrong guy to ask because I was working for Ukrainian NATO negotiations team and I believe in what was saying that Ukraine has to be a part of the European nations family those in European Union and NATO. Some people might bring a better example like I've been hearing things like why would you want to go behind the bars of NATO and throw the bear from it? It's not our idea. We don't want to poke anybody we just want to be as safe as those who are inside NATO or inside European Union. We don't want at the same time we don't want to go to touch impact because we've been before towards attack. And we see even now when between Belarus and Russia it was milk war some two years ago. And Belarus was chairman of the Tashkent Pak at the time. They wanted to have the military exercises and Belarus because they've been so so angry by Russian war the trade war decided not to have you know exercises happened anyway. So that's so much about the way of running this business. It's not like NATO which is consensus built organization although in the books it is consensus built but that's that's example of whether it will be respected this consensus building system or not. Last question. Thank you Your Excellency it will be a hard lighted question for you. So I hope you're enjoying kind of the new winter it's your second winter and we all coming from hibernation here. So imagine that you are hibernated here in Canada and you wake up. Sorry if I've been the same way. But you wake up science can do it in 10 years and what kind of Ukraine you would like to wake up in. Give us a few what kind of Ukraine you should report. Thank you. It's a good question. It's not because you have Polish roots. Because my friend Ambassador Poland here present but that's more or less what we see Ukraine is. More or less by territory by population it's very close mentally historically also with what a couple of times because we're all very senior. But I believe that's very good example if we are not going in details that's more or less same we would try to do. We know not to complicate. I believe that Poland also went through quite painful process and they're still running in some obstacles and problems. But that's more than the system we can expect to be in 10 years when later on I don't know maybe some maybe Kenny will see. Thank you. I would like to ask Canada's former ambassador to Russia and to Ukraine Christopher Westall to thank our ambassador. Thank you Larry. Excellent seas and ladies and gentlemen and excellent sea. It's a great pleasure for me to have a chance to thank you. I thank you for your speech. I thank you for those answers. You heard us all riveted and listening very carefully. I learned I'm sure we all did. But I want to thank you for more than that. I have been watching the head's admission ambassadors and high commissioners and senior diplomats and many here have also been watching a head's admission reform. I've been doing it for 40 years and I was one myself for quite a while. And I have been watching your performance day after day now for three months every day. And I was aware of it before that.  But I can say having seen you on the television regularly having seen you on the front pages having met with you having imagined the almost unimaginable complexity of the circumstances that you dealt with over these 14 months and particularly the last four if one one stops to think of the complexities of the developments at home and the gradual disintegration of faith in the government and then a sudden unexpected change in the government and you are representing that country throughout and then the change and the complexity of your audience here in Canada where there are a million people with relatives and ancestors in Ukraine and there are many millions including me and many others who have been taking this crisis to heart for four months now and watching it. I can say in all in all of that time that I've been aware of what ambassadors are responsible for your performance has been one of the finest that I've ever witnessed and I think that it's very timely that that example be now in this city and that that example of what a diplomat can be and must be when he must rise to an occasion as I say probably more complex and daunting than ever I can imagine a Canadian diplomat has faced we have not had such tumult on the home front to represent and we have not had the circumstances that you have in terms of of who you represent now listen I could go on I don't want it too much but I want to thank you for that performance I want to thank you for that example of professional excellence a very timely example I also just want to thank you for the years you spent here you're 20 years into a career you have a stunning CV you've got much more time to go than you yet spent and you're already in a leading an important position of responsibility in your country and I'm sure that you will have more and I wish you well enough I know I speak for everyone here in thanking you for what you've done this evening here and what you've been doing for your people with such excellence for the last 14 months so truly thank you this is the last act before we go to the adjacent room for a reception where you'll be able to have a chat with the master best cycle but last I would like to ask the director of the Norman Patterson School of International Affairs Dr. Dane Rollins to present a souvenir this evening to our ambassador so I'm sure you don't need a reminder of these times that you're placing but I think this is a token of our appreciation for having taken time under the special uh we'd like to present you with that as a reminder of your benefit to grant us your guidance thank you please let's go to for a grant we have a four I'm sorry it's been a long time I'll have to work on it I'll have to find a way to do it Jason alright I'd hope to hear lastly from our director of the Marvious I'll get a drink him in please he's a guest of mine there you're right you've got too much to do it's a work a drink what is a drink I'll take one oh all right I have a cup like a cheers to that night ok let's our thank you your


All right, everybody, let's get going today. It's like people are still recovering from their weekend. Some of the people in this room look like they're still recovering from their weekend. And I'm assuming that some of the people that are not in this room are maybe actively choosing to spend this morning recovering from their weekend. But it's good you guys are here because today is a really important lecture where we're going to cover a lot of really important stuff that'll end up in really important places in this class. Whether it's assignment three or the midterm or something like that. All right, so my goal today is to basically get through page translation and paging and some of the data structures that are used in the kernel to do this. So this is a little bit ambitious. I'm going to start off with a little bit less review than usual today, partly because we didn't cover as much material on Fridays we normally do, which is fine. That was good. Let me go through the announcements briefly. Assignment two is going to be coming out today, at least the text, at least the actual description of what the assignment is. So compared with assignment one, assignment two is much more, I won't put it this way. It's less well specified. So for assignment one, there were a series of functions that you were supposed to implement. And we gave you skeleton code for those functions. And we gave you examples and things like this. And basically, it was kind of filling in some blanks in terms of finding where the code needed to go. For assignment two, much more of your time is going to be spent just understanding what you need to do. The assignment specification is very clear, but how you actually implement that is going to be more up to you. You're going to have to add files to the kernel. You're going to have to change a lot of the data flow. You're going to have to design data structures and use them, rather than just simply adding things to some templates that we've given you.  Because if you sit down and start writing code, you're really not going to know what to do. So how many people in here have not chosen a partner? Do not have a partner yet? So we're going to work on helping you guys find partners. We'll also put the form online. But maybe some of the people that don't have partners might be a good idea to kind of hang around after class today, meet some other people that don't have partners, and maybe form the beginning of a beautiful friendship. So maybe if you don't have a partner, that'd be a good thing to do. Because the faster you have a partner, the faster you can get on this assignment, which is great. So we're behind on grading. We're still working on assignment zero, hopefully next couple days. I'm prioritizing getting this assignment out. So you guys can start it. But I do apologize. We are. I know we're behind. So this is a priority for us. Finally, how many people would like to see some kind of bulletin board on the course website, where you could post questions and sort of discuss things with each other and stuff like that? OK, this is what I thought. I think this sounds like a good idea. And we'll work on putting this up. Particularly for assignment two, I think it would be helpful. So this way, rather than emailing the core staff and just getting back and answering individually, you guys can post this online. Maybe you can help each other answer questions. And when the core staff does answer questions, the those answers will be visible to the entire group. So this probably would have been a good idea to do a while ago, but again, we've been busy with other things. All right, so really all we got through last time that we're not going to cover again was base and bounds address translation. So are there any questions on base and bounds? Base and bounds is pretty basic, pretty simple. But anybody have any questions on this before we continue? So today I'm going to review segmentation, again, just sort of from the beginning, because we didn't quite get through it. And then we'll go on to paging. Any questions on base and bounds? Yeah? So I'm going to get to segmentation. So this I'm talking about single, base, and bounds. Single, base, and bounds. That was our simplest straw man, not a good idea. We talked about why. But any questions about how this works and how we translated addresses using this approach? All right, so let's do this. This is easy. This is simple. What do I assign to each process? Base and bounds. The name is a clue. The name is a big clue. I assign to each process what? Back here. What's that? You have no idea. It's called base and bound. What do I assign to each process? Two things over there. And then base and bound addressing. I assign a base and a bound to each process. Again, the name is a fairly large clue. So a base physical address. Does anyone know what K-I-S-S means? Keep it simple. Stupid. This is a classic systems design approach. And actually, it's a good thing to keep in mind when you do assignment two and assignment three. Don't outsmart yourselves. The way that we build complex systems is we build something easy first. And then if we understand that it doesn't perform well, we understand why it doesn't perform well, then we go back and we make it work a little bit better. This is particularly relevant today because we're going to see some more complicated approaches to storing page state that people have sometimes decided to use for assignment three when it is completely unnecessary. So again, first pass, something simple. This is the simplest thing. So I assign each process a what physical address? Again, base and bound. Back here, Jason. Base physical address. And what else? A bound. Base and bound. OK, this is like, I know it's Monday morning. So we're kind of everybody sort of booting up their machines. So let's start warming up. And then to check an address. It's very simple to check a virtual address. I just make sure that it's within the range that I've assigned to this process. Essentially, it's lower than the bound. How do I translate a virtual address in this scheme? Anybody? Well, the MMU does it, but how? I just take the virtual address, and I add it to the base. The implicit assumption here is that my virtual address base has started zero. So what were some pros of the base and bounds approach? Were there any pros? Name me one pro. It's simple and fast. There's very little state that the hardware has to keep around. Just has to know the base and bounds per process. Two things. And then it's very fast. Check is one comparison. And translation is just one addition. So this is very, very simple. It's nice. Now remember, is this a good fit for our address space abstraction? One base and bounds for the entire process. Why not? There's a huge amount of internal fragmentation. I have this virtual address base abstraction where I'm telling processes, I'm going to give you the illusion that you have two or four gigabytes of memory. Most of that memory is unused, but allows processes to spread out. Base and bounds doesn't do that. Base and bounds, in order to perform well, the base and bounds have to be small. And that forces processes back into this little box that I was trying to let them out. And yes, as Michael pointed out, we will lose memory to internal fragmentation. I'm going to give out a base and bounds, and a lot of that memory isn't going to be used. What about, what's another problem here? Remember, I have to make these large, contiguous allocations. What else might what happen here? What other kind of fragmentation could I be in danger of? External, there's only two kinds. External fragmentation and internal fragmentation. Both are a problem. So any other questions on base and bounds? Again, this was a short review, but I'm going to start over on segmentation. So you'll see some more of this right now. Any other questions on base and bounds? Going once, going twice? Let's talk about segmentation. So one base and bounds wasn't a good idea. It didn't work well. It's not a good fit for the address space abstraction. But who remembers how we extend this idea using segmentation? What does segmentation essentially do? Rather than one base and bounds, we have multiple bases and bounds per process, each one of which we call a segment. And the nice thing, there's a lot of nice things about segments. We can essentially assign each part of our address space. Remember the address space picture we had? Unfortunately, it's not on this slide. But I had a little sliver of the address space that was used for the code, little sliver that was used for the stack, little sliver that was used for the heap. Most of it's unallocated. Now I can essentially assign each one of those regions to its own segment. And I can assign a lot of protections and other features to those segments that are appropriate for their purpose. So the heap is going to be protected differently than the code. The code might be read only, really to be useful. The heap has to be rewrite. So this is one of the nice things about segments. And also, each segment can, of course, be a separate size. So a process that has a lot of code, but not much heap. We'll have a large code segment, a small heap segment, or a vice versa. This is nice. And again, separate permissions, depending on what's loaded into those segments. Are we raising hands here, or are we like? I feel like doing that sometimes. My hands are full. So how do we do segmentation?  Now remember, with base and bounds, the implicit assumption was that the base and bound, the start virtual address of every process was 0. But with segments, I'm breaking that assumption. So now there's three pieces of data I need for each segment. I need the start virtual address. I need the base physical address. Where does that beginning virtual address map to in physical memory? And then I need a bound. How large is the second? To check whether or not the virtual address is OK, I try to figure out, is there a segment allocated for this process that this virtual address maps into? If there is, then to translate it, I take the offset from the beginning of the segment, and I add that to the physical address where that segment maps to in memory. So let's walk through our example. I have my kernel, my very faded MMU. Now, process tries to use address 0x10,000. What happens? What happens next? Right up here. The MMU asks the kernel. The MMU doesn't know anything. This is the beginning of time. So showing what happens next. So if this is a valid address, the kernel needs to tell the MMU something about the segment that this address maps into. And in this case, it tells it the start address, which is 0x10,000. That's a virtual address. The base address, which is 0x43,000, that's a physical address. And then a bound. The bound is just a size. So what happens next, Michael? So let me point out, before we get to this, the base and bounds here, the base physical address and the bounds essentially defines an area of physical memory that's associated with this segment. So every segment that a process is using is going to map into some chunk of physical memory and with different sizes depending on the bound of the segment. And exactly as Michael said, to translate this address, what address does this actually translate to? 43,000. How did I compute that? I took the start virtual address. I subtracted this from the start. I got 0. And then I added the base physical address. So this translates to physical address 43,000. Does anyone not understand this example? All right, let's do another one. 0x400, what is the next thing that happens right here? Well, I'm asking the MMU to translate this address. But what is the MMU going to do? Well, it's a good question. Is this virtual address inside the segment that the MMU knows about? Is it between 0x10,000 and 0x11,000? That's the bounds of this segment in the processes virtual address space. Is 400 between 0x10,000 and 0x11,000? It is. Do you want to disagree? No, it's not. So the MMU doesn't know anything about this. And so what does it have to do? It has to ask the kernel. Is the process allowed to use this virtual address? And let's say it is. So going down the row, what happens next? I've asked the kernel, hey, the process must use this address 0x400. What's up? And the kernel knows that the process is allowed to use address 400. And so what does it need to tell the MMU? Right, something about this segment. Something about the segment that this falls into. In this case, the segment starts at 0x100. It maps to 0x16,000 in physical memory, and it has a bound or a size of 0x500. So back in up a row, what do I do next? And then what does this map do? 16,300, exactly. I took 400. I subtracted 100. I got 300. I'm doing easy hex for you guys. There's no carrying that would force us into the letter part of hex. So I take 400, I subtract 100, I get 300. I add it to 16,000. I get 16,300. This is how this address maps. Now what else can happen here? So let's say I have this address. Now what's going to happen next? So it's going to ask the kernel, is this address valid? Let's say the address is not valid. What might happen? Boom. The process might be killed. If the process is trying to access some memory that the kernel hasn't given permission to access, then the next thing that might happen is the kernel decides that the process is misbehaving in some way and has to be killed. There are other things that can happen too, but this is just this example I came up with. And I like the kaboom thing. Any questions on this example? Any questions on segmentation? So let's talk about segmentation. So as far as pros, as an address translation mechanism, we're not quite as simple as base and bounds, but we've traded off a little extra complexity for some really nice things. So the first thing to notice is that this isn't that complicated. A process is going to have some number of segments. And now rather than just doing one comparison, I have to do n. So a process that I have n segments, I need to look, and I need to see to figure it out. For the MMU to figure out whether or not it knows about this address, it has to compare the address against the base and bounds of potentially up to n segments. Once I find the segment that I want, translation is very simple. I just subtract off the start and add it to the base of the portion of physical memory where the segment maps. So these are good things. So this happens. So this is partially determined by the ELF file. A certain process might have multiple different code segments that it wants to protect differently. But the processes that we've talked about and the processes that you're going to run for this class potentially have maybe three segments. They have a code segment. They have a stack. And then maybe they have a data segment which contains global variables that the process uses. My question is, in some way or another, I need to guess from any of these segments. Absolutely. So that's a great point. We're going to come back to this in a minute. So clearly, the MMU is a piece of hardware. And hardware has limitations. And one of the limitations that a segment-based MMU would definitely have is that it would only be able to know about some number of segments at a time. So I might be able to tell the MMU something about, I don't know, 128 different segments. Once I got over that number, what would happen? What's that? It would have to start replacing. It would only be able to hold 128 translations. And so what would happen is that when the kernel loaded a new translation, an old translation would fall off. And the next time the process tried to use an address in that part of its memory, it would have to ask the kernel. So exactly, essentially what's happening here is the MMU is caching a small number of translations so that it can do those translations quickly. We'll come back to this thought when we talk a little bit later about translation look-aside buffers, TLB, because it's the same thing. We're using a piece of hardware to cache and rapidly perform a small number of translations. It turns out that a small number of translations turns out to work quite well. And I'll come back to why that is later. But you're exactly right. There are limitations to the number of hardware. There are limitations at heart that would restrict us to only be able to translate some number of segments rapidly without involving the kernel. Good question. Any other questions about segmentation? So another pro of segmentation is that, again, we can organize and protect regions of memory appropriately. That's nice. So in addition to telling the hardware, the base and bounds of a segment, I would probably also tell it something about what the process is allowed to do. So the process is not allowed to do a store into the segment, only loads. So that would be a read-only segment. This is a much, much better fit for our address space subtraction. This is really the biggest win here. Because all that unused part of the address space that I had before that was wasted when I did a single base and bounds, I don't have to cover that with a segment. So you could think about it, whatever parts of the virtual address space the process is using potentially, I have to create a segment to cover all of those. But anything that's not used, and that's going to be 99.9% of the virtual address space, I don't have to cover with the segment. And so that's a really, really nice thing. So one of the problems with segmentation, so now let's get to the cons. We still require the entire segment to be contiguous in memory. So as segments get large, I need to find larger and larger pieces of contiguous physical memory for that segment. And that could potentially lead to what kind of fragmentation? External fragmentation. So I might have little pieces of memory all over the place, but the process now has a 10 megabyte heap, and I need a 10 megabyte contiguous set of physical addresses to give it. And I may not be able to find. Or I may have to start shuffling things around, and I make it really gross. So exactly, potential for internal fragmentation. So let's step back a second and think. We've talked about a couple of practical ways to do this, but what would we really like in an ideal world? What would we like the system to be able to do? Yeah, continuous segment for the square into two segments. So that's a good point. I can't start to fracture segments. And essentially, but the idea of a segment is that there's something nice about being able to store everything in that one segment. But again, you're getting a little bit ahead of me. So come back to this idea, because essentially, what we're going to do is kind of exactly that. But what would we really like? Does anyone want to fantasize about exactly what they would like their MMU to do? And how would we do that? I mean, ah, don't get ahead of me. Ideally, what we want is we want a completely fast and flexible mapping that allows me to map any physical byte, any virtual byte, to any physical byte. What we've come up with are ways of doing this in the aggregate. Segments map a whole range of virtual addresses to a whole range of physical address. The base and bounds map a huge chunk of virtual addresses down to physical addresses.  Well, we haven't found a way of doing this at a byte granularity, which would be awesome. And we've also talked about the fact that the operating system doesn't want to get involved too often, because why? Why can't the operating system get involved in translating every address? It's way too slow. If I had to trap in the operating system every time I translate an address, I would never get anything done. Now, we haven't talked explicitly. We've talked a little bit about what the hardware would be required to do with segmentation. And with base and bounds. But if I wanted to do something like this, where I essentially wanted to map any virtual byte to any physical byte, does anybody know about hardware that might exist that would help me do this? Anybody seen some of these pieces of hardware in other classes? So the first thing we're going to do is, and we've been doing this all along, when the operating system is too slow, this is a common systems trick I just want to point out. Whenever the operating system is too slow, a common approach. When any part of your system is too slow, a common systems approach is put a cache in front of it. So is anyone familiar with L1 cache on your processor, L2 cache? These are all caches for main memory, which we think is fast. But a lot of the way systems work is that you put a small fast thing in front of a big slow thing. And you try to make the whole thing look as fast as the fast thing, but as big as the slow thing. And if you're good, you can do it. We'll talk actually Wednesday about how we do this with the disk for memory. So what we're going to use here is a specialized piece of hardware that's called a translation look-aside buffer. It's kind of a strange name. But what you can think about it is what's called content-addressable memory. So content-addressable memory, normal memory is addressed not by its contents, but by location. You tell the system, give me the contents of this byte. But the address you give it is, I'm trying to think of a good analogy, it's like a street address. It just maps down to some point in the memory space. Content-addressable memory is very different. What it does is it asks the system, give me something associated with memory that contains this content. So it's more like being able to query and find out, map me to Jeff's house. Rather than giving it my address, you ask, tell me the place where he lives. So content-addressable memory is going to help us out here. And maybe this will become more clear. Well, content-addressable allows me to do. So I'm going to use something on the TLB. The TLB is going to cache address translations between virtual addresses and physical addresses. For now, let's not think about pages. Let's just think about, in general, any virtual address to any physical address. So here's my TLB. And here's some virtual to physical address translations that the operating system has set up for a particular process. What happens is, when the process tries to use an address, what the TLB does is it searches all of the virtual addresses it knows about in parallel. So you can think about this search is happening in constant time. It's not quite accurate, and TLBs differ in how they work.  And what will happen is, if it finds one that matches, so this is the content-addressable part. If it finds one that matches, it'll return something about it. In this case, what I'm loading into the CAM or the TLB is the physical address that this address maps to. So it allows me to very, very quickly figure out, for OX800, what physical address does it map to? Does everybody see why this is content-addressable? I always find that it's something I have to think about a little bit. Instead of at, so imagine this was an array. This would be slot 0, slot 1, slot 2, slot 3. And what I would say is I would ask the TLB for what's in slot 2. But I haven't done that. What I've done is I've asked the TLB, I've addressed it by its content. I said, give me OX800. And it searches everything, finds this quickly, and returns the physical address that's associated with this. Now, unfortunately for us and for your computer and every computer on earth, this magic trick only works so well. Content-addressable memory is limited in size. And this is just a feature of hardware. And it has to do with the fact that these things are really, really good at doing these parallel searches. And to some degree, the complexity of these things tends to scale as the square of the number of elements that you can search in parallel. So typically, cams are both expensive, and they also scale very badly. So I can't do this for every byte in my address space. If I had a cam that allowed me to translate individually every byte in a 2 or 4 gigabyte address space, that'd be great. I'd be done. There'd be no problem. I can map byte to byte. It would be glorious. That's not what I have here. What I have here is a limited, limited device. So normally, no, no, no. So normally, a cam, depending on how it works, they don't like duplicates. Some TLBs will basically just kind of like punt if you give them duplicate entries. So one of the things the operandism is responsible for doing is ensuring that there aren't duplicate entries because some cams will not work. There are probably some that will work OK. I don't know what they would return. Maybe both entries, maybe the first one that they find. But normally, duplicate entries are not a good thing. Carl, no, well, that's a great question. Do we think that the application, so if the process had access to the TLB, what could it do? What could it do? Remember, we're trying to, first of all, we don't want processes to ever see physical addresses. But we also, the kernel needs to control and protect processes from each other. So if I could change the contents of the TLB, what would that allow me to do? Well, not between threads, between processes. Any process could essentially, so let's say I'm a process, and I know that the kernel has given me permission to access 0x800. If I can change the TLB, I can essentially change this address to point anywhere. And then if I want to let any bite on the physical memory on the system that I want to address, whether it's mine or somebody else's, all I have to do is change the mapping from 800 and I can access the entire machine. Right. But the kernel has to tell the TLB what to do. This is very similar to what we did before. Once translations are in the TLB, they proceed without kernel assistance. But the kernel is in charge of loading and unloading these entries. Yeah. I'm going to say, as if I'm fetching, you would take me. So it's a good question. Something we'll come back to. For today's lecture, I want you to think about the kernel as directly managing the TLB. The kernel does manage the TLB directly. But it does so in one of two ways. On some systems, when the TLB doesn't contain an entry for a virtual address, it will ask the kernel directly. There are other systems that the TLB and the MMU try to be more smart. And what they actually try to do is they try to read kernel data structures that the kernel has set up and find out what should be loaded. If they don't find an entry, they'll still ask the kernel. And the kernel is still in control because the kernel sets up those data structures the way it wants. But for now, I want you guys to think about what's called a software-managed TLB, which is that the TLB and the MMU don't care or know anything about how the operating system organizes information about these translations. And if the process tries to access a virtual address that's not in the TLB, the system will basically just say, kernel, I need help. Trapping to the kernel and ask the kernel for what to do. But it's a good question. Any other questions about this before we go? All right. So now, I want you guys to see kind of the trade-off that we're making here, because I think it's kind of clever. So our problem with segments is they're too big on some level. They can get too large. I could split them, but that starts to get messy. And at some level, making segments big leads to all this internal fragmentation, because there's pieces of the segment that aren't in use. And I can't really do much about it. On the other hand, mapping individual bytes is not feasible, because what would happen is that if I mapped individual bytes, the TLB would only be able to cache maybe 128 entries. So what that would mean is there was only 128 different bytes of memory that the process could address without requiring the kernel to help it, or whatever the size of the TLB was. So that's bad. That's too small. So can we find a middle ground here? Is there some sort of design point that allows me to map enough memory but avoid some of the problems with segmentation? And there is, as it turns out, not a rhetorical question. And the solution is what's called pages. So what pages are, you can essentially think of pages as fixed size segments. And that size is chosen to balance two things. So we want the size to be small enough to limit internal fragmentation. If the pages were too big, in order for a process to use two bytes of memory, it would have to allocate this huge two megabyte page. Most of it would be unused. But we want the pages to be big enough so that the TLB can cache enough virtual address translations to cover a large enough piece of memory to allow the process to make forward progress without involving the kernel. You guys understand this trade-off. If pages are too small, then I do great on internal fragmentation, but the TLB has to, I constantly am missing in the TLB. The kernel has to constantly be telling the TLB about new entries. If pages are too big, the TLB works great, but there's a huge amount of memory that's lost inside those huge allocations. The other thing that's nice about, the other thing what we want to do with pages that forces us to find a middle ground is that there's a lot of kernel data structures that essentially grow with the number of virtual pages allocated by all processes on the system. And if I make pages too big, this works out great. The kernel data structures get small, but then I had these other problems. But if I make the pages too small, then these kernel data structures get really big. And if the kernel data structures involved with memory management get so big that they start to compete for memory with processes themselves, then this is terrible. The kernel is trying to let processes do their work. It doesn't want to, if the kernel is consuming 80% of the memory under a system, it's not a good design. The kernel is supposed to stay out of the way as much as possible. So I want to come back to a comment that somebody made before about the size or the number of entries that I can cache in even a small TLB. It turns out that processes that are executing show a great deal of what's called locality in their memory access. Typically, not always, but typically. What this means is that processes memory access are very, very clustered to a couple of regions of their address space. What would one of those regions be? What would be one area where a process would be doing, for example, a lot of loads? Snare stack, not so much. Loads, just loads. Anybody want to make a guess? Code, right? Exactly. The code area, I'm basically load, load, load, execute, execute, execute, execute. That's what I'm doing. And there are breaks in control flow. There are times in which I'm going to branch to some other function. But a lot of code execution is completely sequential. I load an instruction. I execute it. I load the next instruction from the next memory address. And I just keep doing it. So that's one area where there would be a lot of locality. What about an area locality where you would see a lot of loads and stores? Somebody mentioned one over here. The heap. If I have a heap data structure that's small that a piece of code is using, most of the writes are going to be within that one page in the heap. What about the stack? The stack is very similar. The local variables that are being used by a function are all allocated pretty close to each other on the stack because they're created when the function starts executing. And this is not always true. Again, I can create massive data structures and then maybe jumping all over them at random. But that's not that likely. And normally, there's a lot of locality. What this means is that normally, at least over a very short time window, the pages or the areas of memory that a process is using are pretty well confined. And what that means is that even a small cache of address translations works really, really well. It's actually surprising how well it works.  I think on your system, it's like 64 entries in the TOP. It's not that many. But that works really, really well because of locality. It means that once I load a translation, I get a lot of mileage out of that one translation before I have to reload a new translation. All right, so let's talk about page size. This is one of those things that I don't really know if there's a rigorous reason why this is the case. But on a lot of systems, 4k is the page size. Yeah, you mean the page size? Yes. No, no. So page sizes definitely are usually a power of two. But I don't know why they're not 8k or 16k or 3k. And actually, 4k pages have been around for a long time. That's the other weird thing. Systems have gotten much, much, much bigger. Page size, now there's some systems that have crept up to 8k. It's not, sometimes when you see things like this in systems, what really is the case is it just doesn't matter that much. As long as there's a long window in which you can have a page size and it works fine. But 4 8k pages are typically used. And if you think about it, so 4k page with an 128 entry TLB, that allows me to cast translation spanning one megabyte of the processes virtual address space. It's just 4k times 128. And again, surprisingly, that can be enough. And that can actually do really well. And again, one way of thinking about pages is just fixed size segments. So when I went from base and bounce to segments, I added a start virtual address. When I go from segments to pages, I take out the bounds. The bounds is implicit. The bound of every page is 4k. It's always 4k. That's the page size. So on some level, you could think about these kind of like segments. Dachi, yeah. OK, but we don't. So we don't, probably. So there are, with 4k pages, there are these things that just kind of work out well. Like for example, we're going to maybe get to this today, maybe next time. Some of the kernel data structures associated with paging, if you use a 4k page, turn out themselves to be 4k. And that's kind of nice. Because essentially, it means for multi-level page tables, each level in the page table turns out to be a 4k array. And that's kind of clever. But in reality, I don't know. Any other, good question. Any other questions about page size? Yeah. Well, it goes back to what we talked about before. The larger pages are, the more potential it is for internal fragmentation. So you need a 32-byte structure. And so you call malloc. Malloc has no heap. Malloc calls the kernel. Malloc gets 8k, whether it needs it or not. And so you're only using this 32-byte data structure that you call malloc for, but you have an 8k page. So that's the problem with larger pages. With smaller pages, the problem is twofold. A, the amount of memory I can cache translations when the TLB goes down for a fixed-size TLB. And the kernel data structures associated with paging get really big. Because the number of pages goes down, the number of pages in use by a process goes up. If I have the same process and I take it from 4k pages to 2k pages, it's going to be using roughly twice as many virtual pages. And so there's twice as many virtual pages that the kernel has to keep information about. And we'll talk in the rest of the lecture about some of the information I need to keep about pages in order to do translation. That's a good question. All right. So let's talk about how we do page translation. So now, again, I have this fixed-size for pages, so that's nice. And what that allows me to do is essentially any address that I'm translating, any virtual address, I can split it into two parts. The first part is what's called the virtual page number of VPN. That identifies a page, a virtual page, that the process is using. That might be 4k, it might be 8k, whatever. The rest of the address is the offset. And what this implies, as you should hopefully be able to see, is that all addresses with the same virtual page number map to the same physical page, potentially. The offset is the only thing that changes. But when the offset changes within the same virtual page, it still maps to the same physical page. So all addresses inside a single virtual page map to the same physical page. So let's see how we do this. So let's say I have 4k pages. Again, very, very common page size, and the one that you guys will use for your assignment 3. So I split a 32-bit address into two parts. So the bottom is 12 bits. Why is the bottom 12 bits? Because it's 4k, right? 2 to the second is 4, and then 10 bits is 1k. That's the easiest way to remember. Everything else, the top 20 bits, is the virtual page number. So in order to translate it, I split it into the virtual page number and the offset. And then to find the physical page, all I care about is the virtual page number. Essentially, I went from translating virtual addresses to translating virtual page numbers, because the offset doesn't matter at this point. The offset will only get included later when I finish the translation. So now what I do is I look and I see, is there a virtual page to physical page translation defined for this virtual page number for this process? If there is, I fetch that physical page, and I just add the offset to it. So this is pretty straightforward. It's a lot like segmentation with fixed size. And fixed size is what allows me to do this partitioning right here. With the segment, I couldn't do this because segments are different sizes. So there's no way to say a priori with a specific page size that the bottom is always the offset. It would have the offset varies based on the segment. All right, so let's do an example of how to translate addresses using 4K pages. So here's my TLB, very similar to the last TLB. And it's caching virtual to physical translations. Now what is the TLB caching? Is it caching virtual addresses? Virtual page numbers. So at this point, the TLB is not caching a 32-bit wide address. It's caching however large it is. And because it's 4K here, we're going to say these are the top 20 bits of the virtual pages. And this is the top 20 bits of the physical pages that that virtual page maps to. So let's go through one example, and then I'll have you guys walk through the second one. So I've got 0x, I don't know how to, 800,346. This is a virtual address. The first thing I'm going to do is split it into its two parts. So this is 12 bits. Remember the hex, each character is 4 bits. So this is the top 20 bits. You don't see all 20, because I just cut them off, but whatever. And now I'm going to translate the top 20 bits. So I go to the TLB, I find the translation. It turns out that the kernel has loaded the translation for this process, mapping 0x, 800, 0x, 306. I replace 0x, 800 with 0x, 306. That's the physical number. And I stitch the address back together. I slam it back together. This is equivalent here, because I'm on a bit offset to adding and subtracting the offset. But you can think about it as pulling the address apart, translating the top 20 bits, and then slapping it back together. Questions about this? Yeah. So what if there is another process including the same virtual address here? So OK, this is a great question. Again, remember, TLB is particularly the one you're going to use, don't like duplicates. But in general, there are a lot of duplicates between processes when we're talking about virtual addresses, because every process sees their virtual address space the same way. So what happens is that the entries in the TLB are only valid. There's one of two cases. One case is that the operating system always keeps entries in the TLB only for that process. So when I do a context switch, what do I have to do to the TLB? I have to flush it and potentially load it with some entries for the other process. Sometimes I don't even bother to do that. Sometimes I just flush it. And then when the process starts running, I start loading the addresses that it needs. The other approach here is that there are TLBs that allow you to load another process identifier. So what would happen is that I would have OX800, and I might have that twice, but I would have different process IDs. And the process ID is what allows the TLB to distinguish between those two addresses. So for assignment three, that's not something we ask you to do, but some modern systems find that to be helpful. Because what it means is that if I'm context switching between processes, I can leave the old entries in the TLB. I don't have to clear them. The new process could start running. I might kick them out eventually, but I don't have to clear them right. That's exactly right. Remember, virtual address translations are only valid for a particular process. And I should have fixed this. But there's really no such thing as translating a virtual address. It's always done within the context of a particular process. OK, good question. Any other questions about this? So let's do another example. OK, OX10336, let's start right here. What's the first thing I do? Split it in half. I take the top 20 bits, which is OX10, and I separate those from the bottom 12 bits, which is 336. What's the next thing I do right here? So I'm going to look it up in the TLB, right? And where does it match? It's OX10. And what's the physical page number for this one? OX50, I find in the TLB, I replace it, and I stitch the address back to go. Any other questions about this? I thought about doing the third example. Maybe I should have, but I only have two. So questions before we move on. 336 is the page offset. It's not considered when doing the translation, but clearly it's part of the address. So we talked a little bit about this, so I'll go through this fairly quickly. The TLB is that the operating system is responsible for loading the TLB. That's one of the main things the operating system does in this model and on your system to allow virtual addresses to be translated, right? When the TLB doesn't have an entry, it asks the operating system for help, the operating system looks up the entry and loads it into the TLB, okay? And we've talked about this. This is Kaboom. Sometimes it's Kaboom, sometimes that address, that the operating system may adjust the processes address space to make this happen, right? Oh, sorry, okay. If it tries to access an address that's on the TLB, it will ask the operating system at which point. The operating system has to either load a valid translation for that process or figure out what to do, right? Okay. So let's talk about paging pros and cons, right? So again, one of the nice things about paging, you see the progression that we've been on here, right? We've been, what we've been doing is we've been essentially making the hardware a little bit more complicated in every step, right? But what that's allowed us to do is gain some benefits, right? Some significant benefits, right? So paging maintains a lot of the pros of segmentation and many systems actually layer some of the ideas from segmentation on top of paging, right? So what they'll do is they'll have pages that they consider to be inside of a segment, right? The protections are the same for the entire segment, but the pages inside of it may be moved in and out of memory or they may be moved around as the operating system sees fit, right? So you can think of segments. Segments are a nice way of organizing information about the address space, right? And protecting each part of the address space appropriately. Pages have advantages when it comes to actually being able to reduce the internal fragmentation issue with segments, okay? Again, this is the same thing for segments, same thing for segments. Now remember, the nice thing about this is there's even less internal fragmentation here, right? Because in general, 4K is probably likely to be smaller than most segments, right? A lot of systems, when we looked at the output of PMAP before, most of the time, even for something as simple as Bash, right? It only, it has several code pages, right? So all the code doesn't fit into one page, right? The segment that that code would have been loaded into would have been larger than 4K, right? Now here's another brilliant, brilliant thing that we get out of this, right? No external fragmentation, right? Fixed allocation size, right? You know, every allocation that a process makes for memory to the system is always 4K. 4K, 4K, 4K, 4K, 4K, right? And that's glorious because it means that I'm gonna have a 4K piece, right? Unless I do something really dumb, you can essentially think of it, take the amount of memory that you start with, break it into 4K chunks and hand out and revoke those 4K chunks, right? So the external fragmentation just completely goes away, okay? What about cons of paging? What have we been forced to do here as we've gone along? Anybody have a guess? Yeah? Right, so yes, that's a great point. There is actually a lot of extra management, right? It also requires per page hardware translations, right? So we've actually talked already about how we get this to work, right? So one con with compare with segmentation is I have to do more translations, right? My solution to that has been to find hardware to help me, right? What we'll talk about on Wednesday with the amount of time today is how we keep all the state around, right? So that's a great question. So now what I've done is with my old system, with the process that had code, stack, and a little bit of heap, I might have had three segments, right? Now I might have 30 or 50 pages, right? So the second con of paging requires is that it requires more state at the operating system level, right? What we're gonna do on Wednesday is talk about how that state is managed, right? Let me just give you a preview here of what we're gonna do, right? There are two things that we have to be able to do to get this scheme to work, right? So essentially, again, what we did here is that for this we got hardware to help us and now we need to do some engineering at the operating system level, right? And again, there's two things I need to do. The first thing I need to do is every virtual page on the system has some state associated with it, right? The most important part of that state is what? What's that? No, no, no, even more important than that. Code, no, no, no. Virtual page. What am I gonna do with it? I'm gonna translate it, right? So for every virtual page, there's a separate translation potential, right? So that's the most important thing I have to keep around, right? There are some other things and you're onto what some of those other things are. So the first challenge is storing all that information efficiently. The second challenge is locating it when I need it, right? So the TLB says, I've got this virtual address this process tried to use, what do I do? And the operating system, the faster you can respond, right? As soon as the operating system is involved, I've already lost some time, right? Because if the TLB had known about that translation, it would have happened like that, right? But if I use clever data structures in the operating system, I may be able to avoid using, losing even more time, right? And essentially again, what I wanna do is very quickly retrieve the translation for that page, okay? So we will spend Wednesday talking about this stuff and I will see you then.


Today, we are going to discuss play in early childhood, play and assessment, how we assess our children through play. So, children's play in their early and formative years is critical to their psychological intervention and assessment. Since the 19th, multiple outcomes have been realized in child development and assessment of the programs implemented. So, play offers children physical, emotional, interpersonal and cognitive learning. So, the thing is that assessment is actually a well-structured phenomenon throughout poor education. But, for our early children, we need a different kind of assessment. The reason is that children are so young that they cannot prepare themselves for assessment. And the outcomes we have decided for them are not necessary to exhibit them in the same way. Or, their dispositions are not controlled or disciplined, their behaviors are not controlled or disciplined, on the basis of which we can say that which child is at this level and which one is not. So, as we said earlier, throughout observation is a very good tool for assessment by early childhood students. Then, many early childhood programs use their own assessments or the assessments that are part of the curriculum. So, these assessments are typically based on students' academics. Look, keep in mind that many such schools and organizations, even the policy makers, are the first to decide the outcomes of the students and their benchmarks or standards and send them to school. That we need so many outcomes. Their reality is not like that. What we are talking about is that our children have different potentials, their backgrounds are different. And if they are equal and have all the good things in them, then it is not necessary to use all of your suggestions during the assessment. Still, the courses that are going on, like some of the language targets, like to achieve these targets, we make our assessments in such a way that if we are teaching the child to count up to 100, then he can count up to 100. And similarly, if we have a vocabulary of some of the languages, like what is made from FR sound, how many words can be made from SP sound, then we give these assessments to see their outcomes. But our philosophies, our theories, they tell us that the children, especially when the play is going on, the learning outcomes do not come so clearly in front of them. So, that is why a lot of research has suggested for rigorous validation that you observe the performance that the children perform during their play. For example, if you keep some blocks or other things in front of them and tell them to play without them, or see, there can be a small instruction that you can count them or you can make them related words. Whatever you want. And if the child is kept away from pressure, from anxiety, then the thing that he is doing during his play, during that time, his vocabulary can also be noted, his counting can also be noted, and many other things. But normally, all of our ECCE programs, the assessments already mentioned are benchmarks, standards, then they are followed. But as I am saying, if we want to associate those results with the play, we have to be flexible and we have to observe the things.  Throughout the year and throughout the session, whatever the children are studying or doing, or the way they are dealing with their friends, all those things should be observed and their grading can be done. So, the children's assessment will be flexible. Whether it is against strict outcomes, whether it is against strict outcomes, you will still try to keep the assessment as flexible as possible.