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/17 15:59] – [March 15th, 2016] ahoover3 | blog:spring2016:ahoover3:journal [2016/05/03 16:00] (current) – [April 28th, 2016] ahoover3 | ||
---|---|---|---|
Line 232: | Line 232: | ||
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. | 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 468: | Line 491: | ||
**Resources** | **Resources** | ||
* man 3 getifaddrs - ifaddrs creates a linked list. woot. | * 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 | ||
+ | |||
+ |