The Equitable Life Assurance Society presents This Is Your FBI This Is Your FBI The official broadcast from the files of the Federal Bureau of Investigation presented, transcribed as a public service by the Equitable Life Assurance Society of the United States and the Equitable Society's representative in your community Money seems to be the hardest thing in the world to get hold of and the easiest thing to get rid of That's because most of us don't know how to handle money If that's your problem, then why not consult a neighbor of yours who can tell you how to use your money to build a more secure future? He's your local Equitable Society representative You can count on him to see your problem from your point of view and see that you get the most for your life insurance dollar In about 14 minutes I want to tell you more about this friendly, helpful man and how he can help you enjoy the many advantages of membership in the Equitable Life Assurance Society of the United States Tonight, the subject of our FBI file, Homicide It's titled, The Astrological Breakout From time to time on these programs, your FBI discusses the criminal mind Perhaps you have wondered why You may have said to yourself, I don't know any criminals and I'll certainly do my best never to meet one It is sincerely hoped that you will always be able to say that But the point is that, unknown to you there may be criminals who want to meet you and will That's why it seems important to put you on guard Unfortunately, criminals aren't labeled as such They don't look like the colorful thugs you see in the movies or illustrated in magazines They vary up to have extremely pleasing personalities Can even look you straight in the eyes when talking with you That's why it's necessary to warn you that behind all this may lurk a twisted mind In tonight's FBI file, you will meet a person who once again proves the truth of the old saying Appearances are deceiving Tonight's FBI file opens in a small, dimly lighted room Ralph Stark, a slight, studious-looking man is seated in one corner of this room, busily writing A companion nervously paces the floor Ralph Yes, Charlie? Got a cigarette? There's some in my jacket there, help yourself Okay You want one? No thanks Ralph, does this bother you? What? My talking like this while you're working Oh, no, not at all You mind if I maybe watch you while? No, go right ahead Not that I'd understand any of it Astrology is really quite simple Not the way you work it What do you mean? All them charts and things Oh, they just look complicated, Charlie Actually, when you understand what the position of the stars mean what relation they have to the individual then it's not involved at all To me it is If I want to know what my fortune's going to be I'll invest a penny and get my correct weight besides You'd be wasting a penny Why? This is a very exact science Look here Here you see the planets as they are at the present time The accompanying graph is their relationship to me This is determined, of course, by the year and day of my birth I've been working on this chart for a very specific reason Trying to determine what the immediate future holds in store for me How are you doing? Fine What'd you find out? This coming Wednesday will be a most favorable day for us to break out of this jail Two days later in a large city some 50 miles away from the jail holding the two astrology-minded criminals FBI Special Agent Jim Taylor is just entering the office of his agent in charge Mr. Jackson Yes, Jim I see you for a minute, please Come in Thanks What's on your mind? Well, I was going down to Elton County Jail this afternoon to interview a man named Charlie Wallace The local police picked him up down there but we have a detainer on him He was involved in the Scobie extortion case Well, yes And we never recovered the money he collected That's right, sir That's what I was going down to question him about Why do you say it was going down? I received a call from the warden in the jail about 20 minutes ago Wallace and another convict just escaped How did that happen? Two men were cellmates They complained of feeling ill so they were given permission to see the prison doctor Once they were in the doctor's office they overpowered him used his keys to get out and what's more, they even stole his car I see When did this break occur? Oh, about an hour ago Any trace of them yet? No, the warden hadn't received any word and I spoke to him Local and state police have been alerted, I imagine Yes, sir, they have Well, we have an interest in finding Wallace, too Send out an alarm on our teletype, Jim I've already done that, sir Good Let me know as soon as something breaks Relax, Charlie Relax and enjoy the scenery Are you kidding? Look, as long as we stay on these back roads we're perfectly safe believe me, nothing can happen to us I know Is there so in the start? Exactly Look, Ralph I don't want to put the whammy on your astrology deal but I'd feel a lot safer if we were holed up someplace right now Well, we will be shortly You mean if your mother done like you told her? I'm certain she has When did you give her the word? Last week when she came to visit me What'd you tell her? That she should find a cabin in some isolated spot How do you know she got it? Charlie, I told you she sent me a note describing the place Said she'd wait there for company Company, meaning us How far is it from here? Oh, about another 30 miles What's the name of the place? Pineville I've never heard of it It's about 10 miles from Quincy Oh You know Quincy, don't you? Oh, yeah In fact, I seem to recall you're telling me that you hid that extortion money somewhere near there That's right, 20 grand Quite a sum What good does it do me? Can't pick it up while I heat some Say, Charlie I just thought of something What? Perhaps my mother could help you out Oh Just tell her where the money is, let her pick it up I couldn't have anybody's mother do a job like that Well, mine is quite exceptional Just wait and see Hey, what are you turning here for? I see a car parked down on the road there There's no one in it So? Charlie, this doctor's car is pretty hot by now I think we should work out an exchange Special Agent Taylor Oh, hello, Sergeant I worked with you last year on the Milford Cave Oh, sure, Sergeant I remember you very well What's on your mind? That's right, we are We have a detainer on him Well, we're not skirts of Quincy Oh, abandoned? Yes Any sign of Wallace and the other convict?  Yes Has an alarm been sent out on the second car? It has, but any time within the last four hours I see If we come up with anything, Jim, I'll call you immediately Well, thanks, Sergeant Well, here we are This is really hidden away I'll get out on your side Okay What'll we do with the car? Just leave it here for now Ma That lamp in the window That's Mother's touch She's such a sentimentalist You mean wandering boy stuff? Exactly It's I, Mother Ralph Hello, Mother Oh, son, it's so good to see you Come right in Sure Come ahead, Charlie Okay Oh, I'm so glad you're here Mother, this is Charlie Wallace Hello, Charlie Hi, Mrs. Stock I've heard so much about you You were Ralph's roommate, weren't you? Well, yeah Now tell me, how did everything go? Very well No trouble at all? Just with the doctor Goodness, I hope you didn't use any guns No, I just slugged them Oh, fine I owe a great deal to Charlie, Mother Really? If it hadn't been for his muscular skill we'd still be cooped up in that cell Stop, will you? But your brains have got us out of there Don't forget the astrology Oh, yeah, the stars Oh, now don't get him started on that Sit down, both of you I've had dinner on the stove for hours Hey, that sounds okay I'm real hungry I'm sure you are I can remember once when Ralph's father broke out of jail the poor man was starved Some more pie, young man No, thanks, Mrs. Stock How about you, Ralph? No, thank you, Mother I'm full Well, I'll just clear the table Ah, what a dinner Well, I'm glad you enjoyed it I'm afraid that roast will have to go along Why's that, Mother? Well, son, I spent practically everything I had on getting here and renting this cabin Oh I'm afraid one of you is going to have to do a job real soon if we're going to go on living here Why, no, ma'am? What? I got plenty of dough Really? How wonderful Mother, Charlie is referring to some loot from a former job He has it hidden away over in Quincy Oh Well, look, didn't you say before that your mother had a job Well, yes, but I didn't know if you wanted her to Oh, sure I do if it's okay with her What do you say, Mother? What? I'm afraid I don't quite follow you Charlie has $20,000 buried over near Quincy Yes I can give you the directions where it's at I see How would you feel about going over tomorrow morning and getting it? Where did you get this money, young man? On a job What kind of a job?  Oh, no, come in, Jim I'd like to give you the latest report on that escaped convict, Wallace What's happened? Well, as you know, the state trooper called me yesterday He reported that Wallace and his companion had stolen a second car Well, they've set up roadblocks for it, but nothing turned up all night And they've evidently gone under somewhere in that neighborhood?  See if they have any friends or relatives living in the vicinity? Yes, sir, I have As far as I could learn, Wallace has no known friends or relatives near where the car was stolen I see I checked on the man who escaped with him His name is Ralph Stark Yeah Now, he has a mother who has a criminal record herself They've always worked very closely together I put a tracer out on the mother, found that he had a criminal record I put a tracer out on the mother, found that she had moved from the last address just a week ago Have you learned why she had gone? Well, I talked to her landlady She said that her daughter had bought the Stark woman a bus ticket to some place in the vicinity of where the car was stolen Well, that sounds like a lead, Jim That's what I thought See, your landlady's daughter was out when I talked to her so I'm going over there later in the interviewer Ralph?  Just fine Did you get the money? Of course Oh, good for you It was the funniest thing I went... Well, goodness, what happened to him? Your friend Charlie, he's tied up in that chair That's right Who did that to him? I did Oh Where's the money, mother? Well, I have it right here in my shopping bag Now, let's see, I'll... Ralph? Yes, mother Why did you tie him up? Well, to begin with, mother According to the stars, his future was very dark indeed Oh, poor boy Then there was a selfish motive, too Money This money I have here? Yes I see Did you have any trouble getting to Quincy? No, I found a bus that took me right there You made very good time Didn't I, though? A son? Yes What are you going to do with your friend here? Well, I've just been thinking about that I'm afraid I'm going to have to kill him Oh, goodness He seems like such a nice young man I know, mother, but twenty thousand dollars can make life very pleasant for us Yes, that's true Look, I think I'll get this over with now It may not be very pleasant, mother You'd better leave the room Oh, don't mind me, son I'll just stay here and count this money We will return in just a moment to tonight's exciting case from the official files of your FBI But right now, I'd like to ask you a personal question Will you be enjoying life on a comfortable income when you are sixty or sixty-five? Will you be able to live where you want?  That was the problem confronting Mr. Robert Grange before he became a member of the Equitable Life Assurance Society That's true, is it not, Mr. Grange? Absolutely Next year I'll be forty and I suddenly realize that I hadn't laid very much by for that rainy day My wife and I got to worrying what would happen to us when we hit my retirement age How did Equitable solve your problem, Mr. Grange? We heard you talking about a plan on this program a plan that would give us freedom from money worries and job worries when we hit the sixties That's the Equitable Independent Sixties plan Then what did you do? Like you advised, we called our local Equitable Agent and I'm mighty glad I did He explained that this plan would provide for our future Get a handsome check every week Go and come as we pleased Live where we want and how my wife would get all these advantages if something happened to me The big surprise was the low cost Well, nowadays when my friends talk about their worries I tell them to call up my friend, the Equitable Man That's good advice If you have life insurance problems like owning your own home free and clear education for your children, independence after 60 protection for your wife and family talk it over with a man who can help you most your Equitable Society Representative There's no obligation to get in touch with this friendly, helpful neighbor simply consult your local telephone directory for the name of your local Equitable Society Representative That's E-Q-U-I-T-A-B-L-E The Equitable Life Assurance Society of the United States And I'm back to the FBI file The Astrological Breakout Tonight's case is an example of so-called mother love carried to the point of viciousness Obviously the mother is a psychopath a sick person probably mentally unbalanced Undoubtedly Ralph is a criminal because he grew up under the influence of such a mother There are laws protecting children from brutal physical punishments or wanton neglect But as far as we know none against being just a plain bad careless parent It's true that most people who do a bad job bringing up their children do so through ignorance and the pity is that many parents who are fully aware that all is not well feel reluctant to ask for outside help in guiding their children They fail to realize that it's no disgrace to admit that they don't know all the answers in rearing their children There are many agencies capable and anxious to help parents in child guidance Mothers and fathers would do well to seek them out before it's too late Tonight's file continues at the FBI field office Special Agent Jim Taylor is talking to the agent in charge Mr. Jackson Yes Jim I think we're beginning to get some place in that Wallace case Good, what have you got? I told you I was going to check up on Stark's mother That's the man who escaped with Wallace That's right sir I went to the place where she last lived and interviewed her landlady's daughter I said she bought a bus ticket for the old woman to a place called Pineville I see Pineville is only 10 miles from Quincy Sounds like she's involved all right I'm sure she set up the hideout It's logical I contacted the state trooper I know down there and I gave him a description of Stark's mother I asked him to check with real estate men and tourist camps to find out she's been seen Good Mr. Jackson, I think I should get down to Pineville I agree with you Jim, get going right away Ralph Yes mother What are you doing? Working on a chart Oh What do the stars have to say today? They're quite favorable mother Isn't that nice They seem to indicate that a trip's in order Good heavens son, I wouldn't need the stars to tell us that They seem to point to either a boat trip or the seashore Please let's make it the seashore I don't like boats Very well That's where it'll be Did you finish counting the money? Yes How much was there? Exactly twenty thousand just as your poor friend said Fine By the way Ralph What are we going to do about his remains? We'll bury him How sweet When do you intend to leave here son? As soon as possible Well are we going to use the car you came in? No mother, that's too hot I want you to go into town and buy one Go to a used car lot Buy one? Yes Well it's against my principles But I'll do it Sergeant, Sergeant Hampton Yes I've been looking all over for you Oh, hello there Jim Hi Had quite a job finding you First a headquarters, headquarters to a real estate man He sent you here That's right Too bad we both didn't arrive a little sooner Why what do you mean? It's the hideout all right But two of our birds have flown Stark Stark and his mother Wallace is still here My gun Not so good Jim He's dead Oh I just discovered the body a few minutes ago Is it in the cabin? No he was buried out back I noticed a fresh mound of earth that's how I found him Have you searched the cabin you?  He was stabbed Knife was buried with him I'm holding him for prints Evidently killed by his confederate Looks that way Go ahead Jim Thanks There's just two rooms here Jim Stark's mother ran it a just week ago Well let's have a look around Right Couldn't have left here too long I know I didn't take the second car they stole either That's still parked up Sergeant Yes Look here What is it? It's a newspaper dated last May 17th Now if I remember correctly May 17th was the day that Wallace's Extortion victim paid him off Really? You notice the way this newspaper is folded? Uh huh At least I've been wrapped around a package of money Yeah You know if he recovered that money That could be the motive for his murder You mean Stark and his mother used it for a getaway? That's right Something else might be elated What Jim? Writing pad See indentations or something is written on here Well I'll get it to our library Jim I know the FBI has no jurisdiction on this paper But we do want to recover that extortion money Sergeant So we're still very much in this case I've been waiting for you Sergeant I've got a reporter from our laboratory It's on that indented writing we found on that pad Yes Report states the writing was a letter Stark sent to a book company Requesting they send some astrology books To an enclosed address An enclosed address Ah that kind of stymies us We can contact the book company though They should be able to help us Sergeant Yes Jim That book company just called me back Yes They recall getting the order It was sent to Ocean City General Delivery In Stark's name? Yes I'll check General Delivery down there at once Well we've kind of hit a stone wall Sergeant How's that Jim? They contacted the Ocean City Post Office Package was picked up yesterday Ah that is a tough break Yeah Well at least we know where they are We can get the local police down there To help us look for them Give them general descriptions Wait a minute Wait a minute Sergeant There may be a quicker way of getting to them I've got an idea Who is it? It's me son Oh just a minute Come in mother Thank you I had such a wonderful morning shopping I brought some of the things home with me I'm having all the groceries saved I see Son are you working on one of those charts again? Yes mother Don't you think you should quit that for a while After all we're at the seashore Mother please Son what's wrong? It's this chart I'm quite worried about it Why? Well it's right on the cusp I don't know if we're about to be very lucky or Unlucky Oh now don't you go worrying over some little cusp Put those papers away like a good boy and relax Mother I'd rather Oh that must be the groceries I'll answer it Just a minute Yes Mrs. Stark That's right The grocery store sent me over here Oh well where are the groceries? Oh I'm not the delivery boy I'm a special agent of the FBI What? What's wrong mother? He's from the FBI Close that door just a minute How did you get here? Well that money you took from Wallace was Extortion money and all the bills were marked So you see you let me hear yourself Ralph Stark was turned over to the local authorities Tried convicted and sentenced to be executed For the murder of Charles Wallace His mother was prosecuted as an accomplice His mother in a state court And was given a life sentence And so another file was marked closed Because of the facilities that are available To law enforcement agencies today Like the FBI laboratory And also because of the fact that the Special agents of your FBI have trained minds Minds that remember things like the fact That the extortion money was marked Those things are not accidents Your FBI did not win its international Reputation quickly or accidentally It attained the status it now holds Because it is made up of men who have Dedicated their lives to public service To the protection of every one of us Every minute, every hour, every day If you worry about the future Then the chances are you haven't made the right Plans for the future Building the right plans are simple When you know how Now there is one man who really knows How to help you build for the future He is your local equitable society representative If you have an average income He can show you how to protect your wife And family, provide for your children's education Own your own home, retire on a comfortable income Why not get in touch with him today? Consult your local telephone directory For the name of your local representative Of the equitable life insurance society Of the United States Next week we will dramatize another case From the files of the Federal Bureau of Investigation Its subject, bank robbery, its title The Dimer Dance Stick Up The incidents used in tonight's Equitable Life Assurance Society's broadcast Are adapted from the files Of the Federal Bureau of Investigation However, all names used are fictitious And any similarity thereof To the names of places or persons Living or dead is accidental Tonight the music was composed And conducted by Frederick Steiner Your narrator was William Woodson And special agent Taylor was played by Stacey Harris Others in the cast were Harley Bear, Ted DeCorsia, Jeanette Nolan, John Stephenson And Tom Tully This is your FBI is a Jerry Divine production This is Larry Keating speaking For the Equitable Life Assurance Society Of the United States And the Equitable Society's representative In your community And inviting you to tune in again Next week at this same time When the Equitable Life Assurance Society Will bring you another thrilling transcribe story From the files of the Federal Bureau of Investigation The Dimer Dance Stick Up on This is your FBI


Hello and welcome to lecture number 2. We have titled this lecture as the zoom in and zoom out features from wavelet transform. And we are going to continue where we left in the first lecture. We saw in the last lecture that wavelet transform essentially decomposes signal into two separate series. A single series to represent the approximations that would lead us to scaling function also popularly known as the father function. And the double series to represent the details that would lead us to the wavelet function or the mother wavelet. Then we also looked at the fact as to what is the speciality of wavelet transform. And we realized that scaling translation and dilation they together are the hallmarks of wavelet transform. And together they lead us to multi resolution analysis or popularly also known as MRA. We also saw the nested subsets and we wanted to move up the ladder. We saw one peculiar way in which multi resolution analysis can be implemented. And it is a two band filter bank structure. And then we focused only on the analysis part of it. And then we realized that this kind of structure would help us move down the ladder. And then we post this question if at all I want to move up the ladder. If at all I want to go on adding up the details then what kind of framework will help me achieve that will help me do that. And in this particular lecture we are going to achieve the same we are going to first of all define the framework. Once we are done with defining the framework will then move on and solve one problem make our hands dirty to really understand the nitty gritties of the entire procedure. So, let us start that process we have realized that the whole MRA multi resolution analysis is in a way based on the underlying nested subsets.  First the equation of scaling function which can be written as phi of t to be equal to summation over k h of k phi of twice t minus k. And to normalize this let us add this factor of square root of 2. Now, this equation is very very special if I take this factor down then we can clearly understand that this is indeed phi of 1 t and 1 essentially indicates 2 to the power 0. And then I can say this belongs to subspace v 0. Similarly, I can also take this factor down and then we will realize that this is phi of twice t minus k. And this essentially means 2 to the power 1 and this belongs to v of 1. So, this feeling of nested subsets is very nicely captured in this beautiful scaling function scaling equation. This holds true for the other type of function as well which is the wavelet function. So, we can write down wavelet function like this psi of t again some door k values g of k phi of twice t minus k. And I can once again sense that this is simply psi of 1 t 2 to the power 0. And then I can say this function belongs to w 0 subspace. And this function once again belongs to v of 1 because I have phi of twice t minus k and 2 to the power 1. So, this still belongs to v of 1. And by looking at these two mathematical equations, now we can once again sense the same equation that we wrote towards the end of last lecture that v of j would indeed be equal to v of j minus 1 orthogonally added with w of j minus 1. And this once again leads us to the beautiful ladder that we have been talking about. Once we realize that v of j and w of j together can take me to v of j plus 1. And if I have w of j plus 1 then together they can take me to v of j plus 2 and this continues. And so once again we can write down the same nested subsets v of minus 2 v of minus 1 v of 0 and this would continue. And last time we pose this question that if I start my analysis, let us say in v of 0 then how I can move in the upward direction. So, that I will keep adding up different details and by virtue of doing that I can go really close to the actual signal or the actual function under consideration for analysis. How to achieve that? Now, let us write down the framework for the same. Let us say I have some function and I have the corresponding projections of that function. So, how this entire assembly will help me move in the upward direction? Let us say I have function and I am representing that function. So, that it belongs to some subspace v of j and I can do this with a scale value of 1 upon 2 to the power of z. Obviously, in order to be able to span this v of j subspace I will require the basis function and since we are talking about v of j spaces obviously the basis function is going to be phi of t. So, the basis function that we will make use of to span these spaces will be this for all different values of k. Here k is the translational parameter and 2 to the power j by 2 this is the normalizing factor. This is for normalization and because of this normalizing factor my orthogonal basis will get converted into orthonormal basis. Now, I can very well write down f j of x in terms of the basis function and the formula would be summation over k because k is my translational factor alpha j k 2 to the power j by 2 phi 2 to the power j x minus k and we can very well calculate alpha values like this. We have purposely taken the function to be a function of variable x just to point out that this is just some variable it need not be always f of t or x of t. So, we are looking at f dot to make it more generic. So, this is how we can span v j subspaces and correspondingly find out the approximation values which are the alpha values. Let us also write down the framework for w subspaces and let us say same function. Now, I am going to call that function of g of j of x it belongs to subspace w j and will make use of same scale which is 1 upon 2 to the power j and in order to be able to span these subspaces I will require the basis which will be now psi and k is once again the translation factor translation parameters. So, to say and I can write down similar equations once again g j of x be equal to summation over k beta j k 2 to the power j by 2 psi j x minus k. And we can very well calculate the these beta values with the similar formula. So, this is how we can calculate beta values and since we are talking about w subspaces these beta values will give us the details which are very much required to actually move from one subspace to another subspace. Now, using this framework how can we actually move up the ladder that is the next question and in order to be able to answer this question let us solve one simple problem. Let us take a sample signal a sample function and we will apply the framework that we have designed to that signal to really understand how we can actually move from one subspace to another keep on adding the details and really move in upward direction in order to be able to then achieve l 2 r norm. Let us take a simple signal let us say f of x is defined as x for values of x between 0 and 3 and let us say it is 0 elsewhere. We can also think of keeping this interval open by omitting this and if we plot this signal it would look like this. So, I have my x axis this is my f of x let us say this is a simple looking signal and we want to analyze this signal using the framework that we have written down. Let us write down the objectives that we really want to achieve we will first of all find out f 0 of x which belongs to v 0. Then we will find out g 0 of x which belongs to w 0 and then we will add these two orthogonally to produce f 1 of x which would belong to v of 1 and this is definitely moving up the ladder from v 0 and w 0 we are able to generate v 1 correspondingly we can also find out g 1 that belongs to w 1 and add v 1 with w 1 to produce v 2 and so on. So, it is very important to understand the process first and so we can restrict our exercise to this and at the end of it what we really want to prove is v 0 plus w 0 gives us v 1 this is what we really want to achieve. So, we have this objective in our mind. Now, let us begin with the first task and that first task is we want to find out f 0 of x which belongs to v 0 that essentially indicates j value is 0. The scale over here is going to be 1 upon 2 to the power j which is 1 upon 2 to the power 0 which is 1 this essentially indicates that my window of analysis is of length 1 and then this is my basis function that I will make use of and if I plug in j is equal to 0 then this would reduce to this will go to 1 and I will be left with x minus k. So, this is my basis function that I am going to make use of in order to be able to find out projection of f on v 0. So, let us do that recall the formula and I can very well write f 0 of x will be equal to summation over k. Now, if you remember our signal the signal exists between 0 and 3 and now my analysis window is of length 1. So, as a result of that I will have to translate my basis function twice. So, the first window of analysis will be from 0 to 1 then 1 to 2 and then 2 to 3 and I will have to carry out the analysis in 3 different steps. So, my summation of k will run from 0 to 2 then I have alpha j k j is 0. So, I would write alpha 0 k 2 to the power j by 2 goes to 1 and then we have already calculated that this will be x minus k. So, it boils down to calculating the values of alpha let us begin with the first value when k is equal to 0. So, let us focus on alpha 0 0 it will be integration from minus infinity to plus infinity f 0 of x into 2 to the power j by 2 and now we will plug in j is equal to 0 and k is also equal to 0. We also understand that the moment you say k is equal to 0 we are talking about phi of x that is the version which is not translated. We will have to here define which phi of x and which psi of x we are going to make use of and this is one another beautiful property of wavelet transform as per as Fourier transform is concern or Z transform is concern the basis is fixed. However, the beauty associated with wavelet transform is you have choice you can not only select the scaling function and the wavelet function from whatever is available if you are smart enough you can also think of designing your own scaling function and wavelet function. We are going to take up this particular topic in the next lecture. However, for the time being let us restrict to har scaling function and wavelet function. So, as far as har scaling and wavelet functions are concerned we typically know how they actually look. So, we will use har scaling and wavelet function and in case of har we know since you are using x phi of x looks like this and we also know psi of x looks like this. So, we will make use of these 2 functions to actually solve the problem at our hand. So, this integration bounds limits are now restricted from 0 to 1 and between 0 and 1 we know the nature of our signal f of x it is going to be x between 0 and 3. So, between 0 and 1 it will be x. So, I can very well write x over here 2 to the power j by 2 this will go to 1 I do not really have to worry about it. Now, between 0 and 1 when k is equal to 0 I am talking about phi of x because this 2 to the power j is also going to go to 1 and between 0 and 1 this function is going to take a value of 1 and as a result of that I can plug 1 for all of this and then d of x and this will be x square by 2 that leads us to half. So, alpha 0 0 is half correspondingly let us try and find out the other values of alpha. Let us calculate alpha 0 1 now my integration would range from 1 to 2 between 1 and 2 my f of x is once again x 2 to the power j by 2 is going to go to 1 and I have phi of x minus 1 d x. Now, how this function looks if my phi of x looks like this then obviously this is how my phi of x minus 1 would look. So, it will have value of 1 between 1 and 2 as simple as that. So, I can very well plug 1 over here and this will be x square by 2 for limits 1 and 2 and this boils down to. So, alpha 0 1 comes out to be 3 by 2 and then correspondingly we can calculate alpha 0 2 which will be equal to integration between 2 and 3 x phi of x minus 2 would be 1 between 2 and 3 into d x and this would come out to be phi by 2. What does this indicate? These alpha values are nothing else, but the approximate values of this function that we started off with. We have already seen that f 0 of x is going to be a projection of function in subspace v 0 and the formula is this and so it goes without saying that I can now very well write f 0 of x in terms of all the alpha values that we have calculated and I can write f 0 of x is equal to half into phi of x plus 3 by 2 into phi of x minus 1 plus phi by 2 into phi of x minus 2. So, this is how I can very well find out the projections of signal f in subspace v of 0 and if we try and plot it, it will look like this. So, this is my alpha 0 0, this is my alpha 0 1 and this is my alpha 0 3. So, these are neat approximations of the underlying signal. Now, the next task and the next task is to find out the projections of signal in w 0 and we have already written down that we are going to call these projections as g 0 of x that would belong to w 0. The scale will be once again 1 as j is equal to 0 and the basis function will be will once again make use of the Haar wavelet function and since j is equal to 0, this will reduce to a very simple form k is once again the translation parameter and now I can write down that g 0 of x will be summation for k values from 0 to 2 and then beta j 0 k values into psi of x minus k and the next important task is to find out all the beta values and since these are the projections in w 0 subspace, these beta values will now give the details associated with the signal. So, let us calculate the beta values now. Using the formula, we can very well say beta 0 0 that means j is equal to 0 and k is also equal to 0 integration from minus infinity to plus infinity g 0 of x into now k is 0. So, we are talking about psi of x and how this function actually looks we have already seen the nature. We are going to make use of Haar psi of x and so it is of this particular nature and as a result of that in order to be able to solve this integration we will have to split it into two parts. So, for k value of 0, the integration would exist only between 0 and 1 g 0 of x is x again and then we have psi of x into d x and due to the very nature of psi of x, we will split this integration into two parts from 0 to half x into now between 0 and half psi of x takes the value of 1 and between half and 1 it takes the value of minus 1. So, we will plug in these values x into 1 into d x and then plus between half and 1 x into minus 1 into d x and this will result into x square by 2 between 0 and half minus I will bring this minus sign out x square by 2 between half and 1 and thus beta 0 0 result into 1 by 8 minus 1 by 2 plus 1 by 8 this would result into minus 1 by 4. So, this is the first beta factor that we have obtained beta 0 0. Let us work on the next one that is beta 0 1 j is 0 and k is equal to 1 and the integration is going to last between 1 and 2 g 0 of x will be x again into psi of x minus 1 into d x and how would this look? We know if psi of x looks like this and psi of x minus 1 will be the translated version of the same this will exist between 1 and 2. So, this is how psi of x minus 1 is going to look and will split the integration again between 1 and 3 by 2 x into 1 into d x minus between 3 by 2 to 2 x into 1 into d x. We can solve this and confirm that this comes out to be minus 1 by 4 as well. Correspondingly, we can also calculate beta 0 2 j is 0 k is equal to 2 and I will leave it to the viewers to verify that beta 0 2 also comes out to be minus 1 by 4. So, all the 3 beta values they have the same value of minus 1 by 4 and what does it indicate? So, we will try and analyze what it actually depicts, but before that once we have calculated all the beta values now it is time to write down g 0 of x in terms of its corresponding beta values because then I can very well write this will be beta 0 0 psi of x plus beta 0 1 psi of x minus 1 plus beta 0 2 psi of x minus 2 and we can think of plotting this g 0 of x on top of the original signal and what projection it would have in v 0 that we have already plotted. So, the green lines they indicate the corresponding representation or projection of signal f of x in v 0. Now, we will draw its corresponding projection in w 0 and it is going to look like this because all my beta values are negative the first half is going to be negative and this will be of value minus 1 by 4 and this is of value plus 1 by 4. So, these are the projections in w 0 subspace and these are my projections in v 0 subspace. Now, if you recall our objective we wanted to orthogonally add our findings in v 0 and w 0 to then achieve the projection in v of 1. So, let us see if we can really do that now if I want to find out the projections of the same signal in v 1 I can write down f 1 of x which belongs to v 1. Now, you can clearly see and sense that j is equal to 1 and we are actually moving up the ladder. So, my scale is now going to change the scale is going to be now 1 upon 2 to the power j which will be equal to half. So, the scale will get reduced to half and what kind of basis function will have to make use of 2 to the power j by 2 and then phi 2 to the power j x minus k k still remains the translation parameter and since j is equal to 1 in our case this would reduce to square root of 2 into phi twice x minus k. So, this will be the basis function that will make use of correspondingly I can also write down that my f 1 of x will run over different values of k and how many values of k our original signal lasted from 0 to 3. Now, my window of analysis is half and so I will obviously need 6 different windows in order to be able to span the entire thing and so my k value is now going to run from k is equal to 0 to 5. I will have to calculate alpha 1 comma k because I am in v 1 subspace. So, j is equal to 1 and then square root of 2 into phi of twice x minus k. So, this is how my f 1 of x the projection of my original signal on subspace v 1 is going to look and what we really are interested in at this point in time is to really see if I can really match all the alpha values that I will obtain numerically to the alpha values that I can obtain by adding the alpha values in v 0 with beta values in w 0. And if I can match up these values then I would say oh this is definitely working and I can really move up the ladder. So, let us calculate the alpha 1 k values and let us begin with alpha 1 0 when k is equal to 0 and we know the formula minus infinity to plus infinity and then you have f 1 of x into 2 to the power j by 2 phi of and we are discussing a very special case when j is equal to 1 and k is equal to 0. So, obviously I am talking about the first interval that would last from 0 to half between 0 and half f 1 of x will be equal to x 2 to the power j by 2 would go to square root of 2 and then I am talking about phi of twice x k is 0. Now, between 0 and half what value phi of twice x is going to take? We already know that if my phi of x looks like this then phi of twice x is going to be the Schringt version of it and let us not worry about the area under the curve at this point in time. Let us worry about the nature and if we can actually preserve the entire energy or not. So, if this is how my phi of twice x is going to look then between 0 and half phi of twice x is going to take a value of 1 and then I can bring out square root of 2 outside and this will be integration from 0 to half x into 1 into dx and so this will be equal to square root of 2 into x square by 2 between 0 and half and this will lead us to square root of 2 into 1 upon 8 and probably I can write down a convenient form of the same and I can say this will be 1 upon 4 square root of 2 essentially the same thing. So, this is how my alpha 1 0 is going to look. Now, let us try and tally this alpha value with the geometrical representation that we have over here. Now, in order to be able to calculate alpha 1 0 what we will have to do is to concentrate on the portion between 0 and half and correspondingly I add the alpha 0 0 with beta 0 0 well alpha 0 0 value is known and beta 0 0 value is also known. So, what we are saying is I can calculate alpha 1 0 which will be equal to alpha 0 0 minus. So, I am talking about only the first half of alpha 0 0 plus beta 0 0 minus that is what we are saying and we already know these values. So, as far as alpha 0 0 minus is concerned it is half and as far as beta 0 0 is concerned it is minus 1 by 4. So, this will eventually lead us to 1 by 4 the value that we are getting after solving this integration is 1 by 4 square root of 2, but we do not really have to worry about this square root of 2 because this is going to get cancelled out. You remember we have already done the normalization of our basis functions and. So, our basis is not just orthogonal it is also orthonormal and as a result of that when I am going to plug in this alpha 1 0 in the formula for f 1 of x this square root of 2 is going to get cancelled out and then this will match up with the value that we have obtained graphically. Let us see that formula what I am saying is I can very well write down f 1 of x to be equal to summation for k is equal to 0 to 5 and then alpha 1 k values square root of 2 into phi of twice x minus k. So, if you consider the first term in this summation when k is equal to 0 that is going to be alpha 1 0 into square root of 2 into phi of twice x and alpha 1 0 that we have calculated is 1 over 4 square root of 2 into square root of 2 into phi of twice x. Obviously, we have the rest of the series, but I am just focusing on the first element and. So, this square root of 2 will get cancelled with this square root of 2 and will be left with 1 by 4 and this definitely matches with what we have solved graphically. This is indeed 1 by 4 likewise we can go on finding out the rest of the values of alpha and convince that it indeed matches up. The alpha values in v 1 would look like this 1 by 4, alpha 1 1 will be 3 by 4, alpha 1 2 will be 5 by 4, alpha 1 3 will be 7 by 4, alpha 1 4 will be 9 by 4 and alpha 1 5 will be 11 by 4 and if we want to plot these values again on the same graph. Now, it is going to be interesting because I am starting with 1 by 4, 3 by 4, 5 by 4, 7 by 4, 9 by 4 and 11 by 4 and you will agree that. So, these are my projections in v 1 and it is very easy to see that the approximations that are obtained in v 1 are much better compared to the approximations those were obtained in v 0. We are able to add some details in v 0 from w 0 and then finally achieve the projection in v 1. So, this is the mechanism using which we can not only think of moving up the ladder, but we can also think of making the choice of the scale we can think of also making the choice of the translation parameter and then specifically zoom on to a particular point in my signal or function which is of greater importance to really find out something interesting to convince more on this point. We are going to see another example, we are going to build one function this function is very specifically designed. We are going to understand the beauty associated with this function and then we will see what kind of things it will have when we will try and analyze this function using the wavelet toolbox in MATLAB. So, if you look at this slide will try and find out a hidden jump discontinuity from a particular function. Let us consider this function g of t and looks very interesting because we can very clearly see that at half there is a clear discontinuity. Please carefully notice that t is only less than half and then over here it is less than or equal to half. So, at half there is a clear discontinuity that we can notice. However, such kind of discontinuities are easier to detect we will complicate the matters slightly. What we will do is we will integrate that signal g of t and by virtue of doing the integration we know that integration essentially is a low pass filtering operation and we will smooth out that signal. So, the discontinuity is now not very much visible. However, there is still a cusp jump at t is equal to 0.5 and now by virtue of integrating the original signal g of t this is how the new signal h of t would look. We will complicate the matters further more and we will integrate h of t as well. We will integrate h of t and finally, we will generate f of t and now this function f of t appears absolutely smooth to our eye and we may not be able to perceive the discontinuity at point t is equal to half. We will pose this challenging problem to our wavelet tool box in MATLAB and we will see if the tool box will be able to really find out this discontinuity at t is equal to 0.5. So, this is a simple MATLAB program that is written. This is how we have declared the time stamps t 0 is equal to 0, t 1 is half and we know this is the point where there is discontinuity and t 2 is equal to 1. The level of analysis that has been selected is 9 and this is selected out of trial and error and honestly speaking there is no thumb rule that says to what level one should go and after doing analysis to what level one should stop. However, there is a slight mention of this in the book written by Ingrid Dobas which says that if you lose more than 70 percent of the total energy in your signal then you should actually stop doing further analysis. Based on that we have selected the level to be 9 and this is how the original signal t would look. You can clearly see that for a given time stamps the original signal g would look like this. It was t only when t was less than t 1 and t 1 is 0.5. It was t minus 1 between all the values of t which are greater than t 1. So, between t 1 and t 2 0.5 and 1 and correspondingly we have generated signals h and f. Just a gentle reminder that g original signal had a discontinuity at 0.5. We did the integration of that into h and again integrated h to finally get f. So, first of all let us plot these signals and let us see the nature of these signals and as expected this is my original signal. We can clearly see the discontinuity at 0.5. Then this is the cusp discontinuity after doing the integration and after doing the integration of this signal that is double integration of the first signal there is no visible discontinuity at 0.5. So, this is fairly difficult signal now. Let us save this signal. So, I am going to save f and let us save this signal as test underscore s i g and now we can clearly see that there is a mat file called as test underscore s i g dot mat. We will invoke the wavelet toolbox in mat lab and we will select the 1 d wavelet. We will load the signal that we have generated which is test underscore signal. So, this is how the signal actually looks and now I have freedom of selecting any of these wavelet mothers. Let us say we select dobash 3 for a level of 9 and we want to carry out the analysis and you will see a strange thing. At d 1 you can clearly see that we are able to detect the discontinuity at 0.5 and as we start losing out the information the crispness of the detection of the discontinuity eventually goes away. Since we have done the entire analysis using Har wavelets, let us also work out that exercise. So, I am going to select dobash 1 which is nothing but the first member of dobash family and it is Har. And if we do this analysis again then now you can clearly see that we are once again able to detect the discontinuity, but with lesser efficiency. So, there is point in selecting the mother wavelet. However, what is striking about this wavelet analysis is even though we smooth out the function by doing double integration and now to the naked eye I cannot sense the discontinuity, wavelet transform can still find out such underlying discontinuities. And hence it makes lot of sense to invoke the zoom in and zoom out properties of wavelet transform. With this we will conclude this lecture and we will continue working on how we can go about generating the scaling function coefficients and wavelet function coefficients in the next lecture. Thank you.


First of all, thank you for coming. There's a huge offering at TLC normally, so Yeah, you have plenty of offer of possibilities. Thank you for coming to this one my colleague Ben Hutchinson and myself Will be talking a little bit about Some of the ideas that a company called Copethink is bringing into the kernel maintenance within CIP My colleague Ben, it's a well-known kernel maintainer Davian kernel maintainer Also, he works upstream as a maintainer and currently he's maintaining the the CIP kernel based on 4.4 and I work as a consultant in the same company and Basically, I I represent the company at CIP Copethink is an open-source embedded company 10 years old based in Manchester and we have a What I believe is a strong background in working in the open and also working in customers. We are quite strong in automotive and Those of you who were this morning at the CIP talk, I'm not gonna repeat most of what was said there I would simply say that are basically six companies The platinum members among the four they have more than a million employees Which is more than many countries out there and then we have Copethink and Plathome Doing kind of a specific word plathome in the IoT space and Copethink providing These we are working on the kernel side of things for in the CIP And we have basically four four topics to comment. First of all, we're gonna give a very brief Picture of what maintenance is today in different industries And then I would go for very briefly also for different strategies that we could have chosen to work on the kernel within CIP and then Some considerations from Ben related with the limits of the maintenance lifetime of the kernel and finally He will provide us some ideas of how can we achieve? Longer lifetime in terms of the kernel so Yeah, this is just a picture that is approximating and you can make tons of considerations here But basically what I'm trying to show here is that on the enterprise world the site the maintenance Well, the lifetime cycle Of the the life cycle of the products that are out there in their enterprise world Depending on how you consider it not around 15 years 15 17 13 depending on which company how do you do you consider that the life cycle of a kernel? But it's run about that time Then non-commercial distros like Davian. They are around eight If you count all the life cycle of the product Or project if we go to the mobile space we see around five six years since they started and until the Lifetime of a product finished And focusing a little bit more on the kernel Well, depending on how you count or you want to think about how the kernel is developed if Some might say that you have feature stabilization in next and then in the main line You do the whole product stabilization that could be around four months somebody will claim that it takes years to Change a core feature. So depending on how you look at that We are talking about up to six years with this new announcement for for the LTS branch Two two and a half. It's if we consider Other branches and then on top of the LTS you can have LSK or LTS I they just try to extend in different ways that period so Again, the specific dates are not very relevant When you think about it from the industrial perspective This this slide was pretty much shown this morning. So I'm not gonna stop on it too much I'll just gonna say that Think about a Railway control system and for example each country has its own rules and way of doing things So just the the the specifications for us for a customer's extensions might take up to four years These are data provided by by some of the members, right? So Or just the initial certification of that system might take one year and we are thinking about Think about those systems maintain it for a very long time if we go to power plants, for instance, then the year This is completely crazy You take out about five year up to five years to develop and then just simply Specific customers takes extensions might take up to four years And if you think about the deployment time or the supply Time, then it's a whole bunch of years are putting a power plan up to working up to work It's it's insanely costly. So and Then you associate hardware with software in these cases and those two You have to provide hardware Maintenance and support and software so if we can be talking about I mean Urs van Siemens was talking about Systems being developed Provided in this in the late 60s or in the 70s. Sorry and I'm still working, right? So It's a huge challenge. So when you think about those timescales In terms of the mind of the kernel of the Linux kernel if we are aiming to put Linux And that's the whole point of where these industries heading little by little and you compare that with what we know today It doesn't matter how you count it. We are thinking about in the best scenarios about extending the current Maintenance Cycles in in four three four If you compare it with enterprise, but if you compare it with embedded, I don't know buy a lot so For a company a small company like Like co-thing that the following question is and why what are we doing here? working in in in CIP so For us it was very interesting from a company that comes from embedded and is getting into a strong and automotive Think about the strategies that we have been following lately are very close to what upstream is telling everybody, right? which is basically Reduce the delta between upstream and and your product and that will help you and keep your product alive and Then we have these use cases and for us. It was a challenge that we want to learn because maybe maybe Things might change in the future and the current strategies Are not working that are currently Challenged by these kind of use cases will bring us to something new and different or no Or maybe just the use cases will need to change if they want to adopt open source or Something new comes right so As I said the first strategy that we can follow It's like in as a as a company that is let's say expert in In in embedded world and lately in automotive and approaches these big customers is look The current model that you are that you're following is completely wrong. You need to update so you and when I mean to update I mean having updates as a core strategy towards When you think about your maintenance cycle so your business model also around it That is one strategy which is in the embedded world is what we Know that's fast as we would want to but is what we are seeing and we are seeing also that pushing the Automotive industry The second strategy would be like well, you know, we are doing things on the maintenance side of things on the kernel in some specific ways So what we are going to do is just extend Try to extend and push as hard and as much as we can our current approach and see where we get right and and Let's find out the limits of that technically speaking but also business wise economic wise also and process wise, let's find out the limits where it take us and Assuming that over time tooling get better and we are improving right Five or six years ago having The announcement that we got a few weeks ago that the LTS branch was going to be extended for six to six years Would probably have been a completely crazy thing And Then the following one the following strategy is just sit down Assume that the current model doesn't work. So we would sit down until somebody finds a solution that we can use Or we can apply with some guarantee and So those companies that are members of CIP would keep Would would keep doing what they are currently doing which is doing everything in-house their own way and And and and trying to make a good business out of that without killing anybody So obviously we went for the second option which is we are trying to push the the current The current strategy. Let's see what where it take us assuming that we are getting better and better at this and Yeah, so now Benny is going to explain some of those Some of the actions and considerations that we are taking With this second strategy in mind within CIP so firstly going to describe some of the Probable practical limits to the maintenance lifetime of a kernel branch So unfortunately, there is a what seems to be a hard limit on supporting the the current CIP kernel branch based on Linux 4.4 and that's the year 2038 It's kind of like the year 2000 problem which required a whole lot of changes in a whole lot of different pieces of software Linux systems like Unix represent absolute time or walk-alike time as a number of seconds since 1970 and If they you where this is represented in a 32-bit signed value the maximum possible time you can represent is sometime early in 2038 When Linux is running on a 32-bit architecture The system called API is that you use a space users to talk to the kernel and many of the internal interfaces in the kernel Use those two bit signed values so that will stop working and malfunction in unpredictable ways after 2038 And unfortunately even on 64 bit architectures there are some places in the kernel Where those two bit values are used? So to fix this there need to be changes in the kernel There needs to be changes in Knewlip C or any other C library That's being used Other libraries that use that have API's that involve time types mainly to be updated and applications that store time in binary files or use them in network protocols may also need to be updated The EPS work underway to fix this in the kernel Things have got better since 4.4 But they're not complete I am hoping that I and possibly other CIP member developers will be able to work on finishing that Having that in place when we start the next CIP kernel branch That work is probably not going to be possible to back port onto 4.4. So that's Lightly to be an absolute limit on the the lifetime of this branch second issue is going to be hardware the commercial support lifetime of most CPUs SOC's and some of the other Important ASICs used in these embedded systems is going to be less than 30 years And over time some of those Some of that hardware is going to break and it's going to be harder and harder to get hold of spares The only the most recent CIP kernel branch is going to be receiving back ported support for new hardware And after say 10 15 years, it's going to be practically impossible to add support for a new SOC So I would expect that some of the long-lived systems that are using the CIP kernel Are going to need to have at least as an option a Replacement for the Linux based components that would update both the hardware and the kernel And the third limiting factor is in the kernel software itself As you all know the kernel is is being developed and and changing very rapidly So internal API's and their implementation details that may need to be fixed change over time Times in quite dramatic ways And any bug fix that that is made upstream and ought to be back ported Might actually depend on some of the interface or implementation changes that have happened since the stable or CIP branch was created So back porting the bug fix Can become very difficult The longer the stable or CIP branch lasts The harder back porting any given bug fixes likely to become So how how can CIP achieve a longer lifetime than Current long-term support branches promise How how do we how can we possibly maintain a branch? for decades One factor that should make this Help to make this tractable is that the scope of maintenance is based on the needs of members The The CIP only makes releases The kernel source rather than back binary packages, so members can use whatever configuration they want But we're collecting together the configurations that actually use And using that to determine which features of the kernel are Are actually important to members For example on the current branch that's based on 4.4 The members are only using the arm arm 64 and x86 architectures So any bugs in other That affect other architectures are simply irrelevant. They don't need to be reviewed. They won't need to be back ported and Most drivers most file systems and all the different network protocols in the kernel only a small subset of those Would need to be maintained in the CIP branch So this should greatly reduce the overall effort required in back porting and in reviewing fixes compared to a regular stable or long-term stable branch secondly any any long-term stable branch if you look at the Get history and compare how many changes are going into each update you can you can easily see that the rate of fixes that's needed reduces over time of course, there's a finite number of bugs in any given release and So More of them get fixed the fewer of them are left to fix pretty simple arithmetic So a lot of bugs get fixed within just one release cycle Most of the remainder within a year or the major bugs get fixed within a year after five or six years at the end of a Long-term support branch There will be a much much smaller number of bugs number of major bugs to fix Upstream kernel developers can and mostly do help Stable maintainers to filter out in applicable fixes By including information in their commit message Which commit or kernel version introduce the bug that they're fixing? So although Bug fixes will get harder to back port over the years. There will be a lot fewer of them to deal with and The bugs that get found later will tend to be more obscure things Some of those obscure things are unfortunately security issues that quite probably do need to be fixed But obscure issues that don't have security significance and don't have a safety significance Might not be worth back porting to a to an older branch and third major Point is This is a collaboration Although I'm currently maintaining the CRP kernel I'm going to be handing it over to developers from the various members over the next year or so So the members of CRP are not going to be Customers who have to negotiate or plead with their vendor to keep supporting an operating system When the vendor and its developers really like to move on to something else It's an open-source project and Developers from all members can take responsibility for fixing the the things that their members need to get fixed While also pooling and sharing the the work they do on common areas of the kernel So ultimately the lifetime of CRP kernel branch Will be determined by the the interest and the capability and the will of its members To keep to keep it going So it's yeah, that's basically about it what we have to say. We don't need to spend the time if you don't want to right No, we we we deliberately since we know this is a Interesting topic for many we have about 15 minutes for for questions. I think that was the Most relevant interesting part for for us. So any question Should I hand over the oh I repeat the question anybody Okay, the question is if we do we have a strategy for testing the kernel? Okay Beside taking care of the kernel maintenance, we We also take care of the testing the kernel testing for now within CIP Yes, we do have a strategy We have some actions. We just released an implementation of kernel ci.org To try to test the kernel locally As a first step towards having a share common a common share service that everybody In CIP can use So in terms of service architecture for testing, yes, we do have a strategy in terms of tooling also now the hard part comes Most of what it's out there is very focused on in terms of testing the kernel in development Not so much on maintenance So that's an open question that we will need to figure out by ourself But well not by ourself with with others also because this is becoming a topic also for a GL and other groups out there But it's we are just taking the first few steps. So we don't have any real conclusion on that part yet The question is if it would be a better strategy to sorry To a new Sunnier kernel and then forward for the drivers If it if they are missing I leave that to you That may well be easier from a development point of view but CIP members have to consider That's a much larger code change and that likely means that Regulations will Mandate that a larger a much Longer period of testing and and read defecation So that's something that That that is is not not necessarily so easy in the areas where where CRP members are working. I would add to that that we are currently focused on one kernel 4.4, but obviously over time we will have more In I mean the the members are developing products in a continuous basis So at some point they will we will have to start At a point in which it makes no sense to start by porting because the hardware support will not allow it So we will have to have another another kernel in two three years. That's still undetermined So CIP will maintain more than one kernel over time Any other question the question is if we expect to solve the The year 2038 issues also in user space It's a big issue for members We are We we have identified year 2038 as a big topic within CIP and we have Clearly identified that as an action point from our side also We cannot just wait for the community to do it at their own schedule on best effort basis And there are some already ongoing activities from members in that in that particular area Within CIP something that we have discussed for Sometime in this event and I we are expecting some actions taking in that direction sooner than later currently Yeah, it just identified that as a priority with these big companies is is a huge step And I think that acting on the on it. It's sometimes easier than Understanding and realizing within the group that that's that is a problem and that we prioritize that as a need So I'm very very positive about CIP helping The more wider community in this regard because obviously it's an issue for for some of the companies. Yes It has to happen in in Mainline Right and we have to backport it. It's Well, if you were this morning in the talk it was upstream first policy and and also We have our policies in the current that clearly state that if it's not a mainline We should not backport it obviously for hardware support. We have some I would call it exceptions that are not really exceptions but but yeah, yeah, it's a We are not gonna do this for ourself and then Offer it to the community. We are gonna do it Within the kernel community and then figure out how we're gonna consume it So it can be the case for instance in which we fix issues for 2038 and cannot be backported He mentioned that risk. So hey, it's it's how it works in any case. We will be benefiting the members yes, you can use it and The reason why you can use it is not just because we have a credible maintainer behind it But the current members have plans to ship it on products Well more than plans. I will say sorry. I'm not hearing you. Sorry the question if if there is an estimation of Companies that might need this in order to estimate the development effort that will be put into this No, I don't but if you think about the three companies that are labeled there Toshiba Hitachi and Siemens If they as they are doing clearly state in public that they are shipping The the kernel and they keep working in the open for the core parts. I think that it's a quite strong Big development effort behind that It's a matter of wait and see obviously like everything in the open, but so far I'm I'm quite positive about that Right. So he started with 4.4 because that was at the time the the latest Stable kernel that had long-term support, which at that time we expected meant two years For now the CIP branch is is tracking the 4.4 long-term stable branch and adds Some back ported hardware support and a few back ported enhancements from the kernel self-protection project so all the fixes from 4.4 stable are going to 4.4 CIP Yes, it is Sorry, the question that he was asked asking is if everything from the LTS it has been taken Into the CIP kernel and the answer was yes. It has we have taken up the same approach than LTS at this point We are also he has been reviewing the configurations of members in order to understand What kind of features we will have to support over time I mean the idea of 4.4 being six years. It's just pretty recent. So we were expecting this year to take up Ownership basically of the con of the kernel, right? So it's it give us some more time to To adapt ourselves and learn in this strategy of pushing the current LTS model farther and farther and let's see how how it goes and until when and how much we learn out of it So you're asking you're saying that sometimes customers want the last kernel plus some small number some selected fixes As I said, CIP is not a vendor to customers. So in effect the the Members are going to be their own customers and if that they're developers if they want can can cherry-pick fixes in the short term for an internal kernel tree, but The expectation is that in the In the longer term they're going to be up. They're going to be taking everything from the CIP branch Which for the moment means everything from the long-term stable branch Any other question we have five minutes. Oh, yes, we have one The question is what are the main difference between the deviant kernel maintenance policies and the CIP kernel maintenance policies The main the main difference then would be that Debin is trying to debut firstly Debin is building is is shipping binary packages. So it's selecting a configuration which in general turns on pretty much all the features as long as they're not going to have a Huge performance impact for little for an obscure feature and Debin also tries to avoid a bi breaks which that it's not a not a concern for CIP at all But there is a quite a lot of commonality in the Debin says upstream first Debin does Does allow for back port at hardware support Does that answer your question Do we have time for one last question probably any final comment from your side then No, thank you very much for coming. We're done. Thank you


Let's give bread a warm welcome Good afternoon. Thank you all you can hear me fine. It sounds like great How are you feeling like it's good to be here, right? Like I know it's a little bit. Yeah, thank you I know it's a little bit of that post-lunch law and we're heading into the break You're thinking about your next coffee. I am too after I get off the talk nerves But so since Josh introduced me so well, I won't belabor the point if you want to follow along with the slides on this talk For accessibility reasons or just because I've got a QR code that'll take you right there I just point your mobile device toward the front of the room and scan it and you'll be able to head right there So to give a bit of background Josh mentioned that I work on a lot of technical projects. So like I've been I Love Python. I work with Python a lot One pattern I find myself implementing a lot is I write a lot of command line tools for people People who aren't me always So I need to think a little bit about how to make them user-friendly and accessible And when I start usually I start by trying to write a shell script How many of you all have written a shell script or at least are familiar with the concept? Okay, so good a good number. So hopefully this will be a useful talk for all of you um Shell scripts are really handy like when you have tools that Input and output formats that you need It's very easy to set them up to talk to each other seamlessly and get a useful result that you want And typically we do that with shell pipelines. So if you're not familiar with that terminology, we can walk for you through a few examples Uh pipe shell pipelines are literally indicated with the pipe character In between two commands and it means take the output of the command on the left and make it the input of The command on the right. So some examples of pipelines you might see commonly Like here here's probably the first one that everyone learns right like take the LS command that lists files and pipe it into less so that I can scroll through the list and actually Read it at my leisure rather than having to go whoosh like all the way down my terminal real fast So that's a that's a pipeline. We take the output of LS Which is just a plain text list of files and and make it the input of the less command Which then gives us an interface to scroll through it another another common one That's often taught to beginners is doing like if you've got a tar archive It's usually compressed in some way right and so what we can do is we can run that file through the decompression tool which might be Z cat or BZ cat or XZ cat And then feed the resulting output into the tar extraction command or the tar list command so that we can see What's inside that file? But we can do more sophisticated things right like like it doesn't just have to be One command on the input one command on the output. We can keep doing this So so here's a personal pipeline that I use every now and then to publish like lightweight webpages There are command line tools called smarty parts pants and markdown markdown does what you think it does it takes a Markdown formatted input and gives you HTML on the output And so that's how you sort of render the markdown Smarty pants just adds like nice formatting to that so m dashes Proper curly quotes things like that And so one pipeline I've written occasionally is to just take a markdown file pass it through smarty pants pass it through markdown And that'll give me like a nice chunk of HTML, right? And then I can use the cat command which concatenates files or inputs To take an HTML header that HTML chunk that I got out of markdown and an HTML footer and Conglomerate it all into a single HTML page that's ready for serving If you want to write blog posts, but you don't actually have set up a blog yet. This is a great way to do it Or at least it's convenient And so like if you've got tools that that you can chain together like this like you can do some very powerful things Here's an example of a kind of pipeline. I've written in the past. I'm not going to step through every technical detail of it But what it's saying is go through a source directory recursively find out all the files with extension PDF or ODT So basically documents and print out a list of them And then we're going to turn that list into arguments for CP the copy command and copy them recursively into a destination Directory and so what this is going to do is is recursively search a source directory find all the documents in it and copy them all Into a single target directory whether for reorganization or backup or whatever purpose you need That's a very high-level concept to express in just like a single shell pipeline like this right like this is a lot of power It's really like you can do some pretty impressive things if you're handy with the shell but one limitation of the shell is that what what this what these pipelines rely on is that The output of one tool and the input of another tool are formatted the same way And in fact, there's a little bit of like almost cheating going on in this last pipeline You see here this print zero argument to find and then this XRs dash zero basically these two flags Cause finds output to be compatible with XRs as input like we're kind of having to tell them to talk to each other correctly And if you don't use these flags like bad things can happen if your PDF file Names have like spaces or new lines or other unusual characters in them so it's important to include them and so One issue I run into when I start writing shell scripts like this occasionally is is I'll have like an impedance mismatch in My pipeline like one tool will output yaml and I'll need to like do a little bit of manipulation on that or selection on it And then feed it as input to something else And this is where I start really bumping up against the limits of shell scripting right because shell scripts like like Arrays are awkward to work with and hashes are completely non-standard dictionaries as we would call them in Python And so it can be difficult to like You know here's a task where like oh if I just had this I could parse this yaml in Python It would be really easy. It would give me a dictionary I could just do my selection there with a dictionary comprehension and then feed it as the input to another thing That that can be kind of difficult to do with shell So it's like well it'd be really nice if I could take the power of these pipelines and have it in Python fortunately you can So here's how you can take a shell Pipeline and write it in Python, and I'm going to use one of the examples from the previous slide the tar extraction one So there's a sub-process module in the standard library. You can import it right now In it it you can create p open objects out of it and p open basically represents a running process and and I Encourage you to refer to the documentation because p open actually takes a lot of different arguments to control Exactly how you want to run this process one thing you can do is you can take the different file descriptors that every process has the standard input output and error and determine how they get redirected and if you Say that you want to redirect something with the pipe Constant out of the sub-process module what happens is this p open objects that you get back will have an Attribute that is a file like object that you can read or write depending on which file descriptor it is And so this is saying start the xz cat command with whatever other arguments my script was given And then give me the standard out in a file object So here's an example sit where I'm sort of like mixing my shell command in my Python data structures Right like I'm taking a list of arguments that I got from the outside world And I'm using them as arguments to xz cat now this this is this is very simple This is something we could do in shell You know we're just like passing more arguments, but this list could be instead of being argv It could be a list I got from a yaml data structure or JSON or some other more sophisticated data manipulation that I did in Python Could just as easily go there and so this is the already a good example of how I can sort of mix and match these things So once I've got this standard out file object on my xz proc p open object To to set up the pipeline all I have to do is start another process in this case tar So there's the command for tar And now again, I'm going to set one of its file descriptors, but instead of setting it to a pipe I'm just going to pass it the file objects that I already have From the previous process and so this is literally what a pipeline is right? We're taking the input of one command Right excuse me the output of one command and making it the input of the next and that's you can literally see that reflected here This is the output of the first command. It is the input of the second And this is a very efficient way to do it like when you do it this way Their Python doesn't deal with the data being passed in between your two commands at all They go directly you're not introducing any overhead or anything like that to the data processing In p open objects are context managers so we can put them in a with statement And as usual, you know once the with block finishes Python will like Wait for the process to finish clean up all your file handles stuff like that Take care of all the cleanup for you without you having to worry about it So if you wanted to do some additional interaction here like print out Progress bar or something like that you could do it inside this block But if you just want to wait for your pipeline to finish you can just say with my pipeline pass and You'll just wait for it to finish One slight tricky thing to note here note that they're in reverse order from the way the pipeline would be written So we have the last process in the pipeline first and then the first process last that's because remember context managers create a stack and so When we when the with block finishes and we unwind that stack We're gonna wait for this process first, which is what we want because it's first in the pipeline and then this one So that's why it's that part slightly counterintuitive, but it it may sense if you think through how context managers work So that's pretty straightforward right like that's a nice clean way that we can write shelf pipelines in Python So I have to make a quick aside here Someone in the audience is chomping at the bit right now and they want to tell me you don't have to pipe xzcat into tar Modern tar already knows how to decompress its input and we don't have to run a second command And yes, you are correct. Absolutely. That is true I want to work with this as an illustration because it's a relatively simple pipeline And I think a lot of people are familiar with the tools involved Odds are like you know tools that you often use in shell pipelines that you could use a technique like this for but they tend It's difficult to find a set of tools to use as an example that everybody can use as a reference point So that's why I've stuck with xzcat and tar is because those are very common tools But don't literally do this, please. You don't need to just just say tar x and you're good Okay, so when we're so when we're writing shell pipelines in a shell script when we're like chaining these things together One neat feature of shell scripts is that right at the top you can say set dash e and what this means if you're not familiar with it It checks the return code of every program that you run inside the shell script and as soon as one of them fails It stops the shell script and doesn't continue unless you specifically added some error handling to deal with that case So this is a really nice safety feature to make sure that like the shell script doesn't continue on After execution stops making sense It's actually very similar to the way that you know, we're very big on having exceptions in Python Stop the execution of your programming something unexpected happens set dash e is really similar to that too And so you might want to do this for the programs that you're invoking from Python You might want to be able to say if one of these fails like I'm not going to be able to do anything else So stop and if you ask around if you search around on the web like how can I do that? You'll find really quickly They'll tell you oh The sub process module has functions for that You can just say sub process run with the check equals true argument Or if you're using an older version of the sub process module you could it has a function called check call and what that does is it waits for the program to finish and then it checks the return code and if It wasn't successful ie if it wasn't zero The sub process module will raise an exception for you But that's kind of tricky right because wait wait and we're waiting for the process to finish But the whole point of a shell pipeline is that you've got two processes running simultaneously one providing input for the other So we can't afford to wait for a process to finish So how can we get the best of both worlds here? How can we have our p-open objects which let us? pipe processes together While still having error checking It's about a three line subclass So you will have to like add this to your own script, but all you have to do is make a very quick extension to the wait method of sub process dot p open so all p open objects have a wait method which does exactly what you Think it does it waits for the underlying process to finish and then it returns the return code of that process And so what we can do is we can override that method to say Call call the original wait method of p open objects and so it returns the return code If that's not zero raise an exception just like sub process run would And if we were successful, we'll just return the return code just like the original wait method would so we stay API compatible So that's like something that's pretty simple you can drop that into your script pretty easily and Then once you have that for for any pipeline where you want to be doing this kind of error checking Instead of saying sub process dot p open you just say checked p open and that's it That's literally the only thing that's different about this entire block of code So you might be wondering well wait, where does the error checking happen? It happens right here Remember how I mentioned that the context manager waits for the underlying sub process to finish It does that by calling the wait method so implicitly Your context manager is calling the error handling code that we added through this this method and So that way that lets you just write your error checking code once And then like very easily adapted into the rest of your script where you're already writing these pipelines So that's pretty nice so Once we've got that How does error reporting handling or how do we report the errors that we get that we catch with set dashy or with our new Wait method so in a shell script You kind of don't really have any error reporting, but it kind of works out because Normally what happens is like if a tool like tar or xz cat encounters an error It'll print an error to its standard error file descriptor the user will see that and then your self script will stop So hopefully normally the last thing they'll your user will see is The error message that came from the underlying tool and hopefully that's helpful enough that they can do something with it Unfortunately, not always true, but you know like it is a start at least So if we if we've adapted this in Python like let's say for example that so we've got our tar extraction pipeline in Python Let's say the user gives it something that isn't actually a tar file the output will typically look like this So just like a shell script on the standard error You'll get an error from tar where it's explaining that it can't actually extract this thing so far so good Then you get about eight lines of Python trace back from where we raised the exception That we caught when we did our error checking after the fact So this does tell the user what went wrong, but like this is a lot of Like the user can't really do anything with most of this information Even if they're familiar with Python, even if they're familiar with their script i.e. It's future you This is a lot of information to parse through to like understand what actually went wrong that you use the tool incorrectly That you can do something about right now to fix So is there something we can do about this to improve this error reporting? There actually is so if you've seen a lot of these trace backs Have you ever asked yourself? Where does where does this printout come from like what what prints out this trace back that tells me? Where the exception came from in my script? It's built into Python But it's also customizable What Python does is it calls of function sys.except hook from the sys module To do exactly this kind of error reporting and so when you start Python This function is the function that prints out this trace back with all of this information But if you want to customize it you can just set a different function as sys.except hook So here's an example of one custom except hook you might write for yourself So every except hook takes three arguments the exception type the exception value which will normally in modern Python be an instance of exception type and then a very specific trace back object that has the details of Everything that happened leading up to this exception And so what we can do like in the simplest case you can simply like check the exception type and see if it's a kind of exception that Normally indicates that the user made a mistake or that it's some problem with the user's input And then just generate a custom error message accordingly So what this one does is it looks at a couple different exception types if it's called process error We can just we'll grab an error message. That's like Just the exception string but without the entire trace back Because that that's useful. We can give the user that If we get a keyboard interrupt exception But usually because the user hit control C at the terminal will just say okay, you interrupted us If anything else happened Python always has access to its original exception hook its default one as sys.dunder accept hook And so in your custom accept hook you can just call that directly to sort of fall back to the normal behavior For for cases that you're not prepared to deal with in your custom accept hook And so that's what I've done here there are so there are and then if we did find something we encounter You know would just print the exception and then exit one and then actually set it as sys.exept hook There are a million things you might want to customize here. You might want to customize the error message You might want to customize the handling you might Check whether or not a debug flag is set and if it's set don't set this as the accept hook Just use Python's default one The world is your oyster do whatever makes sense for you and your users But hopefully this is a useful illustration of the technique of both overriding sys.exept hook and common things you might want to do in it like writing new error messages or Customizing the exit return code so it's not just always one in this case it is but you could set whatever you wanted So once we have that installed and we we run again with the same bad input The output from our script will look more like this We'll see the error from tar and then there will be another error from your script specifically that says okay tar returned exit 2 This this is something that You know if a user understands that they're extracting a tar archive This is an error message that they can probably do something about they're like Oh that thing I thought was a tar archive apparently isn't I need to go back and check and maybe give it a different input So that's that's something most users will find a lot more friendly And so that that's it so there's just a few simple things that you can do in your python script so that you can call Shell commands and even orchestrate them into pipelines and get a lot of the user-friendly features of shell scripts as well so you create pipelines by creating chains of p-open objects where the output of one p-open object is connected to the input of another You can extend p-open objects to do things like error checking And potentially other cleanup as well to get shell script behavior like set-e Don't drop my water bottle And you can set your own except hook so that when you get exceptions from this kind of error checking You can do more user-friendly error reporting something something that's more useful to non programmers Rather than just giving them the default python trace back That they wouldn't know what to do about So that's my talk thank you all very much if you want to grab some of this code I've got so all the code that's been on these slides. I've got like it's got nice doc strings and like oh, it's so good It's also it shows you how to do python 2 compatibility. It shows you how to do It's got a couple extra features in there. I won't spoil the surprise But go ahead and check out that code and you can just drop that right into your scripts and start using that today Hopefully and if you have any questions or I'll be around for the rest of the day And there's my contact information at the bottom. Thank you all very much Thanks. Thanks Brett here is your love