Thursday, December 13, 2007

assignment 3

1.Expain the following:
a.Multiprogramming.
Why is it used?Multiprogramming is a feature of an OS which allows running multiple programs simutaneously on 1 CPU. So, say, you may be typing in word, listning to music while in background IE is downloading some file & anti-virus program is scanning. These all happen simultaneously to you. Actually programs dont run simultaneously, but OS divides time for each program acccording to priorities. When the chance of that program comes it runs, after the stipulated time is over, next program runs & so on. Since this process is so fast that it appears programs are running simultaneously.
b. Internal fragmentation.How this it occur?
Internal fragmentation occurs when storage is allocated without ever intending to use it. This space is wasted. While this seems foolish, it is often accepted in return for increased efficiency or simplicity. The term "internal" refers to the fact that the unusable storage is inside the allocated region but is not being used.
c.External fragmentation.How does it occurs?
External fragmentation also occurs in file systems as many files of different sizes are created, change size, and are deleted. The effect is even worse if a file which is divided into many small pieces is deleted, because this leaves similarly small regions of free space.
d.Compaction.Why is it needed?
Compaction is very needed because it is the process of collecting fragments of available memory space into contiguous in block by moving programs and data in acomputer's memory disks, or known as garbage collection.
e.Relocation.How often should it be performed?
It depend on the process of address refferences in program.
2. Describe the Major Disadvantages for each of the four memory allocation schemes presented in the chapter.
The disadvantage of this memory allocation its an overhead process, so that while compaction is being done everything else must wait.
3.Describe the Major Advantages for each of the memory alloatiuon schemes presented in the chapter.
They could be divided into segments of variable sizes of equal size. Each page, or segment, could be stored wherever there was an empty block best enough to hold it.

page 104Exercises:
#4What is the cause of thrashing?
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.
#5What purpose does the referenced bit serve in a demand paging system?
The main idea here was to have the operation system maintain its own array of reference bits (that's the easy part) the tricky part is that the OS must somehow learn about the accesses made to pages. The best way to do this was to mark pages as invalid so that an access to the page causes a trap to the OS, which can do the bookkeeping (of course, the OS must keep extra information around to be able to tell which page table entries are truly invalid). The clock algorithm could reset the invalid bit when it checked an accessed page. The extra costs are additional traps to the OS just for normal references (depend on how fast your clock moves) and extra complexity in the OS.

Tuesday, December 11, 2007

assignment 2


The purpose of virtual memory is to enlarge the address space, the set of addresses a program can utilize. For example, virtual memory might contain twice as many addresses as main memory. A program using all of virtual memory, therefore, would not be able to fit in main memory all at once. Nevertheless, the computer could execute such a program by copying into
main memory those portions of the program needed at any given point during execution
UNIX
sysadmins claim that UNIX is intrinsically better designed.Stored in many text files,The kernel does not use shared libraries (Linux modules are not shared.UNIX systems for handling heavy-duty applications.
Windows
Windows NT is a portable, secure, multithreaded, multiprocessing operating system.Windows NT is a portable, secure, multithreaded, multiprocessing operating system. As a result, its virtual memory manager must:•

Thursday, November 22, 2007


Operating System

2. Regional bank might decide to buy a six server computer than a one supercomputer:

-it easy to use.

- its better to work faster.

Wednesday, November 21, 2007

Assignment 1

Operating system
The software component of a computer system that is responsible for the management and coordination of activities and the sharing of the resources of the computer. The operating system (OS) acts as a host for application programs that are run on the machine. As a host, one of the purposes of an operating system is to handle the details of the operation of the hardware. This relieves application programs from having to manage these details and makes it easier to write applications. Almost all computers, including hand-held computers, desktop computers, supercomputers, and even modern video game consoles, use an operating system of some type. See also Computer systems architecture.
Operating systems offer a number of services to application programs and users. Applications access these services through application programming interfaces (APIs) or system calls. By invoking these interfaces, the application can request a service from the operating system, pass parameters, and receive the results of the operation. Users may also interact with the operating system by typing commands or using a graphical user interface (GUI, commonly pronounced “gooey”). For hand-held and desktop computers, the GUI is generally considered part of the operating system. For large multiuser systems, the GUI is generally implemented as an application program that runs outside the operating system. See also Computer programming;
Human-computer interaction.
Modern operating systems provide the capability of running multiple application programs simultaneously, which is referred to as
multiprogramming. Each program running is represented by a process in the operating system. The operating system provides an execution environment for each process by sharing the hardware resources so that each application does not need to be aware of the execution of other processes. The central processing unit (CPU) of the computer can be used by only one program at a time. The operating system can share the CPU among the processes by using a technique known as time slicing. In this manner, the processes take turns using the CPU. Single-user desktop personal computers (PCs) may simplify this further by granting the CPU to whichever application the user has currently selected and allowing the user to switch between applications at will.
The main memory of a computer (referred to as random access memory, or RAM) is a finite resource. The operating system is responsible for sharing the memory among the currently running processes. When a user initiates an application, the operating system decides where to place it in memory and may allocate additional memory to the application if it requests it. The operating system may use capabilities in the hardware to prevent one application from
overwriting the memory of another. This provides security and prevents applications from interfering with one another. See also Computer storage technology.