The Great Symbian

Anything under the sun goes here!

Computer programs must be in main memory (also called random-access memory or RAM) to be executed. Main memory is the only large storage area(millions to billions of bytes) that the processor can access directly. It is implemented in a semiconductor technology called dynamic random-access memory (DRAM), which forms an array of memory words. Each word has its own address. Interaction is achieved through a sequence of load or store instructions to specific memory addresses. The load instruction moves the content of a register to main memory. Aside from explicit loads and stores, the CPU automatically loads instructions from main memory for execution.

Direct Memory Access (DMA) Structure
• Used for high-speed I/O devices able to transmit information at close to memory speeds.
• Device controller transfers blocks of data from buffer storage directly to main memory without CPU intervention.
• Only one interrupt is generated per block, rather than the one interrupt per byte.




• When executing in kernel mode, the operating system has unrestricted access to both kernel and user’s memory.


• The load instructions for the base and limit registers are privileged instructions.






<--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 two modes 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 current mode: 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 PROTECTION-->


• All I/O instructions are privileged instructions.

• Given the I/O instructions are privileged, how does the user program perform I/O?



• 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.


<--Use of a System Call to Perform an I/O-->


• 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 vectorand 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 memory address.

– 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 systems organized in hierarchy.
– Speed
– Cost
– Size
– Volatility



<--STORAGE HEIRARCHY(MEMORY HEIRARCHY)-->





Click here to see full image size


• 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

• Main Memory – only large storage media that the CPU can access directly.
• Secondary Storage – extension of main memory that provides large nonvolatile storage capacity.
• Magnetic Disks
– 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 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.
Magnetic tape revolutionized the broadcast and recording industries. In an age when all radio (and later television) was live, it allowed programming to be prerecorded. In a time when gramophone records were recorded in one take, it allowed recordings to be created in multiple stages and easily mixed and edited with a minimal loss in quality between generations. It is also one of the key enabling technologies in the development of modern computers. Magnetic tape allowed massive amounts of data to be stored in computers for long periods of time and rapidly accessed when needed.
Today, many other technologies exist that can perform the functions of magnetic tape. In many cases these technologies are replacing tape. Despite this, innovation in the technology continues and tape is still widely used.

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


<--DEVICE STATUS TABLE-->

Click here to see full size of image

• 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 two modes 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.

FEEDS

Add to Google Reader or Homepage

Click2Sell

Buy

How To Learn Photoshop in Just 2 Hrs

Chatbox

Click Here

About this blog