Work Sheet 14 

 1.What is meant by Domain Name service? What is the IP address of www.rpi.edu?
 ###
 Domain Name Service means to distribute the information about the names and addresses 
 of all the other hosts among systems on the network.
 The IP address of www.rpi.edu is 128.113.113.29. (This can be obtained
through traceroute www.rpi.edu)
  
 2.What are the different routing methods and their advantages and disadvantages? 
 ###
 Fixed routing. Advantages: For the shortest path is chosen, the communication cost is
 minimized;ensure the messages in order. Disadvantages: it can not adapt to link failures
 or load changes.
 
 Virtual circuit. Advantages:reliability is high, ensure the message in order. 
 Disadvantages: Only partly remedy the link failures. 
 
 Dynamic routing: Advantages:communicating cost is low,reliability is the highest. 
 Disadvantages:The messages may arrive out of order; too complicated.
  
 3.What is the difference between packet switching and circuit switching? 
 ###
 A permanent physical link must be established in circuit switching; The packets must be
 divided and reassembled into messages as they arrive in packet switching; Circuit switching requires
 set-up time, but incurs less overhead for shipping each message, and may waste network bandwidth;
 Packet switching requires less set-up time, but incur more overhead per message; Packet switching
 is the most common method used on data networks because it makes the best use of network bandwidth
 and it is not harmful for data to be broken into packets, possibly routed separately, and reassembled 
 at the destination.
  
 4.Explain the seven layered design. 
 ###
 Physical layer: responsible for handling both the mechanical and electrical details of the physical transmission
 of a bit stream;
 Data-link layer: responsible for handing the frames, or fixed-length parts of packets, including any error
 detection and recovery that occurred in the physical layer;
 Network layer: responsible for providing connections and for routing packets in the communication network;
 Transport layer: responsible for low-level access to the network and for transfer of messages between the clients;
 Session layer: responsible for implementing sessions, or process-to-process communications protocols;
 Presentation layer: responsible for resolving the differences in formats among the various sites in the networks;
 Application layer: responsible for interacting directly with the users.
  
 5.What are some of the factors that affect Network Performance? 
 ###
 The topology, routing strategy, packet strategy, connection strategy, resolving contention strategy are all the 
 factors that can affect Network Performance.
  
 6.Do problems 15.1, 15.3, 15.4 and 15.6. 
 ###
 15.1
 ###
 Fully connected network is the most reliable. Second one is partially connected network. 
 In hierarchical network, the failure of the node except a leaf partitions the network into several disjoint 
 subtrees. If the root site fails, then all the network will break down.
 In the star network, if the central site fails, the network is completely partitioned. The other site can only
 affect itself.
 In the ring network, one or two links fail will partition the network.
 In the multi-access bus network, the failure of one site does not affect communication among the rest of the sites.
 The hybrid network depends on what it includes.
 
 15.3
 ###
 The main difference between LAN and WAN is in the way they are distributed geographically. LANs are composed of 
 processors that are distributed over small geographical areas, such as a single building or a few adjacent buildings.
 WANs are composed of autonomous processors that are distributed over a large geographical area.

 15.4
 ###
 (a) LAN; (b) LAN; (c) WAN; (d) WAN.
 
 15.6
 ###
 With a doubling of the speed of the systems on an Ethernet segment, they are able to send more packets per time segment. And
when more collisions occur, the performance will be poor.  As a result, the number of systems per Ethernet segment 
 generally is kept low to keep networking performance reasonable.
 

Work Sheet 15 

 1.What are threads and what are some of the operations with Threads? 
 ###
 A thread, sometimes called a lightweight process, is a basic unit of CPU utilization, and consists of a program counter,
 a register set, and a stack space.
 Some of the operations with threads: 
 Thread-management calls: create, exit, join, detach;
 Synchronization calls: mutex_init, mutex_destroy, mutex_trylock, mutex_lock, mutex_unlock;
 Condition-variable calls: cond_init, cond_destroy, cond_wait, cond_signal, cond_broadcast;
 Scheduling calls: set-scheduler, getscheduler, setprio, getprio;
 Kill-thread calls: cancel, setcancel.
 
 2.What are the uses of threads in DFS? 
 ###
 Threads can be used to make the server process easier to write and more efficient, as one thread can process a request
 from beginning to end while its fellow threads are doing the same for other requests.
 
 3.What are RPC's and why are they useful? 
 ###
 RPC is the remote procedure call mechanism. RFC's are the structured message addressed to an RPC daemon listening to a 
 port on the remote system, and contains an identifier of the function to execute and the parameters to pass to that parameters
 to pass to that function. The function is then executed as requested, and any output is sent back to the requester in a
 separate message.
 
 4.Do problems 16.1, 16.3, and 16.5.  
 ###
 16.1
 ###
 Advantages: convenience and mobility; disadvantages: implementation is complicated.
 
 16.3
 ###
 a. The same operating system. The process can be implemented by the same system calls;
 b. Different operating system. They should support one public language, and the process should can be translated into this 
 public language. This policy is just like Java and Java Virtual Machine.
 
 16.5
 ###
 Yes. A distributed system may suffer from various types of hardware failure. If the message can't reach the destination
 and the sender don't know it, the message will be lost and can't send again. Thus, it is crucial.
 
Work Sheet 16 

 1.What are the disadvantages of replicating files? 
 ###
 Space cost and updating cost are high; it may result in inconsistent files.
 
 2.What are the issues of naming files? 
 ###
 Naming is a mapping between logical and physical objects. Location transparency: the name of a file does not reveal any hint
 of the file's physical storage location; Location independence: the name of a file does not need to be changed when the file's
 physical storage location changes.
 
 3.What are RPC's and why are they useful? 
 ###
 Please read Worksheet15 item3.
 
 4.What is concurrency control and why is it important? 
 ###
 Concurrency control is the function of the transaction manager of a distributed database system to manage the execution of those 
 transactions that access data stored in a local site. It is important because of  maintaining a log for recovery purposes, coordinating 
 the concurrent execution of the transactions, and handling deadlock etc.
 
 5.Do problems 17.1, 17.4, 18.3 and 18.4. 
 ###
 17.1
 ###
 DFS has more availability, mobility than a centralized system.
 
 17.4
 ###
 We should choose Naming Scheme, Caching and its updating policy, File replication policy for a distributed system.
 
 18.3
 ###
 Every node in distributed system has to manage its wait-for graph. In additional, the system has to test whether the union of all local 
 graphs is acyclic. Thus,the deadlock detection is much more expensive.
 
 18.4
 ###
 Comparing two schemes, one prefer to deadlock prevention scheme because its cost is low. In deadlock prevention scheme, one chooses bound-wait
 scheme for: an older process never waits for a more recent process; there are fewer rollback.
 
 Work Sheet 17 

 1.What are the Differences between protection and security?
 ###
 Protection refers to a mechanism for controlling the access of programs, processes, or users to the resources defined by a computer system.
 Security is a measure of confidence that the integrity of a system and its data will be preserved. In fact, protection is an internal problem;
 security is both internal and external problem.
  
 2.What are access rights? 
 ###
 Access rights are the ability to execute an operation on an object.
 
 3.What are capability Lists?
 ###
 A capability list for a domain is a list of objects together with the operations allowed on those objects.
  
 4.What are Trojan horse and trap doors? 
 ###
 Trojan horse is a code segment that misuses its environment: if the programs are executed in a domain that provides the access rights of the
 executing user, they may misuse these rights.
 Trap door is that the designer of a program or system might leave a hole in the software that only the intruder/program is capable of using.
 
 5.How does virus scan program work in pc? 
 ###
 The virus scanning  in pc mainly scans the trail of a virus. This trail is a uniform segment code for the virus.
 
 6.Do problems 19.3, 19.4, 19.11, 20.2, 20.4 and 20.7 
 ###
 19.3
 ###
 The capabilities of a domain at level j is a subset of that of a domain at level i to an object(for j>i).
 
 
 19.4
 ###
 We can design as following access matrix(* means have right to use)
 Domain/Object (5pm-10pm)  (10pm-6am)	  (6am-8am)	  (8am-5pm)
 
 Students			*
 Faculty	*		*		*
 Staffs		*		*		*		*
 
 19.11
 ###
 The need-to-know principle is the requirement that a process should be able to access only those resources that it currently requires to complete
 its task. It is useful in limiting the amount of damage a faulty process can cause in the system.
 
 20.2
 ###
Encrypt the passwords internally so that they can be accessed in coded form. No person should be
able to decode the password files. 
 20.4
 ###
 Two potential hazards of using such a system may cause the unauthorized access or malicious destruction.The problem can either be fixed by the system,
 or reported to the system administrator to use the prevention measures. 
 
 20.7
 ###
 In bank, the security list as:
 Physical security: close door with lock; guard with guns;
 Human security: everyone has its own right to use the system; developers can use the running system;
 Operating-system security: audit log for every operation; multi-level passwords.