Results 1 to 5 of 5

Thread: OS Types and Functions!

  1. #1
    In And Above Man Black Cluster's Avatar
    Join Date
    Feb 2005

    OS Types and Functions!

    OS Types and Functions
    By Black Cluster

    Yeah, yeah! I felt so bored today and since I have some time to waste, I decided to write this tutorial about the OSs and their functions, absolutely for newbies. Many of my friends have been sinking in the sea of computer in general and been asking, what is the OS? How they operate? Ö etc.

    Operating System Definition

    First off, we have to define the Operating System. The Operating System is a seat of specialist programs that acts as an interface between a user and the computer hardware components. The OS manages the operations and resources of the computer to present a better performance {Resource allocator}. Its main purpose is to provide a user-friendly environment in which the user can execute programs and interact with components more easily and efficiently.

    Not-really Smart Tips:

    1.Without OS computers worth nothing. Never ever think to buy a computer without an operating system.
    2.The primary goal for an OS is a convenience for user.
    3.The OS is ONLY the core software component of your computer.

    Before commencing to identify the various functions of the OS, we have to identify what kinds of OSs are available? How we can recognize them? And Why they vary?

    Operating System Types:

    After reading this section you will be able to categorize operating systems into neat categories, and readily identify what each OS is for. There are many kinds of operating systems; however, they usually fall into four broad categories. They are distinguished from one another by nature of interaction between the user and the OS and the purpose that they intend to serve.

    1-Real-time Operating System {RTOS}.
    2-Single-task, Single user Operating System.
    3-Single user, Multitasking Operating System.
    4-Multi-user Operating System.

    1- Real-time Operating System {RTOS}

    This OS is used specifically to control instruments, machineries, industrial systems and scientific instruments. They have very little user-interface capabilities. One of the most remarkable aspects of an RTOS is the management of the resources of the computer so that a particular operation executes in the same amount of time every time it occurs. Thatís the main reason of using this OS in the industries as the prices time is really a big matter.

    Real-time operating system, in turn, is further broken up into two categories:

    a.Hard real-time OS: This OS fully guarantee critical tasks will be completed in a given amount of time. This type accepts new critical commands from an external device, in this case, it is common that it will suspend the execution of other less critical commands, so if a process completes correctly but takes longer than its given amount of time, the process fails.
    b.Soft real-time OS: This type is by far less restrictive than the Hard type. This type prioritizes tasks into critical and non-critical. The non-critical tasks are bounded to give the critical tasks enough time to be performed; however these bounds are as severe as in the Hard type. Compared to the Hard type, if a process completes correctly but takes longer than its given amount of time, the results may still useful.

    Well, I would like to add that finding details about on these systems can be relatively hard, however some manufacturers like QNX offer more insight into these kinds of OSs .

    I guess, you figured out that this type of OS is not for home usage.

    2-Single-task, single-user Operating Systems

    This is another kind of OS. As the name implies this OS is designed to manage to manage so that one user can perform one single task at a time. A proof-of-concept OS is MS-DOS.

    3-Single-user, multitasking Operating Systems

    This is the most famous OS and some times called Desktop OS. It is the OS that most people use at home and office. Most people have got this OS installed on their PCs or laptops. Good examples are, Linux SuSE, Slackware, Windows XP, Windows 5.0, MacOS.
    In this OS you may perform many tasks at the same time. For instance, writing an email while downloading a file or listening to your favorite music bands.

    4-Multi-user Operating System

    This OS can let many and different users to take the advantage of the resources of the computer simultaneously. It is usually used on servers to let many users use the same set of programs and to effectively share resources. Before letting user commencing to use and work on the OS, the OS makes sure that the requirements of different users are balanced, and each program they are using has a sufficient and separate resources so that in case of one user failure wonít effect the other users.
    Examples: VMS, Unix, and mainframe OSs like MVS.

    Important Note: Please donít mix up between multi-user and single-user operating systems. People usually use the term multi-users for any OS that support the creation of different users like Win2000, WinXP, this is very wrong. Even though, these OSs can handle thousands of user but they are not truly multi-user OS, the ONLY functional user is the System Administrator. The remote user logins and the programs being run by them are actually being run by the Administrative user.

    Now we are done with the first phase, recognizing the different types of Operating Systems and categorizing them.

    Operating System Functions

    This part is the most interesting part, we will go through the functions of the OS, how they load and how they manage the hardware and level of interaction between the OS and the hardware. Not to mention folks, we will firstly go through the initial processes of loading the OS.

    Loading Phase

    Hit the power button, wait few minutes, Oh! The OS loaded so quickly. But wait a minute what happened inside? What makes the OS loads?

    A set of pre-saved instructions in the Read Only Memory {ROM} is firstly loaded. These instructions examine the hardware and its compatibility and check if there is any failure or not {this software is referred to as firmware}. This first movement or action is called Power-On Self Test {POST}. The main propose of POST is to check CPU, RAM, and BIOS and other parts for errors and if any occur, the systems stops without displaying any error message.

    After the completion of the POST process, the firmware starts to activate disk drives, and finds the bootstrap loader in order to load the OS into the memory. {bootstrap: is a small piece of program that loads the OS into the memory and allows the OS to commence operations. Usually the interrupt 19H}

    It also sets up the division in the main memory {RAM} that will hold the operating system and the other set of data.

    Now moving to the functions. We can list the functions of the OS as follows:

    1- Central Processing Unit Management.
    2- Memory Management
    3- User Interface
    4- Backing Storages
    5- Running Application
    6- Input/Output Management

    Letís talk about each one of them briefly. Not to mention, there are other functions but not as critical as the listed, however I will be mentioning some of them at the end of this tutorial. Some say that OSs most do more than merely the stuff we are talking about.

    1-Central Processing Unit {CPU} Management

    Lets consider a little scenario, imagine that every program that run takes as much share as it needs from the CPU, this would inevitably lead to complete anarchy. The allocation of CPU would be allocated unfairly and in a way that would lead to a system breakdown.
    The first function of the OS is to police the allocation of resources among deferent applications. Also the OS ensures that each process gets enough share of the processorís time share to function perfectly and properly. This is what we call allocating CPUís time share. This allocation is fully controlled by a small program called Scheduler. The work done by the Scheduler is either a Process or Thread.

    A process is an application in the running state, and this application is controlled by the user, other applications or the OS itself. For instance, when we are navigating through you LAN network, many application run in conjunction with your navigator. With any evidence they even exist. So as a conclusion, the processor is rather controlling a Process not an application.

    Thread is similar to Process, in that both represent a single sequence of instructions executed in parallel with other sequence, either by time slicing or multiprocessing. Threads allow processes to split itself into two or more simultaneously running processes or tasks.

    Definition: Interrupt, Is a CPU event that is triggered by some external device.

    The OS is really smart that it can set priorities to each process, thatís to say, which process is more crucial than the other. I know that you would say that all the programs are important and I would say Yeah thatís right!. But in some cases some programs needs the immediate CPUís response to some action that canít ignored and need to be handled immediately {We call this Interrupts}. To this extension, the OS will either prioritize the Interrupts to Masked or Non-maskable interrupts {NMIs}. For those interrupts that are not really critical and can wait until the more important process is executed, they will be Masked {Suspended}, the CPU will ignore them until the current process is done. And there are some interrupts that are very important that they canít be ignored such as memory faults or error conditions, those interrupts will prioritized as Non-maskable interrupts.

    As we know that we can do many things at the same time, surfing the internet, listening to the music, downloading and writing, all this at the same time. But here you need to know that the CPU, no matter how fast it is, can handle only do one thing at a time. But wait a minute, How come?!?! The OS arranges the execution of the applications so that you believe that everything is happening at the same time, and to do this the processor switches between the processes thousands of times a second. This swapping happens without the direct user interference. This process gives each process enough CPU cycles to accomplish its task properly.

    So, how the processor keep track with the processes when switching from on to another:
    1- Unique ID number for each process
    2- The priority of the process
    3- Pointer to the maximum and the minimum amounts of the memory needed for the process.
    4- The information about the I/O devices needed by the process.
    5- A list of the files opened by the process.
    6- Register Contents
    7- States of various flags and switches
    8- Pointers to the location in the program and its data where processing last occurred.

    In case of poorly designed OS and too many applications are running already the system will start to use the majority of its available cycles to switch between the applications rather than actually running them, this problem is called Thrashing. In sometime is necessary to intervene to end some process. Some OSs are designed to support Multithreading which allow different parts of a program to run concurrently.

    2-Memory Management

    Every program need to be loaded into the computerís memory in order to be processed.
    The OSís Scheduler makes sure that the following points are met.

    1- Each process has enough memory storage to function properly.
    2- All memory types are being used in the most proper way and no wasted spaces are tackling them.
    3- Allocating the storage being generated by the userís programs.
    4- Loading the important parts the program need to be loaded before processing and then unloading them when they are no longer needed.

    First off, the OS sets u memory boundaries for the software and the other applications. After that the applications begin to load in pre-determined block sizes of memories. If the block size is 2 kilobytes, then every process that is loaded will be given a chunk of memory that is a multiple of 2 kilobytes in size. Applications will be loaded in these fixed block sizes, with the blocks starting and ending on boundaries established by words of 4 or 8 bytes. Well what is point of all that? These processes will the application wonít be loaded into the top of another application.

    You might as yourself what if we got all memories occupied? It is possible to extent the memory you have, this can be expensive however. We can do a trick to overcome this problem at no cost; this technique is called Virtual Memory Management. It is possible to move the information from RAM to your HDD {Hard Disk Drive}, however this technique might cause some delays in processing the information that it holds {Slower than the RAM}.

    Now to our last point in the Memory Management. Types of memory in a computer system are:

    1- High-Speed cache: You always hear the word that always accompany the CPU {Full-cache, Dual-cache ..etc}. High-speed cache is the fastest memory type in the computer system, and it is a small fast memory available to the CPU. This memory has controllers that predict what information the CPU will need next and put it on the main memory in order to speed up the overall system performance.
    2- Main Memory: Also known as RAM {Random Access Memory}, this is measured by megabytes; it plays a key role in speeding up the overall performance of the computer.
    3- Secondary Memory: Kind of magnetic storage that keeps the information, applications and data available to be used at anytime {Virtual RAM}.

    Balancing the available memory with the amount needed by the programs is one of the most crucial and critical functions of the OS.

    3- User Interface

    It is usually wrongly understood that the GUI {Graphical User Interface} is exactly the same of OS. Thatís wrong, the user interface is set of programs that sits above the OS itself and is the main form of communication between the user and the computer.

    In some systems the only method of communication between the user and the system is the command line {Command Driven}. A good example is MS-DOS, where you write your commands in a command driven environment.

    Unix is by far similar but has something additional called Shells that presents a user interface that is more flexible and more powerful than the Standard text-based interface.

    The most recent improvements in the User Interface {UI} is in the field of Graphical User Interface {GUI}. The first two models were Appleís Macintosh and MS Windows. All the operations are compromised and processed at the kernel of the OS. Thus, the GUI lies right above the OS. The GUI is basically WIMP {Window, Icon, Mouse and Pointer} environment where you can execute programs and application with mouse clicks instead of using the less-flexible command driven environment.

    4-Backing Storage

    The reading and writing of data to a backing device is an important function of the OS. The OS controls the allocation of spaces on these devices. As we know that OS watches and supervises the data transmission between every part of the computer. For instance, between the backing storage devices such as magnetic desk or DLTs and tape drives and memory and deals with requests from spaces on them.

    This function is extremely good since it would allow us to write into external devices to back up our sensitive data, Disaster Recovery. Imagine how bad would be data lose, the data that is collected in about one year is gone or corrupted. This would be really a disaster. Thanks to this function with backing data is no longer in danger.

    Backing storage uses either direct or serial access methods. Direct access means that particular files can be found without the need to read through all of the data, as with serial access. Data may be stored on (or written to) CD-Rom, FDD (both direct access), or magnetic tape (serial access).

    5-Running Applications

    The OS supervises and coordinate the loading and the unloading of the applications from and into the memory, and closely coordinate the execution of the commands.

    The management of the applications is really important, imagine that every program is loading and occupying as much as it wants from the memory. This is normal as every program would compete to gain the attention of the CPU. Here the OS ensures that each application is getting enough resources to function properly.

    If the application is running in an unstable environment, they will function improperly and a lot of errors will occur as the interface with the hardware would be faulty. The OS offers a stable environment in which applications can run properly, thatís why an OS can run on different types of computers.

    6-Input/Output {I/O} Management

    Every program on run required some hardware resources, like a word file requires resources like keyboard a mouse to interact with. The OS controls the allocation of Input and Output devices. Exactly like in the previous functions the OS ensures that every program has enough resources to function properly.

    The OS has no built-in programs that control the Hardware on the Motherboard; the OS make use of small special programs called Driver. The driver functions as the translator between the electrical signals of the Hardware subsystems and the high-level programming language of the OS. But Why Drivers are separate from the OS? So in the future we can add new functions to the drivers without the pain of modifying the whole OS. I think it is a reasonable factor not to add drivers to the OS.

    At its simplest level, managing input and output is largely a matter of managing queues and buffers, which are special storage places the handle the stream of bits from devices, like mouse and keyboard and transfer them to the CPU for processing.

    Recent OS are really fixable in dealing with hardware. For instance, Win XP, or Linux SuSE can accommodate with thousands of different hardware types {Modems, printers, disk drives.. ect}

    Final thoughts
    For more information about what this tutorial is covering please visit the links that I cited. And if you should have any queries shot me a PM, and I will be happy to answer any.
    Remember what I offered is really not enough if you are looking for full-coverage article about the OSs, please do use Google for further information.

    Thanks for reading.



    5-Some articles from our own curriculum and magazines.

    Find attached a PDF file format copy

    \"The only truly secure system is one that is powered off, cast in a block of concrete and sealed in a lead-lined room with armed guards - and even then I have my doubts\".....Spaf
    Everytime I learn a new thing, I discover how ignorant I am.- ... Black Cluster

  2. #2
    Senior Member gore's Avatar
    Join Date
    Oct 2002
    I just dragged my ass out of bed so I can't read it all yet (To half alseep) but damn I think I'm proud already.

    It's like I'm the Dad that just saw his kid pimp slap some dude in a Sum41 is punk shirt.

    This may add a bit to your thread as it is an OLD add for an order of a Cray by the guys at Bell Labs when they were testing the original Unix on it:

  3. #3
    In And Above Man Black Cluster's Avatar
    Join Date
    Feb 2005
    Thanks for your kind participation bud! ....

    I'm really gald that you are proud ..... lol

    really JIT pic. .... old and relevant ....

    \"The only truly secure system is one that is powered off, cast in a block of concrete and sealed in a lead-lined room with armed guards - and even then I have my doubts\".....Spaf
    Everytime I learn a new thing, I discover how ignorant I am.- ... Black Cluster

  4. #4
    Senior Member gore's Avatar
    Join Date
    Oct 2002
    Heh, I just found this one on my HD, OLD ad for Unix:

  5. #5
    Senior Member gore's Avatar
    Join Date
    Oct 2002
    And for the Windows loving Unix hating people:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts