Tuesday, January 15, 2008

Assignment No.4

1. The major difference between deadlock, starvation and race is that in deadlock, the problem occurs when the jobs are processed. Starvation, however is the allocation of resource that prevents one job to be executed. Race occurs before the process has been started.

2. Example of Deadlock: When two person are about to buy one product at the time.
Example of Starvation: When one person borrowed a pen from his classmate and his
classmate get his pen back.
Example of Race: When two guys have the same girlfriend.

3. Four necessary condition needed for the deadlock from exercise #2:
if the product is only one.
if the two person needed that one product urgently.
if there's other alternative products available.
if the two person are brand concious and the product happen to be what they like.

4.

5.
a. Deadlock will not happen because there are two traffic lights that control the traffic. But when some motorist don't follow the traffic lights, deadlock can occur because there's only one bridge to drive through.
b. Deadlock can be detected when there will be a huge bumper to bumper to the traffic and there will be accident that will happen.
c. The solution to prevent deadlock is that, the traffic lights should be accurate and motorist should follow it. In order to have a nice driving through the bridge.

Friday, December 14, 2007

Assignment no.3

Page 104Question #4
What is the cause of thrashing? How does the system detect thrashing? Once it detects thrashing, what can the system do to eliminate this problem?

- Thrashing is caused by under allocation of the minimum number of pages required by a process, forcing it to continuously page fault. The system can detect thrashing by evaluating the level of CPU utilization as compared to the level of multiprogramming. It can be eliminated by reducing the level of multiprogramming.

Page 56 Question 1-3

a. Multiprogramming - is the technique of running several programs at a time using timesharing. It allows a computer to do several things at the same time. Multiprogramming creates logical parallelism. The concept of multiprogramming is that the operating system keeps several jobs in memory simultaneously. The operating system selects a job from the job pool and starts executing a job, when that job needs to wait for any i/o operations the CPU is switched to another job. So the main idea here is that the CPU is never idle.

b.External Fragmentation:- External Fragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much external fragmentation occurs, the amount of usable memory is drastically reduced. Total memory space exists to satisfy a request, but it is not contiguous.

c.Internal Fragmentation:-Internal fragmentation is the space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks. Allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used.

2.) The advantages of the memory allocation are as follows:- It avoids wastage of CPU idle time-Operating system is easy to implement

3.) The disadvantages of the memory allocation are as follows:- degree of multiprogramming is fixed- only 1 job per partition- waste of main storage- some partitions not used

Wednesday, November 21, 2007

Assignment No.1

1.Operating Systems

An operating system (sometimes abbreviated as "OS") is the program that, after being initially loaded into the computer by a boot program, manages all the other programs in a computer. The other programs are called applications or application programs. The application programs make use of the operating system by making requests for services through a defined application program interface (API). In addition, users can interact directly with the operating system through a user interface such as a command language or a graphical user interface (GUI).An operating system performs these services for applications:
In a multitasking operating system where multiple programs can be running at the same time, the operating system determines which applications should run in what order and how much time should be allowed for each application before giving another application a turn.It manages the sharing of internal memory among multiple applications.It handles input and output to and from attached hardware devices, such as hard disks, printers, and dial-up ports. It sends messages to each application or interactive user (or to a system operator) about the status of operation and any errors that may have occurred.It can offload the management of what are called batch jobs (for example, printing) so that the initiating application is freed from this work.On computers that can provide parallel processing, an operating system can manage how to divide the program so that it runs on more than one processor at a time.

2.Why we use six server computer in a regional bank instead of one supercomputer
  • Six server computer because six computer is better than one
  • Six server computer because to faster the work
  • 1