https://drive.google.com/drive/folders/0Bz9C0ysJZ7PncHZ5cDZrZEdScE0
TE Computer Program Forum (OSD : PL-I)
Wednesday, 28 September 2016
Sunday, 18 September 2016
Assignment No : 06
Assignment No : 06
Q1. What is handheld System ? explain Frame of reference.
Q2. Write Short note on:
I. UNIX free BSD
II. ReFS
III. Embedded System
IV. Windows Mobile
V. Microsoft Windows CE
Vi. Master Slave Processor
***************************************************************************************
Q1. What is handheld System ? explain Frame of reference.
Q2. Write Short note on:
I. UNIX free BSD
II. ReFS
III. Embedded System
IV. Windows Mobile
V. Microsoft Windows CE
Vi. Master Slave Processor
***************************************************************************************
Assignment No : 05
Assignment No : 05
Q1. What is Mak Utility ? explain with Ex.
Q2. Write Short note on:
I. grep
II. egrep
III. fgrep
IV. sort
V. Mork Manager
VI. Shim Manager
VII. Multiprocessor System
VIII.Real tyime Shedullting
IX. Palm O.S
X. Google Android
Q3. What is IPC ? Explain with its all types
**************************************************************************************
Q1. What is Mak Utility ? explain with Ex.
Q2. Write Short note on:
I. grep
II. egrep
III. fgrep
IV. sort
V. Mork Manager
VI. Shim Manager
VII. Multiprocessor System
VIII.Real tyime Shedullting
IX. Palm O.S
X. Google Android
Q3. What is IPC ? Explain with its all types
**************************************************************************************
Saturday, 16 July 2016
Some important Study material regarding Haddop,Python,MongoDB
For Download Study material
Click on bellow link
Wednesday, 9 September 2015
Assignment No: 04
Q1. Explain IPC
Q2. What is Process Tracing ?
Q3. What is System V IPC?
Q4. Explain Network Communication different technics
Q5.What is Master Slave Processor?
Q6. Explain Tunis System.
Assignment No: 03
Q1. Explain Memory System with Its types
Q2. What is Address Binding ?
Q3. What is Mean by Linking & Loading in memory system?
Q4. Explain Memory management Techniques
Q5. Explain types of Memory Partitioning
Q6. What is Paging?
Q7. What is Segmentation? Explain Page replacement strategy
Q7. Explain Virtual Memory
Tuesday, 25 August 2015
PR( 05) Write a program in C++ to create a RAMDRIVE and associate an acyclic directory structure to it. Use this RAMDRIVE to store input, out files to run a calculator program.
cal.c
#include<iostream>
#include<fstream>
#include<sys/types.h>
#include<stdlib.h>
using namespace std;
int main()
{
int a,b,c,ch;
FILE *fp;
// The two numbers are stored in input.txt file
fp = fopen("/mnt/ramdisk1/input.txt","r"); // Open input.txt file stored in RAMDISK
fscanf(fp, "%d", &a);
fscanf(fp, "%d", &b);
fclose(fp); // Close the file
fp = fopen("/mnt/ramdisk1/output.txt","w"); // Open (Create if not exist) the output.txt file stored in RAMDISK
fprintf(fp, "\n Addition: %d", (a+b)); // Write addition in file
fprintf(fp, "\n Subtraction: %d", (a-b)); // Write subtraction in file
fprintf(fp, "\n Multiplication: %d", (a*b)); // Write multiplication in file
fprintf(fp, "\n Division: %d", (a/b)); // Write division in file
return 0;
}
****************************************************************************************
ramdisk.c
#include <stdio.h>
#include <stdlib.h>
long long create_ramdisk(void)
{
FILE *fp;
int ch;
long long space = 0;
system("mkdir -p /mnt/ramdisk");
system("/sbin/mke2fs -q /dev/ram");
system("mount /dev/ram /mnt/ramdisk");
system("df /mnt/ramdisk tmp.txt");
fp = fopen("tmp.txt", "r");
if(!fp)
{
printf("Can't open file\n");
return 0;
}
while((ch = fgetc(fp)) != EOF && ch != '\n');
while((ch = fgetc(fp)) != EOF && ch != ' ');
while((ch = fgetc(fp)) != EOF && ch == ' ');
while((ch = fgetc(fp)) != EOF && ch != ' ');
while((ch = fgetc(fp)) != EOF && ch == ' ');
while((ch = fgetc(fp)) != EOF && ch != ' ');
while((ch = fgetc(fp)) != EOF && ch == ' ');
ungetc(ch, fp);
if(feof(fp))
{
printf("Unexpected read\n");
return 0;
}
fscanf(fp, "%lld", &space);
fclose(fp);
remove("tmp.txt");
return space;
}
void remove_ramdisk(void)
{
system("umount /mnt/ramdisk");
}
int main(void)
{
long long space = create_ramdisk();
printf("Ramdisk has %lld bytes free\n", space);
remove_ramdisk();
return 0;
}
*******************************************************************************************
ramdisk.cpp
#include<iostream>
#include<sys/types.h>
#include<stdlib.h>
using namespace std;
main()
{
int ch;
do
{
cout<<"\n Switch to the Superuser mode for better results.\n";
cout<<"\n MENU";
cout<<"\n 1. Check Free Space";
cout<<"\n 2. Create RAMDISK";
cout<<"\n 3. Copy Files to RAMDISK";
//cout<<"\n 4. Run Calculator program";
//cout<<"\n 4. See the contents of Output file";
cout<<"\n 4. Unmount RAMDISK";
cout<<"\n 5. Exit";
cout<<"\n\n Enter Your Choice: ";
cin>> ch;
switch(ch)
{
case 1:
system("df -h");
break;
case 2:
system("rmdir /mnt/ramdisk1");
system("mkdir /mnt/ramdisk1");
system("chmod 777 /mnt/ramdisk1");
system("mount -t tmpfs -o size=256m tmpfs /mnt/ramdisk1");
break;
case 3:
// copy input.txt and calculator (object file of calculator.cpp) to RAMDISK
system("cp input.txt /mnt/ramdisk1");
system("cp calculator /mnt/ramdisk1");
cout<<"Files successfully copied to RAMDISK.";
break;
/* case 4:
system("/mnt/ramdisk1/calculator");
break; */
case 4:
system("umount /mnt/ramdisk1");
break;
case 5:
return 0;
}
cout<<"Do you want to continue? (1/0): ";
cin>> ch;
} while(ch == 1);
return 0;
}
#include<iostream>
#include<fstream>
#include<sys/types.h>
#include<stdlib.h>
using namespace std;
int main()
{
int a,b,c,ch;
FILE *fp;
// The two numbers are stored in input.txt file
fp = fopen("/mnt/ramdisk1/input.txt","r"); // Open input.txt file stored in RAMDISK
fscanf(fp, "%d", &a);
fscanf(fp, "%d", &b);
fclose(fp); // Close the file
fp = fopen("/mnt/ramdisk1/output.txt","w"); // Open (Create if not exist) the output.txt file stored in RAMDISK
fprintf(fp, "\n Addition: %d", (a+b)); // Write addition in file
fprintf(fp, "\n Subtraction: %d", (a-b)); // Write subtraction in file
fprintf(fp, "\n Multiplication: %d", (a*b)); // Write multiplication in file
fprintf(fp, "\n Division: %d", (a/b)); // Write division in file
return 0;
}
****************************************************************************************
ramdisk.c
#include <stdio.h>
#include <stdlib.h>
long long create_ramdisk(void)
{
FILE *fp;
int ch;
long long space = 0;
system("mkdir -p /mnt/ramdisk");
system("/sbin/mke2fs -q /dev/ram");
system("mount /dev/ram /mnt/ramdisk");
system("df /mnt/ramdisk tmp.txt");
fp = fopen("tmp.txt", "r");
if(!fp)
{
printf("Can't open file\n");
return 0;
}
while((ch = fgetc(fp)) != EOF && ch != '\n');
while((ch = fgetc(fp)) != EOF && ch != ' ');
while((ch = fgetc(fp)) != EOF && ch == ' ');
while((ch = fgetc(fp)) != EOF && ch != ' ');
while((ch = fgetc(fp)) != EOF && ch == ' ');
while((ch = fgetc(fp)) != EOF && ch != ' ');
while((ch = fgetc(fp)) != EOF && ch == ' ');
ungetc(ch, fp);
if(feof(fp))
{
printf("Unexpected read\n");
return 0;
}
fscanf(fp, "%lld", &space);
fclose(fp);
remove("tmp.txt");
return space;
}
void remove_ramdisk(void)
{
system("umount /mnt/ramdisk");
}
int main(void)
{
long long space = create_ramdisk();
printf("Ramdisk has %lld bytes free\n", space);
remove_ramdisk();
return 0;
}
*******************************************************************************************
ramdisk.cpp
#include<iostream>
#include<sys/types.h>
#include<stdlib.h>
using namespace std;
main()
{
int ch;
do
{
cout<<"\n Switch to the Superuser mode for better results.\n";
cout<<"\n MENU";
cout<<"\n 1. Check Free Space";
cout<<"\n 2. Create RAMDISK";
cout<<"\n 3. Copy Files to RAMDISK";
//cout<<"\n 4. Run Calculator program";
//cout<<"\n 4. See the contents of Output file";
cout<<"\n 4. Unmount RAMDISK";
cout<<"\n 5. Exit";
cout<<"\n\n Enter Your Choice: ";
cin>> ch;
switch(ch)
{
case 1:
system("df -h");
break;
case 2:
system("rmdir /mnt/ramdisk1");
system("mkdir /mnt/ramdisk1");
system("chmod 777 /mnt/ramdisk1");
system("mount -t tmpfs -o size=256m tmpfs /mnt/ramdisk1");
break;
case 3:
// copy input.txt and calculator (object file of calculator.cpp) to RAMDISK
system("cp input.txt /mnt/ramdisk1");
system("cp calculator /mnt/ramdisk1");
cout<<"Files successfully copied to RAMDISK.";
break;
/* case 4:
system("/mnt/ramdisk1/calculator");
break; */
case 4:
system("umount /mnt/ramdisk1");
break;
case 5:
return 0;
}
cout<<"Do you want to continue? (1/0): ";
cin>> ch;
} while(ch == 1);
return 0;
}
Subscribe to:
Posts (Atom)