This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
blog:spring2016:ahoover3:journal [2016/03/08 16:09] – ahoover3 | blog:spring2016:ahoover3:journal [2016/05/03 16:00] (current) – [April 28th, 2016] ahoover3 | ||
---|---|---|---|
Line 205: | Line 205: | ||
The root password, username, user password and the like were kept the same, in order to make it easier to transfer information between the machines and make authentication easier. | The root password, username, user password and the like were kept the same, in order to make it easier to transfer information between the machines and make authentication easier. | ||
+ | |||
+ | ====March 7th, 2016==== | ||
+ | |||
+ | All the computers had installed Debian properly except for minion0, which failed in its installation. When reinstalling the system, instead of installing the desktop environment like before on the other machines, a purely bare bones installation was used. | ||
+ | |||
+ | This was done in order to make the most optimized system possible. Once the system was installed, even the recommended files and installations were removed. Things like the dictionary library aren't needed for what we are doing, so they were taken out. | ||
+ | |||
+ | When all is said and done, the entire OS was reduced down to only 830MB, roughly. This small size enables us to fit the entire system on only a gigabyte of memory. And since speed is the goal, the intent is to put that entire system on a 1GB ram stick, or otherwise known as a ramdisk. This makes any performance blazingly fast. Memory in ram though is volatile though, which means that it would have to be netbooted every time the computer boots. | ||
+ | |||
+ | ====March 11th, 2016==== | ||
+ | |||
+ | Today we tackled the issue of not having the IP addresses assigned properly for the cluster nodes. Every time they were booted, they took the addresses of 10.80.2.142, | ||
+ | |||
+ | The static IP addresses that were supposed to be assigned are as follows: | ||
+ | - Minion0 - 10.80.2.100 | ||
+ | - Minion1 - 10.80.2.101 | ||
+ | - Minion2 - 10.80.2.102 | ||
+ | - Minion3 - 10.80.2.103 | ||
+ | |||
+ | This is what the DHCP was set for, but it never worked. | ||
+ | It was confusing because there wasn't any clear reason for it to be holding on to the previous address. Eventually after a lot of trial and error, it was determined that in the DHCP log there was an old entry for the mac address of the machines that was listed before the new IP addresses we had created. This was because these machines were originally part of the old video wall project. After deleting these entries, the IP's were assigned properly. | ||
+ | |||
+ | ====March 14th, 2016==== | ||
+ | |||
+ | Working on cosmetic details and trying to make each host display their name at the prompt, instead of just the ambiguous minion. This would make it easier to discern which machine you were hooked into and working on, making things easier. | ||
+ | |||
+ | Other than that, the machines are ready to go in order to start implementing the programs that will utilize the power of multiprocessing as opposed to multithreading. | ||
+ | |||
+ | ====March 21st, 2016==== | ||
+ | |||
+ | Did some research on creating a cluster setup using the timeserver program in Systems Programming earlier. There is a cluster library, however it would probably be better to use the existing libraries in order to get a better understanding of the way sockets work. | ||
+ | |||
+ | ====March 23rd, 2016==== | ||
+ | |||
+ | Working on creating a program that will take advantage of the cluster. I was originally thinking about trying to send the program to the individual nodes, but I feel that it will be easier to give the server program the existing function to use, and simply use the client program to read the data that is outputted to the socket. This way, there is only reading that is going on. | ||
+ | |||
+ | ====April 13th, 2016==== | ||
+ | |||
+ | Today I researched and learned about Beowulf clusters. Beowulf clusters are an open source community that is implementing a similar system comparable to what we have created in the lab. | ||
+ | |||
+ | There are multiple open source systems and programs that take advantage of cluster computing in c, with one of the top ones being MOSIX. These systems take multiple network connected machines and turns them into a " | ||
+ | |||
+ | |||
+ | ====April 15th, 2016==== | ||
+ | |||
+ | More information regarding Dragonfly BSD : | ||
+ | |||
+ | More information regarding MOSIX: [[https:// | ||
+ | |||
+ | Perks of using Dragonfly versus MOSIX is that MOSIX treats every single node on a cluster as part of a whole single machine. This means that performance decreases might be seen if there are differences in the physical hardware of the nodes. Dragonfly is different in the respect that you have more control over where specific parts of the program go if you so desire. | ||
======Systems Programming Journal====== | ======Systems Programming Journal====== | ||
Line 412: | Line 462: | ||
Quicksort, | Quicksort, | ||
+ | |||
+ | ====March 10th, 2016==== | ||
+ | |||
+ | PNC2 is open for business. | ||
+ | |||
+ | Talking about sockets today, and using them to create a time server. | ||
+ | |||
+ | Useful website: beej's guide to networking. | ||
+ | |||
+ | **Protocols** | ||
+ | * ipx/spx | ||
+ | * smb | ||
+ | * tcp/ip | ||
+ | |||
+ | sockaddr_in: | ||
+ | |||
+ | |||
+ | ====March 15th, 2016==== | ||
+ | |||
+ | Finished the timeserver.c program and demonstrated it working. Depending on what port it uses, that port cannot be accessed by anyone else after the server is running. This allows only one program to work at a time. | ||
+ | |||
+ | ====March 17th, 2016==== | ||
+ | |||
+ | Happy St. Patrick' | ||
+ | |||
+ | Today' | ||
+ | |||
+ | **Resources** | ||
+ | * man 3 getifaddrs - ifaddrs creates a linked list. woot. | ||
+ | |||
+ | ====March 22nd, 2016==== | ||
+ | |||
+ | Writing the client side of the socket implementation. | ||
+ | |||
+ | We will use the write and read system calls. They are very low level. | ||
+ | |||
+ | dup2: duplicating. We made a modification using this at the end of our timeserver program. | ||
+ | |||
+ | getenv | ||
+ | |||
+ | ====March 24th, 2016==== | ||
+ | |||
+ | Talking about terminal management (stty)and ioctl() | ||
+ | |||
+ | **Resources** | ||
+ | * man stty | ||
+ | * man ioctl | ||
+ | * man tty_ioctl | ||
+ | * man ioctl_list | ||
+ | |||
+ | stty -echo: hides your typing within the terminal. Passwords use this. | ||
+ | |||
+ | ====April 5th, 2016==== | ||
+ | |||
+ | Talking about pipes today. | ||
+ | |||
+ | Pipes: unidirectional data channel that can be used for interprocess communication. | ||
+ | |||
+ | man pipe | ||
+ | |||
+ | FIFO: fist in, first out. - queue | ||
+ | |||
+ | |||
+ | stty echo: resets the previous operation. | ||
+ | |||
+ | ====April 7th, 2016==== | ||
+ | |||
+ | Time to explore signals! | ||
+ | |||
+ | newer way: sigaction - this is much more portable and is used for more broad instances. This still uses signal.h. | ||
+ | |||
+ | **Resources needed:** | ||
+ | |||
+ | * man signal | ||
+ | * signal.h | ||
+ | * kill -l for signal #'s | ||
+ | * CTRL+Z to kill programs | ||
+ | * man signal 7 | ||
+ | * man sigaction | ||
+ | |||
+ | **Interacting with the program:** | ||
+ | * ps -find the running | ||
+ | * ps | grep sigfun2 | ||
+ | * kill -# (process id) | ||
+ | |||
+ | |||
+ | |||
+ | ====April 12th, 2016==== | ||
+ | |||
+ | **Shared Memory** | ||
+ | |||
+ | The goal is to use this as a shared communication channel. | ||
+ | |||
+ | * man page: man shmat | ||
+ | * must be compiled with -lrt (real time library) | ||
+ | * ls -l / | ||
+ | * cat / | ||
+ | * | ||
+ | |||
+ | ====April 14th, 2016==== | ||
+ | |||
+ | Continuation of shared memory exploration. | ||
+ | |||
+ | We are attempting to create a ghetto messaging (chat) program that utilizes shared memory. | ||
+ | |||
+ | ====April 21st, 2016==== | ||
+ | |||
+ | Today' | ||
+ | |||
+ | Ncurses is a terminal management library. This means that it takes over the stdout, stdin, and such. Things like fprintf will not work properly while ncurses is engaged. | ||
+ | |||
+ | **Resources: | ||
+ | * man ncurses (on the pod, not lab46) | ||
+ | * man initscr (init screen) | ||
+ | * -lncurses (to compile against) | ||
+ | * man refresh | ||
+ | * man getxyx | ||
+ | |||
+ | |||
+ | |||
+ | ====April 26th, 2016==== | ||
+ | |||
+ | Working with ncurses again today, with an immersion in the windows aspect of it. | ||
+ | |||
+ | ====April 28th, 2016==== | ||
+ | |||
+ | da real Pac-Man implementation. | ||
+ | |||
+ | Over the years, there have been many different implementations that are similar to the original, and those with different styles. | ||
+ | |||
+ | In order to layout the board, we will use a variation of the bit-field called a bit-board. | ||
+ | |||
+ | In order to make things more manageable, separate files should be written and compiled in one. | ||
+ | |||
+ | ====May 3rd, 2016==== | ||
+ | |||
+ | Continuing the pac-man journey by implementing a cursor function. | ||
+ | |||
+ | user include ncurses.h | ||
+ | |||
+ |