Table of Contents

The Beginning

Entries

September 10, 2011

Linked lists. Establishing nodes in structures or classes allows retention of pointers to the next piece of the list or chain. Keeping the construction represented graphically is helpful for both logical resolution and debugging or troubleshooting. The application of this is going to become more intense as we get to doubly linked lists (which will allow movement both up and down the list.)

Keep an eye on the conversion and swapping back and forth between C and C++. it is going to cause headaches later.

September 17, 2011

7400 server is finally up. There were IP issues on the lair.lan network, however it looks like they were all resolved externally. May need to set up virtual machines on the lan to send signals to the switch. Are the virtual machine servers on the same lan?

Note: The packets that are missing from the initial wheezy install for the server can be put on a floppy and loaded during install from there. It does NOT _NEED_ to be a USB drive for things to work.

September 22, 2011

Static library implementation is not nearly as much of a hassle as it seemed to be the first time it was explained. With a bit of troubleshooting and desk checking I think the double linked list will be functional by tonight. make a note somewhere about the actual construction of the library, including the compile commands, the archive commands, and the final compile of the executable.

September 23, 2011

If you have a linked list that works, and you don't deal with the previous location from any node on the list, then it's NOT doubly linked. No matter how much you want to argue. This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

The server is coming along, however it seems that talking to the switch is going to be an ordeal. Microcom installed on the server is providing a terminal program to use in communication. The console cable may not exist At the moment. Construction of one may become necessarry. This is NOT going to be happy fun time.

DATA Topics

Pointers

A Pointer is a variable which contains the memory address location where information of a datatype is stored. A pointer is declared by indicating the datatype and prefixing the pointer name with an asterisk '*'.

#include <string>
/*
 * Sample pointer declaration.
 */
 
int * pointer1;
char* pointer2;
string *pointer3;

Pointer Addresses

Pointer Declaration creates a variable of a type 'pointer' which contains the memory address of the location of a type of data. The address of the pointer itself is NOT the same as the address where the information is located.

The unary operator '&' can be used to return or manipulate the address of the actual pointer.

The code:

int *pointer;     //Declares a pointer 'pointer' pointing to a location containing a data type 'int'
cout << pointer;  //outputs the address the pointer 'pointer' is pointing to.
cout << &pointer;  //Outputs the address of 'pointer' which contains the address that 'pointer' is at, not the address 'pointer' is pointing to output by *pointer.
cout << *pointer; //Outputs the information located at the address 'pointer' is pointing to, not the address pointed at (contained in 'pointer') or the address of 'pointer' itself.

De-referencing Pointers

In order to access the object a pointer points to, it must be dereferenced using the unary operator '*'. The asterisk '*' is therefore used not only to determine that a variable is a pointer at declaration, but also to assign information to the location it points to once memory has been allocated to it.

int i=0;          //declares a variable named 'i' of type integer and assigns the value of 0.
int *pointer;     //declares a pointer to an integer named pointer.
pointer =&i;      //aims the pointer at the memory address where i is located.
*pointer = 1;     //the integer value i's memory address is now equal to 1.

NULL Pointers

Since pointers indicate memory addresses, they are not interchangeable with integers. The exception to that rule occurs for the value 0. In order to avoid confusion the symbolic constant

NULL

is used to indicate a special value for the pointer.

Memory Allocation

In order to use a pointer you must allocate memory to the location it is pointing to. In c this is accomplished with the malloc command. In c++ it is done with the new command.

In C++ the command combination would look something like this:

int *pointer;  //declares a pointer named 'pointer' which will point to the location of data of type int.
pointer = new int; //allocates memory for the pointer to use.

you can also use the memory allocation commands to allocate more/new memory and direct the pointer at the newly allocated space.

Memory De-allocation

To free memory that was allocated use the delete xor free command.

delete pointer;

This does not get rid of the pointer, it simply frees up the allocated memory for future usage.

Function Pointers

Function Pointers are variables which contain the memory address of an entire function. allowing the passing of an entire function to various locations without reincluding the function in declarations. Version Control (checkout, commit, update, add, log)

Pointers (-, -, -)
    arrays, pointer arithmetic
    pointers to pointers
    -
    void pointers
    -
Static allocation vs. Dynamic allocation
    -
    -
structures
    structure pointer
-
-
Stacks (array-based, linked-list based)
    Pushing
    Popping
    Top
    Overflow condition (where applicable?)
    Underflow condition
    -
    -

Linked Lists

A Linked List is a dynamic array of pointers to information in a structured form. it allows creation, elongation, and modification of the array, but only allows movement through the list in one direction.

Doubly Linked Lists

a Doubly Linked List is a Linked List which has internal pointers assigned which will allow movement in both directions I(forward and back) through the list. This makes manipulation of the list faster and more efficient.

LIFO

LIFO or Last in First Out is the manner in which stacks handle information. Data added to the stick (Which can only be added to the “Top”) is accessible until more data is placed on the stack. Therefor the first data added to the stack will not be available until all other data has been removed, or the First data in the stack will be the Last data out.

FIFO

FIFO or First In First Out is the manner in which a Queue handles data. Much like a line at the bank or amusement park, the first person in line is the first one to be server, or to get on the ride. The first data placed in the Queue remain at the “head of the line” and any other data lines up behind it. Therefore when data is removed from the queue the first data put in is the first data out, second data in is second out, third is third, and so on…

..

SYSPROG Topics

User Space

The portion of the system memory where user programs are stored and run.

Kernel

The actual running operating system. It manages all user access and allocation of system resources. It resides in the system space, or kernal space, of system memory.

Kernel Space

The portion of system memory where the running operating system, or kernel, is located.

File Access

File access can be dictated and restricted on an individual, group, and global scope. The abilities to read, write, and execute a file can each be set at each of these levels.

File Descriptors

File descriptors can be seen in a directory listing (They are the first letter entry in a long directory listing ls -l) and they indicate

Buffering

Buffering not only holds information in memory, a stack or cue, for files, input, or output, it can also make your car or leather shoes shiny if utilized properly.

File Open

In order for the system or a program to access or affect nother program during execution first the file must be opened by the program being executed.

File Close

After an executing program has finished with a file, and before run completion, any file which was opened by the program needs to be closed. This is done with the file close command.

File Read

Gets or extracts data from a file opened by an executing program. The information is stored in the buffer and used by the program, then the next read continues from where the last stopped. This continues to the Eod Of File flag or untill the file is closed.

File Write

File Write puts data into a file. It can create a file if it doesn't already exist, and can append to or replace an existing file.

System Calls

When a program requests activity from the kernel to read or write information it's performing a system call to fill or empty the buffer. The more system calls required the slower and less efficient the program.

File lseek

HPC1 Topics

  lab operations
  maintenance
  accessibility
 
  resource usability
  remote administration
  on-site administration
  security - internal
  log analysis
  troubleshooting
  security - external

Straight Thru Cable

A Straight Through Cable is a cable where the wiring of corresponding pins for either end of the cable match. Therefore pin-1 on one end of the cable is wired to pin-1 on the other end. Pin-2 to pin-2, and so on for every connection in the cable.

RS-232

RS-232 (Recommended Standard 232)- A standard for serial binary single-ended data and control signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly used in computer serial ports and cabling.

Remote Administration

The ability to manage, administer and trouble shoot systems remotely, weather via remote login or through background applications which allow access.

Backups

Images, partition copies, and redundant copies of files which can be reinstalled or utilized for recovery of lost or damaged data in case of system damage, corruption, or failure.

Documentation

Written/Recorded instructions and explainations of activity, instructions, and useful documents about execution, implementation, use etc… Developed during implementation and updated throughout all other possible aspects of … well … everything….

Logging

Recording of events and/or activities in a file for informational usage and/or manipulation.

Upgrades

Improvements from the initial or base state. They can include new or better hardware as well as software patches to fix bugs or resolve security issues (among other things).

On-site Administration

DATA Objectives

Data Structure Construction

Utilize primitive data types to construct impressive data structures, like Legos. Manipulate, massage, and man-handle the constructed data structures into structures which can be assembled or clicked together to form singly linked lists, doubly linked lists, and giant robots.

Method

Using a statically defined structure code a doubly linked list in C++. After successfull compilation, create a static library, which includes functions to create a new list, add to an existing list, delete from an existing list, search within a list, edit a list, copy a list and delete an entire linked list(terminate with extreme prejudice/inheume with an axe).

Create a main executable program to utilize the created functions and prove functionality of the library.

Measurement

The library and header compile into a library fine. The executable utilizing the library compiles and runs fine. It is possible to generate a segmentation fault by purposely selecting a node location which is out of scope during the insert function. The same issue may be possible with the top end of the delete function.

Analysis

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

SYSPROG Objectives

Who function (and mod?)

Utilize Operating System build in capabilities to duplicate the results of running the who function.

Method

By accessing the utmp and wtmp files write code to replicate the effect of the 'who' command.

Measurement

Compare the output of the who command on the lab46 server with the output of the replacement program you've written. Compare run-time as well as file-size.

Analysis

HPC1 Objectives

Instigating acceptable

State the course objective; 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.

DATA Experiments

C vs. C++ (size matters)

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:

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.

I'm not as Linked as you Drunk I am

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:

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.

KISS it Pretty!

Question

Is there a way to simplify a doubly linked list, utilizing a library, to make linked list usage easier.

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

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:

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.

SYSPROG Experiments

ls evaluation

Question

How does ls work, and how can we manipulate it?

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

Utilizing existing system files, the ls command in unix can be replicated using the basic inclusive files and functions without using the actual ls command.

Experiment

Utilizing existin functions, with the aid of the course text, attempt to replicate the effect of the ls command.

Data

Analysis

Based on the data collected:

Conclusions

Since most user commands are built on integral kernel functions and commands, investigation of these commands can allow more diverse implementation of the functions and files with a little investigation.

...

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:

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.

....

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:

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.

HPC1 Experiments

Net Installing a Unix Operating System

Question

Can a Unix Operating System be installed on a Gateway 7400 server?

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

With a working Gateway 7400 server, blade drive, and working network connection a linux operating system can be installed on the server.

Since many computers can be “netboot” and install operating systems as a result, it will be possible to accomplist with a Gateway 7400 server also.

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:

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.

Initial Configuration of a Nortel Baystack 450

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:

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.

.?.

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:

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.