Professional Documents
Culture Documents
Nature of Processes a set of similar jobs in Allows multiple users to share the
Work bulk. CPU simultaneously.
Q1.5
Q1.6
Q1.7
Q2.
DMA (Direct Memory Access) is a feature that allows peripherals to transfer data
to and from memory without involving the CPU directly. It improves the efficiency
system performance.
Operation:
Initiation: The CPU initializes the DMA controller by providing it with the source and
destination addresses, transfer size, and other control parameters.
Request Phase: The peripheral device requests access to the system bus to initiate
a DMA transfer.
Bus Arbitration: The DMA controller gains control of the system bus through a
process called bus arbitration. It requests control from the CPU and, once
granted, takes over the bus for data transfer.
Data Transfer: The DMA controller transfers data directly between the peripheral
and memory without CPU intervention. It increments memory addresses and
adjusts control signals accordingly.
Completion: Once the transfer is complete, the DMA controller releases control of
the system bus, and it may generate an interrupt to notify the CPU.
2. Interrupt Process:
Interrupt Types:
Interrupt Process:
Interrupt Request (IRQ): An external device or software generates an interrupt
request, signaling the CPU to stop its current execution.
Interrupt Acknowledgment: The CPU acknowledges the interrupt request and
temporarily suspends its current task.
Interrupt Vector Table: The CPU uses an interrupt vector table to determine the
address of the interrupt service routine (ISR) associated with the specific
interrupt type.
Save Current State: The CPU saves the current state of the program, including the
program counter and registers, to return to it after handling the interrupt.
Execute ISR: The CPU jumps to the address specified by the interrupt vector table,
executing the ISR that handles the specific interrupt.
Interrupt Service: The ISR performs the necessary actions to handle the interrupt,
such as processing I/O, updating data structures, or responding to software
requests.
Restore State: After completing the ISR, the CPU restores the saved state, allowing
the interrupted program to resume its execution.
Return from Interrupt (RFI): The CPU executes a return from interrupt instruction
to resume the program from the point where it was interrupted.
3. Magnetic Disk:
A magnetic disk is a storage device that uses magnetic patterns to store and
Components:
● Platters: Circular, flat disks coated with a magnetic material where data is
stored.
● Read/Write Heads: Positioned above and below each platter, these heads read
and write data by magnetizing or sensing the magnetic patterns on the platters.
● Spindle: The spindle rotates the platters at a constant speed.
● Actuator Arm: Positioned on the side of the disk, the actuator arm positions the
read/write heads over the desired track.
Operation:
Read Operation: The read/write heads position themselves over the desired track,
and the platter rotates until the data sector is under the heads. The heads sense
the magnetic field, converting it into electrical signals for data retrieval.
Write Operation: To write data, the read/write heads magnetize the surface of the
platter to store binary information.
Access Time: The time taken to position the heads over the desired track (seek
time) and the time for the platter to rotate to the correct sector (rotational latency)
contribute to the access time.
Storage Capacity: Magnetic disks offer high storage capacities and are suitable for
storing large amounts of data, applications, and the operating system.
4. Memory Hierarchy:
of computer memory with varying access speeds, capacities, and costs. The
effectiveness.
Levels of Memory:
Registers: Located within the CPU, registers are the fastest and smallest type of
memory. They store data directly accessible by the CPU.
Cache Memory: Cache memory is a small-sized type of volatile computer memory
that provides high-speed data access to the processor and stores frequently
used computer programs, applications, and data.
RAM (Random Access Memory): RAM is volatile memory used by the computer's
operating system, applications, and active data during execution. It provides fast
read and write access.
Virtual Memory: A portion of the computer's hard disk that serves as additional
RAM when the physical RAM is full. It is slower than RAM but expands the
effective memory capacity.
Secondary Storage: Non-volatile memory such as hard drives, SSDs, and optical
drives. It provides long-term storage for the operating system, applications, and
user data.
Principles:
CPU Protection:
CPU protection ensures that, a process does not monopolize the CPU indefinetely, as it
would prevent other processes from being executed. Each process should get a limited
time, so that every process gets time to execute it’s instructions. To address this, a
timer is used to limit the amount of time, which a process can occupy from the CPU.
After the timer expires, a signal is sent to the process for relenquishing the CPU. Hence
one process cannot hold the CPU forever.
Memory Protection:
In memory protection, we are talking about that situation when two or more processes
are in memory and one process may access the other process memory. To prevent this
situation we use two registers which are known as: 1. Base register 2. Limit register
So basically Base register store the starting address of program and limit register store
the size of the process. This is done to ensure that whenver a process wants to access
the memory, the OS can check that – Is the memory area which the process wants to
access is previliged to be accessed by that process or not.
I/O Protection:
With I/O protection, an OS ensures that following can be never done by a processes:
1. Termination I/O of other process – This means one process should not be able to
terminate I/O operation of othe processes.
2. View I/O of other process – One process should not be able to access the data
being read/written by other processes from/to the Disk(s).
3. Giving priority to a particular process I/O – No process must be able to priorotize
itself or other processes which are doing I/O operations, over other processes.
Q4.
When our computer is switched on, it can be started by hardware such as a button
press, or by software command, a computer's central processing unit (CPU) has no
software in its main memory, there is some process which must load software into main
memory before it can be executed. Below are the six steps to describe the boot process
in the operating system, such as:
Step 1: Once the computer system is turned on, BIOS (Basic Input /Output System)
performs a series of activities or functionality tests on programs stored in ROM, called
on POST (Power-on Self Test) that checks to see whether peripherals in the system are
in perfect order or not.
Step 2: After the BIOS is done with pre-boot activities or functionality test, it read
bootable sequence from CMOS (Common Metal Oxide Semiconductor) and looks for
master boot record in the first physical sector of the bootable disk as per boot device
sequence specified in CMOS.
● Floppy Disk
● Hard Disk
● CDROM
Step 3: After this, the master boot record will search first in a floppy disk drive. If not
found, then the hard disk drive will search for the master boot record. But if the master
boot record is not even present on the hard disk, then the CDROM drive will search. If
the system cannot read the master boot record from any of these sources, ROM
displays "No Boot device found" and halted the system. On finding the master boot
record from a particular bootable disk drive, the operating system loader, also called
Bootstrap loader, is loaded from the boot sector of that bootable drive· into memory. A
bootstrap loader is a special program that is present in the boot sector of a bootable
drive.
Step 4: The bootstrap loader first loads the IO.SYS file. After this, MSDOS.SYS file is
loaded, which is the core file of the DOS operating system.
Step 6: The last file is to be loaded and executed is the AUTOEXEC.BAT file that
contains a sequence of DOS commands. After this, the prompt is displayed. We can
see the drive letter of bootable drive displayed on the computer system, which indicates
that the operating system has been successfully on the system from that drive.
______________________________________________________________________