Tuesday, January 15, 2008
CS 223 Assignmet #4
Deadlock: When two basketball player are about to shoot in one basket in a practice game.
Starvation: When a person siutoring a girl while the girl has a boyfriend already.
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. figure 5.16 shows a tunnel going trough a mountain and two streets parallel to each other- one at each intrance/exit of the tunnel. Traffic light are located at each end of the tunnel to control the crossflow of tghe traffic through each intersection.
a. Deadlock will not happen because there are two traffic lights that control the traffic.The deadlock may when some of the motorist dont follow the traffic light 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.
b. Are there any block process?
- yes because the resources that needed by P2 was allocated already by P1.
c.
Thursday, December 13, 2007
Assignment page 104
Thrashing is caused by under allocation of the minimum number of pages required by a process, forcing it to continuously page fault.
b:How does the operating system detect thrashing?
The system can detect thrashing by evaluating the level of CPU utilization as compared to the level of multiprogramming.
c:Once thrashing is detcted, what can the operating system do to iliminate it?
It can be eliminated by reducing the level of multiprogramming.
CS 221 assignment 3
Multiprogramming is a rudimentary form of parallel processing in which several programs are run at the same time on a uniprocessor. Since there is only one processor, there can be no true simultaneous execution of different programs. Instead, the operating system executes part of one program, then part of another, and so on. To the user it appears that all programs are executing at the same time.
For example, in many file systems, files always start at the beginning of a sector, because this simplifies organization and makes it easier to grow files. Any space left over between the last byte of the file and the first byte of the next sector is internal fragmentation. Similarly, a program which allocates a single byte of data is often allocated many additional bytes for metadata and alignment. This extra space is also internal fragmentation.
Another common example: English text is often stored with one character in each 8-bit byte even though in standard ASCII encoding the most significant bit of each byte is always zero. The "wasted" bits are internal fragmentation.
Similar problems with leaving reserved resources unused appear in many other areas. For example, IP addresses can only be reserved in blocks of certain sizes, resulting in many IPs that are reserved but not actively used. This is contributing to the IPv4 address shortage.
Unlike other types of fragmentation, internal fragmentation is difficult to reclaim; usually the best way to remove it is with a design change. For example, in dynamic memory allocation, memory pools drastically cut internal fragmentation by spreading the space overhead over a larger number of objects. wikipedia
wikipedia
e. Relocation. how often should it be performed?
Thursday, November 29, 2007
Operating System
When a window is minimized through the Minimize command from its System menu or the Minimize button, the window is sent a WM_SYSCOMMAND message with the SC_MINIMIZE command. If the window procedure passes this message on to the system's default window procedure by calling DefWindowProc(), the default procedure will handle the message by calling ShowWindow() with the SW_MINIMIZE command. As stated earlier, this will cause the process working set to be trimmed."microsoft help and support"
Tuesday, November 20, 2007
Why are regoinal bank are might decide to buy a six server computers instead of onesurpercomputer?
Six Server Computer wereable to:
- Emphasis on inherent security requirements.
- Responsible for the integrity, availability, and confidentiality of all data.