Programmes

Saturday 14 May 2011

cs604 solved current paperz (12-14 may 2011)


total Qs 26.
20 MCQs.
2Qs of 2 marks.
2Qs of 3 marks.
2Qs of 5 marks.

Limited Register contains the size of the  process.
Command-line interpreter is also called shell in some operating system.
You can use the cp file1 file2 command to copy file1 to file2.
IO bound process spend more time doing IO thancomputation.
Pipes are used for communication between relatedprocesses on a system.
----------------------------------------------------------------------
What are pros and cons of multithreading?5 marks --------p-70
What is waiting time in context of CPU burst?2marks
Waiting time: Waiting time is the time spent waiting in the ready queue. We want to
minimize the waiting time to increase CPU efficiency.
Prove that SJF is an optimal scheduling?3marks--------------p-85
Q. What is the main disadvantage od semaphore?5marks----------p-110
Q. About spinlock..3marks

===========================================================
20 MCQ's and 6 questions

1. Write data structures for bakery algorithm? (2 marks)
The common data structures are:
boolean choosing [n];
int number[n];
Initially these data structures are initialized to false and 0, respectively. The following
notation is defined for convenience: 
ƒ  (ticket #, process id #)
ƒ (a,b) < (c,d) if a<c or if a= =c and b<d.
ƒ max(a0, …an-1 ) is a number, k, such that k>= ai for i=0,…n-1

2. Which command is used for suspending a foreground process? (2 marks)
You can suspend a foreground process by pressing <Ctrl-Z>, which sends a
STOP/SUSPEND signal to the process

3. Which command is used to resume the execution of a suspended job in
the background? (3 marks)
You can use the bg command to put the current or a suspended process into the background. Here is the syntax of the command.
bg [%job_id]
If %job_id is omitted the current job is assumed.
4. Define race condition? (3 marks)
A situation, where several processes access and manipulate the same data
concurrently and the outcome of the manipulation depends on the particular order in which the access takes place, is called a race condition.
5. How to implement RR scheduling? (5 marks)
To implement RR scheduling, we keep ready queue as a FIFO queue of processes. New processes are added to the tail of the ready queue. The CPU scheduler picks the first process from the ready queue, sets a timer to interrupt after 1 time quantum, and then dispatches the process. One of the two things will then happen. The process may have a CPU burst of less than 1 time quantum, in which case the process itself will release the CPU voluntarily. The scheduler will then proceed to the next process in the ready queue.
Otherwise, if the CPU burst of currently running process is longer than one time quantum, the timer will go off and will cause an interrupt to the operating system. A context switch will happen, the current process will be put at the tail of the ready queue, and the newly scheduled process will be given the CPU.
6. Highlight critical sections of this code? (5 marks)

do
{
while (TestAndSet(lock)) ;
Critical section
lock=false;
Remainder section
} while(1
=====================================================================

Total 23 Questions
MCQs    16
1.     List and define the different metrics by which might evaluate a scheduler (List at least 4). 5 marks
2.     Write brief the multilevel feedback queue scheduling. 5 marks---p-89
3.     Assumption made while formulating a solution to the critical section problem. 2 marks
While formulating a solution, we must keep the following assumptions in mind:
ƒ Assume that each process executes at a nonzero speed 
ƒ No assumption can be made regarding the relative speeds of the N processes.
4.     There are many commands. Write the method through which these commands can communicate with each other. 3 marks
5.     Write Difference between SJF and Shortest Remaining Time First Scheduling algorithm. 3 marks
Sjf algorithm is associated with each process the length of the next latter’s cpu brust. When the cpu is available, it is assigned to the process that has the smallest next cpu brust.
 While in srtf scheduling algorithm preempts the currently executing process, wheres a non-preemptive sjf algorithm will allow the coureently raunning process to finish its cpu brust.
6.     Write formula for calculating waiting time in preemptive Shortest Job First Algorithm.  2 marks
Average waiting time: (0+24+27)/3 = 17
7.     Define race condition and how prevent this condition. 2 marks
A situation, in which many process access and manipulate the same data concurrently and the outcomes of the manipulation depends on the particular order in which the access takes place, is called race condition. To prevent this condition we required synchronization of the process.

Thursday 12 May 2011

Today CS501 paper time......9:30am

1-define latency and throughput................2marks.
2-  Describe and write it in own RTL brefily...............3marks.






3-what is time step in detail........5marks
4- what is hazard, its detection and solution............5marks.
most of the MCQ'S are from previous papers.
Thanx................



Tuesday 10 May 2011

3000 VU students in 2nd convocation

Virtual University will hold its 2nd convocation at three different venues to facilitate the graduates of their respective areas i.e. Lahore, Rawalpindi and Karachi in the month of April and May.  Renowned personalities from academic sector and parents of VU graduates will attend this memorable occasion.
Approximately 3000 graduates will be awarded degrees in different disciplines. Outstanding position holders will receive gold medals and merit certificates. Virtual University graduates are already showing tremendous zeal to attend this event with a sense of pride and achievement.

Top Ten Universities in Pakistan..........

According to the 2009 Web Popularity Ranking, the Top 10 universities in Pakistan are as follows:
1 Lahore University of Management Sciences
2 University of the Punjab Lahore
3 University of Karachi
4 Jamia'h NED Baraey Engineering aur Technology
5 Shaheed Zulfikar Ali Bhutto Institute of Science & Technology
6 National University of Computer & Emerging Sciences (FAST)
7 Sir Syed University of Engineering & Technology
8 Aga Khan University
9 Institute of Business Management
10 University of Central Punjab

Top Ten tips to success in EXAMINATION....

I am often asked for my top ten tips when it comes to exam success and over the years I have accumulated many ideas However if I were to limit myself to ten it would be the following:

1. Find your own deep and compelling reason to successfully learn your subject and pass your exams.

2. Plan your time to include study, revision and social commitments - a balance of having fun, taking breaks and studying is vital.

3. Use multi-coloured Mind Maps® for your notes.

4. Review your notes regularly to reinforce your new-found knowledge.

5. Swiftly skim through your text books and course material before you read them in depth to give you an overview of your subject.

6. Learn how to remember lists of things by linking each item to a location on a journey or route you are familiar with around your town. You could even use your own home.

7. Before you do any revision, warm up by doing some gentle exercise to relieve any tension in your body and to get a rush of healthy oxygen flowing to your brain.

8. Do past papers under thorough exam conditions as often as possible to familiarise yourself with the format and the pressures of working under exam conditions.

9. In an exam, make sure you read the question completely and fully understand what the examiner wants before you allocate your time and begin answering the questions.

10. If you are faced with a mental block breathe deeply, relax and ask yourself "If I did know the answer to this question, what would it be?"

solved Quiz cs501..........

 CS501 today quiz

Question # 1
Which one of the following register(s) that is/are programmer invisible and is/are
required to hold an operand or result value while the bus is busy transmitting some other
value?
Select correct option:
 Instruction Register
 Memory address register
 Memory Buffer Register
           Registers A and C  (P # 153)

Question # 2 of 10 ( Start time: 07:25:00 PM )  Total Marks: 1
For any of the instructions that are a part of the instruction set of the SRC, there are
certain ____________ required; which may be used to select the appropriate function for
the ALU to be performed, to select the appropriate registers, or the appropriate memory
location.
Select correct option:
 Registers
   Control signals  (P # 173)
 Memory
 None of the given
Question # 3 of 10 ( Start time: 07:26:05 PM )  Total Marks: 1
In which one of the following techniques, the time a processor spends waiting for
instructions to be fetched from memory is minimized?
Select correct option:
 Perfecting
 Pipelining   (not sure)
 Superscalar operation
 Speedup

 
Question # 4 of 10 ( Start time: 07:26:52 PM )  Total Marks: 1
FALCON-A processor bus has 16 lines or is 16-bits wide while that of SRC is
__________ wide.
Select correct option:
 8-bits
 16-bits
   32-bits   (159)
 64-bits 

Question # 5 of 10 ( Start time: 07:27:48 PM )  Total Marks: 1
-------------- performs the data operations as commanded by the program instructions.
Select correct option:
  Control
 Datapath
 Structural RTL
 Timing
 
Question # 6 of 10 ( Start time: 07:28:47 PM )  Total Marks: 1
The external interface of FALCON-A consists of a __________address bus and a
_________ data bus.
Select correct option:
 8-bit , 8-bit
   16-bit , 16-bit  (P # 169)
 16-bit , 24-bit
 16-bit , 32-bit
 
Question # 7 of 10 ( Start time: 07:30:02 PM )  Total Marks: 1
Which one of the following registers stores a previously calculated value or a value
loaded from the main memory?
Select correct option:
 Accumulator
 Address Mask
 Instruction Register
   Program Counter
 
Question # 8 of 10 ( Start time: 07:31:29 PM )  Total Marks: 1
Computer system performance is usually measured by the ---------------
Select correct option:
 Time to execute a program or program mix
 The speed with which it executes programs
   Processor’s utilization in solving the problems
 Instructions that can be carried out simultaneously
Question # 9 of 10 ( Start time: 07:31:54 PM )  Total Marks: 1
Which one of the following registers holds the address of the next instruction to be
executed?
Select correct option:
 Accumulator
 Address Mask
 Instruction Register
   Program Counter
Question # 10 of 10 ( Start time: 07:33:26 PM )  Total Marks: 1
_________ control signal allows the contents of the Program Counter register to be
written onto the internal processor bus.
Select correct option:
 INC4 

 LPC
   PCout  (P # 174)
 LC
Question # 1 of 10 ( Start time: 07:02:29 PM )  Total Marks: 1
The external interface of FALCON-A consists of a ____________ address bus.
Select correct option:
 8-bit
  16-bit
 24-bit
 32-bit
 
Question # 2 of 10 ( Start time: 07:03:47 PM )  Total Marks: 1
Computer system performance is usually measured by the ---------------
Select correct option:
 Time to execute a program or program mix
 The speed with which it executes programs
  Processor’s utilization in solving the problems       (not sure)
 Instructions that can be carried out simultaneously 
Question # 3 of 10 ( Start time: 07:05:03 PM )  Total Marks: 1
The external interface of FALCON-A consists of a ________ data bus.
Select correct option:
 8-bit
    16-bit
 24-bit
 32-bit




Quiz Start Time: 07:02 PM  
Time Left  89
sec(s)  
Question # 4 of 10 ( Start time: 07:05:54 PM )  Total Marks: 1
In which one of the following techniques, the time a processor spends waiting for
instructions to be fetched from memory is minimized?
Select correct option:
 Perfecting
 Pipelining    (not sure )
 Superscalar operation
 Speedup
Question # 5 of 10 ( Start time: 07:07:23 PM )  Total Marks: 1
_________ control signal allows the contents of the Program Counter register to be
written onto the internal processor bus.
Select correct option:
 INC4
 LPC 

   PCout  (P # 174)
 LC
Question # 6 of 10 ( Start time: 07:08:09 PM )  Total Marks: 1
-----------is the ability of application software to operate on models of equipment newer
than the model for which it was originally developed.
Select correct option:
 Backward compatibility
 Data migration
 Reverse engineering
 Upward compatibility
Question # 7 of 10 ( Start time: 07:09:35 PM )  Total Marks: 1
-------------- performs the data operations as commanded by the program instructions.
Select correct option:
 Control
 Datapath
  Structural RTL  (not sure )
 Timing
Question # 8 of 10 ( Start time: 07:10:57 PM )  Total Marks: 1
The external interface of FALCON-A consists of a __________address bus and a
_________ data bus.
Select correct option:
 8-bit , 8-bit
   16-bit , 16-bit
 16-bit , 24-bit
 16-bit , 32-bit
Question # 9 of 10 ( Start time: 07:11:17 PM )  Total Marks: 1
Motorola MC68000 is an example of ---------microprocessor.
Select correct option:
   CISC  (P # 149)
 RISC
 SRC
 FALCON
Question # 10 of 10 ( Start time: 07:12:12 PM )  Total Marks: 1
__________ enable the input to the PC for receiving a value that is currently on the
internal processor bus.
Select correct option:
   LPC  (P # 174)
 INC4
 LC
 Cout

Monday 9 May 2011

Complete Solution of STA301

New Entry on VU Notice Board

The Government of Mexico has called for the delivery of international medal called the “Human Cities, Inclusive Cities”. This contest is for all students and graduates of higher education in fields related to the categories (Inhabitable cities, sustainable urbanization, cultural and natural heritage, technological innovation in developed areas, Disadvantaged areas), whose ages range between 20 and 26years.

Complete Solution of STA301

Complete Solution of STA301 will be available at Noon 12:00.......
Please visit regularly for Solution.....

Sunday 8 May 2011

STA 301...........Last date is 09-05-2011


Assignment 2 (Lessons 12-18)

Question 1:                                                                        Marks: 2+2+4+2=10
  1. By using five number summary, suggest the skewness of the data from the following information:
  1. What is the usefulness of Pearson’s coefficient of skewness?
  2. For a certain data,
Find moment ratios  and. Interpret your results also.
d.      Explain equally likely events with the help of an example.

Question 2:                                                                          Marks: 4+4+2=10 
a. For a particular data of 5 pair of values:
      The fitted regression line is:
Y= -1.5 + 0.5 x
Find the standard error of estimate (Sy.x); what doest it indicates?
  1. Five yellow balls and four green balls, which are indistinguishable apart from color, are placed in a bag if six balls are taken from the bag; Find the probability of being three yellow and three green.
  2.  If the equations of the least square regression lines are:
        Y= -1 + 0.5 x        And        X= -1.1 + 0.2 y
Find correlation coefficient ‘r’.


Question 3:                                                                                    Marks: 5+5=10
  1.  
                    i.            How many different words (even meaningless) can be formed from the word “Component”?
                  ii.            How many distinct four-digit numbers can be performed from the following integers 2, 3,4,5,6 where each integer is used only once?

  1. When a pair of dice is rolled, make the sample space and find the probability
i)                    Total of 5
ii)                  Total of 7?