Controlling VM CPU allocation through VMware VI SDK

I wrote some code recently to interface with VMware’s Virtual Infrastructure (VI). This java code utilizes VMware’s VI SDK and provides some basic functions that can be used to control the CPU resources allocated to virtual machines running on VMware VI. At the least, it might be useful as an example of how to connect to the VI API through the SDK. Ultimately, it could be easily extended to create an autonomic CPU resource allocator which would monitor and update the CPU resources dedicated to each virtual machine running on VI in real-time.

Here’s the java code: CPUController.java
Here’s a build script for compiling this java class along with the rest of the SDK: buildSamples.sh

A farewell to Zora

My leopard gecko, Zora, died on Monday.  She hadn’t been doing well for a few months now so I think it was her time to go.  I estimate that she was about 15 years old but I only had her for the past 3 years or so.  Here’s a picture of her napping in her favorite spot:

Races and Relocations

Relocations:
As of this morning, I am no longer a resident of Benton 311…I’ve been relocated to Larsen 336A. My new office is within the ACIS lab which is located through the double doors on the east end of Larsen Hall. I will miss all of my wonderful officemates and friends over in Benton. Fortunately, you are all less than 100 feet away and so I hope everyone will stop by from time to time to keep me company over here.

Races:
After running in the Dogs Days 5K race for rabies prevention this weekend, I decided to create a log to keep track of my race results. My times for this weekend’s race as well as the Great Gainesville 5K Road Race, which I ran in April, are posted on my Race Log.

The race this weekend was my first after recovering from a serious bout of runner’s knee. There were several points during my recovery that I seriously doubted whether I would ever be able to run again, so it felt really good to run this race and get a personal record! On the bright side, my injury has taught me the importance of proper strength training and good old fashioned rest. I was very fortunate to have supportive people around who would remind me of this often.

Water, water everywhere

Every time I walk into the Shands medical center at UF, I can’t help but be awed by not just the sheer size of the building itself but of all the activities taking place within its walls. Some people are dying, others are being born, some are fearing for their own lives or the lives of their loved ones and all the while, I’m sitting there under the same roof just listening to a lecture. Today, however, the situation was reversed when a student in the lecture I was attending fainted. After his neighbor brought the situation to the notice of the professor, the entire lecture hall sat rapt with attention over the development. The professor appeared just as stunned as the rest of us as students offered up their water bottles and snack bars to our half-conscious classmate. As for myself, I just kept thinking about the irony of the situation – there we were in a hospital swarming with doctors and yet we all seemed paralyzed to help. I started asking people for a cell phone to call 911 but then thought about how ridiculous I would sound to the operator when he or she asked for my location and I’d have to say that I was already in the hospital. Eventually, a doctor, who I can only assume had been summoned by one of the other students, came into the lecture hall and the student was taken to the emergency room on a stretcher. I hope he has a quick and permanent recovery.

Erin Taylor – Aunt/Godmother-to-be

I’ve been holding out on posting this for a while, but I think it’s finally safe to say that I’m going to be an aunt and a godmother!! My sister, Kristi and her husband, Mark are expecting their first child sometime in late April and I couldn’t be more excited for them and for myself, of course, since this means that I will acquire two new titles to add to my name. My only regret is that they live so far away (San Diego, CA). Guess I should start saving up those frequent flier miles now.

Thoughts on women in computer science and engineering (Part one)

Over the weekend I represented Women in ECE, an organization I founded last year, at two new student orientation activities. The first was a new student reception on campus for anyone interested in engineering and the second was an engineering organization fair for women hosted by the Society of Women Engineers. The fact that so few women approached our table at both events was not in the least bit shocking, but it did get me thinking about the dearth of women in the field. With only 15% of the degrees in ECE being awarded to women in the US in 2004¹, it is clear that females are severely underrepresented in this area. The two million-dollar-questions these days seem to be 1) why is this the case and 2) what can we do about it?

Numerous studies have been conducted in order to try and unearth the answers to these questions. Their findings suggest that the low number of female engineers can be attributed to a high dropout rate after freshman year, the lack of female role models, the absence of peer support, and little effort by faculty to encourage young women to stick with the field ¹. In reaction to these findings, initiatives to counteract these deterrents have been started across the board, from engineering departments at universities to academic funding agencies. And while I applaud and support these efforts to reach out to women, I sometimes wonder whether we’re beginning to adopt poor practices, including curriculum changes and placing too much pressure on women in an attempt to recruit and retain them in the field.

Consider the first concern – a high dropout rate of women after freshman year. According to one of the largest surveys conducted on the subject ², most women leave engineering during their freshman or sophomore years at a university. The reasons they most commonly cite for doing so include: 1) A loss of interest in the field (44.9%), 2) Liking another major/field better (34.7%) 3) Bad grades (20.7%) and 4) It takes too much time/energy (15.5%). In trying to avoid these sentiments and their resulting dropout rates, there is a tendency to advocate changes to the engineering curriculum in order to make it more appealing to new students. These changes, however, may only serve to misrepresent the field itself. At its core, engineering is an application of mathematical and physical principles – if students, whose initial course loads are dominated by physics and mathematics courses, aren’t interested in and can’t succeed in these subjects then what hope do they have of being passionate about a career dominated by these fundamentals? In short, I advocate against drastic changes in curriculum because I don’t think they address the key issues involved here and attempting to retain women by doing so may only serve to degrade the quality of an engineering program as a whole.

As for the lack of female role models in the field, there can be no doubt that this is truly the case. The percentage of women faculty with a Ph.D. teaching computer science at 4-year colleges/universities is a paltry 9.4% ¹. Clearly, it is currently a male-dominated field and being that we can’t change these demographics instantaneously, it will continue to be so for several decades even if we could miraculously convince an additional 10% of female freshman to join (and stay!) in engineering. Unfortunately, this situation presents a much-neglected reality to those trying to encourage young women to join the field – these women will have to be comfortable working and interacting in a male-dominated environment. We can all lament this situation as much as we like (break here for lamenting), but it will, nevertheless, remain the reality.

This is certainly not to say that women shouldn’t demand equal treatment and rights in this profession. On the contrary, both women and men in the field should be striving to address women’s issues such as providing adequate maternity leave and the ability to stop the tenure-clock to have children. I just think that women pursuing careers in engineering will have to be comfortable having a large number of male peers.

Unfortunately, the problem of there being only a few female role models in the field is a catch-22, we can’t get more female role models into the field until we have more female role models in the field. I think our best hope of breaking out of this cycle is by equipping our young women with the self-confidence to be comfortable in the current engineering environment (more on this later) and, more importantly, by not putting pressure on those women who are not comfortable working in this environment to stay in the field.

[In my next post(s), I'll continue with my thoughts on faculty encouragement, peer support, and my views on the best ways to increase women's participation in computer science and engineering].

Sources: [1], [2]

Wood floors, success!

Between vacationing this summer and doing research, I took some much-needed time off to install new wood floors in my condo. With a little (okay, maybe a lot) of help from my folks, I managed to lay down 350 sq. feet of solid hardwood in my living/dining room and my bedroom closet. This was about a month ago, so all the backaches, splinters, and stiff knees are pretty much long forgotten thanks to my super-human ability to induce selective-amnesia. I can reflect on the whole experience pretty positively now. In fact, I would recommend that anyone who has more time than they know what to do with and several grand burning a hole in their pocket seriously consider undertaking a similar project in their own home.

A couple things I learned through the whole process: 1) Wood flooring adhesive is expensive and sticky. Who knew that a 5 gallon bucket of glue could go for almost $150? That’s nearly $30/gallon! And I thought gas was bad… Of course, this is no wimpy, watered-down kiddie glue we’re talking about here – this is some serious adhesive with an insidious ability to affix itself to any and all surfaces, including skin, hair, and toilet seats. 2) It’s not over until the thresholds are laid. In this sense, I guess I’m still not finished with the whole job. My thresholds (the junctions between carpet/tile and the wood) are glaringly bare even though I have several feet of wood strips to put in them. I think I haven’t gotten around to them because my real drive has always been the challenge of a new task. Initially, putting the wood down was exciting since it required me to learn some new skills and there was no guarantee that it would actually work. But laying the thresholds will be easy now – mundane, actually – and besides, I’m far too busy trying to find a new challenge to take on.

It all makes sense mathematically

Let W = {x : x = something you want}

Let N = {y : y = something you need}

Life Lesson: W ⊄ N

Adding noise to signals in SPICE

I was running some SPICE simulations recently and needed to add Gaussian white noise to specific nodes in my circuit in order to measure noise tolerance. Between the two simulators I run, OrCAD’s PSPICE and Cadence, I hoped that there would be an easy way to do this – perhaps a noise-generating source of some kind or a rand function that would return random values according to a specified distribution. Unfortunately, this is not the case – a sad fact that has caused others working with SPICE to lament:

Unfortunately there is no easy way [in SPICE] to randomly tolerance devices such that they are not a perfect match, or to add a ‘noise’ voltage to insure the circuit will start. (Wish list: add a rnd(n) function to B2SPICE to enable random part values to be specified, or a small noise generator to be created. The proposed function would return a pseudo-random number between zero and unity, where ‘n’ could represent a uniform distribution for the value ‘0′, a Gaussian distribution for a ‘1′ argument, and so on.) [http://www.beigebag.com/case_convergence.htm]

After relentlessly pursuing the matter, however, I have found that there is in fact a way around this apparent limitation in SPICE. The solution involves the use of a piecewise linear source, a common SPICE component which outputs voltage or current according to tuples of the form (time,voltage/current) which are supplied by the simulation programmer. These tuples control the source by indicating the voltage or current signal that it should be supplying at any given point in time. A programmer can supply a seemingly infinite number of these tuples in order to control the output of the source over a certain time period.

An effectively random source can be created by generating voltage or current values according to a desired distribution and using these values in the tuples of a piecewise linear source. In my case, I used a short Matlab program to generate values that were normally distributed with a mean and variance of my choosing and then used these values as data points for a piecewise linear voltage source.

Here’s an example of how the whole process might work:

Let’s say, for instance, that in order to test the noise tolerance of a circuit, you need input voltages that behave like Gaussian white noise with a specific mean and variance.

  1. Search your SPICE component library for a piecewise linear voltage source. In both Cadence and PSPICE there a is piecewise linear voltage source that takes its data points from a file (this component is “pwlf” in Cadence and “vpwl_file” in PSPICE).
  2. Use this voltage source component for your input signals.
  3. Configure each component to pull data from a file – in this case we’ll call the file ‘pwlFile.in’.
  4. Use this Matlab program to generate the pwlFile.in file and place it in your SPICE simulation directory. Note that the program provided generates voltage values the are normally distributed according to a user-specified mean and variance.