Good morning, everybody. I'm Tim Brighlin, Chair of the House Energy and Technology Committee. This is our second hearing on the morning of January 5th, and we have with us this morning Christine Hallquist from the Vermont Community Broadband Board and Will Anderson, who's representing the Vermont Communication Union District Association. And as you all know, we spent a good deal of time in the first part of this biennium working on some modest broadband legislation that manifested itself in Act 71. And one of the things that I wanted to make sure we had the opportunity to do early in this session is go back and review and get an update from Christine as the Executive Director of the Community Broadband Board and also Will to kind of bring us into the loop as some of the things that are going on in the communication district world. So really appreciate both of you making time for us today to give us that update. I apologize that we went over in our last hearing, but we're real eager to hear your update. So welcome to you both. Thank you. Yeah, thank you. Thank you. Shall I get started? Yeah. Take it away, Christine. Okay. It looks like it looks like I don't have a ability to share screen share here. I got it now. Thank you. Okay. Can you see that presentation? What do you see? We can on my screen. So I think I think we're probably good. Okay. So anyway, thanks for thanks for giving us the opportunity to give you an update and thanks for all the work you've done in Vermont. You're actually leading the nation in the work you're doing. So well done. And it's ironic that we're sitting here today being virtual again. So shows the importance of broadband. And I know you're all aware of that. So I'm going to give you a status and update and talk about what some of the issues we're facing. We're going to we're working on now a comprehensive report that we'll have ready for the legislature by the 15th. But this is kind of give you some foreshadowing of what we're going to be talking about. So the role is universal service. You know, we're every CUD is committed to universal service. By the way, the towns, they're not incorporated with the CUDs. This is a bit of a problem for them because if a town is trying to get grant funding, our board has been very clear that they have to have a universal service plan. And some of that creates some problems with wire centers. But I do believe it's a it's a very important and I know you believe it's important as well. And I know the towns can get there. Our job is to provide resources to communication districts in terms of administrative and technical support. The grants we've completed our RFP design, which will issue in mid January for construction grants. We've already issued a number of grants, which I'll get to in terms of pre construction and and preparing the designs and the plans. We're really working hard to build partnerships between the CUDs and potential partners. And I will tell you that at this point in time, all the CUDs are planning to work or work or either have contracts with partners or planning to work with partners. So the bottom line basically community owned infrastructure but operated with partners who already know how to do this business. We're looking at the $150 million in state recovery funds that have been committed so far. We're counting on the other 100 million to continue. It's very important to continue their cash flow because once you get construction stood up, you don't want to be shutting it down. And we're also working on a number of other finance sources for finance. We're going after every possible source there is for grant money and funds. So if you hear of any, send them our way. The status, we kicked it off on August 9th. We've been holding meetings every other week. We've met with, I would think at this point, all of the telecom providers and the CUDs. We're certainly staying ahead of the curve. There's only 20 states that have announced broadband plans. And as far as some of the other things we're doing, the states are envious around the communication union districts. Particularly we're working closely with Maine and they're trying to emulate our model. We've got the good news is we've got a staff now. We've been Rob and I kind of working furiously to the end of the year, but we hired a great attorney. He's Stan Maysell. He's from the security exchange commission as well as the FINRA, which I'm not sure what this stands for, but anyway. We've got a great executive assistant. One thing I'm impressed with is the state pay is lower than private industry. And I was a little skeptical when I got into this business thinking we're going to get some highly qualified folks. And the reality is we're getting really qualified folks. I'm really happy to say we've got some really good outstanding candidates for positions. So people are still committed to the mission of serving Vermonters. We're in the process of getting on a fiber optic engineer. We've got GIA support agreements in place. So from an infrastructure standpoint at the VCBB, we're in good shape starting the new year. And Rob and I are looking forward to working with all these new partners and stepping things up even more. I should also say that last slide, we're also building relationships with philanthropic institutions. We're working closely. I'm really happy the Vermont Community Foundation has been working closely with us, the Vermont VSECU, working with a group called Social Finance out of Boston. So there's a lot of interest in supporting some of the programs like workforce development, which I'll talk about in a minute. We've issued about 21 million dollars in grants. At this point, seven of the nine CUDs have been issued grants. Those grants are to build the detailed design and the construction plans. So it's an iterative process. We start with a feasibility study way back in 2020s, moved to a high level design, which gives you a high level idea of what your costs are going to be and what your mileage is going to be. And then you move into detailed design, where we are today, which is coming out of detailed design, you've got a detailed construction plan, you've got a plan, how you're going to get to every single address, you've got higher level confidence and costs. So coming out of this process, going into the 2022 construction season, we're going to have our plans laid out and how to get every address connected in Vermont. Keyish, we have developed outside standards. You know, this gets to the issue. I know in Act 71 talked about the possibility of doing a statewide fiber design. A statewide fiber design would have set us back quite a bit, because the CUDs are already there. They had their design partners picked. And if you look at, you know, people just don't do statewide designs. You know, if you look at the electrical network, for example, you don't have a utility come in and do a statewide electrical network.  Same thing is true in the telecom industry. There's a set of agreed upon standards nationwide. We've implemented those standards at the statewide. We're going to be reviewing those design plans to ensure they comply with the standards. We're going to be reviewing the test results, making sure that these networks are tested to those national standards. And the good thing about fiber is it doesn't have the, you know, your experiences today with cable, your experience with DSL, that's unreliable because of the physics. Fiber is just like a power line. It's a welded connection. So once you've got it, it's solid. Key issue we're facing is rising costs, significant rising costs. You know, we're all recognized that inflation is hitting us hard, but it's hitting the telecommunication industry particularly hard because there's so much money being pumped into the U.S. economy for building telecom infrastructure. We're all competing for the same supply. And, you know, the fact that the ARPA funds have domestic content requirements means we're all competing for the same suppliers. So the law of supply and demand applies here. So the key issues, supply chain and workforce issues, I'll get into what we're doing about that in a minute. We've addressed both of those issues and, you know, I'm pretty proud of the work everybody's doing in that across the state. Another key issue is having enough funding to ensure the networks are built at an affordable rate for all Vermonters. You know, so you could get, you could build a network and you could get everybody connected, but if it costs $150 a month to access the network, you know, that's not doing anybody any good. So affordability has got to be a key part of our discussion. So our basic model, we're starting with grant funding and donations to provide the initial funding to get the initial capital built. CUDs build and own the infrastructure. Operator provides a service. When we say CUDs build the infrastructure, we're not going to physically build the infrastructure. They're going to be using construction partners to do that, those that already have the experience in the industry to do this. Then, you know, once you've got three years of operating model built into place, we access the revenue bond market as well as other finance like cooperative banks and build out further and continue that build out, continue to increase the revenue, which funds further build out and continue the cycle. Eventually, once the entire network is built, then those, as you pay off that debt, you can drive down your cost of your monthly cost for consumers. But the key point is borrowing, you know, if you have to borrow money, it's going to drive the cost up because you have debt service coverage. If you, the more grants we can apply, the reduced cost of entry we have for monters. Because just like your home mortgage, if you buy a $100,000 home, you've got a mortgage of X, if you buy a $200,000 home, it's two of X. So, at this will, Will's going to take this, talk about the status of the communication unit districts. Take it away, Will. Thank you, Christine. Great presentation. I think I'm going to have to echo many of your points that you just made. And thank you, representatives for having me here today to represent the CUDs, which I do full time as the staff representative for the CUD Association. Over the course of 2021, we made some really tremendous progress and have set ourselves up to begin construction statewide in 2022, and essentially become an unprecedented rural community broadband movement. Nothing like this has happened in a rural area statewide in history. So, pretty remarkable project. I'll go through briefly some of the CUDs and their progress, you know, relative to their geographic location in the state. EC fiber in the upper valley, of course, was the first CUD. They do have thousands of customers. They have a functional business. However, because they built their network prior to the influx of state funding, as Christine mentioned, that's going to place them in quite a bit of debt, which they are still in. So, in order for their service to become even more affordable, we need to find a way to help them pay that debt down. But they're doing a great job. They were awarded a preconstruction grant from the VCBB because they are intending on extending their network even further into the northern towns that border Orange and Caledonia counties. Another CUD, there are now two CUDs that are online because NEC broadband is officially online with their Concord project. NEC broadband, of course, located in the northeast kingdom, is the largest and most rural CUD. It's a tremendous project to build fiber internet across the northeast kingdom. It's going to be a very, very expensive project, but they have some top-notch staff working for them. They are really leading the way in terms of some innovative ideas to address these problems. So, a lot of credit is due to them. They have a lot of work ahead of them, but they're already online, and we expect really big things in the northeast kingdom this year. There's three other CUDs that kind of follow a similar path, Maple Broadband and Addison County, Central Vermont CV fiber in Washington County, and in the southeast corner of the state's DV fiber, Deerfield Valley. These three CUDs are all planning on starting construction this spring, most likely April or May in each case. Through the association, which I represent, they were each able to secure 300 miles of fiber optic cable, which will be delivered around the same time that they plan on starting construction. We see this as a critical move for being able to stay on track throughout 2022, and they each now all have staff members and very strong volunteer boards driving them. So, we expect those three CUDs to make a lot of construction in 2022, and really accomplish a lot over the next two years. There's two newer CUDs in the northwest corner of the state, Northwest Fiber and Lemoyle. Northwest, of course, in Franklin and Grand Isle counties is actually now also expanding into Northern Chittenden County. Both of these CUDs are still finalizing their partnerships for design and construction. However, they've also both hired an executive director. They're moving extremely quickly. They have also purchased about 150 miles of fiber each, and they plan to start construction most likely in the summer. However, at the rate that they're going, it could be even sooner than that. So, we expect some construction at least in 2022 from both of those CUDs. Lastly, in the southern part of the state, Otter Creek in Rutland County and southern Vermont CUD in Bennington County, these CUDs are still working out their partnerships. They definitely have a viable CUD ready to be built out, but they have yet to hire staff. They're working closely with the regional planning commissions. We're working closely with them from the Association and the VCBB to try to help them really get on pace with the other CUDs as well, and those are the only two CUDs that haven't received their pre-construction grants yet. It is worth noting that one of those CUDs is awaiting the results on a major federal grant this month. If that grant is awarded, then things will really get into top gear for them. So, despite this really tremendous progress and staging for 2022, as Christine mentioned, we are facing a number of challenges. The first that I'd like to highlight is workforce. We are doing quite a bit of research right now to figure out exactly what kind of workforce supply we have, what kind of workforce demand we have, but we expect a deficit. And, of course, the VCBB and myself, to an extent, are working with the Department of Labor to establish a program to improve that workforce, and we may be exploring other solutions as well. I expect you'll be hearing quite a bit about how we're going to solve this workforce issue, because with all these CUDs wanting to do construction, there's going to need to be quite a few technicians doing the work. As for the problem of materials, we've been proactive about this. We work with the VCBB and a number of funding partners, community foundation, VSECU, in order to secure 2,000 miles of fiber optic cable across the state. It's a great start, but prices for everything are picking up because of supply chain issues. We're going to need to continue to work proactively in order to secure all the hardware that we need. And then especially the funding issue. Because of these increasing costs, even with the funding that is presently coming down from the VCBB for construction, we're going to be facing large deficits. And as Christine mentioned, the key to us for affordable service is being able to provide universal service as cheaply as possible via grants. Where we take on debts, that's where we have to charge a higher amount for rates to customers. And that's the last thing we want to do. So I'm doing everything I can to get the CUDs connected to as much grant funding as possible and really hope that the legislature will support that goal as well. Just one final thing legislatively. Representative Briglin is aware of this issue. In Act 71, there's a provision that states that in the unlikely event of CUD failure, all assets will revert to the state. While it's completely understandable why the security measure is in place, it is causing a conflict regarding third-party private investment in CUDs. As of course they want to have, those investors want to have that kind of security as well. So we've had some conversations about this. The VCBB council is working on this issue. I have some ideas on this issue from my time at the USDA where there are some similar problems, but I expect this is something that could be facing the legislature as well. So as Christine mentioned, we are working as much as we can to get connected with other funding partners. I do have a meeting with some of those potential funders at 11.30 and we'll have to go, but I hope I'll have the opportunity to take some questions. We have over 400 volunteers working on this project around the states. They're extremely dedicated. There's now full-time staff on board as well. And I just think it's a really remarkable project and I hope that we'll have your continued support. So with that, I'll hand it back to Christine and thank you very much for giving me the opportunity to represent our communication unit districts. Yeah, thank you. And I will add something to the pre-purchase material. You know, if you look at that pre-purchase material, it was close to a $7 million purchase, but because we were able to pre-purchase it, we were able to purchase it at $2,021 prices and we saved $2 million. So you look at $2 million on a $7 million expense, that was pretty impressive. So kudos to everybody who worked on that. Thank you, Will. So the issue for the VCBB has been jumping on a moving train. And I will say that, again, I was a little bit skeptical coming into the job. In fact, I was a supporter early on of making the VCBB a separate organization entirely, but putting it under the DPS was a really smart move. I think that that's really been helpful. I will tell you June, turning in the public service department have been very supportive. And I think that's helped us a lot. I think it's saved us significant time in terms of months, at least maybe even half a year. So that was a great move. But because this board had to jump on, normally what I would do with a board, we'd start with board policies and established all those guidelines. We didn't have time to do that. Really had to get that normal board development would have probably impacted the construction season. So we went right into work mode. And I will say being a professional board and the people to sign has made it work. Because I'm not sure if you had any other way would have worked. But it's been a good board. They've been on it, very deliberative, focused on the issues. But limited time for training. We started up a year after the CUDs were established, clearly understaffed. Vermonters are impatient, naturally so. And everybody's competing for the resources. I've been working closely with broadband leaders across the country. The issues we're facing here in terms of resources, everybody is facing. I consider us very lucky to be getting the high quality candidates that we're getting for the jobs we're getting here. Because that's not happening in other states. There's competing interests with the telecom providers and all that. We're working through all that. Defining a universal service plan for the towns is difficult. I'm encouraging every single town to join a CUD. In fact, I don't understand why a town would not join a CUD. Because the CUDB has the universal plan. We'll develop the plan. I can't see how the towns are going to be able to do that on their own. Affordability is a top priority. As Will talked about, state being in first position. We're going to have some recommended language for that to resolve that. As far as Act 71 goes, that's the only thing we're going to address in Act 71. Overall, Act 71 is very workable. It's a good piece of legislation. We're not looking for major changes. Just change to that one line. Key challenges. You've heard it. Access to capital, access to materials, access to labor, rising costs. We're competing with the rest of the nation for these things. So the challenge you heard, CUDs are under capitalized. The construction grant program is opening this month, but we're going to need more money. And I know there's more coming. But that's the good news. We've got generous amounts that are committed from the federal government. We're certainly working with private and philanthropic organizations. We're asking the towns to do matching grants. So we set aside $16 million for a matching grant program. So if a CUD can come up with a matching grant for the town, we'll provide the dollar per dollar match to encourage those towns to invest. And I talked about continuous funding necessary. We can't interrupt the funding. Once you gear up for construction and you get moving, you can't stop. It's very expensive delays. And if you lose that labor, you aren't getting it back in this market. The good news for Vermont is we're ahead of the curve. So we can land those contracts early, but we've got to stay ahead of the curves. We're seeing up to a year lead time for fiber optic cable. As you've heard, we've addressed that with some pre-purchasing. We're going to next, there's, even down to certain specific bolts that are required, some of those bolts have one year lead time. So we're carefully looking at the bill of materials to identify what materials we need to pre-purchase next. The good news is we've connected with large established providers that have, what has happened is the large providers have actually reserved manufacturing lead time and space in manufacturing floors. We've partnered up with one of those major partners in order to take advantage of that. We're actually scheduling the factories for the materials that we need to be delivered over a certain time period. So it's not like we're going to get 2,000 miles of fiber at once. We're going to get it at a pace that matches our construction. As I talked before, the VSCU and Vermont Community Foundation have a great, Vermont Community Foundation continues to work with us closely to solve the labor issues as well. I've talked about the two million dollar savings. So let's talk about the labor issue. This is a harder issue than the material issue because you've got to skill up folks. And of course, the labor market's tight for all industry right now. And of course, you know, you were just talking about the nursing shortage yesterday. So we're looking at 200 additional fiber technicians. And when we went, even before COVID hit, it was hard to get fiber technicians. And they require 144 hours of classroom training, 2,000 hours apprenticeship, that's basically one year apprenticeship. So that means every fiber tech has to work with an existing fiber tech in order to get through their apprenticeship. It's putting labor on the electric utilities to prepare the poles and make ready that that if if I'm happy to say that the electric utilities have really been good in terms of creating capacity to do the make ready, I, we believe we have the capacity to do the make ready, but we don't have any contingency there. So, you know, again, we get we we're going to build this network in five years. Once we get started, we got to keep going. We can't interrupt it because in particular, the make ready is very difficult because although you can get you can get a fiber technician through in one year of apprenticeship, it's four years of apprenticeship for an electric utility line worker. So again, going into this, I was didn't really think we would be able to have these make ready issues addressed. But certainly the utilities have been very cooperative. And we've been working very closely together to solve that issue. I'm not that's not an issue right now. It's a challenge, but it's not an issue. So what we're talking about in terms of we've worked with an organization called Social Finance out of Boston that has it's a philanthropic organization. They have a very great model. And we're working with the Agency of Commerce and Community Development, Department of Labor, as well as now we're partnering with we're starting to partner with other states on this. It's a great model for how to train folks.  So even if we, you know, can bring people out of prison into these jobs, these outside jobs are a great place to start. And ultimately that will lead to a career path in IT, a career path in the electric utility industries, great starting place for people to move to. That's, and I've really oversimplified it because the issue is if you're in a low income job, you're probably working two or three jobs, and you're trying to provide for your family, and you're dealing with childcare issues and all those other things, thinking about changing your career is a challenge. That's why this pay it forward model is very powerful. The idea being, it's, you know, we'll put you in a training program, we'll pay you while you're in that program so you don't lose income, we'll provide those wraparound services such as childcare in the case of, in the case of fiber technicians, for example, it, you have to have after hours of childcare. So all these issues, we're working with the Department of Labor and agency commerce community developed. But the idea of pay it forward is, it costs so much to put people through that program. We work with their employer as based on the fact that they move to a higher paying job. These jobs are starting at about $30 an hour. So if you're going from a $15 an hour job to a $30 an hour job, over a five year period, you pay that cost of that training back. And that will train future folks. So a training dollar goes two to three times as far as it does by just traditionally funding a training program. So we're working with this program. It's a larger program that social finance, you know, felt like Vermont may not have been enough. So we've now got Virginia on board, we're working with Maine to bring them on board. But it, in my view, that's an excellent program and it's an excellent model for how to, how to train people. So the short term needs, we put out a survey. Will was key to doing that. He's wrapping up the data work with the Department of Labor. The legislature actually you know, asked the Department of Labor to do this survey and we jumped on board and kind of accelerated it in order to meet our needs. We also have some other things, other things in place in order to address the short term labor needs that were working. If you look at the rising costs, you know, if you look at telecom plan, the telecom plan talked about 362 million and 439 million is the cost of building this network. Well, you know, we're seeing significant increases. So if you look at a 20% increase, it goes to 435 to 527. If you look at these increases, these costs increases are increasing our need for grant money. Right now, NEK has the freshest numbers because they just completed a project. We also, Northwest Fiber, Northwest Fiber Works, which is the CUD in the Northwest, has also got similar numbers in. We're looking at about 55k per mile right now, including the drops. If you look at the estimate from two years ago, that didn't include the drops. It's about 10k per mile for drops. So, you know, the numbers I personally was using, you know, FX and I compared numbers way back in August of 2020. We were looking at about 35k per mile plus 10k for drops. Now we're looking at 45 plus 10. So the numbers are going up, and that works out to about 594 million statewide. One of the things we did is that we took the numbers, the Public Service Department gave us the numbers for what it would take for miles based on their October data. They just completed the end of October. So we estimate that it's going to take about 10,200 miles of fiber to accomplish the goals that we've got set here. So it's pretty straightforward math, right? 10,200 miles, what you cost per mile, that's going to be your total cost. Don't worry, I'm getting to wrap up here. For questions. So anyway, this is just a quote that you've got. You know, this really sums it up. We're facing a crisis. We've got competition all over the country for these resources. The amount of money that's been invested in broadband, it's great. You know, it's a double-edged sword, right? We haven't been able to get broadband to our rural residents because we haven't had the money. Now we've got the money, but everybody's got the money. So it's creating that competition that we... So that, again, emphasizes the importance for Vermont to stay ahead of the curve. I think we covered this. You understand that borrowing means higher prices, grants lower prices. So open it up to questions. Great. I'm looking for hands. And I've got a couple of questions, Christine, but I'm going to first go to Representative Bian Tachka. Go ahead, Mike. Okay. Thanks. Great presentation. I really appreciate it. One of the provisions we had in there was to allow towns that aren't part of a CUD to work with small ISPs that meet the eligible provider criteria to build out broadband in non-CUD towns. Using, I guess, the same universal service criteria that CUDs have. You mentioned that you didn't understand why towns would not join a CUD. And if a town has a good experience with an eligible provider like Waysfield or Shapley Valley Telecom, and Charlotte has that type of service from them, what are the obstacles or what are the challenges that you see that would not allow such or that would discourage, I guess, such a relationship? Yeah. So let me use Bolton as an example, because Bolton is a particular thorny and difficult issue, but it's probably one of the most difficult. But what happens is Bolton is served by two wire centers. Common through Vermont is you'll have... So by definition, we're following the poles and wires of the electric utility, the existing poles and wires. So because of the demographics of Bolton, they have a mountainous barrier where the poles don't run over the mountain. So they've got about, you know, I think 20-something town people that are on another wire center that comes from Waterbury, but there's a requirement for the town to have a universal service plan. So they've got to address... So Waysfield, Shapley Telecom is working with Bolton, and they've got this plan for all but these 22. So we're saying, look, you got to have a universal service plan. That's the whole goal here. So now they've got to work with another provider who's serving that area. Now that was a little complicated because Waterbury wasn't part of a CUD, but Waterbury joined the CUD, which now the CUD, they joined the Lemoyle Fibernet. Now Lemoyle Fibernet is going to be able to commit to a universal service plan, which now Waysfield, Champlain Valley Telecom could come in with Bolton and say, we've got those 22 people covered. They're going to be built ex-date by Lemoyle Fibernet. But if you don't have, if you have a, if your town, for your town of Charlotte, it's all covered by one wire center, you're probably okay. But there are a few towns that have that advantage.  Comcast is not doing fiber, so they can't meet the 100 by 100 requirement, you know, that Burlington Telecom might be able to reach some of them as well. So that's the kind of things we're working with. The CUD has the resources to do that. Towns don't necessarily have that resource. So for a town that has a wire center, you're probably okay. But if you don't, it's a challenge. So in cases like that, it almost argues that we should be figuring out a way to provide resources for these separate wire centers to collaborate to cover a town with universal service. Yeah, yes. But let me also tell you another thing to set you up for that we want to be very careful about. Hey, let me, I'm not going to use any telecom provider names. But let's take Bolton, for example. And let's say Telecom provider X had those 22 customers. Telecom provider X said, I'm going to, I'm going to inhibit competition here. I'm not going to provide a universal service plan. Now Bolton can, now Waitsville Jam Plain Valley Telecom can't build because they're held up by this private provider. So in the worst case scenario, we've got a situation here where a private telecom provider could, you know, could work the effort. So that's, that's an issue we're paying very close attention to. It's a potential to sabotage these. As far as, I'm going to say, do you have any recommendations as to how we would settle these, these types of differences and lack of cooperation between providers that cover one town, different providers? Yeah, join the CUD. The CUD is going to solve that problem for you. That's why I question why the towns wouldn't join the CUD. Join the CUD, they'll solve it for you. That's the resources there for. Otherwise, the town has to do it on their own. Okay. All right. Thank you. I'm sorry. Okay. I just want to say Lucy Rogers did a correction. Lamoille Fiber hasn't yet approved Waterbury joining. So I don't want to make that. So thank you. Would you mind stopping your screen share, Christine, just so we can kind of see each other? Yeah, sorry about that. You know, one of the, I think this is the point you were, you were making with Representative Yantashka at the end there, but I just want to confirm this tonight. If I did hear this, it's an important point, I think, which is the, the, the, the issue that Representative Yantashka is talking about, which I'm well aware of and is a, is a challenge in Charlotte, but it's not unique to Charlotte. There are many other towns in the state that are dealing with this that CUDs are, you know, supporting kind of the, kind of straightening out that challenge, if you will. So it's a big issue, but it's not unique to Charlotte. And CUDs are dealing with this across the state. Yeah, that's what, that's my point. My point is the CUDs have the experience. So I've, I've gone, you know, for example, I personally went up to Milton and encouraged them to join the CUD and they did because it, you know, it's an evolving thing. You know, the CUDs a year ago, I mean, we've got 202 towns that are members of CUDs right now. So I can understand a year ago there was probably a level of skepticism is this thing real, you know, are they, are we going to really deliver? But I think now that we've got the momentum, I, I think it's probably going to be easier for the towns to rationalize joining. So Christina, a question that I have, and it's multifaceted, but I'm going to try and simplify it. And it's just related to financing and the, the, the financing resources that are out there. Obviously the state of Vermont in channeling a portion of its ARPA dollars has stepped up in a significant way to support build outs with $250 million dedicated to this effort. As you've laid out in the presentation, it's going to take more money than that. Can you give me a sense? And I know there are, there are multiple streams, but what the potential resources are out there to support CUDs, you know, whether it's through USDA, whether it's through other federal programs that CUDs are pursuing right now outside of our ARPA funds, you know, outside of, I guess, the Vermont Community Broadband Board. But, you know, to what extent is CUDs access to those other federal programs kind of be a meaningful part of kind of the financing puzzle here, if you will. Well, you know, we were hopeful about the USDA ReConnect program, but unfortunately the USDA ReConnect program requires, requires comparative audits. So since these CUDs are new, they don't have audits, they don't have comparative audits. So the only, the only CUD that's going after the, the NTI, NTI grants, the ReConnect grants is NEC Broadband. And it's questionable. I think we're getting a little more confidence that they, that their grant, their audits will do it, but they're the only one that really have the comparative audits to do that. So there's, you know, there's, there's other pots of money. We're going for every little pot of money we can find, but there's just not anything like ARPA, of course. And then there's, what's coming is the Broadband Equity Access and Deployment Program, the VITA program, which right now there's a hundred million dollars minimum committed to each state. And there, then they're going to overlaid that with a dollar amount per underserved address. And when, and the new VITA program is defining served as a 100 over 20, not 25 over three. So that'll open up a lot more unserved addresses for us. So we're hopeful that we can access a significant amount of funding through the, the VITA program. So if you look at the 150 million we have committed that we already have in place another hundred million coming this year, we should be able to access the VITA program and keep the flow going.  Yeah. And in terms of, you know, one of the things that you'd mentioned with regard to EC fiber in some ways they're ahead of the curve in terms of they've been doing this work for several years now. They're also pursuing financing debt financing in, in the public markets and recently did another, another financing, you know, a concern you raise there is it's expensive. And it adds to the cost ultimately for consumers who subscribe to, subscribe to the service. You know, one of the things that I had hoped for and still hope for is that, you know, call it the 250 million dollars that is kind of the foundational support for this work will allow CUDs to get airborne, get subscribers, generate, you know, kind of that early cash flow that allows them to access financing in the public markets. Again, you and Will had raised, you know, some, some legislative action we might take to, you know, to really support that work. But it's not clear to me how much that really adds to the, you know, the, the cost for a consumer ultimately financing costs are extraordinarily low right now. And I'm not sure what those rates would look like for a CUD that went out to do a, you know, 10 or 15 million dollar financing to do the next two or three town build out. But, you know, I think as we wrote this legislation last year and look forward to what the opportunity was, you know, that public market access is absolutely critical to, you know, to finishing this job. I don't anticipate that ultimately Vermont is going to push five or 600 million dollars to do all this work, you know, through grants. So that public market financing is really going to be an important tool to have here. Yeah. So, so that, you know, if you look at EC Fibre, there's two things about EC Fibre. First of all, they've been around a long time. So they have a good credit track record. Secondly, they're, you know, if you talk to EC Fibre, they've got 65 million, number on, I shouldn't say the number, but they've got a significant amount of debt. Their average revenue per paying customer is high. So that's, you know, if we're talking about affordability, you know, and you look at all the requirements we have, we recognize it's important that every person, every single individual has access.  So we certainly, you know, our target really needs to be get down below $70 for 100 by 100 for sure. And, you know, closer to 50 is even better. So that's one thing. One thing is, again, I'll go back to that, the fact that it's going to overlay cost the more we borrow. The other second piece of that is, of course, we're not going to go through the entire 600 million. But we're probably going to need 60% of that, you know, because the reality is, if you don't have a credit record, then you've got to, your collateral has to be your network.  But no major banks going to borrow any more than 40% on your equity.  So clearly 250 million is not going to do it. But with the money coming from the broadband equity access and deployment bill, you know, that probably rounds it out to where you've got a business case. But you've got to have enough money in your assets constructed and built assets in order to borrow that money. It's just like a home, right? If, you know, if you've got a poor credit record on your home, you have to have put in more equity on your home. Now, in the business world, you'd see even, I wouldn't even want you to think about your home because your home, you know, maybe you could, maybe you have to provide 20% equity, but in the business world, you're going to have to provide 60% equity. Yep. Yep. I guess the difference I'd point out is my home is not a, is not a revenue generating asset, whereas a broadband system is a revenue generating asset. But, you know, again, that's for the, that's for the lenders to work out down the road. Well, it's all, it's also only a revenue, it's, it's not a revenue generating asset without grant funding, right? There's a, my home?  So there's a, there's a sweet spot between take rate. You know, how many people are going to access in the cost? Your costs go through a high, you're not going to get the take rate, you're not going to get the revenue. So that's the balance we're trying to work here. Yep. Understood. Thank you. Representative Sims, go ahead, Catherine. Yeah, thanks. I don't have so much of a question, but really just a comment. Just want to thank you, Christine, and the whole team for all this work and Vakuta. As you said, really jumping on a train here midway, and it's, you know, remarkable to see the progress that's happened in a short amount of time. And particularly really appreciate the collaboration that I'm hearing about the effort to, you know, get ahead of the fiber buying train and the ability to save $2 million as a result of that collaboration is really impressive. And, you know, appreciate the focus on, you know, this is just started. We need to keep our pedal, you know, to gas on the pedal or whatever the right metaphor is here to keep the dollars flowing so that we can continue to build, reach all Vermonters and continue to stay focused on affordability. So thank you for this incredible work. Excited to follow along and continue to find ways to ensure that every Vermonter has access to high speed broadband. Those who are part of CUDs and those who aren't, aren't pounds aren't there yet. So thank you. Yep, you're welcome. Thank you. So Christine, I don't see any other hands up, but what I will say is, you know, we'll certainly look forward to working with you and the other VCBB folks and the CUDs in terms of, you know, better understanding what some of the tweaking is that we have to, you know, address facilitating public financing and, you know, some of the, as I said, some of the tweaks we might have to make to Act 71. So we will stand by and look for some of your recommendations on that.  Go ahead. Yeah, if I could go back to the Bolton situation. If you've got a town that's, that is separate, that has some of its residents are separated by a geographical boundary like, like a mountain. How is the CUD going to do anything better about that situation than, you know, what a, what did you call a wire provider working with another entity? How would that situation change? Well, first of all, the CUDs, you know, they, they have the resources to address these issues. It's not saying a town couldn't address these issues, but, you know, they also have the purse strings, the grant purse strings. So if, if Wakefield, Champlain Valley tried to solve this problem though, the provider, well, you know, they're working with a competitor, likely. The nice thing about a CUD is you can say, look, you know, we can provide you additional funding if you extend your network to reach these 22 addresses. Town can't do that. That's, that's where the CUD plays, plays the role of that public, that public interest of providing all the towns, of providing access to all the addresses. The private provider is not going to be able to do that. But the town can do it. So Bolton, so Bolton were to join a CUD and that CUD said, well, you know, we want to provide universal service to Bolton, but we got this problem where if we come in from one side, you know, we're taking care of these 22 addresses and we don't really have the resources to go to the other side of town, you know, to do it would be extremely expensive. So it almost, it almost requires two different entities to work together unless there's some other way around it. I don't know. Yeah, it requires the two CUDs to work together, but we're already positioned to do that. So think about those 22 addresses. Would a town have to join multiple CUDs then? Well, no, no, I'm saying that as Lucy pointed out that LaMoyle has an approved water barrier, but let's assume that LaMoyle approves of water barrier just for this example.  Now CV and LaMoyle are going to work together because they're already got a relationship and it may be that these 22 customers aren't going to get service till 2028, or I'm going to extreme here, but it doesn't matter. As long as we've got a commitment to get it done and we're tracking that commitment and making sure it gets done is the key here. Vermont, we want to make sure every address gets connected, and the CUDs are the way to do that. And the VCBB, you're holding our feet to the fire, the VCBB to make sure we do that. All right, thanks. You're muted, Tim. I'm sorry, I was calling on you, Lucy, I beg your pardon. Thanks. I was just going to add to, in kind of in response to Representative Yampochka, the example of a town where this is currently happening would be Wolcott, which has dual membership between LaMoyle CUD and Northeast Kingdom CUD. And in this town, there's ongoing work between the two CUDs to come to an agreement of you take these addresses, we take these addresses so it's kind of formalized and there won't end up being a situation where some addresses are left out unclaimed by both CUDs. Yeah, thank you, Lucy. I'm actually sitting in Wolcott right now, so I'm on the any case side. Christine, thank you for your time this morning and thank you to Will as well in Obstentia, but I want a second Representative Sims gratitude to thank you and all the VCBB folks for the extraordinary work that you've done, not only in terms of volume and in terms of quality, but also in terms of speed. This has gotten moving really quickly. And this, you know, I would say this is one of the one of the primary concerns that we wrestled with last year and how to draft this legislation, which is, you know, we don't want to lose time.  And I think some of that was addressed in structuring, but clearly some of it was addressed in the quality of the people that the governor has appointed and, you know, and the other folks who appointed members of the board. So again, I want to want a second Representative Sims gratitude for the work that you've done. So thanks for being here. Yeah, thank you. It's a great example of a collective effort, which we should all take pride of being here in Vermont that we could we could do these things though. Yep. So I just wanted to give members a heads up before we adjourn for the morning that we are going to reconvene at 315 this afternoon after the governor's state of state address. I don't anticipate that the governor's address will go beyond three o'clock. So let's assume that we will meet right at 315 sharp. If for some reason his address and that whole process does go beyond three o'clock, let's commit to meeting and starting our afternoon hearing at 15 minutes after the adjournment of the General Assembly this afternoon. But as I said, I'm presuming that that's not going to go that long. So look forward to seeing you at 315 this afternoon. And Rowan, you can you can take us offline now.


Welcome back to 353. Thanks for joining me today. Sorry about the lecture scare yesterday or before. That was one of the weirdest experiences of my life.  So apparently that's something that can just happen to you after you are 25 and older. So you have that to look forward to in your life. But yeah, that was not good. So other piece of news. So if you can, in the Discord, there's that Sylvite channel. If you want to check out that tool, it was made by someone who has taken this course, one of your fellow students. So if you could check that out, that would be nice. It's there to hopefully help you get some feedback and he is eager to improve that tool should help you kind of manage your time. So this lecture is when things start getting interesting because after this lecture, we get to figure out how to create processes. And then we have multiple things happening at once. So your world is going to change from this point onwards. So recall that a process, we should know kind of what a process is right now. It is the instance of a running process or running program. So we argue that there are some things that have to be in the process. So it has to have its own set of virtual registers because it should be independent of any other process running. It shouldn't just change registers randomly. Otherwise no program would ever work in the history of ever. They also, we argued, would have virtual memory. So they have their own independent view of memory. They can even use the same address, but the operating system has some magic where each process will actually access different physical memory and they'll be completely independent. Even if they access the exact same address and in virtual memory, that's where your stack and your heap live. So we can add something else to the process. So we can add the open file descriptors. We kind of talked about them yesterday being the standard file descriptors that every process by convention has open. So zero is standard in, one is standard out, two is standard error, you'll get used to those numbers. So that is also tracked within a process. So we call whatever file descriptors it has open by default. You probably have three open by convention and they're all the standard file descriptors. So what we use to keep track of a process in software in the kernel is something called a process control block or PCB. And since we're in software, not hardware, it's not printed circuit board. It is a process control block in this course. Specifically in Linux, there is a struct called a task struct that you can browse on GitHub. That is the process control block for Linux. Some things it contains, so that this will be common across any kernel. It would contain the process state, like the CPU register. So if it has to switch it back and forth, it has to save what the registers currently are somewhere and it would do that in the process control block. It would have some information about scheduling, whether or not to run this process, maybe how long it's been running for, things like that, memory management. So keeping track of virtual memory, what memory it has access to, what memory we should not let it have access to, IO status information, so that would be any input output, likely the file descriptors it has open and anything else associated with input or output and any other type of accounting information or other things it needs. Great thing about open source is you can just go to GitHub, you can see everything that is in it. It is really massive, there is a lot of information in it. One of the other types of accounting information that we actually really care about is each process gets a unique process ID to keep track of it. That process ID will never change as long as that process exists and it will be guaranteed to be unique. So this is the process state diagram and it describes the lifetime of a process. So our first goal here is to, there's some mechanism that we'll explore today to actually create a process and the kernel might have to do something to set it up, maybe set up its virtual memory, maybe mess with its registers, something like that and then as soon as it is able to run, so after it has been set up, it would transition to this waiting state. You could rename waiting to ready if you want so it is not actually executing on a CPU yet but if the kernel decided to actually run it, it could. So if the kernel actually decides to run it which is the job of the scheduler that we will see next week, not this week so we can just assume the kernel just makes random decisions. It would take that process and then actually run it on a CPU core and then we would actually see some results from it. So it would run, run, run over and over again until eventually your kernel decides that, hey, you've had enough time running, it's time to give someone else a turn in which case it might transition back to this waiting state or ready state where it's not actually running but we could run it again if we wanted to. Other states that we can go from the running state in order to actually get rid of a process and end it, we could take this transition to the terminated state and we saw previously what the actual system call is that does that, anyone remember the name of the system call that ends a process? Yep. Yeah, exit group or exit either are fine so that is the only way to terminate a process so we actually know how to actually go from running to terminated. The next weird one in this diagram is sometimes you'll be running, you'll do a system call and well, sometimes it's really, really slow so if I'm, say, trying to write to a physical file, writing to our SSD is much, much slower than just writing something to memory so while it's doing a system call the process might go into a state called blocked, it is just another way of saying it's waiting for something but in this case blocked means it's waiting for some IO to happen or it's just waiting for something to complete and we can't actually execute it even if we wanted to. So blocked, this basically just means this process cannot run anymore, it's waiting for something to happen and then eventually whenever the kernel completes whatever operation it asked for then the process will go back into this waiting state where we can actually run it again and then whenever the kernel decides it could go into this running state so any questions about this state diagram? So this is the entire lifetime of a process. All right, we're good and ready to get into some fun. So this is kind of a primer for lab one which I'll release either after the lab session on Thursday or Friday so you'll have a week to do so lab will be short. You probably use like, has everyone used like the task manager or activity monitor to see everything running on your machine before? Yeah, everyone's done that so that's basically what you're going to write for lab one. So what you're going to write is going to be specific to the Linux kernel because each kernel has a different way of doing things. In Linux you can read the state of a process using a proc file system so everything in there will look like a file but it's just a way for the kernel to present information to you where it doesn't have to come up with a billion different system calls. Remember we only have a few hundred system calls for absolutely everything. So it just creates some fake files that you can access and you can just use the standard tools on them and they will work just fine. So in the proc directory that is all of the kernel state you can ask a whole bunch of interesting questions by just going there and figure out things. So one of the files actually will tell you what CPU is running, it's running on so if you wanna see what you're connected to remotely is running you can actually use this file system. So one of the things in this proc directory is just a bunch of directories that look like numbers. For every number that's there that represents a process ID and inside that folder or directory will tell you a whole bunch of information on that process. In there there is a file called status that contains the state of the process and it's name and everything and that's what we use for lab one to actually display what's going on. So, oh yep. So by the files aren't real, what I mean by that is that they don't actually exist on the hard disk or SSD or anything. So that's why they're not real. They don't actually take space on the hard drive, they take zero bytes and here we can just look at one real quick. So for instance, if you look at the proc directory they kind of look like files but their size, except for that one, if we scroll up this is their size, it's all zero bytes. But since the kernel controls everything you can read and write these files and the kernel will generate the information for you on demand. So like for example, you can do this on any system you can look at this file called proc CPU info and it will tell you what CPU you're actually running on. So here it doesn't have a good name but tells me all sorts of information about the CPU if this was a more standard system it would say like it's an Intel whatever or an AMD whatever. But you'll learn more about this as we go through the course not terribly important at the moment. So process creation. So we could create processes from scratch that would probably make sense to you that I have a system call where I just in one step I create a process and I start running a program that I tell it to run. That might make sense to you and that is what Windows does. So you tell it what program to run sets up the process control block for you loads that program into memory puts aside any other information it needs like it's global variables or whatever sets it all up so it's ready to run and then it runs whenever it decides to but Unix, so Mac OS and Linux actually you can't do that it actually decomposes it into two steps and gives us a bit more of a flexible abstraction although initially it will be a bit weird but trust me it is actually quite useful. So instead of actually creating a process we could clone it. So that is what Unix does. So how it works is it pauses the current running process so it goes into that waiting state where it can't run anymore and then we copy its entire PCB into a new one and now that new process is an exact copy of the old one and including variables including virtual memory locations and everything like that and then the job of the kernel is to make them independent after that point and because programmers need to distinguish which one is which so if you have two that are exactly the same you probably wanna know which was the original and which was the clone so to distinguish between them Unix always keeps a parent-child relationship between them so whoever created it is the parent and then whoever is the newly created process is the child and this is where the start of the weird Google searches begins. So they could execute different parts of the program together but there are two independent processes so it might look like we're in two different if statements or something like that but your world hasn't changed when we argue about a single process but now we can have more than one process at a time. So what we'll see at the end of the lecture is well after we fork what we could do is just tell that process to load another program and execute that instead set up a new PCB yep. So the question is when we create a new process does it get moved to the kernel? So the kernel keeps track of all the processes so whenever you create a new process that will be done in the kernel and then you'll see the result of it and we'll have an example very shortly yep. So just take that PCB and then create a new one that's the exact copy of the old one. So yeah the question is why would you do that? So for some things you like for web browsers for example processes are a good way to keep things isolated cause they're completely independent from each other so say your web browser or someone opens a new tab you just fork and well I haven't said you just clone like a previous tab and then you don't have to reload all the libraries and everything again like everything's loaded for you and then you can just after you complete the clone then you can just render a new website that's different than the parent and we'll see why that's effective as we go on when we learn about more things but turns out that cloning something is actually really really fast too so it doesn't really matter and sometimes it's very beneficial. So don't worry about that. For now we will see let's just see how to actually clone a process. So word I accidentally just said was fork. So fork is the system call that creates a new process and like I said it is a copy of the current running one. So the function prototype is just fork takes no arguments and then returns an integer. So the return value is actually the process ID of the newly created process and if it fails to create a new process it will return negative one and if it is successful so if we have successfully created a new process that is a clone of us then in the new process that is created fork will return zero and then in the parent process that actually created the new child it gets a process ID that's greater than zero and that will be the process ID of its child. So now it can keep track of its child and you actually know who's who but after the fork completes like at the time of the fork both processes exactly the same the only way to distinguish the two is the return value of the fork. So now there's two processes running they can access the same variables but they are completely independent they are separate and the operating system why this is fast is something that is called the copy on right optimization where you don't have to reload like the standard C library or anything again you can actually share memory between them and copy them really fast as we go through the course we'll figure out how to actually do that. So on POSIX systems you can find documentation using man which is the short for manual so we'll be using the following APIs today so fork, execve and then wait will be in the next lecture so you can use man to look up documentation so just man number and then the function name so some of these will give you weird results so for instance if I do I think it's man fork no not man fork man execve okay so for these these will actually tell you all the information about the system call you need or you know it's 2024 you can just use the internet so they're also available on the internet but if you don't hate you can use the man pages. All right so let us dive into an example and where things start getting actually fun so here is our program can everyone see that okay so in here after main well we know because we S trace that main is not actually where we start executing things some things that will happen before main is it will open the standard C library loaded and all that fun stuff but now we're going to put a fork in it and immediately we're going to call fork now after the fork we have two processes are exactly the same while right now we didn't declare any variables in main or anything so they'll just start executing after the fork independently the only difference is going to be the value of this return PID so I'll have two processes and then in the parent return PID will be greater than zero if it's successful and give me the process ID of the child so in here I have a bunch of print statements so I will print what the value is of the return PID and then I also introduce a few more system calls here so there is a system called called get PID so that gets this processes process ID and then there's another one called get PID so that gets the process ID of your parent so all of these things should be consistent if there is a strict parent child relationship so in here I return or I print off the value of the return PID which since this is a child process it is going to be zero and then the child's process ID well should be the same as the return process ID from the parent since it should represent this new process and then I can check in the child what its parent process ID is which should be the original one so any questions about this? Yep, no the get PID and get PID they're system calls that are part of the C library so their system calls are given to you so in here let's run it and ask any questions because this is when your world starts getting weird whoops I need to recompile it so if I run it this is what I get and in fact I got really lucky in that the kernel switched what was running randomly so here I got printed the parent return PID which should be the process ID of the newly created process I had and then well the kernel decided to switch over to the other process and execute that so it switched over to the child process and then it printed return PID which is zero so if that makes sense it's the child the child's PID is 6879 which is exactly matching what the parent returned and then the child's parent ID is 6878 and then that child process terminated it was done the kernel decided to switch back to the parent and execute that so the parent's ID was 6878 which makes sense because the child's parent ID should be whoever created it and then finally we got the parent's parent ID which is 4700 so any questions about that? It's okay if this is a bit weird Oh yep. Do I have any questions? Yep, yeah so it kind of looks like I went into both if statements at the same time right which should be impossible but the reason why it looks like I'm in both if statements is because I have two processes running so one executes one and one executes the other so I can try and draw that so luckily your reasoning about a single program or just single process hasn't changed but what has changed now is that there may be multiple processes running so in this case what was it? So in this case what I like to do is write to the side what process is actually running cause we can have multiple processes running so initially I just pick a random number say this is process 78 to match what we saw but with less digits it would execute main and then the first thing it does is call fork so we will create a new process that is exactly the same as process 78 and is actually executing this line so we would create let's say we create process 79 and it would also be doing this fork call so at the time of the fork they are going to be exactly the same but we don't have any variables or anything like that so we don't really have to argue about much but the only difference is that in process 79 well that's the newly created process so what will fork return? Yeah, zero, right? So that's the rule you're gonna have to remember for this course the newly created process always gets zero from the fork and then in process 78 eight fork would return the process ID of the newly created process so it should be 79 that gets returned from this fork now both of these processes at this point are completely independent and then you can use all the rules that you know and love from C and arguing about C programs so we have to argue about two different processes so say we have the child running first so if the child runs first which is in orange here well it would create a local variable called return PID and then assign the value zero to it and then it would check this if statement while return PID is not equal to negative one so it would fall through here, check does the return PID equal to zero? Yes, so it would execute these three lines of code and say it goes all the way to the end it would fall through return zero and then this process is done so this process 79 is responsible for printing all of these lines then let's say it's done now we can only run the parent so it gets the value 79 back from fork it would now create a local variable called return PID, assign it to 79 then we would check, does return PID equal negative one? Nope, check here, does return PID equal to zero? Nope, so it would fall through this if and then it would print these three statements and then return zero and now the process is done so we did not violate the terms of C we did not execute both sides of the if statement we actually had two processes one executed the if, the other executed the else so for a single process still acts as you would expect C to have but now we have multiple processes, yeah yeah, so forked forks whatever is running it so as soon as you call fork you create a new process that's a copy of whatever just called fork so your questions were, yeah it's not executed again we'll see weird things we can do where I see where you're going, yep no, 79 does not call fork so in this originally whenever we start the process like whenever we start about it we just argue that one initially only one process is running main and then this one process calls fork and then 79 or 78 creates 79 so 79 only comes into existence after it returns from the fork so before that it didn't exist, does that make, yeah so in this, so a process is just a instance of a running program so whenever we run a program it's actually running in a process because it needs virtual memory and all that stuff yep, yeah so I'll make an example after this because it has virtual memory they should be independent so they can change them without affecting the other but I'll go through other questions, yep outputs oh yeah, so the question is about this PIDT data type so it's just a typed up so usually we want things to be more easily readable and try and express what the number actually is so there's this PID underscore T which is basically just an int but it's just a more expressive way of saying this int actually represents a PID but yeah sorry I should have explained that but they mean the same thing it's really an int with a different name, yep oh that's a good question so parent, parent, parent ID it is some random value, what does that refer to? any guesses as to what that would refer to so this parent process is what I actually ran so whoops, it is called fork example so this is fork example so the question is who created the fork example process so any guesses as to what this PID is, yep terminal very close, very very close any other guess, yep VS code slightly colder but still in the right track, yep the kernel, which process so processes are managed by the kernel not part of the kernel though, yep ZSH or a shell or something like that so that is the answer, that is the process or the process that I'm typing these commands into so it makes sense that it would be something like ZSH or bash or your shell and in fact, because we know about the proc file system now we can actually see exactly what it is so I can do look at the file 70 or 4700 and look at the status and see its name hey, it's ZSH and I can see who created it so it has a process ID, it has a parent process ID and I can follow that up as long as I want so that also brings us to an interesting fact here so if the only way to create a new process is by forking or cloning well, guess what? In order to run my process ZSH I was originally a clone of ZSH at some point which, fun to think about, yep yes, yeah so the question is why did I see like one line from the parent and then all from the child and all from the parent so at this point when we had two processes like right after the fork that differed in the return value we have two different processes and your kernel gets to decide what runs and the kernel can make any decision it wants so me seeing that output was just random so between the process I'll always see like these three lines from the parent all in a row in that same order and the child I'll see those three same lines in order but I can't argue about anything between processes because it's out of my control the kernel just picks what process to run it can just stop it from running run something else, stop it, run something else it gets to decide, yeah in theory I could have seen parent child, parent child, parent child I could have seen any combination between them but between in a single process it will all be in the same order yeah so in this case I actually got lucky so what typically happens is the parent will just run to completion and then the child will run cause it's not doing that much so yeah like I said I bet so I got three parents and then three childs but if I run this over and over again likely I'm gonna see it in that order over and over again but I don't have to yeah so this time I got really weird the child printed it all first and then the parent and then before that I got the same thing I got originally parent, three children, parent but I can't make any arguments about that and that is where the fun comes in yeah so the parent's return PID is one higher than its actual one so that is the process ID of the child you just created and typically the kernel will assign it sequentially so the parent was running so it was running 75, 87 in this case so if it creates a new process the next number available is probably 79, 87 yeah the only difference is from fork so fork essentially you can think of it as it kind of returns twice but it returns only once in a different process so it creates two processes in one process fork returns the process ID of the child if you were the one that created it if you're the newly created process you get a process ID of you get a return process ID of zero all right yep yeah so that's a good question is there any way to communicate between processes and we'll actually have a lecture for that it's inter process communication so yeah right now all our processes completely independent they can't communicate so we need a way to communicate between them which we'll see in a bit yep wait at the back so when would the fork command fail so the fork command would fail probably if your computer is catastrophically failing if it's out of memory or something like that or maybe you've run out of process IDs because there's only a certain number or you've run out of some other resource so usually if fork starts failing you're kind of in the shit no good so yep yeah so that's a question that we can do at the end of lectures is this the fork that's referred to in a fork bomb and the answer to that is absolutely so also to demonstrate that they are completely independent let's create a variable called x x equals to one and then after the fork let's just print off the address of x so this print line I just highlighted how many times is that going to print twice right it should print once from each process and because they are exact clones of each other the address of x should actually be the exact same so here so I can see from one hey the address of x is whatever edd04 and this one's edd04 so I can go ahead and go here and change say x equals two and then in this one x equals three and then here I can print off say the value of x so what should I see when I print this out yeah the two different values of x that I assigned even though this could run in any order so if I go ahead and run that I should see x equals three and x equals two no matter in what order they run in because the kernel makes sure that after the fork even though they look exactly the same after the fork they are completely independent of each other one change does not affect the other if they are so they're actually updating the exact same memory address so if they actually weren't independent sometimes I would see like in the parent process if they actually access the exact same physical memory well what might happen is that the parent updates the value to two and then if it's the exact same location the child comes and updates it to three so sometimes the parent might actually print out three instead if they actually shared memory or anything like that but no matter how many times I run this I'm going to see x equals two coming from the parent and x equals three coming from the child because they are completely independent at that point so questions about that so you can see same address same everything okay so next question might be how do we actually start executing a different program and that is a different system called called execve so that replaces the current process control block replaces the process with another program resets the process control block and starts executing that so execve has the following api so path name so full path to the program to load so on linux that'll be an elf file and then there's like an argv array so that's what you get in main all the arguments that get passed to you and then there's environment variables same idea as execve or argv we'll have some we'll have some code examples with exactly what this looks like and then it returns an error on failure does not return if it's successful so let's just go into a code example so in execve whenever we start executing main we just always assume that we just have some process running it with just a random process id so here we print off i'm going to become another process and then in here what it takes is an array of strings or an array of character pointers so argv is the command line arguments for it by convention the first argument is just the name of the process uh but it doesn't have to be in fact and it doesn't have to exist in fact that was actually an exploit at one point where someone assumed that you would always have like the first address would always be valid and some and that was actually a mistake in the sudo command that you might have used during your vm so they screwed up that check and then turned out you could just access sudo as any user and just have full control over a system so that was a fun bug but this is generally the way you do it the environment variables um it's basically just like uh not quite a hash table but just like key values that we can set for a process but we'll just make it null for now and then for execve we're going to turn this process into one that can actually start executing a different program so in this case the full path of the program i want to execute so say i want to do ls the default location is user bin ls and then i feed it the arguments and then i check if execve returns an error if it returns an error which it returns negative one it means it failed to load that program or something like that it failed so all these functions if they return negative one and fail they set a global variable called error no and then we can use this p error function to actually nicely print out the error force with what happened so we can say execve failed and then in the case where execve is successful this process is now transformed into one that starts executing ls and it actually is no longer executing this code anymore it is running ls you can think of it as it's running main of ls now and it this line here will never actually execute so there's only two things that will happen execve will transform this process into ls so it will maintain the same process id or it gets an error and then i see an error message so if i run this i see i'm going to become another process and then i see the results of running ls because i just transformed this process into ls and it started running ls so this is basically how your shell works so instead of create process that starts running another process if i want to run another process i could combine fork and this execve so i could just fork make a clone of myself and then transform the child process into whatever i want so any questions about this yep yes yep yep keeps the same process id so this process that printed all the ls stuff if this what was originally executing main was process 100 ls would have been process 100 there all right any questions about this yep yeah so what's the difference between these two so why do i have ls here and then ls here so this is the path where the actual executable is and this is supposed to represent whatever the user typed in their shell to actually start that program and they might be different so sometimes some programs will actually read this and do something different so they might actually share the same binary um in this case it doesn't actually matter i can just type whatever i want here and if i run it oops that's not the program doesn't doesn't matter it doesn't use it some things will use it by convention so if i did like ls dash dash help it usually tells me if i go to the top here it gives me like a usage thing like i should do ls option file turns out that if i it actually just uses that to generate help messages so if i change the first argument to wtf and then the second one to help and hopefully when i compile it i should get the same help message but if i scroll up what tells me about the usage tells me what i what i typed so just a convention it uses doesn't have to match but if it doesn't match you might be confused but you know in the shell you can like alias stuff and whatever and sometimes it's helpful but you can kind of screw around with stuff if you know what you're doing and confuse people so don't worry about that too much all right any other fun questions all right i have a fun question to you because someone mentioned something called a fork bomb so here's my question to you what would happen if i did the following so everyone likes wall loops right it's like wall one so that's wall true what happened yeah yeah yeah so that's the right answer so in this well if i have wall true bad things kind of happened so first time through assume i just have one process so then that process would create another process that's the exact copy of itself so now we would have two processes and then they'd be right here at the fork now both of those processes are going to go through the while loop again and then both of those processes are going to create another process each so now i have what four processes and then each of those four processes assuming that it switches every time iteration of the loop those four processes are going to create four more processes so one each so then i'll have eight then i'll have 16 then i'll have 32 and then i will create a lot of processes so yeah there's a question before of like why would fork fail might fail here so if i actually run this what will happen so let's just also just print oops let's see if fork starts failing so i'll just put in a print all right oh god oh you're making me do this all right so if i run this i should see just a lot of bs right and let's see let's put the process id here too i get all right oh jesus why why why do i do this so if i run this my screen should just fill with stuff my system probably will not be happy right three two one oh yeah it's fail it's starting to fail but um there's still a lot of processes running on my machine and that's probably not great so my machine is actually smart enough to or the kernel running is actually smart enough to stop creating processes after we've exponentially created quite a lot so i can still use this machine there's just a lot of processes trying to run over and over again in this while loop but i can still use it on some machines that have a kernel that is not configured to do that well eventually you're going to run out of memory or run out of process id's or something like that and then your computer will not no longer be usable and this is called a fork bomb so exponential growth just keeps creating processes over and over again and thankfully i can kill them all and it's smart enough to kill all of them because i have a very smart kernel but if you run this on you know some other machines it might not behave so well and you might screw up their system all right well that's a good thing to end it on so uh just remember i'm pulling for you we're on this together