Rss Feed
Showing posts with label OS2. Show all posts
Showing posts with label OS2. Show all posts

HARDWARE PROTECTION

HARDWARE PROTECTION


@Dual-Mode Operation

• Sharing system resources requires operating system to ensure that an incorrect program cannot cause other programs to execute incorrectly.

• Provides hardware support to differentiate between at least twmodes of operations.

1. User mode – execution done on behalf of a user.

2. Kernel mode (also monitor mode, supervisor mode or system mode) execution done on behalf of operating system.

• Mode bit added to computer hardware to indicate the currenmode: kernel (0) or user (1).

• When an interrupt or fault occurs hardware switches to kernel mode.

• Privileged instructions can be issued only in kernel mode.

@ I/O OPERATION

• All I/O instructions are privileged instructions.

• System call – the method used by a process to request action by the operating system.

– Usually takes the form of a trap to a specific location in the interrupt vector.

– Control passes through the interrupt vector to a service routine in the OS, and the mode bit is set to kernel mode.

– The kernel verifies that the parameters are correct and legal, executes the request, and returns control to the instruction following the system call.

• Must ensure that a user program could never gain control of the computer in kernel mode. Otherwise, undesirable actions can be done e.g. a user program that, as part of its execution, stores a new address in the interrupt vector.

@MEMORY PROTECTION

• Must provide memory protection at least for the interrupt vectoand the interrupt service routines.

• In order to have memory protection, add two registers that determine the range of legal addresses a program may access

base register – holds the smallest legal physical memoryaddress.

Limit register – contains the size of the range

• Memory outside the defined range is protected.

@CPU PROTECTION

Timer – interrupts computer after specified period to ensure operating system maintains control.

– Timer is decremented every clock tick.

– When timer reaches the value 0, an interrupt occurs.

• Timer commonly used to implement time sharing.

• Time also used to compute the current time.

• Load-timer is a privileged instruction.

STORAGE HIERARCHY

STORAGE HIERARCHY

Clarify the ``guarantees'' provided at different settings of the persistence spectrum without binding the application to a specific environment or set of storage devices, MBFS implements the continuum, in part, with a logical storage hierarchy.
The hierarchy is defined by N levels:

The hierarchy is defined by N levels:

1.LM

(Local Memory storage): very high-speed volatile storage located on the machine creating the file.

2.LCM

(Loosely Coupled Memory storage): high-speed volatile storage consisting of the idle memory space available across the system.

3.-N DA

(Distributed Archival storage): slower speed stable storage space located across the system.
Logically, decreasing levels of the hierarchy are characterized by stronger persistence, larger storage capacity, and slower access times. The LM level is simply locally addressable memory (whether on or off CPU). The LCM level combines the idle memory of machines throughout the system into a loosely coupled, and constantly changing, storage space. The DA level may actually consist of any number of sub-levels (denoted DA1, DA2, ..., DAn) each of increasing persistence (or capacity) and decreasing performance. LM data will be lost if the current machine crashes or loses power. LCM data has the potential to be lost if one or more machines crash or lose power. DA data is guaranteed to survive power outages and machine crashes. Replication and error correction are provided at the LCM and DA levels to improve the persistence offered by those levels.

Each level of the logical MBFS hierarchy is ultimately implemented by a physical storage device. LM is implemented using standard RAM on the local machine and LCM using the idle memory of workstations throughout the network. The DA sub-levels must be mapped to some organization of the available archival storage devices in the system. The system administrator is expected to define the mapping via a system configuration file. For example, DA-1 might be mapped to the distributed disk system while DA-2 is mapped to the distributed tape system.

@ CACHING

Copying information into faster storage system; main memory can be viewed as a cache for secondary storage.

@ COHERENCY AND CONSISTENCY

STORAGE STRUCTURE

STORAGE STRUCTURE

@ MAIN MEMORY

The main memory of the computer is also known as RAM, standing for Random Access Memory.
It is constructed from integrated circuits and needs to have electrical power in order to maintain its information.

When power is lost, the information is lost too! It can be directly accessed by the CPU. The access time to read or write any particular byte are independent of whereabouts in the memory that byte is, and currently is approximately 50 nanoseconds (a thousand millionth of a second).

This is broadly comparable with the speed at which the CPU will need to access data. Main memory is expensive compared to external memory so it has limited capacity.

The capacity available for a given price is increasing all the time. For example many home Personal Computers now have a capacity of 16 megabytes (million bytes), while 64 megabytes is commonplace on commercial workstations.

The CPU will normally transfer data to and from the main memory in groups of two, four or eight bytes, even if the operation it is undertaking only requires a single byte.

@ MAGNETIC DISK

A memory device, such as a floppy disk, a hard disk, or a removable cartridge, that is covered with a magnetic coating on which digital information is stored in the form of microscopically small, magnetized needles.

Rigid metal or glass platters covered with magnetic recording material

– Disk surface is logically divided into tracks, which are subdivided into sectors.

– The disk controller determines the logical interaction between the device and the computer.


* MOVING HEAD DISK MECHANISM




@MAGNETIC TAPES

Magnetic tape is a medium for magnetic recording generally consisting of a thin magnetizable coating on a long and narrow strip of plastic.

Nearly all recording tape is of this type, whether used for recording audio or video or for computer data storage. It was originally developed in Germany, based on the concept of magnetic wire recording. Devices that record and playback audio and video using magnetic tape are generally called tape recorders and video tape recorders respectively. A device that stores computer data on magnetic tape can be called a tape drive, a tape unit, or a streamer.

1. Bootstrap Program

Bootstrapping process that starts operating systems when the user turns on a computer system.

2. Difference of Interrupt and trap and their use.

Interrupt - is an asynchronous signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution.

use:

computer multitasking, especially in real-time computing.

Trap - is a device or tactic intended to harm, detect, or hinder an intruder.

use:

intended to harm, detect, or hinder an intruder.

3. Monitor Mode

Monitor mode, or RFMON (Radio Frequency Monitor) mode, allows a computer with a wireless network interface card (NIC) to monitor all traffic received from the wireless network.

Used for packet sniffing, monitor mode allows packets to be captured without having to associate with an access point or ad-hoc network first.

Monitor mode only applies to wireless networks

4. User Mode

Enables multiple virtual systems (known as guests) to run as an application within a normal system (known as the host). As each guest is just a normal application running as a process in user space, this approach provides the user with a way of running multiple virtual machines on a single piece of hardware, offering excellent security and safety without affecting the host environment's configuration or stability.

5. Device Status Table

Device-status table contains entry for each I/O deviceindicating its type, address, and state.

6. Direct Memory Access

Direct memory access (DMA) is a feature of modern computers and microprocessors that allows certain hardware subsystems within the computer to access system memory for reading and/or writing independently of the central processing unit.

DMA including disk drive controllers, graphics cards, network cards and sound cards. DMA is also used for intra-chip data transfer in multi-core processors, especially in multiprocessor system-on-chips, where its processing element is equipped with a local memory (often called scratchpad memory) and DMA is used for transferring data between the local memory and the main memory.

Computers that have DMA channels can transfer data to and from devices with much less CPU overhead than computers without a DMA channel. Similarly a processing element inside a multi-core processor can transfer data to and from its local memory without occupying its processor time and allowing computation and data transfer concurrency.

7. Difference of RAM and DRAM

The difference of RAM and DRAM is:

RAM - random access memory - is a form of computer data storage. Takes the form of integrated circuits that allow stored data to be accessed in any order (i.e., at random).

DRAM - Dynamic random access memory - is a type of random access memory that stores each bit of data in a separate capacitor within an integrated circuit. Since real capacitors leak charge, the information eventually fades unless the capacitor charge is refreshed periodically. Because of this refresh requirement, it is a dynamic memory as opposed to SRAM and other static memory.

8.Main memory

The main memory of the computer is also known as RAM, standing for Random Access Memory. It is constructed from integrated circuits and needs to have electrical power in order to maintain its information. When power is lost, the information is lost too! It can be directly accessed by the CPU. The access time to read or write any particular byte are independent of whereabouts in the memory that byte is, and currently is approximately 50 nanoseconds (a thousand millionth of a second). This is broadly comparable with the speed at which the CPU will need to access data. Main memory is expensive compared to external memory so it has limited capacity. The capacity available for a given price is increasing all the time. For example many home Personal Computers now have a capacity of 16 megabytes (million bytes), while 64 megabytes is commonplace on commercial workstations. The CPU will normally transfer data to and from the main memory in groups of two, four or eight bytes, even if the operation it is undertaking only requires a single byte.

9.MAGNETIC DISK

A memory device, such as a floppy disk, a hard disk, or a removable cartridge, that is covered with a magnetic coating on which digital information is stored in the form of microscopically small, magnetized needles.

10. Storage Hierarchy

clarify the ``guarantees'' provided at different settings of the persistence spectrum without binding the application to a specific environment or set of storage devices, MBFS implements the continuum, in part, with a logical storage hierarchy.

The hierarchy is defined by N levels:

1.LM

(Local Memory storage): very high-speed volatile storage located on the machine creating the file.

2.LCM

(Loosely Coupled Memory storage): high-speed volatile storage consisting of the idle memory space available across the system.

3.-N DA

(Distributed Archival storage): slower speed stable storage space located across the system.

Logically, decreasing levels of the hierarchy are characterized by stronger persistence, larger storage capacity, and slower access times. The LM level is simply locally addressable memory (whether on or off CPU). The LCM level combines the idle memory of machines throughout the system into a loosely coupled, and constantly changing, storage space. The DA level may actually consist of any number of sub-levels (denoted DA1, DA2, ..., DAn) each of increasing persistence (or capacity) and decreasing performance. LM data will be lost if the current machine crashes or loses power. LCM data has the potential to be lost if one or more machines crash or lose power. DA data is guaranteed to survive power outages and machine crashes. Replication and error correction are provided at the LCM and DA levels to improve the persistence offered by those levels.

Each level of the logical MBFS hierarchy is ultimately implemented by a physical storage device. LM is implemented using standard RAM on the local machine and LCM using the idle memory of workstations throughout the network. The DA sub-levels must be mapped to some organization of the available archival storage devices in the system. The system administrator is expected to define the mapping via a system configuration file. For example, DA-1 might be mapped to the distributed disk system while DA-2 is mapped to the distributed tape system.