Ad

Wednesday, January 11, 2017

Software Engineering

Thursday, June 23, 2016

S290 - LINUX PROGRAMMING

S290 - LINUX PROGRAMMING

UNIT - I

Linux Utilities
UNIT - II

8_Shell Variables
       Shell Script Variables
       Shell Variables and Environment Variables
9 Command Substitution
10 shell Commands
11 12  Quoting and Environment Variables List
13  Test Command
17 Interrupt Processing (courtesy:Tutorials Point )
18 Functions
19 Debugging Shell Scripts

UNIT - III

1. File Concept
2. File System Structure
3. Inode
4. File Attributes
5. File types
6. Library Functions,Standard IO, Formatted IO and Stream Errors
10 kernel support for Files
11 System Calls
12 File Descriptors
13 Low level File access using System calls
14 File and Record Locking
15 File and Directory management
UNIT - IV
1.sed ppt
2.awk ppt
3. Built-in Functions ( courtesy : Tutorialspoint )
      Arithmetic Functions
      String Functions
      Time Functions
      Bit-Manipulation Functions
      Miscellaneous Functions
4.awk - Using System commands in awk
5. Socket Programming Theory
6. Connection Oriented programs

UNIT - V

1.Process Creation and Termination in Ubuntu
        Process Concept and process creation
        process structure_1
        process structure_2
        Process State_1
        Process state list in linux
        process state list in linux and PCB
        Process termination_1
        Process termination_2
    Note :-  Process Creation and Termination from wrox - our second textbook
2. Scheduling Algorithms in Ubuntu
3. Page replacement algorithms in linux ( technical paper - courtesy -www.ijera.com) 
4. InterProcess Communication 
5. MultiThreading in Ubuntu 
6. Ubuntu File System ( courtesy - Bhagyesh.S.Patel - SSBT's COET,Jalgoan)

Tuesday, December 1, 2015

Web Technologies ( Lecture NOtes )

Web Technologies

HTML


Cascading Style Sheets

JavaScript

JAVA BEANS

Monday, October 12, 2015

LFU Program

LFU Program

#include<stdio.h>
struct page
   {
      int pno;
      int counter;
    }pages[10];
void print(int a[],int n)
    {
     int i;
     for(i=0;i<n;i++)
  {
    printf(" %d ",a[i]);
   }
      printf("\n");
     }
int search(int e,int a[],int n)
    {
    int i;
      for(i=0;i<n;i++)
{
    if(e==a[i])
  {
return 1;
   }
}
    return 0;
    }
void initialize()
  {
   int i=0;
   for(i=0;i<10;i++)
       {
  pages[i].counter=0;
       }
  }
void main()
  {
    int prs[30],prss,nf,i,j,pno,mm[10]={-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
    int min_t=999,min_p,pf=0;
    clrscr();
printf("Enter MM size(no. of frames):");
scanf("%d",&nf);
printf("enter page ref. string size:");
scanf("%d",&prss);
printf("enter page ref string:");
for(i=0;i<prss;i++)
   {
scanf("%d",&prs[i]);
   }
initialize();//making all page counter=0
//LFU algo.
for(i=0;i<prss;i++)
    {
    pno=prs[i];
    pages[pno].counter++;//increment counter for referenced page
min_t=999;
if(search(prs[i],mm,nf)==0)//when referred page is not in mm
 {
for(j=0;j<nf;j++)//to get least counter page in MM
  {
   pno=mm[j];
    if(pages[pno].counter<min_t)
{
min_t=pages[pno].counter;
min_p=j;
}
   }
mm[min_p]=prs[i];
printf("--Page Fault--");
pf++;
}
print(mm,nf);
     }
    printf("\nNo. of Page Faults:%d",pf);
    getch();
   }

Output:

Wednesday, October 7, 2015

LRU Program


                                      LRU Program

#include<stdio.h>
struct page
   {
      int pno;
      int at;  
    }pages[10];
void print(int a[],int n)
    {
     int i;
     for(i=0;i<n;i++)
           {
             printf(" %d ",a[i]);
            }
      printf("\n");
     }
int search(int e,int a[],int n)
    {
    int i;
      for(i=0;i<n;i++)
        {
    if(e==a[i])
           {
        return 1;
            }
         }
    return 0;
    }
void main()
  {
    int prs[30],prss,nf,i,j,pno,mm[10]={-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
    int counter=0,min_t=999,min_p,pf=0;
        printf("Enter MM size(no. of frames):");
        scanf("%d",&nf);
        printf("enter page ref. string size:");
        scanf("%d",&prss);
        printf("enter page ref string:");
        for(i=0;i<prss;i++)
            {
        scanf("%d",&prs[i]);
            }
         //LRU algo.
         for(i=0;i<prss;i++)
             {
        counter++;//logical clock ticks for every page ref.
        pno=prs[i];
                pages[pno].at=counter;//storing time of page ref.
        min_t=999;
                if(search(prs[i],mm,nf)==0)
                  {
                for(j=0;j<nf;j++)
                   {
                    pno=mm[j];
                     if(pages[pno].at<min_t)
                        {
                min_t=pages[pno].at;
                min_p=j;
                         }
                    }
                mm[min_p]=prs[i];
                printf("--Page Fault--");
                pf++;
                 }
                print(mm,nf);
   
              }
    printf("\nNo. of Page Faults:%d",pf);  
   }
OutPut:-
 
 Enter MM size(no. of frames):3
enter page ref. string size:20
enter page ref string:7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
--Page Fault-- 7  -1  -1
--Page Fault-- 7  0  -1
--Page Fault-- 7  0  1
--Page Fault-- 2  0  1
 2  0  1
--Page Fault-- 2  0  3
 2  0  3
--Page Fault-- 4  0  3
--Page Fault-- 4  0  2
--Page Fault-- 4  3  2
--Page Fault-- 0  3  2
 0  3  2
 0  3  2
--Page Fault-- 1  3  2
 1  3  2
--Page Fault-- 1  0  2
 1  0  2
--Page Fault-- 1  0  7
 1  0  7
 1  0  7

No. of Page Faults:12