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.
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.
Tuesday, January 15, 2008
Thursday, December 13, 2007
assignment #2
Windows Operating System;
The Windows NT Virtual Memory ManagerIn Windows NT, responsibility for managing the relationship between the virtual organization of memory (as seen by applications) with the physical organization of memory (as seen by the operating system) falls on a component of the Windows NT executive called the virtual memory (VM) manager .Memory Management GoalsWindows NT is a portable, secure, multithreaded, multiprocessing operating system. As a result, its virtual memory manager must:• Be compatible with multiple processor types • Protect the NT Executive from applications • Protect applications from each other • Provide mechanisms for programs to efficiently share physical memory (RAM). • Be efficientAn Application's View of MemoryIn Windows NT, applications access memory using a 32-bit linear addressing scheme. This scheme is sometimes referred to as flat memory model because applications view memory as one linear (or flat) array of memory locations. Applications address memory using simple 32-bit offsets from address zero (0). Since a 32-bit offset can specify 232 memory addresses, each application can access up to 4 Gb of (virtual) memory. The range of addresses an application can access is called the application's address space (Figure 7).The 32-bit flat memory model makes Windows NT portable because it is compatible with the memory addressing of processors such as the MIPS R4000 and DEC Alpha. It also simplifies porting of applications originally written for flat memory model environments such as Unix and the Apple Macintosh.The flat memory model used in Windows NT contrasts sharply with the segmented model used in Windows for MS-DOS. In Windows for MS-DOS, memory is broken into many differently sized segments, each with a maximum length of 64K. This has been a major difficulty for developers of Windows applications for a very long time because changing segments is somewhat difficult and slow. This difficulty has led to many 64K limits in a lot of software, including the Windows 3.1 resource heap. The 32-bit flat memory model does away with all of these constraints.
UNIX OPERATING SYSTEM:
Most corporations have UNIX systems for handling heavy-duty applications. Microsoft Windows 2000 has been rapidly gaining ground because it provides better performance at lower cost. But companies aren't going to replace UNIX with Windows 2000—they've invested too much in their UNIX systems over the years. So many companies are choosing to add Windows 2000 to support departmental functions. It's expensive and inefficient to run two separate systems side by side so network and IT managers need to learn how to integrate Windows 2000 with their existing UNIX systems. This book shows them how to do just that and much more. The expert authors of this book approach Windows 2000 from a UNIX Systems administrator's point of view.
The Windows NT Virtual Memory ManagerIn Windows NT, responsibility for managing the relationship between the virtual organization of memory (as seen by applications) with the physical organization of memory (as seen by the operating system) falls on a component of the Windows NT executive called the virtual memory (VM) manager .Memory Management GoalsWindows NT is a portable, secure, multithreaded, multiprocessing operating system. As a result, its virtual memory manager must:• Be compatible with multiple processor types • Protect the NT Executive from applications • Protect applications from each other • Provide mechanisms for programs to efficiently share physical memory (RAM). • Be efficientAn Application's View of MemoryIn Windows NT, applications access memory using a 32-bit linear addressing scheme. This scheme is sometimes referred to as flat memory model because applications view memory as one linear (or flat) array of memory locations. Applications address memory using simple 32-bit offsets from address zero (0). Since a 32-bit offset can specify 232 memory addresses, each application can access up to 4 Gb of (virtual) memory. The range of addresses an application can access is called the application's address space (Figure 7).The 32-bit flat memory model makes Windows NT portable because it is compatible with the memory addressing of processors such as the MIPS R4000 and DEC Alpha. It also simplifies porting of applications originally written for flat memory model environments such as Unix and the Apple Macintosh.The flat memory model used in Windows NT contrasts sharply with the segmented model used in Windows for MS-DOS. In Windows for MS-DOS, memory is broken into many differently sized segments, each with a maximum length of 64K. This has been a major difficulty for developers of Windows applications for a very long time because changing segments is somewhat difficult and slow. This difficulty has led to many 64K limits in a lot of software, including the Windows 3.1 resource heap. The 32-bit flat memory model does away with all of these constraints.
UNIX OPERATING SYSTEM:
Most corporations have UNIX systems for handling heavy-duty applications. Microsoft Windows 2000 has been rapidly gaining ground because it provides better performance at lower cost. But companies aren't going to replace UNIX with Windows 2000—they've invested too much in their UNIX systems over the years. So many companies are choosing to add Windows 2000 to support departmental functions. It's expensive and inefficient to run two separate systems side by side so network and IT managers need to learn how to integrate Windows 2000 with their existing UNIX systems. This book shows them how to do just that and much more. The expert authors of this book approach Windows 2000 from a UNIX Systems administrator's point of view.
Monday, December 10, 2007
Assignment #3
pg. 56
question# 1-3
a. Multiprogramming. Why is it used?
-Multiprogramming makes effifcient use of the CPU by overlapping the demands for the CPU and its I/O devices from various users. It attempts to increase CPU utilization by always having something for the CPU to execute.
b. Internal fragmentation. How does it occur?
Experiencing Internal Fragmentation Errors only when the IMG function tries to create a partition. Problem occurs when version 4.01 tries to create a partition during the image restore process. Pieces of files within a designated swap file area become fragmented.
c. External fragmentation. How does it occur?
the external fragmentation is to create a minimum swap file size that somewhat exceeds the usual size of your swap file. If your swap file exceeds the minimum, external fragmentation will occur. Setting a maximum that may be exceed is ill advised as it can crash your system if it is exceeded.
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.
3. Describe the major advantages for each of the memory allocation schemes presented in the chapter.-
pg. 104
question # 4
What is the cause of thrashing?
Cause of ThrashingThrashing results in several performance problems. Consider the following scenario, which is based on actual behavior of early paging systems.The operating system monitors CPU utilization. If the CPU utilization is too low, we increase the degree of multiprogramming by introducing new process to the system. A global page-replacement algorithm is used; it replaces pages without regard to the process which they belong. Now suppose that a process enters a new phase in its execution and needs more frames. Its starts faulting and taking frames away from other processes. These processes need those pages, however, and so they also fault, taking frames away from other processes. These faulting processes must use the paging device to swap pages in and out. As they queue up for the paging device, the ready queue empties. As the processes wait for the paging device, CPU utilization decreases.The CPU scheduler sees the decreasing CPU utilization and increases the degree of multiprogramming as a result. The new process tries to get started by taking frames from running processes, causing more page faults and a longer queue for the paging device. As a result CPU utilization drops even further, and CPU scheduler tries to increase the degree of multiprogramming even more. Thrashing has occurred, and system throughput plunges. The page fault rate increases tremendously. As a result, the effective memory-access time increases. No work is being done.
How does the operating system detect thrashing?
It doesn't. 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.
Once thrashing is detected, what can the operating system do to eliminate it?
Thrashing is usually a symptom of low memory in your system. To minimize it, try adding more memory to your computer or try to cut down on use interface elements that use extra memory like complicated background images and detailed icons.
Subscribe to:
Posts (Atom)