C with Linux Here is code for the old lab they mentioned: #include <stdio.h> #in
ID: 3813026 • Letter: C
Question
C with Linux
Here is code for the old lab they mentioned:
#include <stdio.h>
#include <sys/ipc.h>
#include <sys/shm.h>
int main()
{
int shmid, status;
int *a, *b;
int i;
shmid = shmget(IPC_PRIVATE, sizeof(int), 0777|IPC_CREAT);
int *temp=(int *)shmat(shmid,0,0);
*temp=19530;
int start=1;
// for(i=0;i<5;i++)
// {
if (fork() == 0) {
b = (int *) shmat(shmid, 0, 0);
if(start==1)
{b[0]=19530;
start=0;
}
for( i=0; i< 5; i++) {
if(i==0)
b[0]=19530;
sleep(1);
b[0]-=5;
printf(" Child reads: %d ",b[0]);
}
shmdt(b);
}
else {
a = (int *) shmat(shmid, 0, 0);
for( i=0; i< 5; i++) {
sleep(1);
a[0] = a[0]/5;
printf("Parent writes: %d, ",a[0]);
}
wait(&status);
shmdt(a);
shmctl(shmid, IPC_RMID, 0);
}
}
Explanation / Answer
If you would like to deploy a system of business intelligence or analyze previous records for your system, knowledge quality is one amongst the highest concerns! For a corporation to thrive within the market nowadays, knowledge consolidation and analysis is vital, quite virtually. Our terribly own ETL method comes into image here. From what I gathered regarding the full method, ETL may be a tree step method in direction and knowledge deposit -
Extract the info from varied sources into one repository, that might be homogenous or heterogeneous. Those knowledge sources are often relative databases, spreadsheets, XML files, CSV files etc.
Transform the info into the specified schema. this might embrace varied mapping functions to cleanse the info before it's enraptured into the new system, or filtering the info to create it apothegmatic and prepared to use, or ever-changing the info format victimization bound rules or search tables (since the format of the previous system might take issue from the new one!)
Load the remodeled knowledge into the destination information, or the warehouse.
Let's take associate degree example for higher understanding. Suppose you've got an internet order process system that processes the orders that customers place at you eCommerce. The system stores the order even once they're shipped (with the standing "completed"). however this would possibly clog your information with a whopping quantity of previous orders. you would possibly wish to maneuver those completed orders for higher management, data processing and analysis to a brand new system that contains simply those orders.
So, to consolidate the historical knowledge from all disparate sources, you found out associate degree ETL system, that transforms the info from the smaller databases into the a lot of important long-run databases.
Based on the complexness of your operating atmosphere, you'll obtain an acceptable ETL tool for your purpose, or lo and see, you'll even build one amongst your own employing a appropriate programming language! Speaking of complexness, however specifically to we all know however advanced is our environment? outline what number supply systems we've got feeding our ETL system. Next outline what reasonably transformation is needed in your knowledge and the way troublesome it to use this transformation to suit the present knowledge into the target system. Lastly, style a electrical circuit to perpetually check for errors and discrepancies in our ETL system. There you go! You currently have your own Extract, rework and Load!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.