Rss Feed

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.

2. Explain the goals of OS

It is easier to define an operating system by what it does than what it is, but even this can be tricky. The primary goal of some operating system is convenience for the user. The primary goal of other operating system is efficient operation of the computer system. Operating systems and computer architecture have influenced each other a great deal. To facilitate the use of the hardware, researchers developed operating systems. Users of the operating systems then proposed changes in hardware design to simplify them. In this short historical review, notice how identification of operating-system problems led to the introduction of new hardware features.
1. What is the difference of OS in terms of users view and system view?

The difference between users view and sysrtem view interm in OS is:

Users view

the user view of the computer varies by the interface being used. Most computer users sit in front of a PC, consisting of a monitor, keyboard, mouse and system unit. Such a system is designed for one user to monopolize its resources, to maximize the work that the user is performing. In this case,the operating system is designed mostly for ease of use, with some attention paid to performance, and none paid to resource utilization.

Some users sit at a terminal connected to a mainframe or minicomputer. Other users are accessing the same computer through other terminals. These users share resources and may exchange information. The operating system is designed to maximize resource utilization.
Other users sit at workstations, connected to networks of other workstations and servers. These users have dedicated resources at their disposal, but they also share resources such as networking and servers.

Recently, many varieties of handheld computers have come into fashion. These devices are mostly standalone, used singly by individual users. Some are connected to networks, either directly by wire or through wireless modems. Due to power and interface limitations they perform relatively few remote operations. These operating systems are designed mostly for individual usability, but performance per amount of battery life is important as well.

Some computers have little or no user view. For example, embedded computers in home devices and automobiles may have numeric keypad, and may turn indicator lights on or off to show status, but mostly they and their operating systems are designed to run without user intervention.

System View

We can view an operating system as a resource allocator. A computer system has many resources - hardware and software - that may be required to solve a problem. The operating system acts as the manager of these resources.

An operating system can also be viewed as a control program that manages the execution of user programs to prevent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices.

We have no universally accepted definition of what is part of the operating system. A simple viewpoint is that it includes everything a vendor ships when you order “the operating system”.
A more common definition is that the operating system is the one program running at all times on the computer (usually called the kernel), with all else being application programs. This is the one that we generally follow.
3. What’s difference between batch systems, multi programmed systems and time sharing systems?

answer:

batch system is one in which jobs are bundled together with the instructions necessary to allow them to be processed without intervention.

multitasking is a method by which multiple tasks, also known as processes, share common processing resources such as a CPU. In the case of a computer with a single CPU, only one task is said to be running at any point in time, meaning that the CPU is actively executing instructions for that task.

Time-sharing is sharing a computing resource among many users by multitasking.
6. differentiate client-server systems and peer-to-peer systems.

client-server systems - computing system composed of two logical parts: a server, which provides information or services, and a client, which requests them. On a network, for example, users can access server resources from their personal computers using client software.

Peer-to-peer systems - Peer-to-peer (P2P) networking is a method of delivering computer network services in which the participants share a portion of their own resources, such as processing power, disk storage, network bandwidth, printing facilities. Such resources are provided directly to other participants without intermediary network hosts or servers.[1] Peer-to-peer network participants are providers and consumers of network services simultaneously, which contrasts with other service models, such as traditional client-server computing.
5. Differentiate symmetric multi processing and asymmetric multiprocessing.

Symmetric multiprocessing - in computing, symmetric multiprocessing or SMP involves a multiprocessor computer-architecture where two or more identical processors can connect to a single shared main memory. Most common multiprocessor systems today use an SMP architecture. In the case of multi-core processors, the SMP architecture applies to the cores, treating them as separate processors.
SMP systems allow any processor to work on any task no matter where the data for that task are located in memory; with proper operating system support, SMP systems can easily move tasks between processors to balance the workload efficiently.


Asymmetric multiprocessing - Asymmetric multiprocessing or ASMP is a type of multiprocessing supported in DEC's VMS V.3 as well as a number of older systems including TOPS-10 and OS-360. It varies greatly from the standard processing model that we see in personal computers today. Due to the complexity and unique nature of this architecture, it was not adopted by many vendors or programmers during its brief stint between 1970 - 1980.
4. Advantage of parallel systems

Advantages of Parallel Systems -in terms of disproportionality, Parallel systems usually give results which fall somewhere between pure plurality/majority and pure PR systems. One advantage is that, when there are enough PR seats, small minority parties which have been unsuccessful in the plurality/majority elections can still be rewarded for their votes by winning seats in the proportional allocation. In addition, a Parallel system should, in theory, fragment the party system less than a pure PR electoral system
8. Define the essential properties of the following types of OS:


a. batch

Jobs with similar needs are batched together and run through the computer as a group, by an operator or automatic job sequencer. Performance is increased by attempting to keep CPU and I/O devices busy at all times through buffering, off-line operation, spooling, and multiprogramming.


b. time sharing

sharing a computing resource among many users by multitasking. Its introduction in the 1960s, and emergence as the prominent model of computing in the 1970s, represents a major historical shift in the history of computing. By allowing a large number of users to interact simultaneously on a single computer, time-sharing dramatically lowered the cost of providing computing, while at the same time making the computing experience much more interactive.


c. real time

Real-Time Operating System (RTOS) is a multitasking operating system intended for real-time applications. Such applications include embedded systems (programmable thermostats, household appliance controllers), industrial robots, spacecraft, industrial control (see SCADA), and scientific research equipment.


d. network

Network operating systems typically are used to run computers that act as servers. They provide the capabilities required for network operation. Network operating systems are also designed for client computers and provide functions so the distinction between network operating systems and stand alone operating systems is not always obvious.


e. distributed

With the advent of computer networks, in which many computers are linked together and are able to communicate with one another, distributed computing became feasible. A distributed computation is one that is carried out on more than one machine in a cooperative manner. A group of linked computers working cooperatively on tasks


f. handheld

A handheld PC's operating system determines not only what you see onscreen, but also how you interact with the device and what kind of services you can get from it. The two dominant handheld OSes are Palm and Pocket PC but Symbian and Linux are both up and coming. To help you decide which OS you want on your next handheld, here's a breakdown of these four operating systems plus a few of our hardware picks to get you started.

7. Differentiate the design issues of OS between a stand-alone PC and a workstation connected to a network.

stand-alone PC - a desktop or laptop computer that is used on its own without requiring a connection to a local area network (LAN) or wide area network (WAN). Although it may be connected to a network, it is still a stand-alone PC as long as the network connection is not mandatory for its general use.

workstation - is a high-end microcomputer designed for technical or scientific applications. Intended primarily to be used by one person at a time, they are commonly connected to a local area network and run multi-user operating systems.