total Marks: 20
Scenario:
Government of Pakistan has an agenda of “Education for all” in its prime goals. But current literacy rate of the country is not satisfactory – and the worst in Baluchistan.

In Baluchistan literacy rate is very low as compared to other provinces of Pakistan. The main reasons include scattered population in wide areas, less number of schools (especially for girls), and lack of resources. Moreover, because of patriarchal culture, most of the girls cannot attend the school.

Provincial Government wants to pay attention to this issue but there are certain constraints like non-availability of teachers, tribal system, poverty, law & order situation, and shortage of funds. To help the Government, international donors are ready to invest in education sector to promote Universal Primary Education and in providing latest and free education for all.

Questions:
  1. Analyze the situation and identify different factors affecting the public agencies in promoting education in Baluchistan. Categorize these factors and briefly explain how they are affecting.
  2. Give suggestions to improve the literacy rate in Baluchistan – keeping in view the identified factors.

Instructions:
  • Your discussion must be based on logical facts.
  • Your answer should be relevant to the topic i.e. clear and concise.
  • No theoretical definitions and explanations are required.
The GDB will open and close on above specified date and time. Please note that no grace day or extra time will be given for posting comments on GDB.
Read More

hi,
The day I got the assignment, solved same day. It is easy little understanding is needed. I can give you some guide lines. This is not solution but some idea
define MAX 80

void child();
void parent();
void childtwo();
char * getli();
void printline(char *buffer, int count);
char * convertCase(char *str);

int pipe1[2];
int pipe2[2];
int main(int argc, char **argv)
{
  pipe(pipe1);
  pipe(pipe2);
  if(fork()){
    if(fork()){
      printf("1st\n");
      parent();
          exit(0);
    }
    else{
      printf("3rd\n");
      childtwo();
      exit(0);
    } 
  }
  else{
    printf("2nd\n");
    child();
    exit(0);
  }
}

void child(){
  char *buf;
  int count = 0;
  close(pipe1[1]);
  close(pipe2[0]); 
  while(1){
  buf = (char *) malloc(sizeof(char)*MAX);
  read(pipe1[0], buf, MAX);
  if (strcmp(buf,"quit")== 0){
    printf("Child is leaving\n");
    free(buf);
    break;
  }
  else{
    printf("Child: ");
    printline(buf,strlen(buf));
    write(pipe2[1],buf, strlen(buf)+1);
    free(buf);
        }
  close(pipe2[1]);
  close(pipe1[0]);
  exit(0);
  }
}

void childtwo()
{
  char *buf;
  int count = 0;
  close(pipe2[1]);
  buf = (char *) malloc(sizeof(char)*MAX);
  while(1){
    buf = (char *) malloc(sizeof(char)*MAX);
    read(pipe2[0], buf, MAX);
    if (strcmp(buf,"quit")== 0){
      printf("Childtwo is leaving\n");
      free(buf);
      break;
    }
    else{
      printf("Childtwo:");
      printline(buf,strlen(buf));
      free(buf); 
    }
  }

Read More

Assignment No. 02
Spring 2013
CS604- Operating System

Total Marks:20

Due Date:
Tuesday 14th May 2013

Objectives:
To Learn and understand the concept of UNIX/Linux basic commands.

Lecture Covered:
Lecture # 7 to 12
Instructions:
Please read the following instructions carefully before submitting assignment:

  • You will submit your assignment before or on due date on VU-LMS.
  • Assignment should be completed by your own efforts it should not be copied from internet, handouts or books.
  • You should submit your Word File via assignment interface at VU-LMS.
  • Assignment sent via Email will not be replied and accepted/graded in any case.
  • If the submitted assignment does not open or file is corrupt, it will not be graded.
For any query about the assignment, contact at cs604@vu.edu.pk
GOOD LUCK

Question: [Marks 20]
Write a simple C language program. Program has following main tasks to be performed.
Parent process creates child process using fork ().
Perform an IPC between related processes using pipe ().
Now specifically child process will do following.(1 mark on each step)
1. Child process should display its PID (process ID)
2. Child process should display its parent's PID
3. Child process should take a string as input from user which would be its VU id.
4. Child should write this test string (VU student ID) using write () system call in IPC pipe.
5. Child process should take any value from 0 to 255 from user. After that child process exits and returns to the parent process.

Now specifically parent will perform following tasks .(1 mark on each step)

1. Parent process should display its PID (process ID).
2. Child process value returned to its parent by fork () and show return value.
3. Parent process wait for child process to complete its tasks
4. Parent process should read the message (VU student ID) written by child process and display it on screen.
5. Parent process should print length of string entered by student.
Sample output is given below. .(1 mark on each main step)

SAMPLE OUTPUT
CHILD: I am the child process!
CHILD: Here's my PID: 5667
CHILD: My parent's PID is: 5666
CHILD: Enter your student id: bc12345678
CHILD: Student id is: bc12345678
CHILD: I am writing VU student to pipe…
CHILD: Enter any value from 0 to 255: 104
CHILD: Goodbye!
PARENT: I am the parent process!
PARENT: Here's my PID: 5666
PARENT: Value returned by child code is: 104
PARENT: I am reading VU student id from pipe bc12345678
PARENT: Length of VU student ID is: 10
PARENT: Good work child!
Execute your program in Linux Ubuntu. Take screen shots of your program that you write in C, Commands that you used to run your program in Linux Ubuntu and the output displayed by your program.
Note:
1) Do not write your program in other languages like Java, C++ etc. Write your program only in C language.
2) Do not execute your program in other operating systems like Windows, Mac etc. Execute your program only in Linux Ubuntu flavor.
3) You should provide three screen shots. Required three screen shots that you have to provide are given below.
I) Screen shots of your complete program that you write in C. Your screen shots should display your complete program code that you write in C.
II) Screen shot of Commands that you used to run your program in Linux Ubuntu.
III) Screen shot of final output of your program shown.
4) If you will copy your assignment then you will get zero marks with no leniency.
5) Each student should display his own complete VU student ID.
6) In your program’s output, each student should indicate the execution of parent and child processes codes by using the words PARENT: and CHILD: in the output display as shown in the sample output.

Uploading Instructions:
P
aste your screen shots in word file and then upload your assignment as a Word file. It should have name [YourRollNo.doc]

Deadline:
Your assignment must be uploaded/submitted at or before Tuesday, 14th May 2013.

Read More

Assignment No. 02

Semester Spring 2013
Information Systems CS507


Total Marks: 15
Due Date: 15/05/2013


Objective: Understanding the Information Systems and related techniques.
Lectures Covered: 7 to 14                                                         
Instructions:
Please read the following instructions carefully before submitting assignment:

  • Assignment should be submitted on VU-LMS on or before the due date.
  • Assignment should be completed by your own efforts; it should not be copied from internet, handouts or books.
  • Assignment should be in Word File.
  • Assignment sent via Email will not be accepted.
  • If the submitted assignment does not open or file is corrupt, it will not be graded.

For any query about the assignment, contact at cs507@vu.edu.pk


Q No.1 Suppose an orthopedic hospital wants to develop a special computer based system for the diagnosis of disease according to the symptoms of disease in patient.
You are required to identify the most suitable type of computer based system for the given scenario. Also list its four major components.                         [10 Marks]


Q No. 2 Marketing managers of different companies often need to make an analysis of large amounts of data / information stored in database for getting trends of sale purchase etc, for making marketing strategies for their products. You are required to identify the specific procedure / technique along with its three main steps that can help managers for this purpose.                     [5 Marks]

Read More



Read More

a) Show that the grammar
is ambiguous by finding a string that has two different syntax trees.
Now make two different unambiguous grammars for the same language:
a) One where prefix minus binds stronger than infix minus.
b) One where infix minus binds stronger than prefix minus.
Show the syntax trees using the new grammars for the string you used to prove
the original grammar ambiguous.


Question No 2: Marks 10
Consider the grammar
A → B C D
B → h B | ε
C → C g | g | C h | i
D → A B |ε
Fill-in the table below with the sets First and Follow. Remember to put ε in the set First(X) whenever X can reduce to the empty string.

First Follow
A
B
C
D

Read More

Question # 1                                                                                                                              Marks 5     

Identify and correct the errors in the following SNOBOL code lines. If the code is correct just mention that code is correct.

  1. var  = 28 * 13+2
  2. This.is.null.string = NULL
  3. MONTH = ‘MAY’
  4. RE-PLACE(STRING, ST1, ST2)
  5. SEAT   = ROWNO + 6 /2

Question # 2                                                                                                                              Marks 10     

I) Write down a SNOBOL Program that will display your Name and VU Student ID  [4 Marks]

II) Go through the tutorial given at http://vulms.vu.edu.pk/Courses/CS508/Downloads/How%20To%20Run%20A%2... and run your code written in Question # 2 Part I. Then send the screen shot of the output. As shown below [6 Marks]

To produce the above screen shot save code which you have written in question file in a text file, save it as A2.NSO, and then you will run it as mentioned in the tutorial in above link and take its screenshot. After that paste that screen shot in the assignment solution file.

Note:-
You will send your solution in word file No need to send .SNO file.

Read More
Next PostNewer Posts Previous PostOlder Posts Home