Thanks for joining us on the Cyber Underground. I'm Dave Stevens, your host, and today we're going to cover several topics and ending up with the Equifax breach, so stay tuned for that. Until then, let me introduce again my exceptional co-host, Mr. Andrew Lanning, Andrew, the security guy. How's it going, brother? How's it going, brother? Hello, everybody. I like how it said Equifax breach only on the Cyber Underground. Only here. This is news everywhere. So thanks, Robert, for giving us the plug there, but this is news everywhere. Yeah, it's all over the place. Thank goodness, because that's how we do our research. Yeah. How was your week? It was like lightning bolt. Oh. Yeah, the older I get, the faster it goes. Did you get hacked into Equifax breach? You know what? I can't tell. And we're going to find out why. Ouch, okay. That's part of our discussion. That's part of our discussion. I'm supposed to know the script, but I didn't read it, sorry. Well, tell us what you've been doing this week. You've had a busy week. I'll tell you what.  And we really, there was a lot of... Let's tell our audience about the symposium. The symposium for Safer, why we put on, we had four sessions. One was for like commercial industry, then we had a special session for the healthcare industry, then we did a special session the next day for Fedgov, DOD, and then we did a special, another special session in the afternoon for our folks from the consulting A&E side of the house, right? And the cool thing was we're starting to get all our surveys posted, and everybody really enjoyed it. We're getting, we had like, you know, about 80% of the people who said it was, you know, it gave it a five, and the rest gave it a four. So really... I sat in one of the presentations of the Pacific Club is really, that's well done. Oh, yeah. It's a good spot for it. I mean, I think the environment's really good. But we were able to discuss at length, and I think introducing, I think no one knew or heard about the work that UL is doing on cybersecurity. Important. Yeah. Because they're a standards organization. Yeah. Yeah. And I mean, you know, the Fedgov went to NIST, and NIST came to them, and they talked to them, and they've been doing standards, obviously, for a hundred something years. Right? NIST, National Institute for Standards and Technology, another standards organization. Right. And came to UL and said, hey, can you guys work on this problem where these standards for developing these products don't really exist? So you're involved with UL because you're in physical security, electronic security, and that's the underwriter's laboratory. Right. Yeah. And what do you do and electronic security? So the issue in electronic security is that we've got products that have been being made pretty poorly. Our manufacturers use third-party services like Veracode, for example, to verify that the software's like OK software, but they've sort of ignored a lot of the, you know, what you might call security design principles and practices in their products that we would call cybersecurity. So when you handle passwords or the ability to do a buffer over flow attack on the software? Yep, exactly. And even so far as their software by default may have a backdoor engineering password written into it, or they might have a port FTP port open for, you know, file transfer port open that you don't need to have open. And some of this is left over from when they were developing the product. Yeah. And they forgot to clean that up. Sure. I gave them the example that, you know, I started my talk actually about just telling everybody to think about it, the fact that, you know, 20 years ago, you know, Yahoo was the big search engine. And, you know, you were told don't never trust someone you might meet on the Internet, right? That was the thing. And of course, you were always told you never get in a car with a stranger. But today, you know, 20 years later, you use the Internet to call a stranger to bring his car to you to ride in it. So but it's no safer, there's no more security there, not from, you know, from the passenger perspective or the driver, either one could be nuts and hack the other one up or whatever, right? And often are nuts. And so the security industry sort of had the same issue in that all this product got developed on the, you know, it got onto the networks in the mid 90s and the customer said, this is great. Give me more features. Give me more features. Give me more features. Make it cheaper, cheaper, cheaper. So you know, that value just like Uber brings you value and a lower cost is what the consumer asked for. And so the industry gave it to them. Right. But we left something out. And I thought they were doing it right because they had a username and password assigned to the device, but simple attacks against say like webcams, the wireless webcam, you keep knocking it offline and it will keep trying to connect. And every time it does, you get something like Wireshark and then, you know, tool to do a packet analysis and you can grab all those packets and do an analysis of what that username and password is. It just keeps sending out, trying to connect and eventually you'll hack it. And those, those devices are insecure because of that. Sure. And there's a lot of vulnerabilities that sort of been pointed out by our friends at Blackhead and a lot of these symposiums that have put on and attacked these devices and shown how, how, just how vulnerable they are. And we've had, I think, 80,000 camera botnets DDoSing, the DYN, right? That company. That's right.  Sure. And they're tied to the Internet. Yeah, and they're tied to the Internet. What did you say after the last Blackhead? You went to the arsenal and you said, that's it. There's the whole world, the whole world is broken. We're all broken. There's nothing we can do. It's just broken. It was scary. So, but I got to introduce this idea. And I think a lot of the folks that sat through those sessions didn't know. So, talking about UL, and UL has the 2,900 series of standards, you know, the very first one is software. And that is already, it was published, I think we published it earlier in the year, maybe in Q1. It's already been adopted by ANSI, which is the American National Standards Institute. And it's going through ISO now. So, you know, we're going to have soon an international standard. ISO, International Standards Organization. Yeah. So, we'll have this so that, you know, because a lot of these manufacturers, obviously, they make product that ships all over the world, Tyco in my industry, you know, United Technologies. These are huge companies. They sell product globally. So you need something that meets the international standards, committees, you know, guidance criteria. Super important, because you use these devices to protect yourself and your business. Sure. And if they're vulnerable, you've just added a way for people to break into your personal space or your business. This is really important that they follow these standards. And I think the consumer, once they're educated, like you said, is going to be looking at the product label saying, do you comply? Yes. And if you don't, I'm going to go buy another product. And if they didn't know about it, right? So this is the first they're hearing. And so the interest, the way you all set it up, so you've got this, that's the general requirements in software, but there's a dash two series for your healthcare devices, right? And then a dash three series for the electronic security. And I think two dash three is the industrial control systems. And they're going to go further with the IOT and they'll keep working on all this stuff. Explain the industrial control systems that people might not understand.  So the utility companies, you know, people that are moving fluids think of water, think of petroleum, like pumping from a storage tank out to an aircraft, for example, or from a refinery to a storage tank, or from the tanker offshore, you know, into a refinery. So folks that are moving fluids, folks that are moving electricity, folks that are moving energy, also use PLCs, programal logic controllers to handle. These are really it's an interface between high voltage, monitoring equipment, high voltage devices that are out there in the field that are maybe measuring for pressure or measuring for flow or measuring for temperature and things like that. So, you know, and these are talking back via IP back to software. So you really need some kind of device in there in the middle that can separate that high voltage world from the low voltage world. And that's where the PLCs come into play. And they typically use, you know, ladder logic or they're, you know, they're different types of manufacturers that make these things. Alan Bradley, General Electric, folks like that, but they're pervasive in controlling our world. And they're not like windows or anything. Oh, no, no. It's simple. Yeah, ladder logic. There's a simple code that just do that one job. Oh, yeah. Record that one feature. Remove this one thing there. Yeah. Open a door. Yeah. Close the door or whatever. And they actually write, and if you've seen the interfaces written to them, have you ever been to like a pump house for the wastewater treatment facility or something? You'll see all these, they look like a little pump spinning around in a direction. And it'll be measuring perhaps its RPM and its flow rate or something. And the software that you write actually has discrete data coming off of that particular sensor that's being translated through the PLC back out to the software. So it's really cool. So that you have a war room or something. You see everything in there. Yeah. They build all this, but that's all built in software. You know, the PLC sort of keeps you separated from all the sensor devices out there in the field. And the industrial control systems are really one of the very first ones that UL worked on. So that has also been published now. And I saw the DHS recently released. I've got the site here. It's ICS SIRT-VLP. This is the first instance where DHS has gone and issued a training. Of course, there's like 12 courses in here. Specifically, all of them are around ICS, industrial control systems. It's super important, again, because industrial control systems, those controls, as simple as they are, if they're affected in any way, they could report the wrong information, close the wrong door, move the wrong fluid, lock something, unlock something, flood the gates. And if that's a critical infrastructure or this energy involved, you could be in real trouble. Sure.   Imagine if the wastewater treatment, wastewater treatment, you know what I'm talking about, right? When you can't use the toilets anymore in a city and say that goes on for a week or two, you've got massive, massive problems. Epidemics, cholera, whatever the disease is. And so what was fun, so then we got to do that stuff last week, and then just this week, the Chamber of Commerce hosted a really great event just upstairs here from our studio. And we had some folks there from the NSA, actually the director of the NSA from Hawaii was there. CISO from one of our large local banks. One of the small business providers was in town, was up there. And then one of the larger sort of R&D kind of companies that's out here in Honolulu working for the DOD. And this was all about cybersecurity. And it was great to hear the NSA director get up there and talk about some things that I think not everyone knows. You were telling me NSA is working with two other organizations in the federal government. Very close-knit organizations, right? They're starting to share information and provide guidance to the consumer and to small and medium businesses, right? Yeah. And I think it hasn't, I don't know if people know, like if you're kind of outside those circles of like the federal law enforcement foundation or the, if you haven't been through the FBI, it has like a citizens academy. And if you're not around these government groups, you know, you may think they're very discreet. And the NSA, of course, everyone sort of knows, you know, the national security agency, right? Everyone thinks, wow, they just give us all the information that we need. They have it all. They know it all. I mean, they're the best in the world. That's the organization from the Tom Clancy novels, right? We share the NSA, right? Everyone knows the NSA. And, you know, the NSA is a branch of government and then for the DOD, right? So they're, they have lanes that they have to stay in and he explained that. And the FBI really stays in those investigative lanes for crime. Now, the third one is Department of Homeland Security. And the third one is Department of Homeland Security, which came up again, right? So I was just talking about how they've got this great training out for ICS, for the industrial control system community in cybersecurity. And the director was trying to explain to me, listen, when you, you go, people come to me all the time and won't mention, we know you have all the answers, just tell us what we need to know. You know, outside of his lanes, talking to the community, right? So he was able to share with us how they have their, their own as you go up the chain. They're all married quite tightly when it comes to cybersecurity, keeping the economy safe, all those things. So when you ask the DHS, hey, what should I do for cybersecurity? You're getting the best that the NSA has and the best that they know. Filter down through the DHS for commercial sector, you know, for example, or critical infrastructure. You know, the DHS really has guidance in each of those sectors there's 16 different sectors recognized by the National Infrastructure Protection Plan, the NIPP sectors, we call those of which even your commercial buildings are those multi-dwelling units are because they protect people live in them, right?  A mall, for example, subject to attack just as a utility company maybe or a petrochemical facility. So it was refreshing to hear him sharing, you know, I think, I think for the folks in the room that were all cyber-concerned, you might say, most of the folks in the room are, you know, sort of the IT community around town and many who work in cybersecurity. You know, they were, if they weren't in touch with InfraGuard or some of these other federal agencies very often, then I think they had a good explanation of what government's doing, you know, why they're doing it the way they're doing it and actually how much free help is available. You're really not alone. You really don't have to make this up. You don't need, no reason to be scared anymore. We've talked about that. You know, the thing is, we now know what to do to work on our cyber maturity regardless of what business we're in. If we don't know, pick up the phone, call DHS. They're in town. They can come, they're authorized to come and do assessments for you. There's now grant money available to small business for some of these things. You should do this because the community, we work together as a more organic unit in this country. Yeah, we have to. If you instill panic, interrupt the business flow. If you interrupt the economy and the financial sector, you can crash a whole country and send us all into chaos. Oh, yeah. There's a delicate balance in those countries. Yeah. Okay, we're going to come back and talk about more fun stuff really soon. We're on that cyber underground. We're going to take a break. We'll be right back. Stay safe. Welcome to Hawaii. This is Prince Dykes, your host of The Prince of Investing. Coming to you guys each and every Tuesday at 11 a.m. Right here on Theme Tech Hawaii. Don't forget to come by and check out some of the great information on stocks, investments, your money, all the other great stuff. And I'll be your host. See you Tuesday. Welcome to Sister Power. I'm your host, Sharon Thomas Yarbrough, where we motivate, educate, empower, and inspire all women. We are live here every other Thursday at 4 p.m. And we welcome you to join us here at Sister Power. Aloha and thank you. Aloha. I'm Tim Appachaw, host for Moving Hawaii Forward, a show dedicated to transportation issues and traffic. We identify those areas where we do have problems in the state, but also the show is dedicated to trying to find solutions, not just detail our problems. So join me every other Tuesday on Moving Hawaii Forward. I'm Tim Appachaw. Thank you. Welcome back at Cyber Underground. As you may have guessed, the country is not in panic and we have not crashed as of yet. And Andrew's going to give us a little bit more information on that. So we were talking about the whole country working as an organic unit and all the small and medium and large businesses. We all have to keep working. We need business continuity. The economy, the financial sector depends on confidence in the system. And if that's interrupted, we can go into chaos. And we were discussing this earlier with a friend just a moment before the show that even if the United States credit rating is degraded even by one level in the multinational community, we pay more interest to our lenders. Therefore, we're tapping ourselves out. Our budget goes up and taxes have to go up to compensate all because of our credit rating. But that could be caused by some kind of a crash in our economy. Confidence in our economy. So our confidence can be definitely shattered about some sort of a major hack of a utility or something like that. Oh, it's a 2008 financial crisis. We just invested poorly and so our credit rating dropped for a while. And when did we recover? We're still working on that. They said it's going to be long and slow. Long and slow. So imagine some sort of a catastrophic, you know, global, or a North American power outage, right? Oh, yeah. Or dams getting opened up and flooding whole cities or some crazy stuff like that. So these are some of the concerns, I think, that we got addressed. But there was a lot of comfort, I think, at least from the NSA's perspective that we've got a lot of intel out there. All the agencies are working on it. And again, DHS, if you have questions, go to their website, go to NSA's website. All of them will sort of point you to places we've talked about in the past. You know, the National Institute for Standards and Technology at NIST has a cybersecurity framework and not new guidance for small business. The 800-171, what is that? That's regarding controlled, unclassified information. Right. So how to handle, you know, information that maybe you're working for the utility and you have a schedule of their service and maintenance or something like that. That could perhaps be considered controlled, unclassified information.  And that's obvious to know, but some people, they don't think their CUI is actually CUI. Yeah. It's, a CUI can become CUI if you have an aggregate of enough of it, it creates a threat. Because I can kind of piece out, okay, this has thicker walls. There must be something important here. This is really close to this other structure. This has a lot of space. There must be something big military equipment here. And that could be a threat, just aggregating all that information that becomes unclassified controlled information. Yeah, I think so. And there's, the good thing is that I do think that the commercial community, especially if they were like never worked for DoD or hadn't been around that, the NSA director definitely talked about that, that defense in-depth idea that comes out around, you know, there's really not a silver bullet out there. You know, you're going to have to layer security, cybersecurity in particular. Seriously important, right, layer your security with a username password. Just not going to protect you. The most important thing is train your users. Sure. To be aware.  Sure. But the way into a big target is through a little target. I don't want to go storm. Like a person. Right. So I don't want a little storm in the main wall, right.  So I'll go and attack a small target. Didn't all their information just keep public this week. Oh my gosh. Let's talk about Equifax. So financials, let's talk about the financial sector, right. You brought up how the 08 crash brought us down. Right. And here, Equifax, one of the four credit. Top three. Major credit top three. Major credit reporting bureaus, right. It gets all their records, maybe 140 minutes. That's half the country. That's probably close to 143 million weeks. That's all the adults. Yeah. All the credit where everyone who's applied for credit ever. Yeah. And that's a lot of people don't realize that you don't go to Equifax and say here's all my information. You apply for credit. You apply for a loan. You apply for a credit card. All that goes to the credit agencies. All three of them Equifax is one of them. If you go try to buy a car and you need a loan on that car. Everything that a hacker needs to become you is there. And we were victims of this with all the opium. Yeah. The opium hack, office of professional management for the DOD security clearances when they got hacked. They know my brother's name and where he lives. It's a lot of in-depth information. And this one was unique. I believe what I read is that they think it's not a phishing attack, which is usually found all the firewalls and stuff by sending phishing email attacks with some malware attached to an attachment in an email or something. But this one seems to have been the website. It had vulnerabilities on the website. So SQL or something. Yeah. They won't tell you how it happened, but I'm sure if there's a log in because it was a WordPress site, this was probably a single... It was a WordPress site. That's what they were saying. The Equifax was using a WordPress site. I don't have it yet. So SQL 17.com, this is to see if you're affected. Now this website I believe is WordPress. And we found out there's only one WordPress user on there. I won't tell you which one it is. But if you go on KrebsOnSecurity.com, you'll see all these details. This is a wonderful place. By the way, don't think that if you go there, you're going to get an immediate answer. What we found, Brian Krebs found this actually, answer and then if you go on your mobile phone and you try the same process you're going to get the exact opposite answer. So one of them I'll tell you you were affected and the other one said says you have not been affected. So apparently this is broken. Equifax is not doing the job and in addition there are three executives for the company that are already under investigation for selling stock in Equifax between the July or May July breach and the time which they told the investors in the public that the breach had happened. So in the time they knew about it to before they told the public and the investors these three top executives sold shares and made money. Cashed in a little bit. They cast in before the stock dropped. That was the the major thing right the stock dropped 13 percent. Since the announcement it's gone down 13. Probably more since we've been talking. It's taken down target. This is what we're talking about. The financial community depends on confidence. In the nation's the nation's economy depends on that same confidence. This is a system and the only way the system works is if I have confidence in my army, my navy, my air force, my banks, my branches of government that everybody's working and when I think that's not effective anymore, I start to think as a person how else can I protect myself and that can lead to chaos. Gordo has an answer. Blockchain. Blockchain. Everything's blockchain. Well I mean you know I would think financial sector's surely adopting it. I mean that's you know the backbone of that currency. What's all these new crypto currencies? Ethereum. Yeah. So trust is like done. What's the word they use when it's you know it's federated across so many different people. Distributed. Distributed. So distributed ledger. Trust is no. Trust is in the hashing of the token of their transaction. There's a lot of encryption in blockchain. That's going to be a tough one right because you know security as you know is a running game. Yeah. We're doing security but there's people right on our tail and if we don't run at full speed all the time someone's going to overtake us and those hashes that encrypt our Bitcoin are going to get broken. We've already broken a whole bunch of hashes. The MD5 was broken in the 90s. We have SHA1 was already broken. Now we're up to what? SHA512? Yeah. I saw that they're using they're using AES256 for Bitcoin. Right. Okay. So you know we'll take much of quantum computer to crack that void. Quantum computers are an interesting game for the those of you out there in the in the world wondering what the heck a quantum computer as well. A quantum computer can use photons instead of a lot electrons to measure the state of any object so instead of a one or a zero a photon can actually be built at the exact same time. At the same time. So if I'm asking a question from a computer who's like like my Mac here it's ones and zeros of electrons so I have to test every single possibility one at a time it's either that or that. Quantum computers can take all the possibilities and test them at the same time. So imagine the speed of computing is massive. And not much power to do it. It's all photons right that's incredible and we have quantum computers actually in production in two private companies right now and I believe IBM and I think the criminal community if we keep you know pay in our ransomware that they're gonna they're gonna be buying the first one. Yeah to break the rest of our encryption. Fortunately you know the last I heard the Navy and the Marines were already working on quantum encryption. Yeah when China apparently right now they've announced they've announced that they're gonna have a com network up on this quantum encrypted. Yeah most secure communications network network. How's that. Wow and we're going way up. We're at least just saying eighty two fifty six isn't gonna last forever. No you know there's to be a point at which that you know the box ain't have to change it's hashing right I'm sure they can just make them longer right. They can make them longer and it won't matter because you know if we're using quantum technology doesn't matter the length.  One thing doesn't do it like I said there's no silver bullet you have to have a method to protect yourself there's several layers you have to go in and go into your building you're building as a mantra right. Mine does yeah. Yeah so you go inside you have to enter the first door and be authorized then you have to stand there and be recognized before you get into the second door right that's just one layer and when you get inside you have an ID badge I would assume. Yeah everyone's got to have an ID badge. You see someone wander in the hall and they said you see somewhere's the restroom and if they don't have a badge you escort them to the front right around the back one way or the other. Yeah layers and I don't think people understand that they put that router that Wi-Fi router into their business and then they just say oh yeah you know username password I'm done. Yeah you know the Cisco puts out their thread of the week the vulnerability of the week and there was I think this week it was an AT&T device. Sharknado they called it so was this some AT&T heiress routers these you see these they're common home routers for distributing either fiber connected you know internet to your home or your business or cable connected so these these manufacturers have some vulnerabilities in these products that was the you know most touted or most seen attacked vulnerability this week by Cisco. Wow. In North America. And well ladies and gentlemen tune back in next time we'll be here next week discussing stuff like this again to keep you safe. I'm Dave Stevens this is Andrew the security guy Aloha from the Cyber Underground.


Yes sir, you can do it for any order reaction, but the thing is again that since in this question is clearly given first order you have to find out correct that you need to prove, but suppose if they ask you the order of the reaction, then you have to assume one by one. Okay, zero order first order and then second order that you can do. Obviously if you assume zero order, then you have to take the expression of K for zero order reaction. Are you getting it? Yes. But the value of K for two set of data will be equal only when your assumption is correct. Yes. So, mostly for zero and one you will get the answer and second thing or suppose if you get this question in the exam they are asking you the order of the reaction in comparative exam, then we know in zero order equal amount will react correct. In equal time interval, 240 second, suppose if equal time interval is given, then equal amount must react. If that is not there, it means zero order is not possible. I'm not talking about this question in general I'm talking about. So, suppose zero to 220, 220 to 240, then again to 480. If it is 480 here, then this the amount that reacts over here equal amount should react here in equal time interval. If it is zero order, yes. Yes, yes. If it is first order then what we'll do? Percentage that reacts must be same. So, we'll find out the percentage which reacts over here. So, in that way also you can do obviously this kind of question if they ask them competitive exam, they want you to you know waste your time because it will just a hunch you're using over here. Okay, zero order and then this kind of question I would say, if it is very calculated you're not getting it quickly, then leave it for the last like if you have lasting 15 minutes left and you can try this kind of question, don't waste time on this. So, we'll move on. So, next, you know, see all these things if you recall the last class, we were talking about the factors affecting rate of reaction. Yes or no. We have discussed the nature of reactant and product, we have discussed concentration and all these things, order and everything that we have discussed, RLE and all, it is under the concentration factor, correct. So, let's go back and just revise quickly that we were talking about the factors affecting rate of reaction. And in the concentration factor we have discussed this much of thing, which is mostly in a half of your chapter. Correct. Now the next factor is that is temperature and the next one is catalyst. These two factors we need to discuss, but before going into temperature, we'll discuss one small concept that is molecularity. Theoretical thing, we'll finish this and then we'll move on to the temperature, the other factor here. So, heading you right down, molecularity. In board exam and in comparative exam, they ask questions about this, with this molecularity and order. In board they, many times they have asked this, write down the difference between order and molecularity. Okay, very common thing, it's given an NCRT also. Okay, write down molecularity. It is equals to, it is equal to, let's call that the way, equal to the number of molecules, reactant molecules, write down, number of reactant molecules involved in, involved in, dimension you can use Venkat, if K value is given, no, K-car unit is not given over there, correct. Oh, what I thought sir, we could take one, we could find out K respectively and then do it, but then since we're equating K, I, okay. We're just taking different values and finding out cases that are equal, okay sir, got it. Different orders actually, that you can do if K value is given with unit, then you can understand, okay, this is the order of the reaction. But here the K value is not given, you don't know what value of K you're going to get. Plus the unit also. If unit is given, you can do that. Number of reactant molecules involved in, involved in the balanced reaction, involved in the balanced reaction. Point was write down, it is the theoretical concept, theoretical concept. And if in complex reaction, in complex reaction, we check the number of molecules, reactant molecules. When I say molecules here, reactant molecules present in, present in the slowest step, slowest step. So we just have to see one single step, right. So if you have complex reaction, so molecularity we define with respect to the slowest step, if multiple steps are there. So hence we also say it is defined for elementary reaction, means one single step, elementary reaction, that also we see, okay. It must be a whole number because it is a sum of the molecules, so it cannot be zero negative or fraction, correct. So it must be a whole number, or must be a integer, not whole, must be zero is not possible so we can have one, two, three here. But order if you see order can be anything, it can be zero, it can be negative, it can be positive, it can be fraction, but it is always either one, two, three and like that. Reaction with molecularity, greater equal to four. Some book it is written three also over here, both are rare only, three and four molecularities are rare, three to some extent fine, but four is also very rare. Reaction with molecularity greater equal to four is very rare. It is independent of pressure and temperature, pressure and temperature. So these are the few things, few points for molecularity that you must memorize, difference between order and like it is independent of pressure and temperature. Order depends upon pressure and temperature, that's also we have one point done. Okay. Next the next factor which affects the rate of the reaction we have, write down factor number four is temperature. See temperature has a significant effect on the rate of a reaction, because if you increase the temperature, then the molecules energy, right. Overall average energy if you see for the molecules that also increase, hence kinetic energy increase, kinetic energy increase so we can have more collision, which we can say that collision frequency increases. When collision frequency increases, then rate of the reaction also increases. So write down this, write down temperature has a great influence on the reaction rate, temperature has a great influence on the reaction rate, the reaction rate. In general, temperature increases, in general, as temperature increases, rate of the reaction also increases. Next line, it has been observed that, it has been observed that for every 10 degree rise in temperature, for every 10 degree rise in temperature, the rate constant, the rate constant becomes doubled. Rate constant I'm talking about you see, it's not rate of the reaction. Okay, however, both are related in a similar way, means if rate constant increases rate of the reaction also increases. But it is rate constant which gets doubled. No, here it is not. We'll talk about endo and exo, temperature won't affect the rate. In general, whatever the nature of the reaction, endo or exo, with increasing temperature, the rate always increases. But isn't it a bit contradictory? Why? For exothermic reaction, if you want to produce, if you give more energy, won't it like reduce the rate of reaction is something. No, it's not. Because we are talking about, first of all, you are confused with equilibrium constant rate constant. You are actually you are talking about a reversible reaction. Okay, and I am talking about we have A and B and conversion of A and B into product. So when you increase temperature, the collagen frequency of A and B increases, there will be more collagen per unit time. And hence, the conversion of into product will be more lateral reaction. I'll come to your point. I understood what you are thinking. I'll come to that point. Give me some time. So, this is the thing, right? So, temperature is, in general, what you have to keep in mind temperature increases rate of the reaction increases, why it happens because rate constant increases, k increases. Okay. And the relation of rate, one more thing I forgot. Okay, I said, for every 10 degree rise in temperature, the rate constant becomes double, right? So if you see, if you take the ratio of rate constant k, at a temperature t plus 10 divided by k at temperature t, so obviously we have 10 degree rise in temperature here. This ratio, we call it as mu. And this mu is temperature coefficient, important temperature coefficient. Okay. And this is observed to be nearly equals to two. In the book, they have written, becomes double or triple. This also, they have written in the book. But for solving question, you take this to only. Okay. The temperature coefficient for every 10 degree rise becomes double. Take care. Is this fine? Sir, how is it the same for every reaction? Same as in what? It doubles for every reaction if you change the temperature at 10 degrees. It depends. That's what I said. It has been observed. It's an experimental thing because it depends upon the collision frequency, plus the energy barrier. Okay. So whatever the nature of the, obviously it is not true for all the reaction. It is there for some of the reaction. For few reactions, it becomes tripled also. So if it is two or three possible, it is also possible that could be any other number. But mostly, it becomes almost double. Not exactly equals to almost double. That is the experimental observation we have. For our sleepers, for our question that you get related to this, you have to take the ratio as two only. You won't get any other value over here. Or you can say in other way, that the reaction that they give here in this chapter in our sleepers, for those reactions, the ratio for every 10 degree rise is coming out to be two. Both of you can understand. Why it becomes double or triple, that there are two to three factors, collision frequency, plus energy barrier also we have over there, which can overcome easily. Okay. We'll talk about that energy barrier after some time. Okay. So this is what we observed overall. We discussed overall that what happens overall if you increase the temperature. Correct. But the relation of rate constant with temperature is given by a scientist called Swedish scientist called Arrhenius. Okay, it is observed by Dutch chemist called went off that okay rising temperature, temperature, sorry rate of the reaction increases rate constant increases and rate of the reaction increases. It is initially observed by went off the Dutch chemist, and the relation of K and T rate constant temperature is given by Arrhenius. Okay, so right on the relation of rate constant and temperature is given by Arrhenius and this equation, which relates rate constant K and temperature is called Arrhenius equation. It is equals to a e to the power minus E a by Rp. This is Arrhenius equation. Okay. K is the rate constant all the terms you write down K is the rate constant we know already a is we call this a as frequency factor frequency. We also call it as pre exponential factor pre exponential factor, or we have one more name here that is Arrhenius factor.  Copy. Okay. Now you see, if K one and K two and K two are the rate constant T one and T two temperature respectively. Then can we write this ln K one is equals to ln A minus E a by RT one. Yes, equation one. Okay, ln K two is equals to again ln A minus E a by RT two. This is equation two. If you subtract one minus two, the expression you will get ln K one by K two is equals to E a by R one by T two minus one by T one. This is the expression we have. I memorize this and this expression like this since I have started with one by T two here. So here also I will place K two T two. So K two here. Okay, and then if you convert in log, so I'll write on log of K two by K one I'll write on here. And once I write K two by K one, this side will have a negative sign E a 2.303 R one by T two minus one by T one. So here if I start with K two, here also I'll start with T two. Here if you start with K one, then with a negative sign outside here also you can you can start with K one T one. Okay, so this is how I memorize this expression. Remember the similar kind of expression we have discussed in chemical equilibrium also. Yes. And how do you remember that. Right. Yes, tell me this equation is mostly there for irreversible reaction in chemical equilibrium chapter. If you go back and recall. So instead of this E a will have delta H over there. Yes or no. Yes. Right. This is very important because now that you know, because we are doing chemical kinetics you definitely know this fact that this came in K two are the rate constant. And if you do not, you know, focus on the difference in the two reaction. Right. Then in the exam if you get this expression you'll get confused that whether this K is rate constant or equilibrium constant. Yes. So how do you differentiate the two. If here delta H is written. This expression is given for reversible reaction. And then with delta H, this K one and K two are the equilibrium constant at two different temperatures. It is not the rate constant is clear. Write down this in your notes. Okay, in your own world. If delta H is written over here. It means these are the equilibrium constant. If A is written activation energy, then K one and K two are the rate constant. It is not equilibrium constant and then expression is valid for irreversible reaction. I said, if your delta H is written, it means K one and K two are the equilibrium constant. If he is written, then this K one and K two are the rate constant and this relation is for irreversible reaction. So if you get this relation, I'll write down this side also. Relation is ln K is equals to ln A minus E a by RT at any temperature T. So first of all this a and E a are collectively called activation energy and Arrhenius factor. The second term collectively called Arrhenius parameter Arrhenius parameter. If you draw a graph over here graph of log K rate constant and one by T on the x axis. The graph would be a straight line like this with a negative slope. And what is the slope over here? Tell me the slope minus E a by R, minus E a by R where R is the rate constant. But this is not correct. Why this is not correct? Because I have taken log K it's not ln K. And this is the mistake you made in the test also. The slope is this. Because this is log K it's not ln K. Yes. So keep this in mind. These things you don't have to memorize. I would say that just keep that Arrhenius equation in mind K is equals to A to the power minus E a by RT. From there you can derive everything. If you try to mug it up then this kind of mistake possible in the exam. So this is the temperature dependent relation we have. Okay. And this also like no few questions they ask. Very basic and easy questions I'll show you one question I'll show you. They'll give you this kind of expression and they'll ask you to find out based on the same relation Arrhenius equation you can get 23 kind of question 23 types of question. This is one relation. The only thing is a bit calculating calculation will be there in these kind of questions but it is very straightforward. You see this one. Option A you are getting. I think D is the correct. Are you getting D anyone? Oh yeah D. Okay. Just you need to equate and you need to solve this. Okay. Nothing much. That's the calculation we have here. So K2 you equate and then you take log and solve this. Yeah. So for K1 is equals to K2 will have 10 to the power 15 e to the power minus 2000 by T is equals to into this equals to 10 to the power 14 e to the power minus 1000 by T. So you cancel this out and take Alan both side. So you will have Alan 10 is equals to 1000 by T 1000 by T. Okay. So which is equals to 2.303 log 10 so T is equals to we'll get 1000 by 2.303 so 400 something 434.2 Kelvin we get. And another type of question is what they'll give you the expression of this log K is equals to some value they'll give minus some value into one by T like this. Okay. So they'll ask you to find out the activation energy here. So this term is nothing but e by 2.303 R. So whatever term we have here you equate this e by 2.303 R. You will get the answer. And no very basic questions you'll get. Okay, you won't get any you won't have any difficulty in this. This is the temperature factor we have. Okay, for affecting the rate of the reaction, it affects the rate constant and then the rate of the reaction. Now the last part here, the last term or the factor which affects the rate of the reaction is the catalyst. What is catalyst catalyst is the element or substance which changes the rate of the reaction, it changes the rate of reaction without taking part in it. We know catalyst does not take part in the reaction. Okay, it just affects the rate of the reaction, it can enhance the rate or it can reduce the rate also both ways possible. It depends on the nature of the catalyst. So we have two types of catalyst. The first one is positive catalyst and the second one is negative catalyst, positive catalyst, negative catalyst, positive catalyst right down. It increases the rate of the reaction. It increases the rate of the reaction by decreasing the activation energy. So it decreases sorry it increases the rate of the reaction by decreasing activation energy. So basically, in presence of positive catalyst what happens activation energy decreases. If you have a reversible reaction, I'm taking an example of it, reversible reaction if you have, then the catalyst the positive catalyst will enhance the rate of forward as well as backward reaction. Right so it increases RF rate of forward reaction and RB rate of backward reaction both it will enhance and hence it will achieve the equilibrium sooner. That is the reason you know use of positive catalyst we have. Suppose we have N2 plus H2 gives NH3, reversible reaction. If you want to increase the production of ammonia, then we use the positive catalyst so that the, oh I'm sorry, this is this we cannot take it, ignore this one. Because it does not affect the amount of product and reacting to I was thinking something else. Anyways, so if you want to achieve the equilibrium sooner, you can add some positive catalyst. So it's not like it will always affect the forward reaction. The reaction is reversible. So both way, the rate of the reaction increases by decreasing the activation energy. So purpose of catalyst or the effect of catalyst is what it decreases activation energy positive catalyst and increases the rate of the reaction. If you have negative catalyst so it is exactly opposite negative catalyst increases the activation energy activation energy increases and when activation energy increases the rate of the reaction decreases ROR decreases whether it is forward or backward ROR decreases. If you look at the graph here this y axis is the potential energy energy or potential energy and this x axis is the collision frequency you can say or collision number we can say or we can also say progress of reaction x axis. So we have a graph. Okay, we have certain energy of the reactant will go to a maxima and then wait. So what is the reaction I'm assuming exothermic anything it could be you coming into coming anything it could be here it is exothermic this is a reactant. And this is the product. So this much amount of energy releases. Now if the reaction is taking place in presence of a catalyst, it may go like this goes to a maximum initial and final stage will be same in terms of energy. Okay. And if you have one more catalyst it may go like this. So here you see this energy here. This energy is the activation energy. So, this graph, the orange one that I have written here. This graph is with negative catalyst, this one, negative catalyst, and this green one is for positive catalyst, and the white one there is no catalyst present here for this one without catalyst. This distance that you have here from this point to this point. This is the activation energy of the reaction. This distance. Right. This point we call it as activated complex. Okay, the reactant molecule collides. It forms an activated complex which has the maximum energy, and then it converts into the product. Okay. This is the activation energy of the reaction. This energy here you see this difference that we have here this difference. Right. It is the activation energy in presence of positive catalyst, because the activation energy the positive catalyst decreases the activation energy. And if this gap is less, the energy gap between the reactant molecule and the activated complex is less, then the particles can easily overcome this, and hence the rate of the reaction increases. This is for positive catalyst activation energy for positive catalyst decreases activation energy.  This decreases the activation energy. So that if the energy barrier is more than it is difficult for these particles are reacting particles to overcome this energy barrier and forms the product. Hence the rate of the reaction decreases. Understood. So I don't understand all the x axis. Sorry. So the x axis. The x axis is called as a number means, you can say it's called in frequency. I think when the two molecules collides support your time if more number of molecules collides. So college and frequency is more, or simply if you are getting confused you can also consider this as progress of reaction. This is nothing but the energy to react and converts into product time you can write or progress of reaction also you can do same thing. So that means we need to understand in this graph terms we have energy terms that is threshold energy and all will discuss that in college and theory will come to this graph again. Before going into the college and theory will discuss reaction mechanism. Okay. What is reaction mechanism how do we draw the graph and with that's what all things we can conclude. Can you copy this one of you?


Hi, hello and welcome back to program analysis. This is part three of the lecture on analyzing concurrent programs. And what we want to do in this third part is to look at a technique for testing thread safe classes. Again, as for the other parts of this lecture, this part is also based on a paper. And if you're interested in more details about this technique, then please have a look at it there. So let's get started by defining what thread safety actually is. It's a term that is sometimes used in a very informal way, but usually what it means is that it's a way to encapsulate the challenges of concurrent programming into a specific class in a language that has classes. And these classes then are called thread safe classes. So the basic idea is that instead of using concurrency everywhere and bothering about having the right locks and synchronizing memory accesses correctly everywhere in your program, you delegate this task to a few classes that hopefully do that correctly. And then in the rest of the program, you can basically assume that this class is ensuring the correct synchronization of all shared memory accesses so that the clients of this class can basically use instances of this class as if they were alone and no other threads would access these instances. So in a sense, the rest of the program can treat a thread safe class as a black box and just call its methods without really thinking about the other threads that may also use objects of this class at the same time. A popular book on concurrency in Java gives this definition of what a thread safe class is. So it basically says that the methods of this class behave correctly when accessed from multiple threads with no additional synchronization in the calling code. So the important bit here is that there's no need for clients of this class to acquire any locks, but this is already done in the class. What is not quite clear in this definition is what it really means to behave correctly, but fortunately there's a different definition that says that the operations of this thread safe class behave as if they occur in some serial order that is consistent with the order of the method calls made by each of the individual threads. So essentially the correct behavior is implicitly given by what could happen if you would execute the calls that happen concurrently in some serial order. And we will use this definition of thread safety as a way to find bugs in thread safe classes. Let's first illustrate this idea of thread safety with one particular class from the Java standard library that is supposed to be thread safe, namely the string buffer class. And what we do here in this example is to just initialize a string buffer and then there are two threads that are concurrently using the same instance of the string buffer and one of these threads is appending A and B while the other one is appending C. And now the question for you is, well, what would be possible contents of the string buffer B? Assuming that string buffer is indeed a thread safe class. So I invite you to just stop the video here for a few seconds and think about it and then I'll tell you what content of B could actually happen. So let's have a look at the solution. So there are three possible contents that B may have that are legal if this class is thread safe. One of them is ABC, which you basically get if thread one is executing its first two calls to append first and then thread two follows. We could also have CAB, which is what you get if thread two starts executing its call and then thread one is executing the other two calls. Or you could also legally get ACB if the call of thread two is basically interleaved in between the two calls of thread one. But any other state of the string buffer, for example, AC, where maybe the B is overwritten by the C are not legal, or BAC is also not OK, because this would mean we have reordered the two calls in thread one, which is not OK with the definition of thread safety. Now, because programs that use thread safe classes put so much confidence into these thread safe classes, the correctness of these programs heavily relies on the correctness of the thread safe classes. So now what actually happens if these classes are not thread safe? Well, then you have a problem. So you better test for these classes to be actually thread safe. And one way to do this is the tool that we are talking about now here. It's called ContiG, which basically means concurrent test generator. And in a nutshell, what it does is to automatically generate multithreaded unit tests, which basically look like normal unit tests, just that they have multiple threads. And by doing this, it detects thread safety violations or thread safety related bugs by comparing the concurrent behavior of these multithreaded unit tests to linearizations of this concurrent behavior. So basically two alternative tests where you would put all the methods that happen concurrently into a single thread. Before looking into how exactly this works, let's just have a look at one example bug that this approach has found. And this was a bug in a JDK, which is in the string buffer class that we have already seen earlier. So if string buffer is used, as shown here in this example, then something unexpected happens. So in this example, the string buffer is initialized, and then some strings, say A, B, C, is appended to it. And then the same string buffer, object B, is used in two different concurrently executing threads, where the first thread is trying to insert the content of the string buffer into itself at index one. So it basically tries to put A, B, C right after the A that is already there, so that at the end you would have A, A, B, C, B, C. And concurrently, thread two is trying to delete a particular character that is already in the string buffer, namely the character at index one. And now if you write code like this and you execute it concurrently, you may actually get an index out of bounds exception, which is, of course, not what you would expect, because if you would just execute one of these calls after another, this kind of exception could never occur. And this has actually been a bug in the JDK, which has also been confirmed by the Java developers. To detect this kind of bug, Contigy is automatically generating test cases that test the thread safety of a given class. So the input to the approach is this class under test. And then the output is either nothing or a report about a bug that it has found. So to do this, there are three main steps. The first one is to generate a concurrent test. And we've already seen examples of these tests, and we'll see in a second how they are generated. Then the next step is to execute this test. And finally, there's a thread safety oracle, which we'll also see in a second that looks at the execution of this test case and determines whether there was a thread safety violation or not. If there was one, it's going to be reported as a bug. And if not, then the approach goes back to one of the two earlier stages. So either it goes back to execution, which basically means it's just executing the same test again, hoping that in a different execution, it's going to hit different behavior that maybe exposes a bug. Or it takes this arrow back here and goes back to generating another test, hoping that maybe another test is going to expose a thread safety bug. So let's start by looking at how the generation of these concurrent tests works. So the example that you've seen before is actually a generated test that has been generated by this algorithm. And each of these tests consists of three parts. One is what is called the sequential prefix. So it's essentially a sequence of statements that creates and then sets up an instance of the class under test, for example, by just calling the constructor and then calling one or more methods on it. And then we have two parallel execution threads that each execute a so-called concurrent suffix. So the key idea here is that these concurrent suffixes are using the shared instance of the class under test and each are calling methods on this shared instance. To generate such a test, the test generation algorithm takes three steps. The first one is to generate this prefix. So essentially here it instantiates the class under test and calls some methods on it. And once it has done this, it moves on to step number two, where it's creating multiple suffixes for this prefix, which basically adds calls on this shared instance of the class under test. And then once the algorithm has produced a prefix and at least two suffixes, it puts them together into a test, which basically looks like what you've seen before, so where you have the prefix first followed by the two concurrently executing tests. And all of this generation of the method calls and as a result also of the prefixes and suffixes happens through so-called feedback directed random test generation, which we'll see in more detail in a second. Let's look into this algorithm in some more detail and let's start with the first step, which is to create this prefix for our test. So in the prefix, we start by instantiating the class under test. So we wanna call one of its constructors and this happens by basically randomly selecting one of the available constructors. So let's say our class under test is string buffer and let's say we are randomly selecting this constructor that just calls the default constructor without passing any arguments, then we would basically have this call here. Now, whenever the test generation algorithm is adding a call or a constructor call to the test, it's executing this entire test that it has at this point in order to check whether this call or constructor call yields an exception. And only if it does not yield an exception, it's continuing. So this is an idea that is similar to what you've seen earlier in the lecture when we talked about rendoop and its feedback directed random test generation. Now here for the simple example, if you just execute this test that we have so far, we will see that it runs fine without any exception so we can continue extending this prefix. Now to extend this prefix, the algorithm wants to call some methods on this newly created instance of the class under test. So it will randomly select some method. Let's say it randomly selects to call the append method which requires a string argument. And now in order to get an argument, it goes through a couple of different options. So one option is to take one of the already available objects that we have. So if we had a string object in this test, we could just use that. The second option is to call another method which is returning an object or a value of the required type. And the third option is to just pick a random value. So for the sake of the example, let's assume the algorithm is picking a random value, let's say A, B, C, and then it has extended this test with a new call. So it will again execute this extended test to check whether this leads to an exception because if it does, then we should not use this prefix. But here everything is fine. So we are basically done creating a prefix. Of course, we could also add more methods, but for the example, let's just assume that one is enough and this is the prefix that we get. So let's now look into the second step which is creating suffixes for the already created prefix. And what we essentially wanna do here is after the object has been set up in the prefix, we wanna call some more methods on this shared instance of the class on a test. So we start with the prefix that we have already created and then in order to call more methods on it, we again randomly select one of the methods that this object is providing. So let's say we are selecting insert and insert has multiple variants. So let's say we take the one that takes an integer argument as the first argument and then a character sequence which tells us what to insert at a given index. So that means again, the algorithm needs to decide what arguments to use here for the integer and for the character sequence. And again, it has these three options of taking any available object that has a compatible type or calling a method that returns a value of the required type or just picking a random value. So let's say it takes a mix here of option A and C by taking a random value minus five for the int and the existing variable B which is compatible with the character sequence type that we need because string buffer is also a character sequence. So now this is the call we have added now and now the algorithm is trying out again if this leads to an exception or not. So it will execute both the prefix and this so far created suffix. And if it does that, it'll actually get an exception. And the reason simply is that we cannot insert anything at index minus five. So we get an index out of bounds exception here. So now this is just a sequential problem. It doesn't have anything to do with concurrency or threat safety. So the algorithm does not want to have this kind of suffix but instead goes back to the previous step where it's trying to find better arguments for this call that do not lead to an exception. And now let's say it now randomly chooses one and B as the arguments. So we again execute this entire prefix plus partial suffix and now in this case we do not get an exception which means we have created a suffix that is fine. So now we could of course add more method calls to the suffix but for the sake of the example let's assume we are done and then move on to the second suffix that we also want to have and that we also create in a similar way to before. So let's now assume we add this call in the second suffix that calls delete character add with index one. If you execute just the prefix and the second suffix one after the other we will see that there's no exception so everything is fine which means we basically have created another suffix that the algorithm can continue to work with. So now at this point the algorithm has a prefix and two suffixes so it'll put these together into a complete test which basically just works by spawning a new thread for each of the suffixes after the prefix has been executed and this gives us exactly the test that we've seen earlier which if you execute it and are lucky to trigger the right interleaving will expose a threat safety bug. All right, so zooming out a little bit here's the overview of the approach again. You now have seen how to generate concurrent tests. Now these tests are executed we will not look into detail of how this works and practice quantity is just repeatedly executing the test on the standard Java virtual machine but you could use more sophisticated techniques such as the one that we'll see in the fourth lecture of this on the fourth video of this lecture. So now instead of looking more into the execution let's now have a look into the threat safety oracle which is trying to find out whether a given execution of this generated concurrent test is exposing a threat safety bug or not. Okay, so let's have a look at this threat safety oracle and let's see how it figures out whether a given test execution is actually exposing a threat safety violation or not. So there are two key ideas here. One is that the oracle is focusing on very clear signs of misbehavior, namely exceptions and deadlocks. When any of these two happens and the programmer does not expect it, it's obviously bad. And the second idea is related to the definition of threat safety itself and this idea is to compare the concurrent execution of the given test case to linearizations of this test case to basically check if the misbehavior, the exception or the deadlock that we are seeing in a concurrent execution could also happen in a linearization of this test. So what does linearization mean? Linearization essentially means we're putting all calls that happen in the concurrent test into just a single threat while preserving the order of the calls within that threat. So let's say we have a test case that looks like this where we have some prefix up here followed by two concurrently executing suffixes. One executes some statements one and two and the other one executes a statement three. Then we would have three possible linearizations of this test case, namely the one set you see here. So they always have the suffix at the beginning followed by all the calls in the prefix but preserving the order of calls within the individual threats which basically means we're never swapping the order of one and two what we may put three in between or before or after these two calls one and two. So now given this idea of linearizations let's have a look at how the Oracle figures out whether an execution of a concurrent threat exposes a threat safety problem. So it starts by executing the test concurrently and in this one concurrent execution of the test it checks whether there is an exception or a deadlock. If there's no such misbehavior then we're basically done with this one execution. It has not exposed any threat safety problem and there will be no further analysis of this execution. In contrast, if the Oracle sees an exception or deadlock the question is whether this could also happen in one of the linearizations of the test. So in this case it's trying out a linearization of this test case and checks if the same failure also happens. If the same failure also happens it basically means that well, okay it's an exception or deadlock but it could also happen if you just call this these two or more concurrent methods in a single threat which means it's not a threat safety problem it's not even a concurrency related problem so there's no need to report anything to the user. But if the same failure does not happen in this linearization and if it also does not happen in any other linearizations so basically the algorithm has checked all possible linearizations of the concurrent test and hasn't seen the same exception or deadlock then and only then a threat safety violation is reported because then we know for sure that there actually is a threat safety bug in our class under test. So let's illustrate this idea of the Oracle again with our running example. So here's the generated test that tests the string buffer class of the JK and as I've said earlier if you execute this test concurrently and you're lucky enough to hit the right interleaving you will actually get an exception. So now the Oracle is checking whether this exception can also happen in one of the linearizations. In this case there are only two linearizations one where we take the call from threat one first followed by the call from threat two and if you do this you will not get an exception and the other one where we just swap the order of the two calls from the two threats so after the prefix execute threat two's call and then threats one, threat one's call and in this case we also do not get an exception and this means that the exception is actually a threat safety violation and this is gonna be reported by the Oracle. Good, so now that you've seen how this Oracle works let's take a step back and think about what properties this Oracle is actually giving us. So turns out this Oracle is sound but incomplete which here means that all reported threat safety violations are real so there are no false positives but whenever the approach says that there is a threat safety problem then indeed there is one. But on the downside the Oracle cannot guarantee to yeah that the class that is tested is indeed threat safe because it may not see some more subtle misbehavior that for example does not result in an exception or a deadlock. What is nice about this Oracle is that it's independent of the bug type so in contrast to for example the eraser approach that we've seen in the previous part of this lecture it is not just looking at data races but it can also detect other kinds of concurrency bugs including data races but also atomicity violations or deadlocks for example. And as long as any of these bugs manifests through an exception or a deadlock the Oracle will be able to find it. Finally let me just quickly tell you about some results that this test generator has obtained so it is implemented for Java classes and then was applied to popular threat safe classes from the JDK itself but also from various Apache libraries and in total it could find 15 concurrency bugs that were not previously known in these classes including some previously unknown problems in the JDK itself which is a nice finding because that's a piece of software that is used by many, many people. In the version of the tool that I've talked about here it has taken between several seconds and several hours in the worst case 19 hours to find a bug so it was actually pretty compute intensive and one of the reasons is that this random generation of tests doesn't really look at what kind of concurrent behavior has already been seen. And in a follow-up piece of work that a master student in my group has actually worked on we could reduce this worst case time to several minutes so the overall approach has become much more efficient and the key idea here was to look at the coverage of the, that the test cases achieve and to try to cover new behavior more often so that we do not repeatedly test the same kind of behavior. All right and this is the end of video number three in this lecture on analyzing concurrent programs. You hopefully now have a better idea of what threat safety means and also have seen how to automatically test whether a class is indeed threat safe by generating tests at random and then comparing their concurrent behavior to linearizations of the concurrent test. Thank you very much for listening and see you next time.


Hurry, horse, with the speed of light, the cloud of dust, and a hearty hyosilver, the lone ranger. During the years of unrest that followed the Civil War, a powerful secret organization called the Legion of the Black Arrows sprang up in the western United States. Its members were to be found everywhere, defying the law or using the law for their own purposes, working toward the ultimate goal of revolt and the foundation of a despotic empire. It was the masked rider of the planes who led the fight against this band of outlaws and traitors, and for once his great strength and courage, his daring and resourcefulness were taxed to the utmost in the cause of democracy. Return with us now to those thrilling days when the West was young. From out of the past come the thundering hoofbeats of a great horse, Silver. The lone ranger rides again. Come on, Silver! Run the trail, the Black Arrow! Help, Silver! In their constant quest to track down the Black Arrow outlaws, the lone ranger and tanto were galloping across the desolate western plains when suddenly a riderless horse galloped toward them. It was an army horse, and in one saddlebag the masked man found a note. Just one word's called on the paper, Tunno. The word help. Ah, and what it mean? It was written in desperate haste, scribbled by a man in a great hurry. Him, army man? The horse we found was an army horse. He wore an army brand, had army saddle blankets. His rider must be an army man or was. You think him dead? I don't know, Tunno. We won't know that till we reach the end of the trail. Ah, hoof marks plain and crowned for us to see. How long we ride? Until we can find no more tracks. Until we find the man who wrote this note. Get him up scoundrel! My horse, you see any sign in my horse, Maria? Do you see him? I sent him off with that note. Robert, please. You must not worry.  I hope he headed back. If he didn't, I'll never forgive myself. Oh, my shoulder. Robert, please.  Don't try to get out. Can you see him? No. Robert, lie quiet. I will watch. For your soldier company, I will watch. I will see them coming across the plains. Many horses and soldiers riding. And above them the little pen and snapping in the wind and your flag. The flag of the United States at their head. Don't worry. They will come for you. They will. Maria. They will come for you. Maria, what's the matter? All of a sudden, your voice, it changed like... Maria, is it the company? Robert, could it be that your captain would send two men for you? Two men? Two riders coming this way from far off. Let me look. I... Oh, I can't see. My shoulder hurts me bad. Everything gets blurred when I try to look. Are they... are they wearing army uniform? They come closer now. Uniform? One of them is Indian. Indian, huh? Maybe a guide. What about the other? He might be a soldier. He rides a great white horse. A big horse. His clothes are tan and white. His hat, even his boots. White. He ain't a soldier. His hat comes low over his face. There's a shadow across his eyes. You better... better take my carbine and make sure there's cartridges in it, Maria. Out here you... you never know. That hombre might be an outlaw. He rides like a caballero. I can hear him now. Can't see him. Tiny! Oh, Silver, whoa. Hello. Into the trail, huh? Who... who are you? We found a horse, an army horse. The tracks led us here. Roberto... Roberto, this one who bears mask. Mask? Maria, outlaw, that's what outlaw. Where's my rifle? My carbine? I'll... Catch him, him home. Daddy. Put him down.  He's been wounded. What you want with him? We want to help him. Otto, it's his shoulder. First thing we've got to do is care for his wound. Wake up soon, now. And wake up. He'll heal better. Senor... Senor Mask one. Please, you forgive Maria. You and your Indian compadre have helped my Roberto. For the first time in days he has no fever. For the first time in days... Hush, hush. Quiet now. He's waking up. Maria. Roberto, I'm here. Maria? I feel better. My shoulder's not sore anymore. These two, I've made you well again. What two? I don't... Oh, oh, them. Still here, huh? You fainted, soldier. Otto was able to dress your wound. Thanks. Thanks, engine. You're wearing a mask, mister. Him... him all time wearing a mask. We found your horse on the note near Saddle Bay. You did, huh? I reckon he didn't head for the fort this morning. My name's Vance, Robert Vance. I'm right obliged. I guess Maria's too. Vance, before your fever went down, you did a lot of talking. Yeah? Yes. How did I know you were carrying dispatches? We know you turned us out a few miles to see Maria. You were ambushed. There is so. When I get here, Robert is already hurt. Your dispatches were gone. Mister, I don't know who you are, and it don't matter... It matters that they save you, Robert. Without them, you... you might have died. That's the way I figure it, too, Maria. So I'll consider you friendly, mister, in spite of that mask. And good. We help, huh? Mask man, I reckon I didn't exactly do my duty as a soldier. Turned aside when I was carrying valuable dispatches. But I didn't figure it would do any harm saying howdy to Maria. Well, that's over and done with, Vance. No man can be blamed for an honest mistake. It was a mistake, all right. I didn't have a chance. They sprang at me from both sides. They shot me and took the dispatches. What were those dispatches, Vance? I don't know. You don't? No, mister. I didn't know what was in them. The only thing I knew was they were important. Mighty important. Now they're gone. Robert. Who were the robbers, Vance? Did you see them? I caught a glimpse of one of them, but it was over too fast. I don't know anything about them, except for that arrow they shot into my shoulder. What that? Arrow? We found no arrow. I'll take it out before you come, senor. I break it off and take it from Robert's shoulder. Here, this arrow. Kimusami. Tonto. It's black. A black arrow. A black arrow. The lone ranger and Tonto knew what that meant. The men who had stolen the army dispatches were members of the legion of the black arrow. The stronghold of the black arrow was a hidden valley high up in the remote fastness of the Sierra Mountains. At one end of the valley, two men waited. Torlock said we had to make a fast start. What's holding them up? Must be important. At least most likely talking to the leader. Torlock's a big man in the black arrow. Hey, Chiron. Yeah? You got any idea who our leader is? Not me. You ain't, huh? No, sir Ray. And I don't go around asking. The way I figure even Torlock don't know who it is. Maybe Torlock's the leader himself. Yeah, that ain't healthy to get secure, you shane. This here's a big outfit. Plenty big. You and me, we're just small potatoes, savvy. We do what we're told and we keep our mouths tight shut. Yeah, I can. Yeah. Howdy Torlock. Ready to ride? Yeah. Black arrow has worked for you. Got something to do with them army dispatches. We lifted off that messenger. You're not supposed to ask questions. Well, we wanted to. In this case, I'll let it pass. I meant to tell you anyway. This dispatch states the new captain will take over the garrison at Buzzard Gap. States his name and his description. Read it, Chiron. Huh? Go on, read it. Advice to Captain Lacey, Buzzard Gap Garrison. The bearer of this dispatch is Captain Shirlon, who will relieve you at once. Captain Shirlon, well that's me. Yeah. But I'm no army captain. You will be. I have a uniform my saddlebags for you. I don't get this. Simple. Original of the dispatch was different. This one's a forgery. Forgery? Yeah, done right here by an expert. You'll have no trouble. But we can. You're an ex-army, man. Yeah, yeah, I am. All right. You replace Captain Lacey and then follow my orders. What orders? I'll give them to you as we travel. You and Shane put on these blindfolds. Yeah. Yes. The entrance to the valley of the black arrow was known only to a chosen few.  Yes, sir. That's so for captured, we can't give it away. I'll lead your horses by the reins. In three days, you'll take over the buzzard gap garrison as Captain Sherlock. Get up here. Come on. Get up here. As you were. Corporal. Yes, Captain? Where's Captain Lacey? The Captain's in. Oh, here he comes now, sir. Captain Lacey, my name's Sherlock. Glad to meet you, Captain. What brings you to buzzard gap? And to take over your post. Orders from Fort Laramie. Well, I sent a dispatch rider, a private named Vance to Fort Laramie, for regular orders. Private Vance was detailed with a fort for the time being. Here's the dispatch. According to this, I'm to turn over the garrison to you, Sherlock, and ride post-haste to Fort Laramie. These orders say immediately. So I understood. Very well. You'll find everything in order here. I can leave in an hour. Billings. Yes, sir. Have the bugler sound assembly. The garrison has a new commandant. Mask man. There it is. There's the buzzard gap garrison, my company. We'll have to report back for duty, Vance. Can we stop him in it? It's early yet. No reason why not. Steady, Sherlock. Don't tell him a word. I don't know what's going to happen to me when I get there. No, please. Don't go. You will be caught, Marshal. You may face a firing squad. I won't let you. Maria. No. No, you mustn't. Come away with me. Let them think you died on the way. No one will ever find you. Maria. I won't listen. Maria. Don't say mask one. You're going to say Roberto must go back. It's his duty. I won't listen. You will listen. You must. He's a soldier. He's sworn to serve his country and his flag.  Oh, no. He'll hate himself. He'll begin to hate you too because you made him desert. He's got to go back. The mask man's right, Maria. There's no two ways about it. I'm sorry, Roberto. Mister, what you say is the truth. Roberto must go back whatever happened. Do you think it will be allowed for me to ride to the garrison with him? Yes, Maria. I think it'll be allowed. Tottenham and I will wait for you here. It's best for us to stay away from the fort. See, senora, I will come back. Maria, let's get going before I change my mind. Adios, mask man. You and the engine have been a... Come on, Maria.  I will come back, mask man. You think maybe him get by on squadron? No, they can't do that, Totto. They might put him in the guardhouse for a week or so, but they'll never have him shot. Never. Come in. Yes, Billings. Begging the captain's pardon. Private Vance is outside, sir. Vance? He's the one Captain Lacey sent to Fort Larra. May I message your services? Oh, yeah. Yes, bring him in. The captain will see you, Vance. Captain Lacey, sir, I... What? What are you staring at? And who's this woman?  I thought... Who is this woman? The captain, she came along with me. I was ambushed carrying dispatches from Fort Larra, and I was wounded. That's enough, Vance. The woman will leave the post. Yes. Yes, senora, I will go, but what Private Vance has done is not so terrible. Private Vance will be placed in the guardhouse. Tomorrow morning, he will learn what happens to a soldier who fails on his duty. Tomorrow morning? What do you mean? There's only one way to treat disobedience. Corporal Billings, get volunteers for a firing squad. Private Vance will be shot at dawn tomorrow. The curtain falls on the first act of our Lone Ranger story. Before the next exciting scenes, please permit us to pause for just a few moments. Now to continue our story. Vance was placed in the guardhouse to await the firing squad under orders from the false army captain. A short time later, Maria galloped away from the army post to the spot with the Lone Ranger and Taunta waited and told him what had happened. I speak to this captain. I beg him not to shoot Roberto. Even his soldiers, they do not want to shoot their comrade, but he's the captain. They must obey him. Robert say the old captain is good, kind man, but this new one... A new captain? What's his name? His name is Cherlon. The men do not like him. Cherlon? Cherlon? That's odd, especially since I... What do you think about Kimusabi? Well, nothing. Only when we were near Fort Laramie a month ago, we heard that Lacey was due to stay at Buzzard Gap for at least six months. That's all? Me remember. But maybe the army changed mine. It might be. But that an army captain would sentence one of his men this way, I... Maria. Sort of a man, is he? I did not understand. Well, can you describe him? How tall is he? What does he look like? He does not look nice, but nothing so different. He's like Tonto, so tall as he... How does he talk? Like an army man?  More rough. That mean nothing. Army captains sometime come up from plain soldiers. He is more like soldiers than captain. The way he talk, the way he have tattoo marks... Oh wait, what that? A tattoo mark? Where? What sort of tattoo? It is when I beg of him for Robert's life on the left wrist. Kimusabi. I do not notice just what it is. Maria, was it an arrow? A black arrow? See, that is it. A black arrow. See, senior. And there is something wrong with the army post. Tonto, as soon as it gets dark we're going inside the stockade. We're going to rescue Vance. We're inside the stockade, Tonto. Look, there's a sentry in front of the guard house. Ah, guard house locked. One shot will break the lock, Tonto. We'll have to make it through the gate. Gate closed by night. What we do? Can you reach the gate, Tonto? Tonto thinks so. Then go ahead. When you hear a shot, swing the gate open and call Silver and Scout. They'll come to you. Ah. That shot will mean I've opened the guard house door. Vance and I will run for the gate as fast as we can. The horses are there. We can make good of our escape. It's not the... Tonto, go now.  Tonto, open gate. And the horses came to stop me. Now, time to get to that door. Every second counted. It was after taps. Most of the company were asleep. But in front of the guard house paced the armed sentry, a rifle on his shoulder. As he moved closer, the masked man checked the sentry's pacing. He slid his gun out of the holster and waited until the sentry was at the far end of the porch. Then... Now! Puttin' places. Vance, there's no time for words. Follow me. Masked man. Follow me to the main gate. I'm right behind you. Come, bro. Top of the car. Here's Silver and his count. The gate's open. Master Tonto's got the horses. The gate! They're headed for the gate. Follow. Follow here. There's no time of week. What's this? Come on, sir. Into the saddle, Vance. I'll ride behind you. Silver can carry double. Give him up. Come on, sir. You've done what you say. You've rushed to Roberto. Him and the engine. I never saw two men or two horses go so fast. Masked man. I don't know what to say. There will be no firing. Maria, I want you and Vance to wait here. Tonto and I have urgent business. Where are you going? We go ponder Kimosabi. Wait for us, Vance. We'll be back as soon as we learn what Chirlan's plan is. Ah. Follow me, Tonto. We'll have to trail him in the dark. Give him up. Come on, Silver. Oh, Vance, Tonto. Why do they go so fast? They come. They do not wait. Where do they go? The mask man told me about it when they were bringing me here. As we rode from the army post and looked back, we saw Captain Chirlan heading out of the gate by himself. The mask man and the engine planned on picking up his trail in the dark. And I reckon they can do it, too. Lot of sound. Someone's coming to meet Chirlan. Uh-huh. It's good we trail him here, huh? We're waiting. Listen. As soon as they go, we'll get back to Silver and Scout. I'm eating. Mr. Chirlan? Howdy, Shane. You can drop the captain. There's just the two of us here. Did you bring word from Torlach? Yeah. It's all set. Three days from now on the army trail. Sundown? So Torlach said nothing else has been changed. Kino, I'll have the whole company out here for overnight maneuvers. We'll have almost every gun and cartridge in the army post out here. I'll make certain those guns and cartridges are stacked up where you can get to them without any trouble. Correct. You sure them soldiers ain't suspicious? Well, they don't figure they'll give me any trouble. They don't like me, but they don't question I'm captain. They'll obey orders. Black Arrow can use those weapons. Black Arrow will get them. Just at Sundown, most of the men will be busy down by the river. I'll see to that. That's when we rush for the gun. Right. And make sure you grab me, Shane. The soldiers see their captain taken. They won't be so likely to raise a fuss. Torlach sure plans things cagey. That dispatch carrier isn't dead, Shane. He wrote in the post this morning. I guess we just wounded him. Did he know who you were? He didn't quite recollect it, don't think. He put him in the guard house. Have him shot. Well, that was my intention, Shane, but he escaped about an hour ago. Who done it? I don't know. He got some help from outside. Whoever they were, they left him too big a hurry to spot him. That don't sound so good. It might change everything. No, it won't. But don't you tell Torlach, he'll skin us alive. Besides, it don't affect our scheme any. It was a little Saint Orita came to the post with him. She got mighty upset. Most likely, she gathered together a few of her family and fixed a break him out herself. You don't reckon there's any chance of trouble? Listen, Shane, that soldier says scared he won't go near an army uniform. Forget it, I tell you. You just keep in mind what's going to happen three days from now. I shall be, Charlie. We'll be waiting. So will I. Adios. Adios.   Did you hear that? Uh-huh, me here. Let's get to the horse's tunnel. I have a plan. Silver! What in thunder? A signal from that rider. Column out! Rifle's ready! I'm on the hunt! Ride's like the wind. I'm looking for Captain Lacey. I'm Captain Lacey. State your business. What? Mr. Your Mask. Forget that, Captain. There's trouble at buzzard gap. There will be trouble when I get there. I learned at Laramie that a man named Trun is no Captain at all. His credentials are forged. You know about it? A sundown tomorrow. A trap will be sprung to get the arms and ammunition of your company. Sundown tomorrow. Only a fast horse could make it in time. I have the fastest horse in the army. We'll have to go it alone. All the other horses won't stand a chance. Pretend at brace. Bring the column behind us at all possible speed. Upflighting! Upflighting! Come on! Sit away! It's getting mighty near sundown. Soldiers camp right ahead. Next to Brook. The Masked Man sure had Trun pegged. Look, the way he's got all the rifles and the small arms stacked near the woods. And all the men are near the water. At least a hundred yards from him. Only two men guard rifles. Those outlaws must be in the woods. We write down, talk to soldiers. It won't do any good. They won't pay he does. Trun's Captain, as far as their concern. Masked Man say we do what we can. We try. We should get here. Too late to wait. Soon it'll be sunset. You come. All right, Injun. Head for Corporal Billings. Maybe he'll listen. Get him up to the column.  Get up there!  Hey, Billings! Corporal! And that coyote wearing the uniform is looking too. Trun on, I mean. Him and other and the clearance. We reach men first. Corporal Billings! Well, I'll be. It's Vance.  You got away once. And we don't want to see you get shot. Hightail it before Captain Trun on sports you. Him not, Captain. Him outlaw. Wear army uniforms. What's that, Injun?  It's Trade Billings. That ombre's part of a gang. There's bad men in the woods ready to grab off the rifles. I don't savvy. You believe what we say. Why him send you this way? Put rifles that way, huh? No, you're both local. Vance, we always figured you were an all-right gent. But this takes the cake.  And you listen... Less than nothing, Redskins. Maybe we don't think so much of this new captain we got. Corporal. Yes, sir. Captain Sherlock, these two say... I heard them. Put them under arrest. Oh, they haven't got any firearms. They're all stacked up. I have my gun and it's pointed straight at him. Here, take it. Put them under arrest and then tie them. Yes, sir. It's a soldier's duty to obey orders. See that mine are obeyed. Stay here till you get different orders. Yes, sir. Well, you heard the captain. Climb off those horses. Vance, both of you. Billings, I tell you this.  A regular army soldier. Till I learn different from somebody who matters, he's my captain.  Uh, we do what you say. We get off horse, Vance. We... We try. Too bad, son, going down now. Too bad, what happened soon? No way for us to stop. No way to...  It's Lazy Withers. Captain Lazy. Captain Lazy, sir. There's no time to lose. Soldiers, run for those stacked arms. Sherlock's no army man. He's an outlaw. Follow us.  You heard the man. He's right. On the double. After him. I see the outlaws. They're jumping out of the woods. Reach those rifles first. Sherlock and his outlaws were no match for the speed of silver and scout. The lone ranger and tanto reached the rifles first and held off the outlaws until the soldiers ran up and got their rifles. Then, faced by sixty armed men, the outlaws had no choice but to surrender. Move forward with your hands in the air.  We ain't frightened, Captain. You got us. You got us cold. Masked men, on behalf of the United States Army, I want to thank you. You've saved the buzzard gap garrison and prevented outlaws from seizing government property. We'll never forget what you've done. Several hours later, with Sherlock and his men in the guard house and Captain Lazy once again in charge, the lone ranger and tanto left the stockade. By midnight, the fort was left far behind. They were galloping along the bank of a wide river when suddenly, as they roamed at the heavily wooded bend, Keep coming. That big fire. As I see it, that puddle is a cabin, a burning cabin. Ah, that right.  What that? It came from the cabin. Somebody's inside there in the flames. After we've got to get him out. Get him out of the house. The story you have just heard is a copyrighted feature of the lone ranger incorporated.