The Concept of Limits in a Linux System

Every UNIX based system like Linux has a certain set of limitations on the kind of feature sets and resources that can be used by a program or user. This can range from simplistic models like the complete length of file’s path, to the kind of arguments and calls that a program can have.

Since these limits effectively reduce the scope and abilities of a program, an application trying to be portable across different UNIX implementations needs to account for varying limit standards. The Single UNIX Specification’s third version (SuSv3, in short) defined three discrete functions that an application could call to determine the limits of the system it was working on – fpathconf(), pathconf() andsysconf(). It also defined a limit range that a UNIX implementation could enforce. The most crucial part of this set range was a minimum limit. This particular limit would be set as a constant in the limits header file, with a name that begun with the _posix_ string. If an application could stick to the specified minimum limits, it would manage to be portable across most implementations in all likelihood. However, that would result in a loss of functionality that higher limit values would bring in. This made determining the limits of a system using sysconf() etc. particularly invariable. This function was also a great tool to determine runtime invariant and increasable values.

A function like pathconf(), on the other hand, deals with the name of file paths. Limits on these pathnames could be determined using functions like fpathconf() and pathconf(). Limits can also be ascertained through shell commands. The getconfcommand can help you determine the limits in the UNIX implementation you are currently working on.

During runtime, sysconf() can tell you the limits you need when you specify the name of the limit in the function’s argument. If the limit cannot be determined, or there is an error of any sort, the function will return a value of –1′. SuSv3 dictates that the value returned by the function has to be constant all through the calling.

The difference between pathconf() and fpathconf() is the method of specifying the file/directory. In the case of the former, the pathname needs to be specified, while for the latter, a previously opened file descriptor is required. SuSv3 does not require these functions to return values than remain constant all through an entire process runtime. This lets a file system to be mounted and dismounted multiple times, all while the process is running.

Indeterminate limits are ones that are not defined by an implementation limit constant. The functions stated above would end up returning –1′ to indicate the indeterminacy of the limits required. These hindrances can be handled in a number of ways – the most practical of them being to avoid the checking of limits, and instead perform the corresponding library function calls. If those calls fail too, the errnomust be checked to judge whether some other system limit was violated, so that you can modify the program behavior accordingly.

You should avoid hardcoding system limit assumptions into your programs, as it may not be valid across every file system or UNIX implementation. Using the necessary functions, SuSv3 can guide you to make your program adapt even in real-time.

Running Flash Player On A Linux System

One of the biggest complaints about Linux is that full screen Flash in a browser tends to have a choppy flickering effect that does not look very good. For some who want to experience things like Hulu full screen on their laptops or desktops do not like the fact that Linux and the Flash player are not working together very well.

There are actually a few reasons that this problem exists. The main reason is that the Flash plugin is a closed piece of software made by Adobe. What this means is that people developing software for Linux have to guess at what the Flash player wants since they can’t see all the code. Typically with Linux software the code is open source. This means it is easier to make sure all the code works together since the code can be seen. Unless Adobe chooses to share, this will always be an issue.

There are a few alternatives that do exist. The first is to use the open source version of Flash. The problem with this is that it is not quite as developed yet. One day it will be if improved upon but it is not ready yet.

Another option is to download the flv and swf files and play them full screen with your media player. This will not work with streaming sites like Hulu but will for other types of flash files. In this mode there is no full screen flickering issues.

The last option is to wait for HTML5 standards which are going to gradually phase out Flash. This might not happen for a few years but it will eventually happen. Many are concerned that the browser is too dependent on this one plugin so its use is eventually going to be phased out over time. In HTML5 compatible browsers things like Youtube can be run without using the Flash plugin at all.

Frank has been writing articles online for nearly 4 years now. He also publishes reviews of various consumer products. Come visit his latest websites that review CPA Instruments by Ritoban C and Quick Cash Concept by Eric Rockfeller.