queue overrun condition
Queue Overrun/Overflow Condition happens when a program attempts to add an element onto an already filled queue.
stack (LIFO or FIFO?)
LIFO is an acronym that stands for “Last In, First Out.” When it comes to stacks, functions and procedures that are running become stacked on top of one another in memory (called a “push”). When an item is removed from the stack (or “popped”), it is removed from the top down. This computing action allows for stack integrity, and limits access/insertion.
FIFO means “First In, First Out.” In this regard, data and processing are handled on a first come, first serve basis through usage of a queue (or linear data structure). The first process in line is handled before any others are, and then the next, and so on.
List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).
LIFO STACK (Last In, First Out)
(The number represents the order in which they were put into the list)
( 6 ) TOP (This would be the first one out, being the last one input, because it is on the top of the list) ^ | ( 5 ) ^ | ( 4 ^ | ( 3 ) ^ | ( 2 ) ^ | ( 1 ) BOTTOM (This would be the last one out, although it was the first one input)
FIFO STACK (First In, First Out)
(The number, just like above, represents the order)
( 1 ) TOP (This would be the first one out) ^ | ( 2 ) ^ | ( 3 ) ^ | ( 4 ) ^ | ( 5 ) ^ | ( 6 ) BOTTOM (This would be the last one out)
cartesian product
Cartesian Product is making one set that takes one from a set and pairs it with one value from another set. This is done for each of the values in each set. Example:
List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).
variables (environment/local)
A local variable is only known in the function that you created it in. It isn't known in any other functions and can't be used in any other function. Each time you use the function is starts at whatever value you assigned it to. Global variables are known and can be used by any function in the program. So if you make a variable outside of main() it is a global variable because it can be used in any function. If you make a variable inside main() it can only be used in main() so it is a local variable.
1 #include <stdio.h> 2 3 int glovar = 20; // Global Variable 4 5 int local( int ); 6 7 int main() 8 { 9 int localvarmain = 0; 10 11 printf("global variable: %d\n\n", glovar); 12 printf("Local variable cannot be demonstrated the same way because if the program tries\n"); 13 printf("to access a variable that doesn't exist, the program will not compile correctly\n"); 14 printf("and result in the program not running correctly\n\n"); 15 16 // Running local function to add the local variable (to the function) to the global variable 17 18 glovar = local( glovar ); 19 20 printf("New global variable: %d\n", glovar); 21 22 return 0; 23 } 24 25 int local( int glovar ) 26 { 27 int localvar = 10; 28 29 glovar = glovar + localvar; 30 return glovar; 31 }
The printed result:
lab46:~/src/opus/opus2$ ./unixdemo global variable: 20 Local variable cannot be demonstrated the same way because if the program tries to access a variable that doesn't exist, the program will not compile correctly and result in the program not running correctly New global variable: 30
shabang
A shabang is this: #! The shabang is used to read the following test on the first line after it to determine what interpreter the user would like to… use. Some example of interpreters (Taken directly from http://en.wikipedia.org/wiki/Shebang_(Unix):
PATH environment variable
The $PATH variable specifies a list of one or more directory names separated by colons.
The /bin, /usr, and /local directories are typically included in most users' $PATH settings. The current directory is sometimes included, allowing programs in the current directory to be executed. Superuser (root) accounts as a rule are not include in $PATH, however, in order to prevent the accidental execution of scripts in the current directory.
When a command name is specified by the user or an exec call is made from a program, the system searches through $PATH, examining each directory from left to right in the list, looking for a filename that matches the command name. Once found, the program is executed as a child process of the command shell or program that issued the command.
The following is an example of a $PATH:
lab46:~/src/opus/opus2$
The $PATH The home directory (~/) is the beginning of this specified $PATH, followed by the src directory, then the opus directory, and lastly the opus2 directory.
I downloaded VirtualBox and Debian to run on it, but when everything was installed, the possible resolutions were not available to me. I am going to experiment with it and figure out how to fix it.
I installed it with the help of Evan Olson, but the rest of my help will come from the internet and whatever I can find. Any websites used will be listed below:
I believe that I will need to install packages for the resolution. I don't think there will be much more to it, maybe some command line arguments to actually use the packages or something along those lines.
I will research VirtualBox and Debian and find how to fix the problems. I will document my research and experiment in the data section below with the use of screenshots and such!
Well, the first problem I ran into was that I wasn't a sudo user, so with your help, I made myself one by going to the terminal, going to the root command prompt, accessing the visudo file, and adding myself as a user. From there, I typed in sudo apt-get install virtualbox-ose-guest-x11, which, I think, installed the Guest Addition Driver X11. I ended up getting a larger resolution (1024 x 768) instead of the monitor's natural resolution (1600 x 900). I tried the other website's tactics, which were to update Debian, remove the OSE guest additions using sudo apt-get remove virtualbox-ose-guest* and then mounted the VBOXADDITIONS ISO by using the command sudo sh /media/cdrom/VBoxLinuxAdditions.run.
Based on the data collected:
I can conclude that I have an extremely hard time messing around with operating systems and it is a lot harder than I thought it would be.