THOUSANDS OF FREE BLOGGER TEMPLATES

Friday, July 3, 2009

System Calls

SYSTEM CALLS
-System calls provide an interface to the services made available by an operating system.

Process Control
A process is basically a single running program. It may be a ``system'' program (e.g login, update, csh) or program initiated by the user (textedit, dbxtool or a user written one).

When UNIX runs a process it gives each process a unique number - a process ID, pid.

The UNIX command ps will list all current processes running on your machine and will list the pid.

The C function int getpid() will return the pid of process that called this function.

A program usually runs as a single process. However later we will see how we can make programs run as several separate communicating processes.


File Management

One of the most common features for web applications I’ve built over the last 4 years doing rails is file management. Users download file attachments in almost every web application I use. Thankfully rails has a really capable suite of file management tools, and there are several great plugins to handle some of the more mundane functionality you’d need.

Over the next month or so I’m going to cover the set of techniques I use when building file management solutions for my clients, and some really exciting up and coming solutions which solve the last of my annoyances.

The rough order of business will be:

  1. File Downloads Done Right
  2. File Management Plugins
  3. Painless File Uploads
  4. Storing your Files

Information Maintenance
The CERN proxy server is a concurrent server. Thus it forks a child process for every request received and thereafter it is the child process that is responsible for handling the request. The child process connects to the server, fetches the document, communicate this to the client and dies.

In the modified proxy server, the child process also extracts any replication information present in the response from the server. Since all the child processes run in different address spaces, the replication information available to one child will not be visible to other child processes. In our design this replication information is maintained by the parent process itself in order to make sure that all the child processes have access to it. However, this approach requires some communication, to transfer the information available at a child process, to the parent process.

For implementing this communication, the parent process in the modified proxy server opens a pipe at the startup time. Thereafter, whenever a new child process is created to handle a request, it inherits this pipe from the parent process. The child process also receives the replication information available in the parent process at the time of creation. It uses this information to possibly redirect the request to a replica server. Further, if the child process obtains any new replication information in response to the request made, it communicates this information back to the parent process using the inherited pipe. The parent process collects this information and updates its database accordingly.

0 comments: