Sie sind auf Seite 1von 31

M.

S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)

DATA STRUCTURES AND ALGORITHMS
ASSIGNMENT



Centre Name: CSN
Course Name: M. Sc (Engg) in Computer Science And Networking

Name of the Student : P. V K P Sasidhar
Student Registration No : CJB0910010
Module Leader at MSRSAS : N D Gangadhar


FULL TIME 2010 BATCH

M. S. Ramaiah School of Advanced Studies
New BEL Road, Gnanagangothri Campus, MSR Nagar, Bangalore-560 054
Tel: 23605539 / 23601983 / 2360 4759. Fax: 2360 1923
website: http://www.msrsas.org



P
O
S
T
G
R
A
D
U
A
T
E

E
N
G
I
N
E
E
R
I
N
G

A
N
D

M
A
N
A
G
E
M
E
N
T

P
R
O
G
R
A
M
M
E

(
P
E
M
P
)

M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)

M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 1
Declaration Sheet
Student Name P. V K P Sasidhar
Reg. No CJB0910010
Course
M. Sc (Engg.) Computer Science And
Networking
Batch FULL TIME 10
Module Code CSN501
Module Title Data Structures And Algorithms
Module Start Date 02.11.2010 Submission Date 29.11.2010
Module Leader N D Gangadhar
Submission Arrangements
This assignment must be submitted to Academic Records Office (ARO) by the submission date before 1730
hours for both Full-Time and Part-Time students.
Extension requests
Extensions can only be granted by the Head of the Department / Course Manager. Extensions granted by any
other person will not be accepted and hence the assignment will incur a penalty. A copy of the extension
approval must be attached to the assignment submitted.
Late submission Penalties
Unless you have submitted proof of Mitigating Circumstances or have been granted an extension, the penalties
for a late submission of an assignment shall be as follows:
Up to one week late: Penalty of one grade (5 marks)
One-Two weeks late: Penalty of two grades (10 marks)
More than Two weeks late: Fail - 0% recorded (F
2
)
All late assignments must be submitted to Academic Records Office (ARO). It is your responsibility to
ensure that the receipt of a late assignment is recorded in the ARO. If an extension was agreed, the
authorization should be submitted to ARO during the submission of assignment.

To ensure assignments are written concisely, the length should be restricted a limit indicated in the
assignment questions. Each participant is required to retain a copy of the assignment in his or her record in
case of any loss.
Declaration
The assignment submitted herewith is a result of my own investigations and that I have conformed to the
guidelines against plagiarism as laid out in the PEMP Student Handbook. All sections of the text and results,
which have been obtained from other sources, are fully referenced. I understand that cheating and plagiarism
constitute a breach of University regulations and will be dealt with accordingly.
Signature of
Delegate
Date

Date Stamp from
ARO

Signature of ARO
Staff

Signature of
Module Leader

Signature of
Course Manager


M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 2
M. S. Ramaiah School of Advanced Studies
Postgraduate Engineering and Management Programme- Coventry University (UK)
Assessment Sheet

Department ESDC
Course Computer Science And Networking Batch Full-Time 2010
Module Code CSN501 Module Title Data Structures And Algorithms
Module Leader N D Gangadhar
Module Completion
Date
29.11.2010
Student Name P. V K P Sasidhar ID Number CJB0910010

Attendance Details Theory Laboratory Fine Paid
(if any for shortage of attendance)
Remarks

Written Examination Marks Sheet (Assessor to Fill)
Q. No a b C d Total Remarks
1
2
3
4
5
6
Marks Scored for 100 Marks Scored out of 50
Result PASS FAIL
Assignment Marks-Sheet (Assessor to Fill)
Part a b C d Total Remarks
A
B
C
Marks Scored for 100 Marks Scored out of 50
Result PASS FAIL

PMAR- form completed for student feedback (Assessor has to mark) Yes No
Overall-Result
Components Assessor Reviewer
Written Examination (Max 50) Pass / Fail
Assignment (Max 50) Pass / Fail
Total Marks (Max 100) (Before Late Penalty) Grade
Total Marks (Max 100) (After Late Penalty) Grade



IMPORTANT
1. The assignment and examination marks have to be rounded off to the nearest integer and entered in the respective fields
2. A minimum of 40% required for a pass in both assignment and written test individually
3. A student cannot fail on application of late penalty (i.e. on application of late penalty if the marks are below 40, cap at 40 marks)


Signature of Reviewer with date Signature of Module Leader with date

M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 3
Index
Abstract. 4
Introduction....... 5
Position based list ADT..6
Unification by sequence ADT7
Conclusion..7
File operations8
Pseudo code8-9
Implementation.9-18
Testing and validation18-20
Conclusion...20
Logging sub-system.21
Implementation...21-28
Testing and validation.28
Conclusion...28
References29







M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 4
Abstract
In an array the objects are systematically arranged, usually in rows and columns.An
array is most fundamental Abstract Data Type. An array is a finite sequence of storage cells.
The data storage in most computers can be regarded as an array, so array ADT provides the
ultimate implementation for other Abstract Data TypeIn c arrays are error prone i.e., before
starting of the array the element can be accessed means v[-1] and past the ending of the array
the element can be accessed means v[n] and Modify the variable that keeps track of size
(e.g., n)The List ADT is one of the most basic data structures. List ADT have more complex
data types like Trees, Stacks, Queues, etc.
Pointer has been declared in file operations. The file structure is defined in
input output library. In this file operations 3 modes are available they are read and write and
append modes. In read mode, if file doesnt exist then error is returned. In write mode, if file
doesnt exist then file is created. If file is exist then file is erased. In append mode, if file
doesnt exist then file is created. fclose () is used for close a file. fopen() is used for open a
file
Administrators of UNIX system are familiar about syslog daemon. But Unless
a problem is reported by someone the information that is collected remains unprocessed. For
a site that has more machines, no time is devoted by people to log in and check multiple log
files each day or month.









M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 5


Introduction:
For organising and storing the data specialized format called data structures is
used. Some of the data structure types are file, table, array and so on. In order to suit a
specific purpose a data structure is designed so that it can be worked and also can be accessed
within appropriate ways. Data structures are used in computer programming for data storing
for the purpose of working on it with various algorithms.
A mathematical model for a certain group of data structures
having same behavior or having similar semantics for one or more programming languages is
called abstract data type. In order to build data structures it is important to have ADTs.
Array ADT:
Array is a collection of homogeneous elements. Array is a static like data
type but array list is the list of array is not a like data type. An array is a basic Abstract Data
Type, it can show reasonable response to consider others. An array is a finite sequence of
storage cells. It collects data elements that is same type of elements have sequence of fixed
size. It can access each element directly in the array by specifying its position so that position
values can be retrieved from or stored.
There are different types of arrays differentiated based on the number of
indexes are used
One dimensional array: In this one index is used.
Two dimensional array: In this two indexes are used.
Multi dimensional array: In this more than one index is used.
Static array: The allocation of memory for the array is determined by the compiler.
Dynamic array: The allocation of memory in dynamic array will takes place during
execution.
List ADT:
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 6
List ADT is the collection of heterogeneous elements. The List ADT is also
one of the fundamental data structures. This concept is used for more complex data types like
stack, queues, trees etc. The List ADT is also known as a recursive ADT. The operations on
an ADT are constructors, interrogators, manipulators, and destructors.
A list is a collection of items which are accessible one after another. List ADT operations are
based on positions. List ADT position is generic.
Comparative use of array and list ADT:
List ADT:
In this list ADT list is a sequential data structure it collects the items one after another
starting at head and ending with tail.
Size of list[0] is called as null list.
In this list insertion and deletion operations are can be made at any position.
Sequential data structure is widely used in numerous applications it do not have
random access.
In Array list:
List can be stored in this Array list.
In this insertion element time in certain position depending on list size.
In this insertion element time does not depend on the list.
In this array position of each element is given in the form of indices from 0 to n-1.
In list ADT:
Insertion element time with node pointer is depends upon the node pointer.
In this each element position of the list is given in the form of node.
Insertion element time at any position does not depend on the list size.
Critical appraisal of position based list ADT:
Position ADT is intuitive notation of place of an elment.
Each element of the list can be stored at position and these elements are arranged
in a linear order.
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 7
Wherever a single object is stored the position ADT is the notion of a place
within a data structure.
In position ADT null position refers to no object and defined in terms of its
neighbors.
It gives different ways of storing data, such as
A cell of an array.
A node of a linked list.
It have only one method i.e., element(): returns the element stored at the
position.
Critical appraisal of unification sequence ADT:
Sequence ADT is a collection of sequential arranged elements and it
provides arbitrary elements method.
Sequence ADT is the set of vector and list ADTs and it can be implemented
in linked list or array.
In this, elements can be ordered in a sequence manner is described about the
ADT operations and not by elements values.
Conclusion:
Arrays cannot allocate memory dynamically. Suppose we wanna add
more elements than the array size it is not possible. Array and lists are most basic types of
data structure. Linked list are create any number of nodes and adding them at any position. In
this all operations of elements in middle also easier. Sequence ADT is used to send the
sequence of packets of network and these packets represent the relationship between their
neighbors.






M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 8
File operations:
A file is a collection of related data. computer will treat file as a single unit. Files are
secondary storage of the computers. so whenever a computer switch off then file
contents remain intact. When a computer reads a file, it copies the file from the
storage device to memory; when it writes to a file, it transfers data from memory to
the storage device.
The file open function (fopen) serves two purposes:
In this connection between the physical file and the stream is available.
It creates a program file structure to store the information C needs to
process the file.
Syntax: fopen(filename, mode);
Whenever finish a mode, we need to close the file before ending the program or
beginning another mode with that same file. we use fclose and the pointer variable for
file.
Syntax: fclose(spData);

Pseudo code:
Append:
void append()
{
fp=fopen("Item.dat", "ab+");
if(fp==NULL)
{
printf("File Creation Failed!");
}
printf("Enter the nos. of Items : ");
scanf("%d", &n);
for(i=0;i<n;i++) {
printf("Enter the Item Number : ");
scanf("%d", &i.no);
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 9
}

List:
void list()
{
fp=fopen("Item.dat", "rb+");
if(fp==NULL)
{
printf("\n\tFile doesnot exist!!! TRY AGAIN");
}
while((fread(&i, sizeof(i), 1, fp))==1)
{
nofrec++;
printf("\n Item Number : %d", i.no);
}
printf("Total number of records present are : %d", nofrec);
fclose(fp);
}

Implementation:
#include <stdio.h>
#include<stdlib.h>
void append();
void list();
void search();
void modify();
void del();
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 10
struct employee
{
int no, sal;
char gen, name[20];
};
void main()
{
int a;
char ch[1];
do{
printf("\nEMPLOYEE DATABASE\n\n");
printf("1.Append Employee Record\n2.List Employee Record\n3.Modify Employee Record\n4.Delete
Employee Record\n5.Search Employee Record\n Enter Choice : ");
scanf("%d",&a);
switch(a)
{
case 1:
append();
break;
case 2:
list();
break;
case 3:
modify();
break;
case 4:
del();
break;
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 11
case 5:
search();
break;
default :
printf("Invalid Choice!");
}
printf("\n More Actions ? (Y/N) :");
fflush(stdin);
scanf("%s", ch);
}
while(strcmp(ch,"y")==0);
}
void append()
{
int i,n;
struct employee e;
FILE *fp;
fp=fopen("Employee.dat", "ab+");
if(fp==NULL)
{
printf("File Creation Failed!");
exit(0);
}
printf("Enter the nos. of employees : ");
scanf("%d", &n);
for(i=0;i<n;i++) {
printf("Enter the Employee Number : ");
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 12
scanf("%d", &e.no);
printf("Enter the Employee Salary : ");
scanf("%d", &e.sal);
//fflush(stdin);
getchar();
printf("Enter the Employee gender: ");
scanf("%c", &e.gen);
printf("enter the Employee Name : ");
scanf("%s", e.name);
//fflush(stdin);
//gets(e.name);
printf("\n\n");
fwrite(&e, sizeof(e), 1, fp);
}
fclose(fp);
}
void list()
{
int nofrec=0;
struct employee e;
FILE *fp;
fp=fopen("Employee.dat", "rb+");
if(fp==NULL)
{
printf("\n\tFile doesnot exist!!! TRY AGAIN");
exit(0);
}
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 13
while((fread(&e, sizeof(e), 1, fp))==1)
{
nofrec++;
printf("\nEmployee Number : %d", e.no);
printf("\nEmployee Salary : %d", e.sal);
printf("\nEmployee gender : %c",e.gen);
printf("\nEmployee Name : %s",e.name);
printf("\n\n");
}
printf("Total number of records present are : %d", nofrec);
fclose(fp);
}
void modify()
{
int recno, nofrec=0;
char ch;
struct employee e;
FILE *fp;
fp=fopen("Employee.dat", "rb+");
printf("Enter the Employee Number to modify : ");
scanf("%d", &recno);
while((fread((char *)&e, sizeof(e), 1, fp))==1)
{
nofrec++;
if(e.no==recno)
{
printf("\nEmployee Number : %d", e.no);
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 14
printf("\nEmployee Salary : %d", e.sal);
printf("\nEmployee gender : %c",e.gen);
printf("\nEmployee Name : %s",e.name);
printf("\n");
printf("Do you want to modify this record : ? (Y/N)");
fflush(stdin);
scanf("%c", &ch);
fseek(fp, ((nofrec-1)*sizeof(e)), 0);
if(ch=='Y'|| ch=='N')
{
printf("Enter the Employee Salary : ");
scanf("%d", &e.sal);
printf("Enter the Employee gender: ");
fflush(stdin);
scanf("%c", &e.gen);
printf("Enter the Employee Name : ");
fflush(stdin);
//gets(e.name);
fwrite((char *)&e, sizeof(e), 1, fp);
printf("Record Modified");
}
else
printf("No modifications were made");
fclose(fp);
}
}
}
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 15
void del()
{
int recno;
char ch;
struct employee e;
FILE *fp, *ft;
fp=fopen("Employee.dat", "rb");
ft=fopen("Temp.dat","wb");
printf("Enter the Employee Number to delete : ");
scanf("%d", &recno);
while((fread((char *)&e, sizeof(e), 1, fp))==1)
{
if(e.no==recno)
{
printf("\nEmployee Number : %d", e.no);
printf("\nEmployee Salary : %d", e.sal);
printf("\nEmployee gender : %c",e.gen);
printf("\nEmployee Name : %s",e.name);
printf("\n");
printf("Do you want to delete this record : ? (Y/N)");
fflush(stdin);
scanf("%c", &ch);
}
}
if(ch=='Y'||ch=='N')
{
rewind(fp);
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 16
while((fread((char *)&e, sizeof(e), 1, fp))==1)
{
if(recno!=e.no)
{
fwrite((char *)&e, sizeof(e), 1, ft);
}
}
}
else
printf("No Record was deleted");
fclose(fp);
fclose(ft);
remove("Employee.dat");
rename("Temp.dat", "Employee.dat");
}
void search()
{
int s,recno;
char sname[20];
struct employee e;
FILE *fp;
fp=fopen("Employee.dat", "rb");
printf("\n1.Search by Name\n2.Search by Employee No.\n Enter choice : ");
scanf("%d", &s);
switch(s)
{
case 1:
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 17
printf("Enter the Employee Name to Search : ");
fflush(stdin);
//gets(sname);
while((fread((char *)&e, sizeof(e), 1, fp))==1)
{
if(strcmp(sname,e.name)==0)
{
printf("\nEmployee Number : %d", e.no);
printf("\nEmployee Salary : %d", e.sal);
printf("\nEmployee gender : %c",e.gen);
printf("\nEmployee Name : %s",e.name);
printf("\n");
}
else
{
printf("Record not found with %s",sname);
break;
}
}
break;
case 2:
printf("Enter the Employee Number to Search : ");
scanf("%d", &recno);
while((fread((char *)&e, sizeof(e), 1, fp))==1)
{
if(e.no==recno)
{
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 18
printf("\nEmployee Number : %d", e.no);
printf("\nEmployee Salary : %d", e.sal);
printf("\nEmployee gender : %c",e.gen);
printf("\nEmployee Name : %s\n",e.name);
}
}
break;
}
}
Test and validation:


M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 19




M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 20



Conclusion:
File operations are easy to understand the users. In these file operations
three modes are available. They are write mode, read mode, append mode. Pointer has been
declared in file operations. Stream pointer is used in fprintf and fscanf statements. These file
operations are accessing the files randomly.

M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 21

Logging sub-system:
It is difficult for automated scripts to correlate data across machines
because they have to access individually for each machine. In order to reduce the burden of
automatic and manual data processing, many sites are considering the implementation of a
central log server that gathers data for all the machines on a network. It also includes UNIX
servers, windows and Mac desktops, and also networking equipment like routers and
switches. With most stock UNIX syslog daemons the centralized logging is fairly trivial, but
from early incarnations the syslogd is little changed and it has some shortcomings

Implementation:
#include <stdio.h>
#include<stdlib.h>

void append();

void list();

void search();

void modify();

void del();

struct log

{

int pid[10];

char process[20];

};

void main()

{ int a;

char ch[1];

do{

printf("\n log DATABASE\n\n");

printf("1.Append log Record\n2.List log Record\n3.Modify log
Record\n4.Delete log Record\n5.Search log Record\n Enter Choice : ");

scanf("%d",&a);

switch(a)

M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 22
{

case 1:

append();

break;

case 2:

list();

break;

case 3:

modify();

break;

case 4:

del();

break;

case 5:



search();

break;

default :

printf("Invalid Choice!");

}

printf("\n More Actions ? (Y/N) :");

fflush(stdin);

scanf("%s", ch);

}while(strcmp(ch,"y")==0);

}

void append()

{ int i,n;

struct log;

FILE *fp;

fp=fopen("log.dat", "ab+");

if(fp==NULL)
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 23

{

printf("File Creation Failed!");

exit(0);

}

printf("Enter the nos. of logs : ");

scanf("%d", &n);

for(i=0;i<n;i++) {

printf("Enter the log pid : ");

scanf("%d", &l.pid);

printf("enter the log process : ");

scanf("%s", l.process);

//fflush(stdin);

//gets(l.process);

printf("\n\n");

fwrite(&l, sizeof(l), 1, fp);

}

fclose(fp);

}



void list()

{ int nofrec=0;

struct log l;

FILE *fp;

fp=fopen("log.dat", "rb+");

if(fp==NULL)

{

printf("\n\tFile doesnot exist!!! TRY AGAIN");

exit(0);

}

while((fread(&l, sizeof(l), 1, fp))==1)

M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 24
{ nofrec++;

printf("\n log pid : %d", l.pid);

printf("\n log process : %s",l.process);

printf("\n\n");

}

printf("Total number of records present are : %d", nofrec);

fclose(fp);

}

void modify()

{ int recno, nofrec=0;

char ch;

struct log l;

FILE *fp;

fp=fopen("log.dat", "rb+");

printf("Enter the log pid to modify : ");

scanf("%d", &recno);

while((fread((char *)&l, sizeof(l), 1, fp))==1)

{ nofrec++;

if(l.pid==recno)

{

printf("\nlog pid : %d", l.pid);

printf("\nlog process : %s",l.process);

printf("\n");

printf("Do you want to modify this record : ? (Y/N)");

fflush(stdin);

scanf("%c", &ch);

fseek(fp, ((nofrec-1)*sizeof(l)), 0);

if(ch=='Y'|| ch=='y')

{


printf("Enter the log process : ");

M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 25
fflush(stdin);

//gets(l.process);

fwrite((char *)&l, sizeof(l), 1, fp);

printf("Record Modified");

}

else

printf("No modifications were made");

fclose(fp);

}

}

}

void del()

{

int recno;

char ch;

struct log l;

FILE *fp, *ft;

fp=fopen("log.dat", "rb");

ft=fopen("Temp.dat","wb");

printf("Enter the log Number to delete : ");

scanf("%d", &recno);

while((fread((char *)&l, sizeof(l), 1, fp))==1)

{

if(l.no==recno)

{

printf("\nlog pid : %d", l.pid);

printf("\nlog process : %s",l.process);

printf("\n");

printf("Do you want to delete this record : ? (Y/N)");

fflush(stdin);

scanf("%c", &ch);
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 26

}

}

if(ch=='y'||ch=='Y')

{

rewind(fp);

while((fread((char *)&l, sizeof(l), 1, fp))==1)

{

if(recno!=e.no)

{

fwrite((char *)&l, sizeof(l), 1, ft);

}

}

}

else

printf("No Record was deleted");

fclose(fp);

fclose(ft);

remove("log.dat");

rename("Temp.dat", "log.dat");

}

void search()

{ int s,recno;

char sname[20];

struct log l;

FILE *fp;

fp=fopen("log.dat", "rb");

printf("\n1.Search by log process\n2.Search by log pid\n Enter choice : ");

scanf("%d", &s);

switch(s)

{

M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 27
case 1:

printf("Enter the log process to Search : ");

fflush(stdin);

//gets(sname);

while((fread((char *)&l, sizeof(l), 1, fp))==1)

{

if(strcmp(sname,log.process)==0)

{

printf("\nlog pid : %d", l.pid);

printf("\nlog process: %s",log.process);

printf("\n");

}

else

{

printf("Record not found with %s",sname);

break;

}

}

break;

case 2:

printf("Enter the log pid to Search : ");

scanf("%d", &recno);

while((fread((char *)&l, sizeof(l), 1, fp))==1)

{

if(e.no==recno)

{

printf("\nlog pid : %d", l.pid);

printf("\nlog process : %s\n",l.process);

}

}

break;
M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 28

}

}


Testing and validation:







Conclusion:
It is an alternative file system design. It is mainly used for system log
files for th operating system. Generally it is text message its stores a detailed functionality
which happens in the previous programming. It mainly uses at the time of system crash.






M.S Ramaiah School of Advanced Studies Postgraduate Engineering and Management Programme (PEMP)
Real-Time Software Engineering 29

References:
[1] M.T. Goodrich and R. Tamassia, Algorithm Design: Foundations, Analysis, and
Internet Examples, John Wiley & Sons, Inc., 2002.
[2] Anonymous, Data structures
http://www.idevelopment.info/data/Programming/data_structures/overview/Data_Stru
ctures_Algorithms_Introduction.shtml, retrieved on 25/11/10.
[3] Anonymous, List ADT, http://www.darronschall.com/weblog/2003/09/the-list-adt.cfm,
retrieved on 25/11/10
[4] Forouzan, Behrouz & Richard Gilberg, Computer Science: A Structured Programming
Approach Using C. Thomson Course Technology: 2007.
[5] Anonymous, logging subsystem
http://en.wikipedia.org/wiki/Common_Log_File_System