User Tools

Site Tools


opus:spring2012:kkrauss1:start

Karl Krauss

Spring 2012 Opus

Introduction

My name is Karl Krauss, I have a degree in Math/Science and currently working on Comp Sci and HPC.

Part 1

Entries

January 30, 2012

  • It's that time again, winter break simply wasn't long enough. Being back for only a week and the frustrations have already returned. Comp org thus far is interesting to say the least, I have no clue where we are going yet but hopefully something will make itself apparent soon enough. HPC 0 and 2 are as I expected, and of course joes system and networking god only knows. Networking fun is intense but right up my alley in how it is taught. Its only the first day of the second week so I haven't gotten much done but plan on picking up the pace this week. I had some struggles with my personal laptop and thankfully got that taken care of(thus far). I also had some issues with the pc I use in the lair but after several attemps of installing a stable operating system I finally have thing set up the way I like. Lets see where this semester leads me.

Entry 2: February 17, 2012

  • Today is the half way point of the first part of opus. I, like many others, have not even started so will be working tonight to get it all done. I am definitely put off by how this semester has been going. It is not the same as it was last semester and I mean that in more way than one. Comp org still seems entirely non directional but when I can get joe by himself it seems to make a little more sense. Networking is my best class so far, loving the structure and lab atmosphere. My hpc courses, much like last semester have suffered but I plan to remedy that after the break.

Entry 3: February 27, 2012

  • Soooo things seem to be going in a better direction for classes, but as always my job sucks and is exhausting me to the point that I'm still having some issues keeping up on everything. Overall though, after having a conversation with Matt and Joe, I am happy where things are sitting. I am having to do the juggling act where I ignore a class for a while in place of another but it usually all works out in the end and I hope for that to be the case this semester. Comp org was actually quite interesting on Friday. We discussed a turing machine and the concept was truly amazing for the time period. I have done a little reading on it and hope we get to play with it a little bit more.
  • Opus is due Wednesday night, I hope to get it done on time but Matt usually won't kill me if I am a little late. Right now I am going to do my first experiment. Even though I have specifically said I cannot work on Mondays, as that is my day to try and get caught up on work, I was once again scheduled today. Hopefully I can get some keywords done too before I have to go in.

Entry 4: February 29, 2012

  • Happy leap year! Aka technically the last day of opus. I have one more experiment to do, if I ever stop arguing with Tyler. Its been an interesting month to say the least. I have definitely had to slack off on some classes to get some things done but hopefully it will all balance out in the end. Today we talked briefly about the instruction sets of various CPU's. I looked up the instruction set for the amd 29k processor, the info was quite informative to say the least. I am going to finish up my last keyword and experiment for comp org and hopefully get a head start on the next opus.

Keywords

asm Keywords

asm Keyword 1:Logic Operations

Logic operations are one of the fundamental aspects of computer science. In simplest terms logic operations takes one ore more value inputs and outputs a single value. As it relates to this course it is a boolean function where as the input is 0 or 1 and the output is 0 or 1, as defined by the type of operation. Basically Logic Operations are a physical implementation of truth tables.

  • Here are the truth tables for AND, OR, and XOR:

AND

INPUT OUTPUT
A B A AND B
0 0 0
0 1 0
1 0 0
1 1 1

OR

INPUT OUTPUT
A B A OR B
0 0 0
0 1 1
1 0 1
1 1 1

XOR

INPUT OUTPUT
A B A AND B
0 0 0
0 1 1
1 0 1
1 1 0
  • Each outputs have some difference but the key factor is that there is only ONE output and that everything is a boolean value.

asm Keyword 2: Negated Logic Operations

Negated Logic Operations work the same way as Logic operations(as defined in keyword 1) except the output is negated. So all boolean outputs are simply switched, if the output is for an AND operation is 0 then NAND would be 1.

asm Keyword 3: Address bus

The Address bus is a series of lines that connect devices. It is used specifically to specify a physical address. When a device needs to read or write to a memory location it specifies that location on the address bus.

asm Keyword 4: Data bus

After the Address bus trasnfers the information about the physical address of where the data should come or go, the data bus actually transfers the data.

asm Keyword 5: Fetch-execute cycle

The Fetch-Execute Cycle is the process of retrieving instructions from memory and implementing any action required by those instructions

  • Also known as the instruction cycle
  • Most basic operation of a computer
  • is continuously repeating from bootup to shutdown

Steps of cycle:

  • 1. Fetch the instruction
    • From memory address stored in Program counter
    • When finished the program counter will increment to the next address
  • 2. Decode instructions
    • Stored in instruction register
  • 3. Read effective address
    • Decide operation type, memory, I/O, or register
  • 4. Execute instruction
    • The control unit sends signals to releveant parts of CPU needed to implement instructions

asm Keyword 6: von Neumann vs. Harvard architecture

The Von Neumann architecture is the general purpose architecture for most modern pc's. It only has one bus used for data and instruction fetches. It typically only has one cache, if any at all, that stores both data and instructions.

The Harvard architecture utilises separate buses for data and instructions. This allows for data and instructions to be fetched simultaneously. Caches are almost always used with this architecture as it adds to its efficiency. Also separate caches can be used for data and instructions. This is not as readily used in the general purpose pc world as it is quite inefficient in processor design, at least compared to von Neumann.

asm Keyword 7: Binary and Hexadecimal Number Representation

Binary and Hexadecimal are the names of two common number representations used today. There are many others, decimal, or base 10, for example is one anyone reading this should know. 0 through 9. Binary, or base 2, is 0 and 1. Only two values hence its name. Hexadecimal, or base 16, uses 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. These are different ways to represent quantities. Binary is the most commonly used when working with digital electronics. Processors only deal with two states, aka voltage levels, which we treat as 0's and 1's. Hexadecimal is commonly used for memory addresses for convenience, trying to display it in binary would be less convenient but can be done this way or with any number system. Any value can be represent by any number system, its a matter of convenience, preference, and of course standards that determine what we use.

asm Keyword 8: Processor & Memory Organization

  • For this topic I have decided to talk about interleaving memory.
  • “There are several memory banks which are one word wide, and one word wide bus. There is some logic in the memory that selects the correct bank to use when the memory gets accessed by the cache. Memory interleaving is a way to distribute individual addresses over memory modules. Its aim is to keep the most of modules busy as computations proceed. With memory interleaving, the low-order k bits of the memory address select a module, and the high-order m bits name a location within that module. Hence, consecutive addresses are located in successive modules. A request to access consecutive memory locations can keep several modules busy at the same time.”

asm Objective

asm Objective Understanding the C standard library

  • The C Standard Library provides predefined functions macros and type definitions. This allows for handling strings and number computations. It also handles i/o and memory allocation. Without the standard library it would take us much longer as we would need to write code for these things each time wrote a program.

hpc0 Keywords

hpc0 Keyword 1: Partition

A Partition is storage space on a hard drive. A hard disk can have multiple partitions thus dividing the hard drive into multiple “virtual” hard drives. It can also have only one partition using the entire disk or a part thus having unused portion of the hard drive.

hpc0 Keyword 2: File system

For keyword 1 I discussed what a partition is, however a partition by itself is useless. It needs a File System. A file system is what we use to organize data on the partitioned hard drive. The file system retains the data on the hard drive and allows the data to be retrieved and updated. The file system also allows for managing the physical space on the hard drive.

  • NOTE: although I have emphasized hard drive in my definitions, partitions and file sy stems are actually used on many devices including floppy drives, optical discs and flash drives.

There are many types of file systems, Unix based systems typically use ext4 and windows uses NTFS. From the user point of view they do the same t hing they just have different means of managing the partition and all its data.

hpc0 Keyword 3: Operating System

An *Operating System is a program or a series of programs and applications that runs your computer. It is the most important type of software on a system. It gives users the ability to interact with the system by running applications and accessing system devices. Windows is an example of an operating system, a graphical one to more specific. This gives the user the ability to access the systems resources to “do” various things. Examples being accessing the internet, playing games, sending data to a printer.

hpc0 Keyword 4:Bootstrap loader

When a computer system is first turned on there is no operating system in the ROM or RAM(read only memory, and random access memory). The bootstrap loader is a small program that is stored in rom or on the first sector of the harddrive. The bootloader has the instructions needed to load any operating system stored on the hard drive.

hpc0 Keyword 5: Network Services

  • Network Services are pieces of software hosted by a server that give functionality and shared resources to users on a network. E-mail and file sharing are two common network services.

hpc0 Keyword 6: System administration

  • System administration, in its simplest terms, is the upkeep of a computer system or network. The person who maintains the system or network is typically called a system administrator. The duties of a system administrator to maintain the system or network to company specifications varies depending on the company. The most important aspect of system administration is critical thinking and problem solving. This will come in handy when troubleshooting a unique problem under time constraints. Common system administration duties include: log checking, OS updating, hardware updates, security updates and backups.

hpc0 Keyword 7 Backups

  • Backup is defined, in computer science, as the process of making copies of data to be used to restore the original if it is ever lost or damaged. Backing up data is a very important aspect of the computer science world as loss of data is quite common. When dealing with multiple systems and/or networks trying to back up everything can be quite the challenge but there are many ways it can be accomplished. One good example is scheduling a time when system resource usage is typically at its lowest and automatically copying the contents of directories deemed critical to an offsite server.

hpc0 Keyword 8: Virtualization

  • In computer science Virtualization is defined as is the creation of a virtual (rather than actual) version of something. Hardware platforms, operating systems, storage devices and network resources can all be virtualized. The most common form of virtualization is server virtualization in which one physical server is partitioned into several virtual serves that can interact independently with devices and applications as if it were a separate resource. The virtual machine manager(VMM) is a common software package used in virtualization. It manages multiple operating systems, or instances of the same, on a single system. It manages all the systems resources and allocates what is needed based on what resources each operating system needs.

hpc0 Objective

hpc0 Objective: Impact of high performance computing

  • High Performance Computing can be defined as, the use of powerful processors, networks and supercomputers to tackle problems that are very compute or data-intensive. As technology continues to advance access to high powered technology, such as a supercomputer with a powerful processor, becomes more commonplace. This has caused a boom in High performance computing as HPC is widely used in a range of areas of science, engineering and industry such as climate research, aerospace and automotive engineering, oil exploration, drug design, genetic sequencing and nanotechnology.

hpc2 Keywords

hpc2 Keyword 1: Partition

hpc2 Keyword 2:File systems

hpc2 Keyword 3: Operating system

hpc2 Keyword 4: bootstrap loader

hpc2 Keyword 5: Network services

hpc2 Keyword 6: System administration

hpc2 Keyword 7: backups

hpc2 Keyword 8: Virtualization

hpc2 Objective

hpc2 Objective: demonstrate knowledge of Linux & Open Source

  • Open Source is a philosophy that a user should have free access to, and the ability to change the design of an end product. This gives the end user the ability to alter the end product to his or hers own preference, they are no longer forced to use it exactly as it was originally designed. This philosophy has led to massive improvements because so many end users come up with ways to make the end product better.
  • Linux is an example of an open source end product, in this case an operating system. Linux is synonymous with open source and what made the term more mainstream, along with the advent of the modern internet. Microsoft windows is an example of a non open source end product, also an operating system. Windows is not packaged with its source code, and in fact Microsoft tries to protect its source code. This does not allow for user improvements that can be distributed to anyone interested. Only Microsoft coders, at least in theory, can make changes for improvement to the operating system and users are forced to wait for updates and newer versions of the operating system. Linux on the other hand is packaged with the source code and the user can do with it as they see fit thus compiling the code to perform how they want. Due to the fact so many people are tweaking the code, there are constant improvements and many options as how to use linux. This is why linux is becoming more and more popular.

Experiments

Experiment 1: To not, or not to not, or not to not to not....

Question

  • As often happens with me, my experiment originated from a simple question in class. We were talking about “not” aka !, in class and I asked if it only works with 1's and 0's. Well we are about to find out!
  • I am going to set a value a equal to 0 1 and then some random number, then set b equal to !a. Here is the code and output:
int main()
{
	int a=1, b ;
 
	b = !a;
 
	printf("a = %d\n", a);
	printf("b = %d\n", b);
 
 
 
	return (0);
}
lab46:~/Desktop$ ./a.out 
a = 1
b = 0
lab46:~/Desktop$
int main()
{
	int a=0, b ;
 
	b = !a;
 
	printf("a = %d\n", a);
	printf("b = %d\n", b);
 
 
 
	return (0);
}
lab46:~/Desktop$ ./a.out 
a = 0
b = 1
  • So the above code is basically the same except a is switched between 0 and 1, and the outcome is as expected. When a is 0 b is 1 and vice versa. Now what happens when a is a number other than 0 or 1?
int main()
{
	int a=99999, b ;
 
	b = !a;
 
	printf("a = %d\n", a);
	printf("b = %d\n", b);
 
 
 
	return (0);
}
lab46:~/Desktop$ ./a.out 
a = 99999
b = 0
int main()
{
	int a=-9436, b ;
 
	b = !a;
 
	printf("a = %d\n", a);
	printf("b = %d\n", b);
 
 
 
	return (0);
}
lab46:~/Desktop$ ./a.out 
a = -9436
b = 0
lab46:~/Desktop$ 

Conclusions

  • So as we can see from the code when using “not” ! it simply tests for 0 or any other number, if is any other number then we will get a 0 and if its 0 it will be 1.

Experiment 2: SVN update! Where?

Question

Another simple one… How do you update your subversion repository and where do you need to be to do so?

  • The command to update a subversion repository is “svn update”

The directory of the repository is /home/kkrauss1/src/cpu So we will try to run update from the home directory then each subdirectory until we get an update

lab46:/$ svn update
Skipped '.'
lab46:/$ cd home
lab46:/home$ svn update
Skipped '.'
lab46:/home$ cd kkrauss1
lab46:~$ svn update
Skipped '.'
lab46:~$ cd src
lab46:~/src$ svn update
At revision 17.
lab46:~/src$ cd cpu
lab46:~/src/cpu$ svn update
At revision 113.
lab46:~/src/cpu$ 

As we can see nothing really happens until we get into src. Now our repository is cpu but we did get an “at revision17” at the src level, this is because src is a repository checked out from a different semester. If there any updates made to the files of the repository then it would have updated. Once we get to cpu we see that it says we are at revision 113, now we are where we need to be for this class and it is already updated. So to answer the question of where you need to be to update; you need to be in the directory of the repository.

Experiment 3: ★★argv vs ★argv[] vs argv[][]

  • We were talking in class about argv and whether or not ★★argv, ★argv[], and argv[][] were all usable syntax. Everyone agreed on ★★argv and ★argv[], however Joe said argv[][] would not work. Brian and I both disagreed and said we had done it before. So I am going to test it with a simple program using all three versions and see what compiles and what does not!
#include <stdio.h>
 
int main(int argc, char **argv)
{
 
	return 0;
 
}
karl@joffice2:~/Desktop$ gcc argExperiment.c 
karl@joffice2:~/Desktop$
  • As we can see ★★argv had no issues compiling
#include <stdio.h>
 
int main(int argc, char *argv[])
{
 
	return 0;
 
}
karl@joffice2:~/Desktop$ gcc argExperiment.c 
karl@joffice2:~/Desktop$ 
*No issues compiling ★argv[] either
#include <stdio.h>
 
int main(int argc, char argv[][])
{
 
	return 0;
 
}
karl@joffice2:~/Desktop$ gcc argExperiment.c 
argExperiment.c:3: error: array type has incomplete element type
karl@joffice2:~/Desktop$
  • Well as we can see there WAS an issue with compiling argv[][], and Joe was 100 percent right. ★★argv and ★argv[] for the win, argv[][] is a failure at life.

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

Part 3

Entries

Entry 9: April 5, 2012

  • So I just finished up my RAID project and really enjoyed it. I learned alot about how to use RAID for better performance AND redundancy. I used what I learned to scrape together some experiments as well which I am thankful for as this semester has been tough on everyone for experiments. I lost my job on Tuesday which kind of sucks but in the long run I think I am happy because now I can focus on the school and getting the most out of my last semester here.

Entry 10: April Day 18, 2012

  • Today is my first real day back from break. Monday I only had networking and Matt cancelled class for Tuesday so this is my first real day back in the lair. I actually worked quite a bit on my grisc simulator for comp org. I am quite proud of what I have come up especially my 3 dimensional array for the registers. There is some debate between Matt and Joe how to handle the branch but when it comes to Joe I am not surprised he isn't happy with what I originally came up with. The big question is how do we decide WHEN to actually branch to a different instruction and when do we just continue with the sequence? Hopefully we can get this answered soon. I didn't really do anything for my HPC classes as I am pretty much done with them and just need to wrap a few things up. Semester is going to be over quickly and I'll be two degrees richer.

Entry 11: April 18 (later), 2012

  • Today was a very productive day, a lot of the things I have been working the last couple of weeks are really starting to pay off. I was able to finish all of my keywords and the objective for asm, so that just leaves the oece! I really have a much better understanding of assembly and how a processor works, although there is still a lot there. I forgot to mention in my earlier entry that I found a great source and have learned a lot from it. Assuming anyone actually reads these things, bad assumption I know, that you check it out I have learned a lot from it. Once I realised that understanding assembly is how to understand a processor it seemed to start coming to me.

Entry 12: May 6, 2012

  • It is now after 2 in the morning and I have mostly finished my eoce. I wanted to get as much of it done over the weekend so I don't feel the scramble next week. I have a couple of questions I need clarification on but for the most part I am done with all Lair classes. Its been a crazy semester and most of me is happy to finally move on, but there is a small part that will miss the Lair and all its flaws. I think I want to continue maintaining an opus of the things I learn so plan on copying what I have thus far to a local machine. The thought of getting my own site for it is something I've entertained as well. Maybe someday some one will actually read it.

Entry 12: May 8, 2012

  • Well I think I am just about done with everything, I will double check tomorrow but it looks like asm/hpc0/hpc2/systems & networking material is completed and I am confident with all A's. I just have to get a 50 on my networking final tomorrow to get an A in that class and I am done. I am glad to move on but as I am ready to walk out the door of the lair I realize its one of the last times, if not the last and I definitely have a sense of sadness at the thought. This would be the first time I've felt that way since I have been at CCC. Funny how things work out sometimes.

Keywords

asm Keywords

asm Keyword 17: Data Instructions(Data Movement, Address Movement, Data Conversion, Bit Manipulation)

  • Data Movement:just as one would guess this instruction moves data from one location to another. Source and destination can be registers or memory and will be determined by addressing. The destination contents before the move are destroyed. Data movement instructions typically set or clear processor flags.
  • Address Movement: much like Data Movement except with addresses. This instructions moves an address from one location to another another. Source and destination can be registers or memory and will be determined by addressing. The destination contents before the move are destroyed. unlike movement instructions, address movement instructions typically do not modify processor flags.
  • Data Conversion: an instruction that changes data from one format to another. All data is stored as binary information but there are various storage formats as well as sizes. Data conversion can take a small value and and extend it to a larger format or just simply change a value as in a character value into an integer value.
  • Bit manipulation: instructions that manipulate a specific bit of a bit string. Bit clear changes the specified bit to zero. Bit set changes the specified bit to one. Bit change modifies a specified bit, clearing a one bit to zero and setting a zero bit to one.

asm Keyword 18: Control and Data Flow

  • Control and Data Flow: is accomplished by instructions to modify the flow of a program. This is commonly done with Branches or more specifically conditional branches and unconditional branches. An unconditional branch is going to modify the flow of the program once executed, whereas a conditional branch may or may not change the flow depending on the condition.

asm Keyword 19: Subroutines(Calling, Return Address)

  • Subroutines are a group of instructions that come from the pool of processor instructions. Subroutines are used to when it is often need for a task to be completed on data. Since this “sub-task” is not needed every time these instructions that are included in the subroutine could be included in the processors main program but would waste resources and be unnecessary.
  • To access a subroutine the processor will use its Call instruction to access the first instruction of the subroutine.
  • The last instruction of the subroutine will be a Return instruction which will an address. This address will either be the next instruction address of the program that called it or if some condition was met will be a new instruction address.

asm Keyword 20: Storage

  • Storage is the retention of data for future use. It can be short term(volatile) or long term(non-volatile), but for this topic we are dealing with registers and memory which are both volatile.
  • Registers offer the best access speed but the least amount of storage space.
  • Memory offers a slower access speed than registers but has the greatest amount of storage space.

asm Keyword 21: Stack Operations

  • At this stage of the game everyone should know what a stack is, but to be safe Ill reiterate; a Stack is a “lifo” data structure, the last data stored to the stack is now the top of the stack and the first data to be removed. Stack operations include push which stores data to the top of the stack, pop removes the data from the top of the stack and the moves the stack thus moving the top of the stack down one. There can also be a an operation to simply view the top of the stack but I would venture a guess most processors don't have one(they certainly wouldn't need it).
  • Stacks and their operations are useful in cpus for many reasons, a great example is when you call a subroutine. When you call a subroutine you are going to a different instruction in memory completing each instruction in the subroutine until you get to the last instruction which is a return. The return will take you back to the next address before you called the subroutine. Well how do we know how to do this? When you call the subroutine you push the next address onto the stack, when you return from the subroutine you pop it and know where to return to!

asm Keyword 22: Data Representation (Big Endian, Little Endian, Size, Integer, Floating Point, ASCII)

  • Data Representation is is just what you would guess, how data is represented which can be done in several ways
  • Size: a bit is the is the basic building block of a system but there isn't much you can do with a bit, in fact there is only two things. However once we combine bits together we can do much much more. A byte is the basic grouping and in virtually all modern processors is 8 bits. A word is the default data size for the processor which is chosen by the designer, most are between 16 and 32 bits though. It is important to know this information when dealing with a processor. On a side note a Nibble is half a byte.
  • Integer and floating point are data types. If it is an integer type, then the binary value will be treated as a whole number. If it is floating point it will be treated as a real number, aka fraction.
  • ASCII is a character code that will take an integer value and convert it to some character. For example the integer 64 equates to 'A'.
    • Big Endian stores values in a natural order with the most significant byte in the lowest numerical byte address. In simpler terms it is the way most of us are used to, lets say you use 4 bytes to represent values and broke that up into 32 bits going from left to right the most significant bit would be the left most with the right most being the least significant.
    • Little Endian is the oppositing of Big endian in which the least significant byte is in the lowest numerical bye address. 4 bytes represented as 32 bits the most significant bit would be the right most with the least being the right most.
AddressBig-Endian representation of 1025 Little-Endian representation of 1025
1 00000000 00000001
2 00000000 00000100
3 00000100 00000000
4 00000001 00000000

asm Keyword 23: Data Representation(Sign Representation, One's Complement, Two's Complement)

  • Sign representation is a way to determine if number is positive or negative. Usually the most significant bit will be used to determine positive or negative, but there can be issues with “0”
  • One's Complement is another way to deal with negative values. each bit in the binary value is swapped with its counter parts, 0's become 1's and vice versa.This “complement” of the number then behaves like the negative of the original number in most arithmetic operations. This will still have issues with “0”.
  • Two's Complement is currently the most common method to represent sign. Each binary value is swapped with its counter part just like the ones complement but when finished 1 is added. By doing this you take away any issues with “0”.

asm Keyword 24: Linker, Object and Machine code

  • A Linker is a program that will take one more more object file's and turn them into executable machine code.
  • Object code is generated by a language translator like a compiler or assembler when run on source code. (we compile our c/c++ code). This is the middle step between source code and machine code. It is much closer to machine code but still might have some debugging tokens and other information the processor would not recognize.
  • Machine Code is the output of the linker on one ore more object files and is pure machine code ready to execute on the processor it was designed for.

asm Objective

asm Objective: Understanding the concepts of Assembly

  • The key concept of Assembly is unlike other programming languages, assembly is not a single language. It is actually many languages(although usually similar). Each processor family and sometimes even individual processors in a family will have their own assembly language.
  • Another key concept is that data structures and program structures are created by implementing them right on the hardware, this is not done in high level languages.

hpc0 Keywords

hpc0 Keyword 17: Data Storage

  • Data Storage is a fundamental aspect of computing involving components and media that can hold digital data. It is often called storage or memory. Storage is typically non-volatile memory such as hard drives or optical discs. Memory is typically volatile memory like RAM.

hpc0 Keyword 18: Primary Storage

  • Primary Storage, often called memory, is the only one that can be directly access by the cpu. Primary storage loses its data when there is now power, aka it's volatile. Memory as we are used to it is our RAM, but registers are also a part of primary storage.

hpc0 Keyword 19: Secondary Storage.

  • Secondary Storage cannot be directly accessed by the cpu. This is known as external memory. It is slower than primary storage, but cheaper and it does not lose its data when powered down, aka non-volatile.

hpc0 Keyword 20: Tertiary Storage

  • Tertiary Storage is a third level of storage that consists of anywhere from one to several storage drives. It is usually very slow, so it is usually used to archive data that is not accessed frequently. These are usually run by some form of automated mechanism and used for extremely large data stores that are accessed without human operators. Tape Libraries and Optical jukeboxes are examples of Tertiary storage.

hpc0 Keyword 21: Offline Storage

  • Offline Storage is storage on a medium that is not under the control of the CPU. The data is stored on the medium then the medium is removed. Unlike Tertiary Storage, Offline Storage needs a human operator and is not always kept close to the computer. Flash memory and optical drives are examples of offline storage. Offline storage increase Information Security since the data can be stored offsite and is not constantly connected to the computer.

hpc0 Keyword 22: Tape Library

  • A Tape Library is a storage device that contains a collection of magnetic tape cartridges and tape drives used for reading and writing data. It has access ports for entering and removing tapes and a robotic device for mounting and dismounting the tape cartridges without human intervention. A tape library is an example of tertiary storage, and can be used to store immense about of data currently ranging from 20 terabytes to 366 petabytes.

hpc0 Keyword 23: Optical Jukebox

  • An Optical Jukebox is another example of tertiary storage and very similar to a tape library. It is a storage device that can load and unload optical discs. They can provide anywhere from terabytes to petabytes of data.

hpc0 Keyword 24: Information Security

  • *Information Security** is protecting data from unauthorized access, use, disclosure, disruption, modification, perusal, inspection, recording or destruction. I mentioned this concept when talking about offline storage and felt it was worth going into more detail. Offline Storage increases information security because the data is stored offsite(in theory) and is not directly accessible. Lets say I copy all of my research work from my home PC to a flash drive then store that flash drive in a safety deposit box. Now lets say I have a house fire and it destroys my pc, I have a backup stored offsite that was not damaged. Lets alternatively say that a hacker accessed my laptop and destroyed or altered my data somehow, I again have a backup offsite that the hacker had no way to access. There are more aspects to Information security than just offline storage, firewalls, and virus protection are examples.

Resource

hpc0 Objective

hpc0 Objective

State the course objective

Definition

In your own words, define what that objective entails.

Method

State the method you will use for measuring successful academic/intellectual achievement of this objective.

Measurement

Follow your method and obtain a measurement. Document the results here.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

  • How did you do?
  • Is there room for improvement?
  • Could the measurement process be enhanced to be more effective?
  • Do you think this enhancement would be efficient to employ?
  • Could the course objective be altered to be more applicable? How would you alter it?

hpc2 Keywords

hpc2 Keyword 17: RAID

  • RAID stands for redundant array of independent disks and is a storage technology that will combine multiple disk drives into one logical unit. Once the drives are combined into a logical unit any data is stored across the drives in various different ways know as “RAID levels” and will depend on the level of redundancy and/or performance the user wants.

hpc2 Keyword 18" RAID 0

  • RAID 0 is used for performance and combing all disks into one logical drive with the storage capacity of all disks combined but has no redundancy. It requires a minimum of two disks and the disks will be striped. By striping your data you can can write X amount of times faster, where X is the amount of drives. If you have one drive and want to write two blocks of data you have to write the first block then the next. If you have two striped drives and want to write two blocks of data, you can write the first block to the first drive and the second block to the second drive thus doubling your performance.

resource

hpc2 Keyword 19:RAID 1

  • RAID 1 Gives redundancy but does not increase performance nor gives you a larger logical drive. RAID 0 stripes but RAID 1 mirrors. It requires a minimum of 2 disks and everything that is written to one disk is mirror on all other disks.

resource

hpc2 Keyword 20: RAID 5

  • RAID 5 gives good performance as blocks are striped and good redundancy by using parity. Parity is not as efficient as mirroring. You need a minimum of 3 disks. In a 3 disk system with all disks of equal size, your logical drive would be double the size of your drives as the the third portion would be used for parity data. This gives you the most cost effective way to increase performance and have redundancy with the least amount of drives.

resource

hpc2 Keyword 21: RAID 10

  • RAID 10 is a combination of RAID 0 and RAID 1. It is a stripe of mirrors and requires a minimum of 4 disks. In a four disk system where all disks are the same size, you will double your size. This gives you the greatest performance and redundancy. If you have two blocks of data, the first block and second block are written simultaneously to multiple drives, increasing performance and giving you a backup copy.

resource

hpc2 Keyword 22: Semiconductor Memory

  • Semiconductor memory uses semiconductor-based integrated circuits to store information. Both volatile and non-volatile forms of semiconductor memory exist. Most computers today use dynamic volatile semiconductor memory or dynamic random access memory(DRAM) as their primary storage. Flash memory is an example of non-volatile semiconductor memory as well as offline storage. Solid state drives are also non-volatile semiconductor memory but secondary storage.

Resource

hpc2 Keyword 23: Magnetic Storage

  • Magnetic storage is non volatile and uses different patterns of magnetization on a magnetically coated surface to store information . Floppy disks and hard drives are examples of Magnetic storage. Floppy disks are still used, albeit rarely, and are a form of offline storage. Hard disks are an example of secondary storage.

Resource

hpc2 Keyword 24

  • Optical storage is non volatile and stores information in deformities on the surface of a circular disc and reads this information by illuminating the surface with a lasers. The deformities may be permanent (read only media ), formed once (write once media) or reversible (recordable or read/write media). CD and DVD's are examples of read only optical storage, CD-R, DVD-R are examples of write once optical storage, and CD-RW, DVD-RW are examples or read/write optical storage.

Resource

hpc2 Objective

hpc2 Objective

State the course objective

Definition

In your own words, define what that objective entails.

Method

State the method you will use for measuring successful academic/intellectual achievement of this objective.

Measurement

Follow your method and obtain a measurement. Document the results here.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

  • How did you do?
  • Is there room for improvement?
  • Could the measurement process be enhanced to be more effective?
  • Do you think this enhancement would be efficient to employ?
  • Could the course objective be altered to be more applicable? How would you alter it?

Experiments

Experiment 7

  • Another easy one but still informative. Throughout all of the documentation involving virtual machines it was written that to reboot a VM you would do a shutdown then log into the server and and create it again. I was curious if I could simply do a reboot and bypass the server all together.
  • Overall the experiment would be considered a yes, most of the time simply doing a reboot will reboot the VM
    • However I did learn that if you make any changes that effect the VM you will need to create it again from the server.
  • Simple but nice to know!

Experiment 8

Question

What is the question you'd like to pose for experimentation? State it here.

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

  • Was your hypothesis correct?
  • Was your hypothesis not applicable?
  • Is there more going on than you originally thought? (shortcomings in hypothesis)
  • What shortcomings might there be in your experiment?
  • What shortcomings might there be in your data?

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

Retest 3

Perform the following steps:

State Experiment

Whose existing experiment are you going to retest? Provide the URL, note the author, and restate their question.

Resources

Evaluate their resources and commentary. Answer the following questions:

  • Do you feel the given resources are adequate in providing sufficient background information?
  • Are there additional resources you've found that you can add to the resources list?
  • Does the original experimenter appear to have obtained a necessary fundamental understanding of the concepts leading up to their stated experiment?
  • If you find a deviation in opinion, state why you think this might exist.

Hypothesis

State their experiment's hypothesis. Answer the following questions:

  • Do you feel their hypothesis is adequate in capturing the essence of what they're trying to discover?
  • What improvements could you make to their hypothesis, if any?

Experiment

Follow the steps given to recreate the original experiment. Answer the following questions:

  • Are the instructions correct in successfully achieving the results?
  • Is there room for improvement in the experiment instructions/description? What suggestions would you make?
  • Would you make any alterations to the structure of the experiment to yield better results? What, and why?

Data

Publish the data you have gained from your performing of the experiment here.

Analysis

Answer the following:

  • Does the data seem in-line with the published data from the original author?
  • Can you explain any deviations?
  • How about any sources of error?
  • Is the stated hypothesis adequate?

Conclusions

Answer the following:

  • What conclusions can you make based on performing the experiment?
  • Do you feel the experiment was adequate in obtaining a further understanding of a concept?
  • Does the original author appear to have gotten some value out of performing the experiment?
  • Any suggestions or observations that could improve this particular process (in general, or specifically you, or specifically for the original author).
opus/spring2012/kkrauss1/start.txt · Last modified: 2012/08/19 20:24 by 127.0.0.1