B L O G G E R

--> This is JAN AUSTIN EVANGELISTA hir signing..

Showing posts with label OS 2. Show all posts
Showing posts with label OS 2. Show all posts

9. Hardware Protection


-> DUAL-MODE PROTECTION
• Sharing system resources requires operating system to ensure
that an incorrect program cannot cause other programs to
execute incorrectly.

• Provide hardware support to differentiate between at least two
modes of operations.
1. User mode – execution done on behalf of a user.
2. Monitor mode (also supervisor mode or system mode) –
execution done on behalf of operating system.

• Mode bit added to computer hardware to indicate the current
mode: monitor (0) or user (1).

• When an interrupt or fault occurs hardware switches to monitor
mode



• Privileged instructions can be issued only in monitor mode.

-> I/O PROTECTION
• All I/O instructions are privileged instructions.
• Must ensure that a user program could never gain control of the computer in monitor mode (i.e., a user program that, aspart of its execution, stores a new address in the interrupt vector).

Use of a System Call to Perform an I/O



-> MEMORY PROTECTION
• Must provide memory protection at least for the interrupt vectorand the interrupt service routines.
• In order to have memory protection, add two registers thatdetermine 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.

8. Storage Structure


-> MAIN MEMORY
main memory (main store, main storage, RAM, primary memory). The storage that is closely associated with the processor of a computer system and from which the program instruction and data can be directly retrieved and to which the resulting data is written prior to transfer to backing store or output device. In modern machines this is semiconductor memory but in earlier machines core stores and delay lines were used.

The majority of storage activity generated by a processor in the execution of a program is directed at the main memory. In a modern processor, however, there is usually a further small high-speed memory interposed between the processor and main memory that holds recently accessed main-memory data for rapid re-access. This small high-speed memory is known as a cache. The main memory is normally used in conjunction with a backing store with a much larger capacity.

-> MAGNETIC DISK
magnetic disk. Plastic disk coated with magnetic material and used for storing computer programs and data (information) as a series of magnetic spots. Most computers contain a hard disk unit for general storage. Hard magnetic disks can store larger amounts of data and come in cartridges that slot into a special drive unit. Computers also often have a disk drive for inserting portable, lower-capacity compact discs or floppy disks. Data is stored magnetically on both sides of a floppy disk, and is read by magnetic heads in the computer as the disk rotates.

It provide the bulk of secondary storage for modern computer systems. Conceptually, disks are relatively simple. Each disk platter has a flat circular shape, like a CD. Common platter diameters range from 1.8 to 5.25 inches. the two surfaces of a platter are covered with a magnetic material. We store information be recording it magnetically on the platters.

Moving-head disk mechanism



-> MAGNETIC TAPES
magnetic tape. It was used as an early secondary-storage medium. Although it is relatively permanent and can hold large quantities of data, its access time is slow in comparison to that of main memory. In addition, random access to magnetic tape is about a thousand times slower than random access to magnetic disk, so tapes are not very useful for secondary storage. Tapes are used mainly for backup, for storage of infrequently used information, and as a medium for transfering information from one system to another.

A tape is kept in a spool, and is wound or rewound past a read-write head. Moving to the correct spot on a tape can take minutes, but once positioned, tape drives can write data at speeds comparable to disk drives. Tape capacities vary greatly, depending on the particular kind of tape drive. Some tapes hold 2 to 3 times more data than does a large disk drive. Tapes and their drivers are usually categorized by width, including 4, 8, and 19 millimeters, 1/4 and 1/2 inch.

5. Device Status Table


-> Device-Status Table contains entry for each I/O device indicating its type, address, and state.

->>A diagram of a Device-Status Table<<-


10. Storage Hierarchy


• Storage systems organized in hierarchy.
Speed
Cost
Size
Volatility

STORAGE HEIRARCHY(MEMORY HEIRARCHY)


-> CACHING
copying information into faster storage system; main memory can be viewed as a cache for secondary storage.

• improve performance where a large access-time or transfer-rate disparity exists between two components) Memory caching: add cache (faster and smaller memory) between CPU and main memory
--> When need some data, check if it’s in cache
-->If yes, use the data from cache
--> If not, use data from main memory and put a copy in cache
– Disk caching: main memory can be viewed as a cache for disks

-> Cache COHERENCY and CONSISTENCY
Cache coherency in multiprocessor systems
- Each CPU has a local cache
- A copy of X may exist in several caches --> must make sure that an update of X in one cache is immediately reflected in all other caches where X resides
- Hardware problem

Cache consistency in distributed systems
- A master copy of the file resides at the server machine
- Copies of the same file scattered in caches of different client machines
- Must keep the cached copies consistent with the master file
- OS problem

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.

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.

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.

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. Unlike promiscuous mode, which is also 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, while promiscuous mode can be used on both wired and wireless networks. Monitor mode is one of the six modes that 802.11 wireless cards can operate in: Master (acting as an access point), Managed (client, also known as station), Ad-hoc, Mesh, Repeater, and Monitor mode.

2. Difference of interrupt and trap and their use.


-> An interrupt is a hardware-generated change-of-flow within the system. An interrupt handler is summoned to deal with the cause of the interrupt; control is then returned to the interrupted context and instruction. A trap is a software-generated interrupt. An interrupt can be used to signal the completion of an I/O to obviate the need for device polling. A trap can be used to call operating system routines or to catch arithmetic errors.

1. Bootstrap Program


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

Welcome

=] an eXciting WORLD awaits you [=

"dount count your
friends
on a
SUNNY DAY
when the sky is blue
and
laughter is
abundant.
Instead,
wait for the
STORM
when the clouds are dark
and
smiles are
scarce.
When someone
stands
besides
you
and
lift your
SPIRITs high,
then you'll
know who deserves
to be
called
FRIENDS..
"

Followers

Labels