Sign in or 

| Started By | Thread Subject | Replies | Last Post | ||
|---|---|---|---|---|---|
| Anonymous | RMI-Program | 0 | Oct 16 2007, 12:49 PM EDT by Anonymous | ||
|
|
Thread started: Oct 16 2007, 12:49 PM EDT
Watch
//RMI Interface
import java.rmi.*; public interface Hello extends java.rmi.Remote { public void Hi() throws java.rmi.RemoteException; } Save this file as Hello.java and Compile it using javac. //Implementation File import java.rmi.*; class Implementation extends java.rmi.server.UnicastRemoteObject implements Hello { Implementation() throws java.rmi.RemoteException { super(); } public void Hi() throws java.rmi.RemoteException { System.out.println("HELLO!!!"); } } Save file as Implementation.java and compile it. //Server Side Program import java.rmi.Naming; class Server { public static void main(String args[]) { try { Implementation i = new Implementation(); Naming.rebind("rmi://localhost:1099/HelloService",i); } catch(Exception e) { System.out.println("Exception at server!!"+e); } } } Save file as Server.java and compile. //Client Side Implementation import java.rmi.Naming; class Client { public static void main(String args[]) { try { Hello p=(Hello)Naming.lookup("rmi://localhost/HelloService"); p.Hi(); } catch(Exception e) { System.out.println("Exception at client"); } } } Save File as Client.java and compile. Execution: 1.Open command 2. rmic Implementation 3. rmiRegistry 4.Open new command prompt 4.1 java Server 5.Open new Command prompt 5.1 java Client 6.Stop. |
||||
| Anonymous | Ajith in kreedom!!! Thala Rock---reviw by india glits | 0 | Aug 10 2007, 3:25 PM EDT by Anonymous | ||
|
|
Thread started: Aug 10 2007, 3:25 PM EDT
Watch
http://www.youtube.com/watch?v=O2I8lURCVO4
|
||||
| Anonymous | the site is cool | 0 | Jul 21 2007, 11:31 AM EDT by Anonymous | ||
|
|
Thread started: Jul 21 2007, 11:31 AM EDT
Watch
i see grt work in ur site and tat it make it really cool ...tat too the picture effect is grt ... nice job.... keep up the good work .... and looking for still more of ur works... all the best..
|
||||
| intel_ram2002 | FOR POSTER DESIGN JUST PASTE THE LINK IN THE ADDRESS BAR AND CLICK GO | 0 | Jan 2 2007, 2:20 PM EST by intel_ram2002 | ||
|
Thread started: Jan 2 2007, 2:20 PM EST
Watch
|
|||||
| intel_ram2002 | For applying for Duplicate Certificate | 0 | Dec 26 2006, 1:47 AM EST by intel_ram2002 | ||
|
Thread started: Dec 26 2006, 1:47 AM EST
Watch
http://www.annauniv.edu/coe/info.html#Mark
|
|||||
| intel_ram2002 | SYSTERM CALL | 0 | Oct 30 2006, 8:36 PM EST by intel_ram2002 | ||
|
Thread started: Oct 30 2006, 8:36 PM EST
Watch
fork()
______ #include<stdio.h> #include<unistd.h> main() { printf("output\n"); printf("*****************\n"); printf("here comes the date"); fork(); execip("/bin/date","date",0); printf("\n that was the date"); } OUTPUT sat oct 7 12:09:01 ist 2006 execip() ________ #include<stdio.h> #include<unistd.h> main() { printf("output\n"); printf("*****************\n"); execip("/bin/date","date",0); printf("here comes the date"); abort(); } OUTPUT sat oct 7 12:09:01 ist 2006 |
|||||
| intel_ram2002 | SJFS | 0 | Oct 30 2006, 8:28 PM EST by intel_ram2002 | ||
|
Thread started: Oct 30 2006, 8:28 PM EST
Watch
PROGRAM FOR SHORTEST JOB FIRST SCHEDULING
#include<stdio.h> main() { int n,i,j,avgturn=0,avgwait=0; struct sjf { int burtme,wttme,tatme,prono; }temp,sh[10]; printf("\nEnter the number of processes:"); scanf("%d",&n); for(i=0;i<n;i++) { sh[i].prono=i+1; printf("\nEnter the burst time of process %d:",i+1); scanf("%d",&sh[i].burtme); } for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(sh[i].burtme>sh[j].burtme) { temp=sh[i]; sh[i]=sh[j]; sh[j]=temp; } } } for(i=0;i<n;i++) { if(i==0) sh[i].wttme=0; else sh[i].wttme=sh[i-1].wttme+sh[i-1].burtme; if(i==0) sh[i].tatme=sh[i].burtme; else sh[i].tatme=sh[i-1].tatme+sh[i].burtme; avgturn+=sh[i].tatme; avgwait+=sh[i].wttme; } avgturn=avgturn/n; avgwait=avgwait/n; printf("\nProcess Number\tBurst Time\tWaiting Time\tTurnaround Time"); for(i=0;i<n;i++) { printf("\n%d\t\t%d\t\t%d\t\t%d",sh[i].prono,sh[i].burtme,sh[i].wttme,sh[i].tatme); } printf("\nAverage turnaround time:%d",avgturn); printf("\nAverage waiting time:%d",avgwait); } |
|||||
| intel_ram2002 | ROUND ROBIN SCHEDULING | 0 | Oct 30 2006, 8:26 PM EST by intel_ram2002 | ||
|
Thread started: Oct 30 2006, 8:26 PM EST
Watch
ROUND ROBIN SCHEDULING
#include<stdio.h> int main() { int i,j,k,tbt=0,nop=0,ts=0,flag[20],rem[20],occ[20],to,from=0, wt[20],tt[20],b[20]; float twt=0,ttt=0; float awt,att; printf("\n Enter the no. of processes: "); scanf("%d", &nop); printf("\n Enter the time slice: "); scanf("%d", &ts); for(i=0;i<nop;i++) { rem[i]=b[i]=wt[i]=tt[i]=occ[i]=0; printf("\n Enter burst time for process %d: ", i+1); scanf("%d", &b[i]); rem[i]=b[i]; tbt+=b[i]; flag[i]=0; } k=0; from=0; i=0; printf("\n TIME \tPROCESS ID"); while(k<tbt) { if(!flag[i]) { if(rem[i]<ts) to=from+rem[i]; else to=from+ts; printf("\n%d - %d\t%d", from, to, i+1); rem[i]=rem[i]-(to-from); if((rem[i]==0)&&(flag[i]==0)) { flag[i]=1; wt[i]=from-occ[i]; tt[i]=to; } occ[i]=occ[i]+(to-from); k=k+(to-from); from=to; } i++; if(i==nop) i=0; } twt=ttt=0; for(k=0;k<nop;k++) { twt=twt+(float)wt[k]; ttt=ttt+(float)tt[k]; } awt=twt/nop; att=ttt/nop; printf("\n PROCESS ID \t WAIT TIME \t TURN AROUND TIME "); for(i=0;i<nop;i++) printf("\n%d\t%d\t%d", i+1,wt[i],tt[i]); printf("\n total wait time: %f", twt); printf("\n total turn around time: %f", ttt); printf("\n average wait time: %f", awt); printf("\n average turn around time: %f", att); } |
|||||
| intel_ram2002 | SEGMENTATION | 0 | Oct 30 2006, 8:22 PM EST by intel_ram2002 | ||
|
Thread started: Oct 30 2006, 8:22 PM EST
Watch
PROGRAM FOR SEGMENTATION:
#include<stdio.h> main() { int mem_base,no_seg,mem_lim,i,ref_seg,seg_byte,phy_add=0; struct segment { int seg_base; int seg_lim; }seg[20]; printf("\nEnter the main memory base address:"); scanf("%d",&mem_base); printf("\nEnter the main memory limit:"); scanf("%d",&mem_lim); printf("\nEnter the no segments:"); scanf("%d",&no_seg); for(i=0;i<no_seg;i++) { printf("\nEnter the base address of segment %d:",i+1); scanf("%d",&seg[i].seg_base); printf("\nEnter the limit of segment %d:",i+1); scanf("%d",&seg[i].seg_lim); if(seg[i].seg_base>mem_lim||seg[i].seg_base<mem_base||seg[i].seg_lim>mem_lim) { printf("\nInappropriate segment base or limit"); i=0; } } printf("\nSEGMENT TABLE"); printf("\n*************"); printf("\nSegment no\tSegment limit\tSegment base"); for(i=0;i<no_seg;i++) { printf("\n%d\t\t%d\t\t%d",i,seg[i].seg_lim,seg[i].seg_base); } printf("\nEnter the segment to be referenced:"); scanf("%d",&ref_seg); printf("\nEnter the byte to be referenced:"); scanf("%d",&seg_byte); if((seg[ref_seg].seg_base+seg_byte)<=(seg[ref_seg].seg_base+seg[ref_seg].seg_lim)) { phy_add=seg[ref_seg].seg_base+seg_byte; printf("Physical address is %d",phy_add); } else { printf("\nSegment limit exceeded!Trap to OS!\n"); } if(phy_add = = 0) { printf("\nTrap to OS\nGiven Logical address not in any segment"); } } |
|||||
| intel_ram2002 | PRIORITY SCHEDULING | 0 | Oct 30 2006, 8:21 PM EST by intel_ram2002 | ||
|
Thread started: Oct 30 2006, 8:21 PM EST
Watch
PROGRAM FOR PRIORITY SCHEDULING:
#include<stdio.h> main() { int n,i,j,avgfin=0,avgwait=0; struct priority { int runtme,wttme,fintme,prty,pro_no; }pri[10],temp; printf("\n Enter the no of process:"); scanf("%d",&n); for(i=0;i<n;i++) { printf("\nEnter the running time of process %d:",i+1); scanf("%d",&pri[i].runtme); printf("\nEnter the priority of process %d:",i+1); scanf("%d",&pri[i].prty); pri[i].pro_no=i+1; } for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(pri[i].prty<pri[j].prty) { temp=pri[i]; pri[i]=pri[j]; pri[j]=temp; } } } printf("\nProcess_no\tPriority\tRunning\tWaiting\tFinishing"); for(i=0;i<n;i++) { if(i==0) { pri[i].wttme=0; } else { pri[i].wttme=pri[i-1].wttme+pri[i-1].runtme; } pri[i].fintme=pri[i].runtme+pri[i].wttme; avgfin+=pri[i].fintme; avgwait+=pri[i].wttme; } avgfin=avgfin/n; avgwait=avgwait/n; for(i=0;i<n;i++) { printf("\n%d\t\t%d\t\t%d\t%d\t%d",pri[i].pro_no,pri[i].prty,pri[i].runtme,pri[i].wttme,pri[i].fintme); } printf("\nAverage finishing time:%d",avgfin); printf("\nAverage waiting time:%d",avgwait); } |
|||||
| intel_ram2002 | PAGING | 0 | Oct 30 2006, 8:19 PM EST by intel_ram2002 | ||
|
Thread started: Oct 30 2006, 8:19 PM EST
Watch
PROGRAM FOR IMPLEMENTATION OF PAGING
#include<stdio.h> main() { int phy_add,log_add,pg_sz,i,n,log_lim; struct page { int pg_no,fr_no; }pg[10]; printf("\nEnter the logical adress space limit in power of two:"); scanf("%d",&log_lim); printf("\nEnter the page size in power of two:"); scanf("%d",&pg_sz); n=log_lim/pg_sz; for(i=0;i<n;i++) { printf("\nEnter the frame number for page no %d:",i+1); scanf("%d",&pg[i].fr_no); pg[i].pg_no=i; } printf("\nPAGE TABLE\n**********"); printf("\nPage no\tFrame no"); for(i=0;i<n;i++) { printf("\n%d\t%d",pg[i].pg_no,pg[i].fr_no); } printf("\nEnter the logical address to be searched:"); scanf("%d",&log_add); if(log_add<log_lim) { n=log_add/pg_sz; phy_add=(pg[n].fr_no*pg_sz)+(log_add%pg_sz); printf("\nThe physical address is:%d",phy_add); } else printf("\nLogical address exceeds logical address space!"); } |
|||||
| intel_ram2002 | FCFS SCHEDULING | 0 | Oct 30 2006, 8:18 PM EST by intel_ram2002 | ||
|
Thread started: Oct 30 2006, 8:18 PM EST
Watch
PROGRAM FOR FCFS SCHEDULING
#include<stdio.h> main() { int n,i,avgturn=0,avgwait=0; struct fcfs { int arrtme,runtme,wttme,fintme,tatme; }temp; struct fcfs first[10]; printf("\n Enter the no of process:"); scanf("%d",&n); for(i=0;i<n;i++) { printf("\nEnter the arrival time of process %d:",i+1); scanf("%d",&first[i].arrtme); printf("\nEnter the running time of process %d:",i+1); scanf("%d",&first[i].runtme); } printf("\nArrival Time\tRunning Time\tWaiting Time\tFinishing Time\tTurnarond Time"); for(i=0;i<n;i++) { if(i==0) { first[i].wttme=0; } else { first[i].wttme=first[i-1].wttme+first[i-1].runtme; } first[i].fintme=first[i].runtme+first[i].wttme; first[i].tatme=first[i].fintme-first[i].arrtme; avgturn+=first[i].tatme; avgwait+=first[i].wttme; } avgturn=avgturn/n; avgwait=avgwait/n; for(i=0;i<n;i++) { printf("\n%d\t\t%d\t\t%d\t\t%d\t\t%d",first[i].arrtme,first[i].runtme,first[i].wttme,first[i].fintme,first[i].tatme); } printf("\nAverage turnaround time:",avgturn); printf("\nAverage waiting time:",avgwait); } |
|||||
| intel_ram2002 | fcfs-sheduling | 0 | Oct 29 2006, 2:57 AM EST by intel_ram2002 | ||
|
Thread started: Oct 29 2006, 2:57 AM EST
Watch
#include<iostream.h>
#include<conio.h> #include<graphics.h> #include<dos.h> void main() { clrscr(); int burst[10],temp[10],sum = 0,n,avgtime = 0,turn = 0; cout<<"Enter the number of processes"; cin>>n; cout<<"Enter the burst times for processes in FCFS\n"; temp[0] = 0; for(int i = 0;i<n;i++) { cin>>burst[i]; sum = burst[i]+sum; temp[i+1] = sum; } avgtime = sum/n; cout<<"PROCESS"<<"\tBurst times\n\n" ; for(i = 0;i<n;i++) { cout<<"P"<<i+1<<"\t"<<burst[i]<<endl; } cout<<"\n\n"; cout<<"Process"<<"\t Waiting time\n\n"; for(i = 0;i<n;i++) { cout<<" P"<<i+1<<" \t "; cout<<temp[i]<<"\n"; turn+=temp[i]; } cout<<"AVG TURNAROUND TIME IS:"<<(turn/n)<<endl; cout<<"AVG TIME IS:"<<avgtime<<endl; getch(); } |
|||||
| intel_ram2002 | paging | 0 | Oct 29 2006, 2:07 AM EST by intel_ram2002 | ||
|
Thread started: Oct 29 2006, 2:07 AM EST
Watch
#include<iostream.h>
#include<conio.h> void main() { clrscr(); int pageaddr,pgno,off,phy_addr,temp,pageaddress[5],flag = 0,j,cnt = 0; int n = 5; //page table int page[81][2] = { {10,34}, {20,51}, {30,33}, {40,11}, {50,21} }; cout<<"\nEnter the 4 digit address\n"; cin>>pageaddr; for(int i = 4;i > 0;i--)//Splitting the user input address into page no. and offset. { temp = pageaddr%10; pageaddr = pageaddr/10; pageaddress[i-1] = temp; } pgno = pageaddress[0]*10+pageaddress[1]; off = pageaddress[2]*10+pageaddress[3]; for(i = 0;i<n;i++)//Finding if the page table contains the page no. { for(j=0;j<2;j++) { if(page[i][j] == pgno) { phy_addr = page[i][j+1]; cnt = 0; break; } else if(page[i][j]!=pgno) { cnt = 1; } } if(cnt > 0) { flag++; } cout<<endl; } if(flag == n) //If it is not found then add it to page table and calculate the address. { page[n][0] = pgno; page[n][1] = 70; phy_addr = page[n][1] + off; } else { phy_addr = phy_addr+off; } cout<<"PHYSICAL ADDRESS IS"<<phy_addr<<endl; getch(); } |
|||||
| intel_ram2002 | segment 1-2 | 0 | Oct 29 2006, 2:06 AM EST by intel_ram2002 | ||
|
Thread started: Oct 29 2006, 2:06 AM EST
Watch
if(flag == n)//If segment no is not found in table,inserting it into the table and calculating physical address.
{ segment[n][0] = segno; segment[n][1] = 45; segment[n][2] = 70; if(off > segment[n][2]) { printf("\nOS TRAPPED!OFFSET EXCEEDS LIMIT\n"); printf("PROCESS TERMINATED....PRESS ANY KEY TO EXIT\n"); getch(); exit(0); } else { addr = segment[n][1]; n = n+1; phy_addr = off+addr; } } else { phy_addr = off+addr; } //Displaying physical address printf("PHYSICAL ADDRESS IS\n%d\n\n",phy_addr); getch(); } |
|||||
| intel_ram2002 | segment1-1 | 0 | Oct 29 2006, 2:05 AM EST by intel_ram2002 | ||
|
Thread started: Oct 29 2006, 2:05 AM EST
Watch
#include<stdio.h>
#include<conio.h> void main() { int user_addr,segno,segaddress[10],temp,off,addr,phy_addr,flag = 0,cnt = 0,len = 0,i,j,n = 5; //Segment Table int segment[81][3]={ {1,45,50}, {2,30,50}, {3,67,80}, {4,56,70}, {5,36,45} }; clrscr(); printf("\nEnter the 3 or 4 digit address\n"); scanf("%d",&user_addr); addr=user_addr; while(addr>0)//Finding out the length of the address( length may be 3 or 4) { temp = addr%10; addr = addr/10; len++; } addr = 0; if(len==3) { for(i=3;i>0;i--)//Splitting user input address into segment no and offset for length 3. { temp = user_addr%10; user_addr = user_addr/10; segaddress[i-1] = temp; } segno = segaddress[0]; off = segaddress[1] * 10 +segaddress[2]; } else if(len == 4) { for(i=4;i>0;i--)//Splitting user input address into segment no and offset for length 3. { temp = user_addr%10; user_addr = user_addr/10; segaddress[i-1] = temp; } segno = segaddress[0] * 10 + segaddress[1]; off = segaddress[2] * 10 +segaddress[3]; } for(i = 0;i<n;i++)//Finding if the segment table contains the segment no. { for(j=0;j<3;j++) { if((segment[i][j] == segno)&&(off<segment[i][j+2])) { addr = segment[i][j+1]; cnt = 0; break; } if((segment[i][j] == segno)&&(off>segment[i][j+2])) { printf("\n OS TRAPPED!OFFSET EXCEEDS LIMIT\n"); printf("PROCESS TERMINATED....PRESS ANY KEY TO EXIT\n"); getch(); exit(0); } else if(segment[i][j] != segno) { cnt = 1; } } if(cnt > 0) { flag++; } printf("\n"); } |
|||||
| intel_ram2002 | priority sechduling | 0 | Oct 29 2006, 2:03 AM EST by intel_ram2002 | ||
|
Thread started: Oct 29 2006, 2:03 AM EST
Watch
#include<iostream.h>
#include<conio.h> void main() { clrscr(); int n,temp,temp1[10],prior[10],burst[10],process[10]; cout<<"Enter the number of processes\n"; cin>>n; cout<<"enter the burst times and the priorities\n"; for(int i = 0;i < n;i++) { cout<<"Burst Time for P"<<i+1<<" : "; cin>>burst[i]; cout<<"\nPriority for P"<<i+1<<" : "; cin>>prior[i]; process[i] = i+1; } for(i = 0;i<n;i++) { for(int j = i+1;j<n;j++) { if(prior[i]>prior[j]) { temp = prior[i]; prior[i] = prior[j]; prior[j] = temp; temp = burst[i]; burst[i] = burst[j]; burst[j] = temp; temp = process[i]; process[i] = process[j]; process[j] = temp; } } } cout<<"PROCESS"<<"\tBURST"<<"\tPRIORITY\n"; for(i = 0;i < n;i++) { cout<<"P"<<process[i]<<"\t"<<burst[i]<<"\t"<<prior[i]<<endl; } getch(); } |
|||||
| intel_ram2002 | sjf | 0 | Oct 29 2006, 2:02 AM EST by intel_ram2002 | ||
|
Thread started: Oct 29 2006, 2:02 AM EST
Watch
#include<dos.h>
#include<conio.h> #include<iostream.h> void main() { int n,temp1,process[10],burst[10],j,i,temp[10]; int sum = 0; temp[0] = 0; cout<<"Enter the no of processes in the ready queue\n"; cin>>n; cout<<"\nEnter The Corresponding Burst Times\n"; for(i = 0;i<n;i++) { cin>>burst[i]; process[i] = i+1; } for(i = 0;i<n;i++) { for(j=i+1;j<n;j++) { if(burst[i]>burst[j]) { temp1 = burst[i]; burst[i] = burst[j]; burst[j] = temp1; temp1 = process[i]; process[i] = process[j]; process[j] = temp1; } } } cout<<"The SJF Algorithm Gives The Following Order\n"; cout<<"Process"<<"\t"<<"Burst Time"<<endl; temp[0] = 0; for(i = 0;i<n;i++) { cout<<"P"<<process[i]<<"\t"<<burst[i]<<endl; sum = sum+burst[i]; temp[i+1] =sum; } cout<<"process"<<"\t"<<"waiting time"<<endl; for(i = 0;i<n;i++) { cout<<"P"<<process[i]<<"\t"<<temp[i]<<endl; } getch(); } |
|||||
| Anonymous | Functions | 0 | Oct 26 2006, 11:18 AM EDT by Anonymous | ||
|
|
Thread started: Oct 26 2006, 11:18 AM EDT
Watch
create table book(book_id int primary key,book_na varchar(25),book_au varchar(25),book_price int)
insert into book values(1,'tcs','bala',400) insert into book values(2,'oops','venu',500) insert into book values(3,'cn','karthik',325) insert into book values(4,'ooad','das',275) insert into book values(5,'pns','dinesh',175) select * from book create function getdata() returns table as return(select * from book) select * from getdata() create function dis() returns table as return(select book_na from book) select * from dis() create function checker() returns table as return(select book_id,book_na,book_au,book_price from book where book_price>300) select * from checker() |
||||
| Anonymous | Aggregate Functions | 0 | Oct 26 2006, 11:17 AM EDT by Anonymous | ||
|
|
Thread started: Oct 26 2006, 11:17 AM EDT
Watch
create table aggr(emp_id int primary key,emp_na varchar(25),emp_company varchar(25),salary int)
insert into aggr values(1,'bala','tcs',46000) insert into aggr values(2,'balaji','cts',40700) insert into aggr values(3,'karthik','wipro',42500) insert into aggr values(4,'das','hcl',45000) insert into aggr values(5,'dinesh','hexaware',47500) select * from aggr select avg(salary)average_salary from aggr select max(salary)maximum_salary from aggr select min(salary)minimum_salary from aggr select sum(salary)sum_salary from aggr select count(emp_company)number_of_company from aggr select sum(salary)sum_salary_group from aggr group by emp_na |
||||