Josef “Jeff” Sipek

z/VM = pure awesomeness

Today, I got to use z/VM 5.2 a whole lot (well, I didn’t do all that much, but considering that I never typed a single command in z/VM — only VM/370 — it was a whole lot of using :) ). Long story, short, z/VM is totally amazingly awesome.

Here’s an image that I found on IBM’s website:

I [heart] VM

LILUG Developer SIG: z/Architecture presentation

I spend the last few days getting ready for tonight’s presentation. It went rather well. It did take a bit longer then I wanted to, but it was still well within the 2 hour-limit.

For those of you who wanted to come, but didn’t get to, here are my slides. I do realize that it glosses over most things, and sometimes hides some rather important details, but hey…I want to see you summarize over 1200 pages of docs in hour and a half :-P

Putting the V in HVF

After a number of days trying to avoid having to implement the Dynamic Address Translation (DAT) related code, I finally came to the conclusion that I had to…and so I did…in one afternoon. Woohoo! It actually wasn’t all that bad. Sure, it’s not complete, I still need a way to invalidate entries in the TLB, but right now, the only user that exists is the nucleus, so I just set up the address space, load up a pointer to the first level of page tables (called Region-Third-Table), and toggle the right bit in the Process Status Word (PSW). The DAT hardware turns on, and happily starts translating the addresses from virtual to physical.

One thing that struck me as somewhat wasteful was the fact that if I have, say 128MB to set up page tables for (each page being 4kB), I need to set up 32768 page table entries (PTEs)! Sure, if they are physically fragmented, then you have no choice, but if they are in a couple of (if not one) contiguous chunk, then what? You still need 32768 entries. Oh, and have I mentioned that each entry is 8 bytes? That means, that 128MB needs 256kB of PTEs. Now, you can’t just have just PTEs, that would make the translation far too inefficient. You have segment tables (with segment table entries — STEs) which point to sections of the page tables. As it turns out, each STE can point to a section of only 256 PTEs. In other words, the 32768 PTEs will require 128 STEs — at 8 bytes each, that’s just a single page…but…

Now, imagine we have 2 GB to set up page tables for, that’s…
…2147483648 bytes
…524288 pages
…524288 pages table entries
…4194304 bytes of page table entries (= 4 MB)
…2048 segment table entries
…16384 bytes of segment table entries (= 16 KB)
…~4MB overhead for 2GB

Still doesn’t sound that bad…but if the hardware allowed some kind of extent-based PTE, or if for example the STE had a flag that said this is the physical address and the begining of a 1MB chunk of memory (256 * 4kB = 1MB). A whole lot of memory could be saved.

[ANNOUNCE] HVF v0.11

Hello all!

I would like to announce the first public release of HVF — an open source OS for the zArchitecture written in C.

Currently, the OS does very little. It consists of:

- simple process scheduler
- console layer (currently supports only one 3215 device)
- page allocator
- slab allocator (to provide a libc-like malloc())

Once the system is IPLed, it outputs some information to the console, and then continues to idle. While this is not much there is enough code that it lends itself to (aside from my goal with it — see below):

- being used as a basis for experimenting with zArch
- being used as the beginning of a toy OS

Since I do not have access to a zSeries and therefore I had to resort to developing and testing on Hercules. It is possible that there are issues that need fixing to get things running smoothly on the real thing.

The ultimate goal is to have a VM/370-like OS that runs on the zArchtecture - to allow Linux and other modern OSes to run concurrently on a single machine. Here are few of the goals on the TODO list:

- nucleus should be all 64-bit (minus the arch mode switching code)
- mostly in C
- support multiple users
- use SIE to virtualize the hardware (S/390 and zArch modes)
- give something to the mainframe hobbyist community to play with :)

Note that this is all for the hypervisor — I’d like to have a CMS-like OS as well, but that’s secondary. (In a couple of days, I’m actually planning to post a list of ideas for the guest OS to the HVF mailing list — see below.)

You can find the released source code in a tarball at:

https://www.josefsipek.net/projects/hvf/src/

I use Git[1] as the version control system. You can browse the history, as well as obtain the source at:

http://repo.or.cz/w/hvf.git

Feel free to grab a copy of the source code, build it (see Documentation/building.txt in the source tree), IPL it, tweak it, and submit patches :)

I have also set up a mailing list as a place to discuss design, comment on code, etc.:

http://lists.josefsipek.net/listinfo/hvf

Currently, the list gets commit messages whenever something changes in the repository but I’m hoping that once people join it’ll be more interesting :)

Then there is the IRC channel where you can catch me pretty much all the time:

server: irc.oftc.net (the OFTC network)
channel: #hvf

And finally, I have decided to use GPLv2 as the license of choice for the code. The major advantage of doing so is the ability to borrow code (with proper citation of the borrowing) from other GPLv2 projects — namely Linux. The extent of the borrowing is restricted to basic building blocks — e.g., atomic variable types, locking primitives, but not much more beyond that.

Josef ’Jeff’ Sipek.

[1] http://git.or.cz/

Firefox + vim = ?

What would happen if someone took Firefox and combined it with the awesomeness of vim’s UI? Wouldn’t that be slick? Well, wait no longer! Someone has done precisely that!

Vimperator!

By default, all you see is just the tab list, and the status line on the bottom of the window. I’ve enabled the menu bars because I’m not ready to make a complete switch ;)

Of course, since it’s still Firefox, everything renders just the same.

Edit: It’s called Vimperator and it is Firefox extension.

What? 2008? Already?

Wow! Time flies when you’re having fun.

This year, I had friends visit all the way from Indiana. They got here on the 30th, and left on the 2nd. In those 3.5 days, I’ve seen more of NY than I thought possible (Central Park, Empire State Building, Rockefeller Center, Wall Street, Battery Park, WTC site, a Broadway musical — just to name a few).

For new year’s eve, we went to Times Square..

Times Square

Clockwise starting from…well, ladies first, right? ;)…Wikipedia article: Valkyrie (yes, that’s her real name), Ethan (from Indiana), me, Ilya (from Stony Brook).

If you haven’t noticed on TV, Times Square was quite packed. We got there around 15:30, but didn’t get to be penned (like cattle) with a couple of hundred other people until about 16:15. We were about 15m north of 47th Street, where we stood till bit after midnight (yes, that’s effectively 8 hours).

Fun, but exhausting 3.5 days.

Ancient Storage Device

I decided to clean out my room aaaand I found this:

ancient storage device

I vaguely remember hearing that it was an ancient storage device of some sort… :)

Accepted to EuroSys '08!

My summer internship at IBM resulted in a publication in EuroSys 2008!

So, keep an eye out for my name in EuroSys proceedings near you. :)

Powered by blahgd