In: Computer Science
1. Write a short note on external fragmentation.
External fragmentation arises when free memory is separated into small blocks and is interspersed by allocated memory. It is a weakness of certain storage allocation algorithms, when they fail to order memory used by programs efficiently. The result is that, although free storage is available, it is effectively unusable because it is divided into pieces that are too small individually to satisfy the demands of the application. The term "external" refers to the fact that the unusable storage is outside the allocated regions.
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 spaces.
2. Why we need operating system. If we don’t have operating system what would be the consequences?
why do we need an Operating System?
If we don’t have operating system what would be the consequences?
Without OS, there is nothing left in memory. Still, your computer is not useless, because you can still install an operating system if the computer has external memory (long term), like a CD/DVD or a USB port for a USB flash drive. My current computer doesn’t have a hard disk, it has a solid state drive.
Without an operating system, you cannot execute sufficiently useful software, unless that software contains code which manages the hardware resources for itself enough to get the job done.
3. What is BIOS?
Short for Basic Input/Output System, the BIOS (pronounced bye-oss) is a ROM chip found on motherboards that allows you to access and set up your computer system at the most basic level. The picture below is an example of what a BIOS chip may look like on a computer motherboard. The BIOS pictured is of an early AMIBIOS, a type of BIOS manufactured by AMI.
4.Explain resources.
To be short and specific resources are the hardware or software required by a program to complete its execution. Like for example, in order to print a paper i might require printer, so printer is also a resource.
The main job of an operating system is to allocate and manage the resource. For example, if there are multiple programs running on my computer, its the job of my operating system to provide the resources to program. Now this allocation can be of two types:
Also examples of hardware resources are: CPU, Memory, I/O devices, Registers, Cache and examples of Software resources are: Device Drivers, Semaphores, Monitors(“This is not the display monitor”).
5. What is program counter?
A program counter is a register in a computer processor that contains the address (location) of the instruction being executed at the current time. As each instruction gets fetched, the program counter increases its stored value by 1. After each instruction is fetched, the program counter points to the next instruction in the sequence. When the computer restarts or is reset, the program counter normally reverts to 0.