Tuesday, September 16, 2008

Device Management

Tutorial 5
Device Management


Magnetic Disk
Description:
- A memory device consisting of a flat disk covered with a magnetic coating on which information is stored.
- Magnetically recorded and can be re-recorded over and over.
- Disks are rotating platters with a mechanical arm that moves a read/write head between the outer and inner edges of the platter's surface.

Advantage:
- Can rapidly retrieve information from any part of a magnetic disk without regard for the order in which the information was recorded
- The use of a CrNi pre-seed layer reduces usage of high cost RuAl, improves coercivity and maintains a good SNR.
- The use of a relatively thick CrNi pre-seed layer improves the thermal erasure problems related to a glass disk medium.

Example:
- floppy disk
- hard disk

Image:











Optical Disk (Laser Disk)
Description:
- A flat, circular, plastic-coated disk that stores digital data, such as music or text, as tiny pits etched into the surface and is read with a laser scanning the surface.
- Provided with a land region and a groove region that are
formed on a substrate, the land region and groove region being used as a
recording track that is the medium of the recording/playback of
information signal, and a pre-pit region that is formed at the boundary
part of neighboring land region and groove region and is disposed every
other boundary part, the pre-pit region including specific information

Advantage:
- Offers stable header detection and address identification.
- Enhances the stability of playback/ recording at data region
- Has higher capacities as removable cartridges
- Not subject to head crashes or corruption from stray magnetic fields
- Has a 30-year life and is less vulnerable to extremes of hot and cold.

Example:
- CDs
- CD-ROMs
- DVD-ROMs

Image:









Flash Memory
Description:
- A computer chip with a read-only memory that retains its data when the power is turned off and can be electronically erased and reprogrammed without being removed from the circuit board
- non-volatile computer memory

Advantage:
- Lower power consumption as compared to a hard drive
- better kinetic shock resistance than hard disk
- Offers fast read access times
- High reliability.
- Small and can be carried easily
- Higher speed in erasing and repairing the memory cell array
- Provides a new decoder circuit for a memory array which significantly reduces the breakdown voltage requirement of the devices in the decoder

Example:
- memory card
- thumbdrive
- memory stick

Image:







Magneto-optical Disk
Description:
- A kind of optical disc capable of writing and rewriting data
- Use either magneto-optic (MO) or phase change technology
- Appears as hard drive to the operating system and do not require a special file system
- Extremely robust
- Comprises a substrate and a magneto-optical recording layer applied over the substrate. The magneto-optical disc further comprises an overcoat layer applied over the recording layer having a thickness in a range between 25 nanometers and 200 microns, wherein data is recorded on the magneto-optical disc and read from the magneto-optical disc using a laser light that is incident on the overcoat layer.

Advantage:
- Lower cost consumer-oriented product
- Rewritable
- Data or sound may be recorded to and erased from any portion of a magneto-optical disk multiple times

Example:
- WORM (Write Once/ Read Many) disk
- Recordable MiniDisc

Image:

Tuesday, September 2, 2008

Virtual Memory Management



Untitled Document






SHES2300

Tutorial 4




The key to using memory efficiently is virtual memory management. Consider both
Windows and a UNIX/Linux operating system. Compare and contrast how each implements
virtual memory. Describe how each one handles page faults, page sizes and how
it reconciles thrashing issues. Cite your sources.




Windows is Microsoft's operating system for high-end personal
and server use; it is shipped in several variants that can all be considered
the same for our purposes. All of Microsoft's operating systems since the demise
of Windows ME in 2000 have been NT-based; Windows 2000 was NT 5, and Windows
XP (current in 2003) is NT 5.1. NT is genetically descended from VMS, with which
it shares some important characteristics.



Unix (officially trademarked as UNIX®) is a computer operating
system originally developed in 1969 by a group of AT&T employees at Bell
Labs including Ken Thompson, Dennis Ritchie and Douglas Mcllroy. Today's Unix
systems are split into various branches, developed over time by AT&T as
well as various commercial vendors and non-profit organizations. Unix operating
systems are widely used in both servers and workstations. The Unix environment
and the client-server program model were essential elements in the development
of the Internet and the reshaping of computing as centered in networks rather
than in individual computers.



Virtual memory is a means of allowing our computer to act as
if it has more RAM than it really does and runs applications requiring more
memory than there is available RAM on the system. This is because the segments
of RAM are swapped out to a reserved portion of the disk and back again when
required. It happens when we load up the memory with more than it can physically
hold.



Only those parts of the program and data that are currently in active use need
to be held in physical RAM. Other parts are then held in a swap file (as it’s
called in Windows 95/98/ME: Win386.swp) or page file (in Windows NT versions
including Windows 2000 and XP: pagefile.sys). When a program tries to access
some address that is not currently in physical RAM, it generates an interrupt,
called a Page Fault.



Thrashing is a degenerate case that occurs when there is insufficient
memory at one level in the memory hierarchy to properly contain the working
set required by the upper levels of the memory hierarchy. This can result in
the overall performance of the system dropping to the speed of a lower level
in the memory hierarchy. Therefore, thrashing can quickly reduce the performance
of the system to the speed of main memory or, worse yet, the speed of the disk
drive.



Windows vs UNIX/LINUX




























Windows   UNIX/LINUX
- 2GB are kept for each process and kernel

 

- Windows divides the list of  pages into 4 lists:

  a) Modified Page List

  b) Stand-bye Page list

  c) Free Page list

  d) Zeroed Page List

 

-  Leaves too much memory free that could be cached and runs its caching
procedure at inopportune times as well as trying to swap memory out at any
and every opportunity.
Virtual memory implementation -   Usally 3GB is kept for the process and 1GB given to the
kernel

 

-  Linux divides the virtual pages into 4 lists:

   a) Active list

   b) Inactive-dirty list

   c) Inactive-clean list

   d) Free list

 

-  Uses memory like it should be used. Virtually all of the available
memory is used for both programs and disk caching. Fast changing temporary
files are written to virtual directories mounted in memory. Swap disks are
only used when needed and how aggressively those swap disks are used can
be set in a simple configuration file.

 

-  Linux supports virtual memory, that is, using a disk as an extension
of RAM so that the effective size of usable memory grows correspondingly.
The kernel will write the contents of a currently unused block of memory
to the hard disk so that the memory can be used for another purpose. When
the original contents are needed again, they are read back into memory.
-  The clock algorithm used by Windows is local.

 

-  Windows uses clustered demand paging for fetching pages, and the
clock algorithm for the page replacement.

 

-  The pages are only brought to memory when they are required. Also,
instead of bringing 1, Windows often brings a cluster of them of 1-8 pages,
depending on the current state of the system.

 

-  The  system is required to retrieve the 4 KB page containing
the address from the page file (or in the case of code possibly from the
original program file). This is a valid page fault which happens quite invisibly 
normally. Sometimes, through program or hardware error, the page is not
there either. The system then has an ‘Invalid Page Fault’ error.
This will be a fatal error if detected in a program: if it is seen within
the system itself (perhaps because a program sent it a bad request to do
something), it may manifest itself as a ‘blue screen’ failure
with a STOP code

 

-  Win 2000 uses the working set model. Minimal (min) and maximal (max)
number of pages are allocated to each process. Initially they are the same
for all processes, but they change through time according to the number
of page faults caused by the process. At page fault a new page is added
to the working set. if the working set is bigger than max, then a page of
that process is evicted first. The balance manager periodically checks the
number of free pages. If it is too low, the working set manager evicts unreferenced
pages belonging to processes with working sets above min.
Page faults -   Linux uses a Least Recently Used page aging technique to
choose pages (swapping)

 

-   Linux uses a demand paged system with no prepaging.

 

-   Paging is implemented by the kernel and the paging daemon.
The daemon periodically checks the list of free frames. If the number of
free page frames is below min free, then it initiates action to free up
pages so that there would be lotsfree available page frames.

 

-   Page replacement is done by the two-handed clock algorithm
using global page allocation. The first hand clears the reference bit. If
the second hand finds the reference bit clear,  then the page is evicted,
and the frame is included in the list of free frames. The parameters scanrate
and handspread determine the speed of page eviction.

 

-   If the paging rate is too high, then the swapper evicts some
processes that have not been used recently. It also brings in (page tables
of) processes from disk - it prefers small processes that have been waiting
for long.
Windows will expand a file that starts out too small and may shrink it
again if it is larger than necessary, so it pays to set the initial size
as large enough to handle the normal needs of your system to avoid constant
changes of size. This will give all the benefits claimed for a ‘fixed’
page file. But no restriction should be placed on its further growth. As
well as providing for contingencies, like unexpectedly opening a very large
file, in XP this potential file space can be used as a place to assign those
virtual memory pages that programs have asked for, but never brought into
use.
Page size Operating system divides its main memory into page to allow better utilization
of memory. A page is a fixed length block of main memory, that is contiguous
in both physical memory addressing and virtual memory addressing. Kernel
swap and allocates memory using pages.
There are a few ways to deal with thrashing when it occurs:

a)     Increase the amount of RAM in the system to eliminate
the cause of thrashing

b)     Reduce the amount of RAM needed by reconfiguring
the applications, removing unneeded system services (like network protocols
that aren't being used), or running fewer applications at a time

c)      Try to optimize the paging file's activity

Thrashing issue Linux implements a thrashing protection patch in Linux kernels, which
makes replacement policy responsively resolve excessive memory paging by
temporarily helping one of the active processes quickly build up its working
set. Consequently, thrashing could be eliminated at the level of page replacement,
so that load controls at a higher level, such as process suspensions/swapping
can be avoided or delayed until it is truly necessary.





Reference:

http://en.wikipedia.org/wiki/Talk:Virtual_memory

http://www.cs.montana.edu/~halla/aos/index.html

http://widefox.pbwiki.com/Memory

http://209.85.175.104/search?q=cache:5SatjDQ826AJ:www.itwire.com/index2.php%3Foption%3Dcom_content%26do_pdf%3D1%26id%3D19553+virtual+memory+-+window+-+linux&hl=en&ct=clnk&cd=112&gl=my

http://www.zeroc.com/faq/iceMemoryUsage.html

http://people.richland.edu/dkirby/172vmo.htm

http://www.linuxshowcase.org/2001/jiang.html

http://www.aumha.org/win5/a/xpvm.php



Tuesday, August 5, 2008

Core Functions of An OS

SHES 2300
Tutorial 3


  1. Explain 20 core functions of an operating system in your own thoughts.

    An operating system (OS) is the software component of a computer system that is responsible for the management and coordination of activities and the sharing of the resources of the computer. A computer is consisting of several component parts including monitor, keyboard, mouse, and other parts. The operating system provides an interface to these parts using what is referred to as "drivers". Common contemporary operating systems include Microsoft Windows, Mac OS X, Linux and Solaris.
    The following are the functions of an OS:
    1. Passes information between OS components.
    2. User interface : Provides an interface between computer and the outside world.
    3. System tools (programs) used to monitor computer performance, debug problems, or maintain parts of the system.
    4. Performs specific tasks especially relating to interfacing with computer system components.
    5. Program execution : Supports the running of programs by the users.
    6. Memory management : Manages all system memory which is currently in use by programs. This ensures that a program does not interfere with memory already used by another program.
    7. Prioritizing system requests
    8. File systems management : Hierarchical Filing Systems (NTFS, FAT32, FAT, Ext2); Metadata (Permissions, Size, Location, Attributes).
    9. Forms a platform for other system software and for application software.
    10. Execute and provide services for applications software.
    11. Multi-tasking : Allows several programs to be active at the same time, although at an instant in time the CPU is doing only one instruction for one of the active programs. The Operating System manages which instructions to send to the CPU. Since computers are so fast, the operating system can switch the program that gets to execute on the CPU so quickly, the user can not tell. This is what allows the computer to be "listening" for incoming instant messages, for instance, while you use a word processor to write a paper
    12. Resources management : Manages the computer's resources, such as the central processing unit, memory, disk drives, and printers. It controls how processes (the active agents) may access resources (passive entities).
    13. Transforms the physical world of devices, instructions, memory, and time into virtual world that is the result of abstractions built by the operating system.
    14. Disk access and file systems : Allows for faster access to files stored on disks, higher reliability, and to make better use out of the drive's available space.
    15. Processes management : Creating, scheduling and deleting processes and often for inter-process communication.
    16. CPU : Responsible for scheduling the processes on the CPU(s). This is when in the case that the computer has one or more processes than CPUs.
    17. Device management : Manages Input/ Output devices that are accessed by several different processes
    18. Virtual memory : The kernel can choose which memory each program may use at any given time, allowing the operating system to use the same memory locations for multiple tasks.
    19. Networking : Facilitating networking by supporting a variety of networking protocols, hardware, and applications in a common network for sharing resources such as computing, files, printers, and scanners using either wired or wireless connections.
    20. Security : Provides access to a number of resources, which are available to software running on the system, and to external devices like networks via the kernel.

Monday, July 21, 2008

SEB070005_Tutorial1

SHES2300
Tutorial 1

Application software
A set of computer programs designed to carry out specialized tasks for the user.
For example:
Database programs, electronic mail, word processors, media players, and spreadsheets.

Communication device
A device that assists in data transmission.
For example, microphones, speakers, cameras, mouse, modems, cables, and ports.

Computer
An electronic device which responds to a specific set of instructions in a well-defined manner.
For example:
Laptops, personal digital assistants (PDAs)

Desktop computer
A personal computer (PC) in a form intended for regular use at a single location. The term 'desktop' refers specifically to a horizontally-oriented case, usually intended to have the display screen placed on top to save space on the desk top.Today the phrase usually indicates a particular style of computer case. Desktop computers come in a variety of styles ranging from large vertical tower cases to small form factor models that can be tucked behind an LCD monitor. Most modern desktop computers have separate screens and keyboards.

Embedded computer
A special-purpose computer system designed to perform one or a few dedicated functions, often with real-time computing constraints. It is usually embedded as part of a complete device including hardware and mechanical parts.The system uses a CPU chip, but that is not a general-purpose workstation, desktop or laptop computer. Such systems generally use microprocessors, or they may use custom-designed chips or both.
For example:
Intelligent controllers for televisions, cameras, cell phones, personal digital assistants (PDAs), traffic light, robot, trains, planes, machine tools, space vehicles, automobile engines, consumer and office appliances, etc.

Graphical user interface
A type of user interface which allows people to interact with electronic devices like computers, hand-held devices (such as MP3 Players, portable media players, gaming devices), household appliances and office equipment. A GUI offers graphical icons, and visual indicators as opposed to text-based interfaces, typed command labels or text navigation to fully represent the information and actions available to a user. The actions are usually performed through direct manipulation of the graphical elements.

Hardware
The physical components of a computer system, in the form of computer hardware. They are touchable.
For example:
Disks, disk drives, display screens, keyboards, printers, boards, soundcard, motherboard, mouse, and chips.

Installing
To connect or set in position and prepare for use. In computer terminology, install refers to putting software on a computer (install the software), or adding hardware components to computer (install the hardware).

Internet
A global network connecting millions of computers that transmit data by packet switching using the standard Internet Protocol (IP). More than 100 countries are linked into exchanges of data, news and opinions and carry various information and services, such as electronic mail, online chat, file transfer.

Network
A collection of computer systems linked together as a transmission and devices media. There are many types of computer networks, including:
· local-area networks (LANs) : The computers are geographically close together (in the same building).
· wide-area networks (WANs) : The computers are farther apart and are connected by telephone lines or radio waves.
· campus-area networks (CANs): The computers are within a limited geographic area, such as a campus or military base.
· metropolitan-area networks MANs): A data network designed for a town or city.
· home-area networks (HANs): A network contained within a user's home that connects a person's digital devices.

Tuesday, July 15, 2008

My 1st Blog

Hi all! I have finally created a Blog in my computer lab (Mak 1.5) during Operating System (OS) class! It is actually my OS Tutorial 2 assignment. haha..