Sunday, March 9, 2008

Quiz 1 - IT 222

1. Contact the network expert at your school or place of work. Find out which topology, communication links, and configuration are used in the network. IS it a LAN, MAN, or WAN?

-LAN or Local Area Networks is the type of topology communication links and configuration is used in our school. Because LAN covers only small geographical areas like in our school.


2. Discuss the primary difference between a bridge and a gateway and give real life example that uses each one?

- A bridge connects multiple network segments at the data link layer (layer 2) of the OSI model, and the term layer 2 switch is often used interchangeably with bridge. Bridges are similar to repeaters or network hubs, devices that connect network segments at the physical layer, however a bridge works by using bridging where traffic from one network is managed rather than simply rebroadcast to adjacent network segments. In Ethernet networks, the term "bridge" formally means a device that behaves according to the IEEE 802.1D standard—this is most often referred to as a network switch in marketing literature. A gateway may contain devices such as protocol translators, impedance matching devices, rate converters, fault isolators, or signal translators as necessary to provide system interoperability. It also requires the establishment of mutually acceptable administrative procedures between both networks.
*Example of bridge in real life is use in packet-switched computer networks and for gateway is use for connecting a Local Area Network or Wireless LAN to the Internet or other Wide Area Network.

3. Name three commercially-available operating systems for LANs and their vendor names. Explain the topology that each designed to manage and describe the access protocol it uses.

- Three commercially-available operating systems for LANs are the Windows 98, XP and Vista. This operating systems are created by the Microsoft Windows Corporation.
- Windows 98 was the first operating system to use the Windows Driver Model (WDM). This fact was not well published when Windows 98 was released and most hardware producers continued to develop drivers for the older driver standard, VxD. Windows Vista networking stack supports the dual Internet Protocol (IP) layer architecture in which the IPv4 and IPv6 implementations share common Transport and Framing layers. Windows Vista provides a GUI for configuration of both IPv4 and IPv6 properties. IPv6 is now supported by all networking components and services.

4. Explain the similarities and differences between a file infecter virus and a macro virus, including the types of files each infects.

File infector virus

Virus that infects other files on a system or network

File infector viruses are the 'classic' form of virus, those to which the term is most commonly and, along with boot sector viruses, most appropriately applied.

When an infectious file is executed on a system, the infection routine will seek out other files and insert its code into them, generally at the beginning or end of the existing file (prepending or appending viruses), but also occasionally in the middle of the file (mid-infector) or spreading itself across gaps in the file structure. The entry point of the file is redirected to the start of the virus code to ensure that it is run when the file is executed, and control may or may not be passed on to the original program in turn.

File infector viruses often misinfect, either leaving the file completely non-functional or simply failing to run the viral code at all. More sophisticted forms of file infector virus, which try to hide their presence by changing aspects of their code with each infection, are known as polymorphic or metamorphic viruses

Macro virus (computing)

In computing terminology, a macro virus is a virus that is written in a macro language: that is to say, a language built into a software application such as a word processor. Since some applications (notably, but not exclusively, the parts of Microsoft Office) allow macro programs to be embedded in documents, so that the programs may be run automatically when the document is opened, this provides a distinct mechanism by which viruses can be spread. This is why it may be dangerous to open unexpected attachments in e-mails. Modern antivirus software detects macro viruses as well as other types.

5. Give three examples of inadequate passwords and explain why each would be a poor choice to protect a system from unauthorized users.

- Example of this is the restrictions on the export of cryptography that uses short or weak keys or passwords. The weak key is fed through an algorithm that takes a known constant time to apply.




Tuesday, January 15, 2008

EXERCISE (1-2)

1.
Deadlock a problem occuring when the resources needed by some jobs to finish execution are held by other jobs , which, in turn, are waiting for other resources to become available. Also called deadly embrace. Starvation the result of conservative allocation of resources in which a single job is prevented from execution because it's kept waiting for resources that never become available. Race a synchronization problem between two processes vying for the same resource.

2.
*Deadlock example - a traffic cituation of vehicles in a highway.

*Starvation example - a cituation in a dining table with one food served to 5 people using 5 utensils only but 2 utensils each. This results to the starvation of some people.

*Race example - a cituation that has a competition between 2 persons for only one source of food.

3.
Four Necessary Conditions for Deadlock: The presence of deadlock in a systems is characterized by these four necessary conditions. The term necessary means that if there is deadlock then all four must be present.a. Mutual exclusive resource access - A resource acquired is held exclusively, i.e., it is not shared by other processes.b. No preemption - A process' resources cannot be taken away from it. Only the process can give up its resources.c. Hold and Wait - A process has some resources and is blocked requesting more.d. Circularity - This means that there is a circular chain of two or more processes in which the resources needed by one process are held by the next process.

4.
Algorithm for prevention of deadlock and starvation:

public boolean tryAcquire( int n0, int n1, ... ) { if ( for all i: ni ≤ availi ) { // successful acquisition availi -= ni for all i; return true; // indicate success } else return false; // indicate failure}init) Semaphore s = new Semaphore(1,1);Thread A Thread B-------- --------s.acquire(1,0); s.acquire(0,1);s.acquire(0,1); s.acquire(1,0);Thread B--------while(true) {s.acquire(0,1);if ( s.tryAcquire(1,0) ) // if second acquisition succeedsbreak; // leave the loopelse {s.release(0,1); // release what is heldsleep( SOME_AMOUNT); // pause a bit before trying again}}run action s.value--- ------ -------(1,1)A s.acquire(1,0) (0,1)B s.acquire(0,1) (0,0)A s.acquire(0,1) A blocks on secondB s.tryAcquire(1,0) => falseB s.release(0,1) (0,1)A s.acquire(0,1) (0,0) A succeeds on second

5.
a. Deadlock can be occurred. When the bridge is destroyed.
b. When there are no traffic lights.
c. To prevent deadlock make all the road to be one-way.

6.
a. This is not a deadlocked.
b. There is no blocked processes.
c. P2 can freely request on R1 and R2.
d. P1 can freely request on R1 and R2.e. Both P1 and P2 have requested R2.1. P1 will wait after the request of P2.2. P2 will wait after the request of P1.