Wednesday 8 July 2015

smu assignment of Bsc IT 2nd sem technical communication theory

                                                [SPRING 2015] ASSIGNMENT
PROGRAM
BSc IT
SEMESTER
SECOND
SUBJECT CODE & NAME
BT0071, Technical Communication-Theory

Q. NO. 1. What is Audience Analysis? Explain its significance in Technical Communication.
Ans.  Audience analysis is a task that is often performed by technical writers in a project’s early stages. It consists of assessing the audience to make sure the audience to make sure the information provided to them is at the appropriate level. It is the process of examining information about your listeners. That analysis helps you to adapt your message so that your listeners will respond as you wish.
In every conversation you adapt your message to your audience. For example, if you went to a party the night before, you would explain the party differently to your friends and family. To your best friend you might say, “We partied all night and there were tones of people there.” To your mother you might say,”Oh, I had fun with my friends.” In each of these situations, you are adapting your message to your listening audience.
Its significance in technical communication are the following:
·         Background-knowledge, experience, and training:  one of your most important concerns is just how much knowledge, experience, or training you can expect in your readers. If you expect some of your readers to lack certain background, do you automatically supply it in your document?
·         Needs and interest: to plan your document, you need to know what about your audience is going to expect from that document. Imagine how readers will want to use your document; what will they demand from it. Imagine you’re under contract to write a background report on global warming for a national real estate association – what do they want to read about; and, equally important, what do they not want to read about?
·          Other demographic characteristics: and of course there are many other characteristic about your reader that might have an influence on how you should design and write your document- for example, age groups, type of residence, area of residence, sex, political preference, and so on.
Audience analysis can get complicated by at least two other factors mixed audience types for one document, wide variability within audience, and unknown audiences.
·         More than one audience: You’re likely to find that your report is for some than one audience. For example, it may be seen by technical people and administrative people. What to do? You can either write all the sections so that all the audience of your document can understand them. Or you can write each section strictly for the audience that would be interested in it, then use headings and section introductions to alert your audience about where to go and what to stay out of it in your report.
·         Wide variability in an audience: you may realize that, although you have an audience that fits only one category, there is a wide variability in its background. This is a though one- if you write to the lowest common denominator of reader, you’re likely to end up with a cumbersome, tedious book-like things that will turn off the majority of readers. But if you don’t write to that lowest level, you lose that segment of your readers.

Q. NO. 2. Explain the role of technical editor. Differentiate between micro and macro editing.
Ans. A technical document, to be effective, requires not only a good writer, but also a good editor. The chief duties of a technical editor are realized when the section of a technical document are submitted to him. The main duties that are performs includes:
Improving text material: the editor determines how appropriate the content and organization are for the purpose and audience. He is instrumental in making the verbose material into concise and clear. In holding this he should be cautions because he needs to retain the tone and words used by the write.
Examining the graphics for appropriateness and balance: he also helps in the task of selecting, naming and numbering of the graphics as well as placing them in suitable context.
Identifying sections that need fuller development: check each section for logic and completeness of evidence to support claims.
Correcting errors, if any, of spelling, grammars, and style.
Differentiation between micro and macro editing:
Macro editing: you need to check the content of the material, how it has been organized and its logic unit to ensure that it addresses its subject and audience, thereby serving the purpose for which it is written. Main issues such as clear matter or purposes statements, fluids, or easy-to-follow organization of the contents, a thorough summary and introduction and accurate as well as complete content are favored in macros editing. You should be familiar with the type of document, its subject matter, the company producing the document in order to edit the document effectively at a macro level.
Micro editing: it is also called copy editing or line editing. This involves necessary revisions to individual sentences or graphics. It is the close editing of the text. In other words, here the editing is done word by word and line by line to come out with a well written document that is sound in expression, correct in grammar, consistent with company standards. The editor checks the complexity level to make sure that the text in the document is presented at an appropriate level to match the complexity level of the readers. The editor also has to check for the correctness; he has to fine tune the document to ensure its consistency with standards and correctness in sentence structure, spelling and punctuation.


Q. NO. 3. Explain the various phase involved in System Development Life Cycle (SDLC).
Ans. System Development Life Cycle (SDLC) relates to models or methodologies that people use to develop systems, generally computer systems. To manage this, a number of system development life cycle models have been created: waterfall, fountain, and spiral, build and fix, rapid prototype, incremental, and synchronize and stabilize. In the academic sense, SDLC can be used to refer to various models. Anyhow, technical documentation is crucial regardless of the type of model chosen or devised for any application, and is usually done in parallel with the development process. 
The image below is the classic Waterfall model methodology, which is the first SDLC method and it describes the various phases involved in development.
                                             
                                                                         SDLC PHASES

·         Feasibility: The feasibility study is used to determine if the project should get the go-ahead. If the project is to proceed, the feasibility study will produced a project plan and budget estimates for the future stages of development.
·         Requirement Analysis and Design: Analysis gathers the requirements for the system. This stage includes a detailed study of the business needs of the organization. Options for changing the business process may be considered. Design focuses on high level design like, what programs are needed and how are they going to interact low level design and data design. During these phases, the software’s overall structure is defined. Analysis and design are very crucial in the whole development cycle.
·         Implementation: in the phase, the design are translated into code. Computer programs are written using a conventional programming language or an application generator. Programming tools like Compilers, Interpreters, and Debuggers are used to generate the code. Different high level programming languages like C, C++. Pascal, Java are used for coding. With respect to the type of application, the right programming language is chosen.
·         Testing: in the phase the system is tested. Normally programs are written as a series of individual models, these subject to separates and detailed test. The system is then tested as a whole. The separate modules are brought together and tested as a complete system. The system is tested to ensure that interface between modules work, the system works on the intended platform and with the expected volumes of data and that the system does what the user requires.
·         Maintenance: Inevitably the system will need maintenance. Software will definitely undergo change once it is delivered to the customer. There are many reasons for the change. Change could happen because of some unexpected input values into the system. In addition, the changes in the system could directly affect the software operation. The software should be developed to accommodate changes that could happen during the post implementation period.

smu assignment of Bsc IT 2nd sem Operatin systems

                                                [SPRING 2015] ASSIGNMENT
PROGRAM
BSc IT
SEMESTER
SECOND
SUBJECT CODE & NAME
BT0070, Operating System

Q. NO. 1. Write short notes on:
A.     Process Creation
B.      Terminating Process
Ans. A. Process Creation: During the course of execution, a process may create several new processes using a create-process system call. The creating process is called a parent process and the new processes are called the children of that process. Each of these new processes may in turn create other processes, forming a tree of processes.
A process in general need certain resources (CPU time, memory, I/O devices) to accomplish a task. When a process creates a sub process, the sub process may be able to obtain its resources directly from the operating system, or it may be constrained to a subset of the resources of the parent process. The parent may have to partition its resources among its children, or it may be able to share some resources (such as memory or files) among several of its children.
In addition to the various physical and logical resources that a poses obtains when it is created, initialized data may be passed along by the parent process to the child process.
An example for this implementation is the DEC VMS operating system, it creates a new process, loads a specified program into that process, and starts running it. Both these approaches may also be supported by some operating system. Microsoft Windows/NT is one such example. It supports both the models. Either the parent address space may the operating system into the address space of the new process may be specified.  
B. Terminating Process: A process is said to be terminated if it has finished execution of its last statement and has called the exit system call to the operating system to delete itself. On termination, the process should return to the parent process through the wait system call. The operating system de-allocates the resources of the process namely physical and virtual memory, I/O buffers and open files.
Only a parent process can cause termination of its children via abort system call. For that a parent needs to know the identities of its children. When one process creates a new process, the identity of the created process is passed to the parent.
To illustrate process and termination, let us consider UNIX system. In UNIX system a process may terminate by using the exit system call and its parent process may wait for that event by using the wait system call. It return the identifiers of the child process which is terminated so that the parent process, the OS terminates all the child processes of the particular process. UNIX has no way to report the activities of a child process if its parent process has terminated.
Q. NO. 2. Write short notes on:
 A. Critical section problem
 B. Buffering
Ans. A. Critical section problem: Critical section is that part of the code section of a process which accesses would result in data inconsistency. For example, consider a system with n processor p1, p2, p3, p4………pn. It is important to ensure that when one process executes in its critical section, other processes should not be allowed to execute in their critical sections. Executions of processes in critical sections should be mutually exclusive. The critical section problem is thus concerned about establishing a protocol the processes in the system should follow to cooperate with each other. When a process requires entry to critical section, it should request permission to do so.
 The following requirements should be met by any solution to the critical section problem.
1.       Mutual Exclusion: if one process is in its critical sections, no other process can executes in its critical section.
2.       Progress: The decision of which will process should enter the critical section should not be indefinitely postponed. When no process is in the critical section, the processes which are not in their remainder section can participate in deciding which process will enter the critical section next.
3.       Bounded Waiting: After a process request to enter its critical section and before that request is granted, there exist a bound on the number of times other processes may be allowed to enter their critical sections.
In the following sections, a solution to critical section problem is presented that meets these condition. Only the variables concerned with synchronization here.
(B) BufferingThe number that can be held by the buffer is determined by its capacity. This acts like a queue connected to the link with messages in it. This facility can be implemented in three way.
·         Zero capacity: This queue cannot hold any message since its size is 0. Thus no message can be waiting in this link and requirement forces the sender to wait till the recipient receives the message. This calls for synchronization between the processes in sending and receiving messages.
·         Bounded capacity: This queue with its capacity bounded by a finite size of n can hold only n messages. While the queue has an empty slot, sender may continue to execute after sending one message. However if the queue is full since it has only n slots and if it is full, the sender will have to wait to send another message, until the queue as an empty slot.
·         Unbounded capacity: The queue has infinite length and thus it can have any number of messages on it. The sender can continue to send without waiting for the recipient.
The zero-capacity case is sometimes referred to as a message system with no buffering; the other cases provide automatic buffering.
Q. NO. 3. What are TLBs? Why they are required in paging?
Ans. A translation lookaside buffer (TLB) is a cache that memory management hardware uses to improve virtual address translation speed. The majority of desktop, laptop and server processor includes one or more TLBs in the memory management hardware, and it is nearly always present in any hardware that utilizes paged or segmented virtual memory.
They are required in paging because when access a CPU generated address, one memory access is required to index into the page table. This access using the value in PTBR fetches the frame number when combined with the page-offset produces the actual address. Using this actual address, the next memory access fetches the contents of the desired memory location.
To overcome this problem, a hardware cache called translation look-aside buffers (TLBs) are used. TLBs are associative registers that allows for a parallel search of a key item. Initially the TLBs contains only a few or no entries. When a logical generated by the CPU is to be mapped to a physical address, the page number is presented as input to the TLBs. If the page number is found in the TLBs, the corresponding frame number is available so that a memory access can be made. If the page number is not found then a memory reference to the page table in main memory is made to fetch the corresponding frame number. This page number next time will find an entry in the table. Thus, a hit will reduce one memory access and speed up address translation.
Q. NO. 4. Describe the techniques of free space management of free space list.
Ans. The disk is a scarce resource. Also disk space can be reused. Free space present on the disk is maintained by the os. Physical blocks that are free are listed in a free-space list. When a file is created or a file grows, requested for blocks of disk space are checked in the free-space list and then allocated. The list is updated accordingly. Similarly, freed blocks are added to the free-space list.   The techniques of free space management of free space list are following:
1.       Bit Vector: A bit map or a bit vector is a very common way of implementing a free space list. This vector ‘n’ number of bits where ‘n’ is the total number or available disk blocks. A free blocks has its corresponding bit set (1) in the bit vector whereas an allocated blocks has its bit reset (0).
Illustration: if blocks 2,4,5,9,10,12,15,18,20,22,23,24,25,29 are free and the rest are allocated, than a free-space list implemented as a bit vector would look as shown below:
00101100011010010101111000100000…….
The advantage of this approach is that it is very simple to implement and efficient to access.
2.       Linked List: All free blocks are linked together. The free-space list head contains the address of the first free blocks. This blocks in turn contains the address of the next free block and so on. But this scheme works well for linked allocation. If contiguous is used then to search for ‘b’ contiguous free blocks calls for traversal of the free-space list which is not efficient.
3.       Grouping: Another approach is to store ‘n’ free block addresses in the first free block. Here (n-1) block are actually free. The last nth address is the address of a block that advantage that a large number of free blocks addresses are available at a single place unlike in the previous liked approach where free block addresses are scattered.
4.       Counting: If contiguous allocation is used and a file has freed its disk space then a contiguous set of ‘n’ blocks is free. Instead of storing the addresses of all these ‘n’ blocks in the free-space list, only the starting free blocks address and a count of the number of blocks free from that address can be stored. This is exactly what is done in this schemes where each entry in the free- space list is a disk address followed by a count
Q. NO. 5. What are computer viruses? How do they affect our system?  
Ans.  A computer virus is a malware program that, when executed, replicates by inserting copies of itself into other computer programs, data files, or the boot sector of the hard drive; when this replication succeeds, the affected areas are the then said to be “infected”. A computer virus is written with an intention of infecting other programs. It is a part of a program that piggybacks on to a program. It differs from the worm in the following ways:
·         Worms is a complete program by itself and can execute independently whereas virus does not operate independently.
Worm consumes only system resources but virus causes direct harm to the system by corrupting code as well as data.
Different computer viruses creates different problems in different ways. The most common problems are:
·         A virus may destroy all data stored in the hard disk by either formatting it without warning or by destroying some of its sectors.
·         A virus may change the boot sector of the hard disk. If the boot sector of a disk is affected, it cannot boot the computer.
·         The computer virus are automatically loaded into the main memory. This slows down the data accessing speed of the computer.

Q.NO.6. List and explain the types of multiprocessor OS.
Ans. There are the three types of the multiprocessor operating system are:
·         Separate supervisors
·         Master/ slave
·         symmetric
Separate supervisors: In separates systems, each nodes is a processor having a separate operating system with a memory and I/O resources. Addition of a few additional services and data structure will help to support aspects of multiprocessors.
A common example is the hypercube. Due to their repeating structure constructed of identical holding blocks, they tends to replicates identical copies of a kernel in each node.

Master/Slave: In this approach, one processor- the master is dedicated to execute the operating system. The remaining processors are slaves and form a pool of computational processors. The master schedules and controls the slaves. This arrangements allows parallelism in an application by allocating to it many slaves.
Master/slaves system are easy to develop. A uniprocessor os can be adapted for master/slave multiprocessor operation with the addition of slave scheduling. Such system have limited scalability. Major disadvantages are that computational power of a whole processor is dedicated for control activity only & if the master fails, the entire system is down.

Symmetric: All processors are functionally identical. They form a pool of resources. Other resources such as memory and I/O devices are available to all processor. If they are available to only a few the system becomes asymmetric.
The os is also is symmetric. Any processor can execute it. In response to workload requirements and processor availability, different processors executes the os temporarily is the master.
An existing uniprocessor os such as UNIX can easily be ported to a shared memory UMA multiprocessor. Shared memory contains the resident os code and data structure.


smu assignment of Bsc IT 2nd sem discrete mathematics

                                            [SPRING 2015] ASSIGNMENT
PROGRAM
BSc IT
SEMESTER
SECOND
SUBJECT CODE & NAME
BT0069, Discrete Mathematics

Q. NO. 1 If U= {a, b, c, d, e}, A= {a, c, d}, B= {d, e}, C= {b, c, e}
Evaluate the following:
A.     A’ X (B – C )
B.      (A U B)’ X (B∩C)
C.      (A - B) X (B -C)
D.     (B U C)’ X A
E.      (B - A) X C’
Solution:
(A)  A’ = U – A = {a, b, c, d, e } – {a, c, d} = {b, e}
        B – C = {d, e} –  {b, c, e} = {d}
        Therefore A’ X (B - C) = {b, e} x {d} = {(b, d)(e, d)}
 (B) (A U B)’ = U – (A U B) = {a, b, c, d, e} – {a, c, d, e} = {b}
       B∩C = {d, e} ∩ {b, c, e} =  {e}
       Therefore (A U B)’ X (B ∩ C ) = {b} x {e} = {(b, e)}
(C) A – B = {a, c, d} – {d, e} = {a, c}
       B – C = {d, e} – {b, c, e} = {d}
      Therefore (A - B) X (B - C) = {a, c} x {d} = {(a, d)(c, d)}
(D) B U C = {d, e} U {b, c, e} = {b, c, d, e}
      Therefore (B U C)’ = U – (B U C) = {a}
      Therefore (B U C)’ X A = {a} x {a, c, d} = {(a, a), (a, c), (a, d) }
(E) B-A = {d, e} – {a, c, d} = {e}
C’ = U – C = U – {b, c, e} = {a, d}
Therefore (B - A) X C’ = {e} x {a, d} = {(e, a), (e, d)}

Q.NO.2 (i) State the principal of inclusion and exclusion.
(ii) How many arrangements of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, contain at least one of the patterns 289, 234or 487?
Solution: (i) for any two sets P and Q, we have;
a)      |PUQ|≤|P| + |Q| where |P| is the number of elements in P, and |Q| is the number elements in Q.
b)      |P∩Q|≤ min (|P|, |Q|)
c)       |P Q| = |P| + |Q| – 2|P Q| where is the symmetric difference.

ii) Let A289 be the event of having pattern 289. Similarly A234 and A487.
We have to find |A289 or A234 or A487|.
Now |A289| = 8! , as 289 considered as a group, which is a single object and the remaining seven single digits. Similarly |A234| = |A487| = 8!
Also since 2 cannot be followed by both 3 and 8, we have |A289 A234| = 0.
Similarly |A289 A487| = 0. But
|A234 or A487| = 6! , since 23487 as a single object and remaining 5 single objects.
|A289 A234 A487| = 0.
Therefore, by the principle of inclusion and exclusion –
|A289 U A234 U A487| = 8! + 8! + 8! - 0 – 0 – 6! + 0 = 3 X 8! - 6!

Q.NO.3 If G is the group, than prove that,
        i.            The identity element of G is unique.
      ii.            Every element in G has unique inverse in G.
    iii.            For any a g, we have (a power -1)whole power -1=a
    iv.            For all a,bG, we have (a.b)whole power -1=b power-1.a power-1.
Solution:
i) Let e, f be two identity elements in G. Since e is the identity, we have e.f = f. Since f is the identity, we have e.f = e. Therefore, e = e.f = f. Hence the identity element is unique.
ii) Let a be in G and a1, a2 are two inverses of a in G.
Now a1 = a1.e (since e is the identity)
= a1.(a.a2) (since a2 is the inverse of a)
= (a1.a).a2 (by associativity)
= e.a2 (since a1 is the inverse of a)
= a2.
Hence the inverse of an element in G is unique.
iii) Let a G. Since a.a-1 = e = a-1.a, we have that a is the inverse of a-1.
Hence (a-1)-1 = a.
iv) Let a, b G. Consider (b-1.a-1)(a.b) = b-1.(a-1.a).b = b-1.e. b = b-1.b = e.
Similarly e = (a.b).(b-1.a-1). This shows that (a.b)-1 = b-1.a-1.

Q.NO.4 (i) Define valid argument
(ii) Show that ~ (P ^Q) follows from ~ P ^  ~Q.

Solution: (i) We call an argument deductively valid (or, for short, just "valid") when the conclusion is entailed by, or logically follows from, the premises.
Validity is a property of the argument's form. It doesn't matter what the premises and the conclusion actually say. It just matters whether the argument has the right form. So, in particular, a valid argument need not have true premises, nor need it have a true conclusion. The following is a valid argument:
1.       All cats are reptiles.
2.       Bugs Bunny is a cat.
3.       So Bugs Bunny is a reptile.
Neither of the premises of this argument is true. Nor is the conclusion. But the premises are of such a form that if they were both true, then the conclusion would also have to be true. Hence the argument is valid.
To tell whether an argument is valid, figure out what the form of the argument is, and then try to think of some other argument of that same form and having true premises but a false conclusion. If you succeed, then every argument of that form must be invalid. A valid form of argument can never lead you from true premises to a false conclusion.

(ii) Assume ~ (~ (P ^ Q)) as an additional premise. Then,
                (1) ~ (~ (P ^ Q))               Rule P
    {1}       (2) P ^ Q                           Rule T
                (3) P                                  Rule T
                (4) ~P ^ ~ Q                     Rule P
    {4}       (5) ~ P                              Rule T
    {3, 5}  (6) P ^ ~ P                        Rule T
Therefore P ^ ~ P is a contradiction. Hence by the indirect method of proof, ~ (P ^ Q) follows from ~ P ^ ~

Q.NO.5(i) Construct a grammar for the language:
L={ x|x∈ {a,b}, the number of a’s in x is a multiple of 3}
(ii) find the highest type number that can be applied to the following production:
1.     Sà A0, Aà1|2| B0, Bà012.
2.     Sà ASA | b, Aà bA | c,
3.     3.SàBs | bc.

Solution: (i)
Let T = {a, b} and N = {S, A, B},
S is a starting symbol.
The set of productions: 
S    à   bS
S    à   b
S    à   aA
A    à   bA
A    à   aB
B    à   bB
B    à   aS
B    à   a
For instance,
bbababbab can be generated as follows.
S è bS è bbS è bbaA è bbabA è bbabaB è bbababbB è bbababbaS è bbababbab
Therefore, the grammar G = (VT = {a, b}, VN = {S, A, B}, AΦ, S )

(ii) 1. Here, S à A0, A à B0 and B à 012 are of type 2, while A à 1 and A à 2 are type 3. Therefore, the highest type number is 2.

2. Here, S à ASB is of type 2, while S à b, A à bA and A à c are type 3. Therefore, the highest type number is 2.

3. Here, S à bS is of type 3, while S à ab is of type 2. Therefore, the highest type number is 2.


Q.No.6(i) Define tree with example.
(ii) Prove that any connected graphs with ‘n’ vertices and n-1 edges is a tree.

Solution: (i) A connected graph without circuits is called a tree.
A tree is a mathematical structure that can be viewed as either a graph or as a data structure. The two views are equivalent, since a tree data structure contains not only a set of elements, but also connections between elements, giving a tree graph.
Trees were first studied by Cayley (1857). McKay maintains a database of trees up to 18 vertices, and Royle maintains one up to 20 vertices.
A tree is a set of straight line segments connected at their ends containing no closed loops (cycles). In other words, it is a simple, undirected, connected, acyclic graph (or, equivalently, a connected forest). A tree with   nodes has  graph edges. Conversely, a connected graph with   nodes and   edges is a tree. All trees are bipartite graphs(Skiena 1990, p. 213). Trees with no particular node singled out are sometimes called free trees (or unrooted tree), by way of distinguishing them from rooted trees (Skiena 1990, Knuth 1997).
The points of connection are known as forks and the segments as branches. Final segments and the nodes at their ends are called tree leaves. A tree with two branches at each fork and with one or two tree leaves at the end of each branch is called a binary tree.
A graph can be tested in the Wolfram Language to see if it is a tree using TreeGraphQ[g] or using TreeQ[g] in theWolfram Language package Combinatorica`.
Example : Trees with one, two, three and four vertices are given in the Fig. below:


                                                       Fig: Graph Theory

(ii) Let “G” be a connected graph with n vertices and n - 1 edges. It is enough to show that G contains no circuits.
If possible, suppose that G contains a circuit.
Let “e” be an edge in that circuit.
Since “e” in a circuit, we have that G - e is still connected.
Now G - e is connected with „n‟ vertices, and so it should contain at least n - 1 edges, a contradiction (to the fact that G - e contain only (n-2) edges).
So G contains no circuits. Therefore, G is a tree.