Tuesday, January 15, 2008
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.
6. Based on figure 5.17 answer the following question.a. is this system deadlock?-this is an deadlock because P2 still requesting or waitng for R1 that has already been allocated.
2. Example of Deadlock: when two students recitates in the class.
Example of Starvation: when the two student are paying tuition at the same time and in a first come first serve basis.
Example of Race: when two girls have the same boyfriend.
3. Four necessary condition needed for the deadlock from exercise #2:
- if the two student have the same answer.
- if there were only one should recitates.
- if the two are the only one who wants to recitate.
- if the two student are sharing answers to others.
a. Deadlock can't occur to this scenario because, there were traffic lights to control the traffic build up. But in case there are motorist that will not follow the rules, deadlock can occur.
b. Deadlock can be detected when there are traffic build up and there will be accident that will happen.
c. The solution to prevent deadlock is that, motorist should follow the rules in traffic and they should have the presence of mind and patience in driving through the bridge.
Thursday, December 13, 2007
question # 4
a. What is the cause of thrashing?
- In virtual memory systems, thrashing may be caused by programs or workloads that present insufficient locality of reference: if the working set of a program or a workload cannot be effectively held within physical memory, then constant data swapping, i.e., thrashing, may occur. The term was first used during the tape operating system days to describe the sound the tapes made when data was being rapidly written to and read from them.
b. How does the operating sytem detect thrashing?
- An operating system would have no idea that thrashing is happening. The OS would be responsible for making use of virtual memory to make up for the lack of physical RAM during a particular computing session, but would have no concept that this is causing issues with hardware.
c. Once thrashing is detected, what can the operating system do to eliminate it?
- 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.
question # 1-3
a. Multiprogramming. Why is it used?
- 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. Internal fragmentation. How does it occur?
-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.
c. External fragmentation. How does it occur?
-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.
d. Compaction. Why is it needed?
e. Relocation. How often should it be performed?
-relocation is the process of replacing symbolic references or names of libraries with actual usable addresses in memory before running a program. It is typically done by the linker during compilation, although it can be done at run-time by a loader. Compilers or assemblers typically generate the executable with zero as the lower-most, starting address. Before the execution of object code, these addresses should be adjusted so that they denote the correct runtime addresses.
2. Describe the major disadvantages for each of the four memory allocation schemes presented in the chapter.
- The major disadvantage only 1 job per partition and waste of main storage.
3. Describe the major advantages for each of the memory allocation schemes presented in the chapter.
-The major advantage of this is operating system is easy to implement.
Thursday, November 29, 2007
Wednesday, November 21, 2007
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). In this article, the author makes the explanation brief and understandable to the reader.
The author also makes the article more presentable.
The two reasons why regional bank might decide to buy six server computers than one supercomputer:
- It's because six server computers can store more data and easy to manipulate and operated.
- because six server computers can perform faster than one supercomputer in terms of number of unit.