User Tools

Site Tools


opus:spring2012:kkrauss1:part2

Part 2

Entries

Entry 5: March 15, 2012

  • I have been diligently working on projects this last week but I just realised I haven't posted any entries in my opus. I finally have my vm server up and running and my first virtual machine. I definitely look forward to playing with that a little more. I have ssh with irssi running on my phone, also very cool. I haven't done any keywords yet but will get on that soon. Hpc classes are coming along nicely, I am still a little iffy about comp org but Matt says by the end of the semester we will start understanding things.

Entry 6: March 30, 2012

  • So class seems to have finally taken a direction that might actually teach me something. We came up with a very basic instruction set and I have been working on implementing it. That and doing the opus has actually started teaching me things, though sometimes class itself still seems pointless. Once I have some time I am going to try and finish up my simulator and start writing code to run on it.

Entry 7: April 2, 2012

  • I am a little behind due to working all weekend but I plan on finishing up my opus today. With the basic instruction set we came up with in class I feel like I am actually starting to learn things. I really did try to be a bigger part of the class but I seem to be learning more just going off on my own and asking questions one on one. Weeding out all the nonsense and just going straight to those who actually know what they are talking about just seems to make more sense to me.

Entry 8: April 2(later), 2012

  • Ok so OPUS is done minus the experiments, for some reason this semester everyone seems to be struggling to come up with experiment ideas, I think its because we aren't constantly working on new things that are testable. After finishing the other parts of my opus I got to talk to Joe some more about the grisc cpu we are doing in class and learned a lot. We decided we are probably going to need to add a shift instruction too. Hopefully over break I can really get a lot done with this.

Keywords

asm Keywords

asm Keyword 9: Registers (General Purpose/Integer, Floating Points, Accumulator, Data)

  • Registers are a small amount of memory accessed directly by the processor. They store necessary data by the cpu and allow for faster access than if stored in ram. There are many type of registers:
  • General purpose registers*: Can store both data and addresses.
  • Data registers: Can store numeric values such as Integer's and Floating point values.
  • Accumulator registers are special types of a data registers than are used specifically to perform operations on the stored values.

asm Keyword 10: Registers(Special purpose, Program Counter, Flag/Status)

  • Special purpose registers Hold a program state, they include a Program Counter and a Flag/Status register.
  • A Program Counter also known as the instruction pointer is a register that points to the next instruction in the instruction sequence.
  • Flag/Status registers Store data than can be used to determine what the next instruction should do.

asm Keyword 11: Registers(Address registers, Index/Pointer registers, Stack registers)

  • Address registers hold addresses of memory.
  • Index registers Is like an address register but the address stored can be manipulated by a user.
  • Stack pointer is how the run time stack is managed, it always points to the top of the stack.

asm Keyword 12: Instruction sets(CISC, RISC)

  • An Instruction set is the instructions stored in circuitry that make up the processor.
  • CISC stands for complex instruction set computer has many specialized instructions which may only be rarely used by common programs.
  • RISC stands for reduced instruction set computer simplifies the processor by only implementing instructions that are frequently used in common programs.

asm Keyword 13: Boolean algebra

  • Boolean algebra is the algebra of truth values 0 and 1.
  • Unlike traditional algebra there is no subtraction or division in boolean algebra.
  • Because there are only 2 values, 0 and 1, addition in boolean algebra can be confusing. 1+1=1 is awfully confusing to some.
  • It is best to think of Boolean addition as the OR logic function and Multiplication as the NOT.

asm Keyword 14: Machine Word

  • A Word is a natural unit of data used by a processor. It is a fixed size of bits handled by the processor. The size of the word is determined at the design phase. There are some designs that allow for variable length words where instead there was a terminator so the processor knew it was at the end of the word.

asm Keyword 15: Interrupt

  • An Interrupt is definded as an asynchronous(meaning not driven by the clock) signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution. Basically the interrupt will stop one task and start another. Once the new task is finished it will continue the interrupted task from where it left off. This increases the efficiency of the processor and allows for multitasking.

asm Keyword 16: I/O

  • I/O aka input/output is when an operation or device transfers data to or from a computer and to or from a peripheral device. Our processors will take input from registers then output information to registers. The registers will take input from memory and output it to the processor.

asm Objective

asm Objective: How assembly impacts programming

  • Assembly language is the machine code needed for any given processor, knowing the assembly language of the processor you are writing code for will actually help you optimize your code.

hpc0 Keywords

hpc0 Keyword 9: Virtual Machine Server

  • A virtual machine (VM) server is a system that will host multiple virtual machines running their own instance of an operating system. This can be done in one of two modes; fully virtual, and paravirtual.

hpc0 Keyword 10: Virtual Machine

  • A Virtual Machine is a self-contained operating environment that behaves as if it is a separate system. Basically it is a software implementation of a system that executes programs like a physical machine. What makes Virtual Machines's so nice is that you can have one physical computer with a Virtual Machine Server and host multiple Virtual Machines that each have their own purpose. Web server and DNS are a couple examples

hpc0 Keyword 11: Xen

  • Xen is the virtual machine manager (VMM) that we use in lab46 to have a virtual machine server. It is what allows us to run multiple computer operating systems to execute on the same computer hardware concurrently.

resource

hpc0 Keyword 12:Fully Virtual mode

  • A virtual machine running in Fully Virtual mode will completely emulate all hardware devices. In Xen this is known as a hardware virtual machine or hvm. An example of a fully virtual machine is an snes emulator, as the special hardware needed for the snes must be virtualized.

hpc0 Keyword 13: Parvirtual mode

  • A virtual machine that is running in Paravirtual mode does not need to completely emulate hardware devices. This is the mode our virtual machines in lab46 use. Xen will call a virtual machine running in this mode pvm.

hpc0 Keyword 14: Emulator

  • An emulator is hardware or software or both that duplicate the functions of hardware(guest) in another system with different hardware(host), so that the emulated behavior closely resembles the behavior of the guest. My laptop runs completely different hardware than a nintendo but through software I can emulate the nintendo and play games on my laptop.

hpc0 Keyword 15: Popek and Goldberg virtualization requirements

  • Popek and Goldberg virtualization requirements are a commonly used set of conditions to determine if a system can efficiently support virtualization.

hpc0 Keyword 16: Embedded System

  • An Embedded System is a computer system designed for specific function as is a part of a larger system. Cell phones(non smart) and microwaves are examples of embedded systems, they have a specific function and can't do much beyond that function.

hpc0 Objective

hpc0 Objective: Key concepts of a distributed system

  • a Distributed System consists of multiple computers connected through a network that work together in order to achieve a common task. Each primary task is broken up into smaller tasks and each subtask is completed by one ore multiple computers until everything is complete.

hpc2 Keywords

hpc2 Keyword 9:Internet Protocol(IP) address

  • A IP Address a number assigned to a network equiped piece of hardware by which other device identify it. IPv4 is the current standard in IP addressing. It uses 4 octets or 32 bits for an IP address. Each octet ranges from 0 to 255 in decimal ex: 192.168.1.1
  • With only 32 bits for addressing there has been a concern of running out of addresses so IPv6 has been implemented which has 128 bits, it will more than like become the standard in the future.

hpc2 Keyword 10: Domain Name

  • A Domain Name is name given to a device that is on a network. It is usually easy to remember and spell. This keeps users from having to remember IP addresses. So I can type www.hotmail.com instead of a 4 octet IP address.

hpc2 Keyword 11:Domain Name System(DNS)

  • A DNS is a system used to associate the Domain Name with an IP Address. It is basically a phone book for a network, it is what allows a user to type a Domain name in and connect to the device with the IP address that domain name is associated with. When you open up a web browser and type in a URL the DNS is what allows you to connect to the correct web page because it resolves the host name to an IP address.

hpc2 Keyword 12: BIND

  • BIND Is the most commonly used DNS software and is basically the standard unix based operating systems. This is typically what one would use for their DNS to resolve host names to IP addresses on a network.

Resource

hpc2 Keyword 13: Datagram

  • A Datagram is an independent, self-contained message sent over the network whose arrival, arrival time, and content are not guaranteed. Each datagram has a header and a payload.

hpc2 Keyword 14: Header

  • A Header is data placed at the beginning of a block of data that has all the information necessary to get the block of data from the source to its destination.

hpc2 Keyword 15: Payload

  • The Payload Is the actual data that follows the header. Without a header the payload would not know where to go, and without the payload there would be no need for a header. The nesting of the header and payload is done by encapsulation

hpc2 Keyword 16: Encapsulation

  • Encapsulation is a characteristic feature of most networking models. And is what allows things like headers and trailers to be added to the data, this allows for the data to know where to go and in some cases error checking.

hpc2 Objective

hpc2 Objective: demonstrate awareness of networking concepts

  • I feel like the keywords I did for part 2 and the fact I have an A average in networking fundamentals shows that I have a solid awareness of networking concepts. I have an understanding of how the osi and tcp/ip models work. I understand how to create multiple networks and connect them, I have even done this in lab.

Experiments

  • Experiments 4,5,6 are all gong to relate to RAID and a project I was working on

Experiment 4: RAID: 2 drives are better than one

  • So for hpc I am learning about RAID and let me tell you, it smells better than the bug spray.
  • My first task with RAID was to create a level 0 raid array. Basically what this does it takes two hard drives and ties them together as one. So my experiment is going to be if I could copy a file that is larger than the drives.
  • Each drive partition is 1 gig but they are striped together as a 2 gig drive.
  • The striped drives are mounted as a single drive at /mnt so this is how I tested if I could copy a file larger than 1 gig to the drives
    • change directory to /mnt
    • type: dd if=/dev/zero of=test.file bs=1M count=1536(this is a gig and a half and quite larger than either single drive)
    • If you get no errors then everything worked according to plan
  • Easy experiment but a fundamental one when learning RAID. Normally any time you would try to copy a file to a disk that is smaller than the file you would get all sorts of errors. But with the functionality of RAID we just bypassed that shortcoming and tied two disks together to treat as one.

Experiment 5: RAID, mirror mirror... how the heck do I back up?

  • Ok so this is the next logical step in my RAID series of experiments.
  • This experiment is going to deal with RAID level 1 which means the drives are mirrored. So I am going to simulate a hard drive failure and see if I am able to recover the data from the still intact drive and restore my RAID array.
  • The mirrored drives are tied together as one drive on /mnt
  • First lets cd into /mnt and using an editor create a file, put whatever message you want to in there then save and exit
  • Once you have put some data on the mirrored drives switch to your virtual server
  • Now pick one of the virtual disks used in the array and overwrite it using dd
  • Go back to your VM and reboot it
  • Try to mount your array(/dev/md0)
    • You will get errors, well wtf is going on!? This is where it gets interesting
  • Through trial and error, as well as a little google I learned that we have to tell mdadm that the drive went bad so type this:
    • mdadm –manage –set-fault /dev/md0 /dev/xvda# (# is the number of the drive that you simulated as bad)
  • Now that we have told mdadm that we have a faulty drive we simly need to give it a new one and it will automatically rebuild, so do this:
    • mdadm –manage /dev/md0 -a /dev/xvda# (# is the number of the drive you are replacing the faulty one with)
  • This process takes some time but you can monitor it by typing:
    • watch cat /proc/mdstat and watch the process as it rebuilds. It takes some time because all bits from the non damaged drive is copied to the replacement drive.
  • This took a little bit of time to figure out but once complete it was really quite simply. Again this is very important to know how to use the redundancy functionality of RAID. The experiment was a complete success and the data was completely recovered.

Retest 2:RAID, mirror parity huh?

  • The final experiment in the RAID series
  • In the previous experiment I dealt with RAID level 1 which simply mirrors two drives
    • Everything that is written to one drive is also written to another
  • However this is RAID level 5 which has 3 drives, two drives will stripe blocks of data(experiment 4) with the third using parity
    • Parity is another form of redundancy and allows(in theory) the restoration of data if there is a drive failure
  • Basically this experiment is the simplest as I am simply going to repeat experiment 4 and 5 on a level 5 array.
    • I want to make sure that I can still copy a larger file and am able to restore lost data
  • I followed all the steps in experiment 4 and 5 and the experiment was a success.
  • I love RAID
opus/spring2012/kkrauss1/part2.txt · Last modified: 2012/04/05 16:56 by kkrauss1