What is Operating System and its Structure

1.3- Defining Operating System


By now, you can probably see that the term operating system covers many roles and functions. This is the case, at least in part, because of the myriad designs and uses of a computer. Computers are present in toasters, cars, ships, spacecraft, homes, watches, and businesses. It is basics of game machines, music players, cable, TV tuners, and industrial control system.

How, then, can we define what an operating system is? In general, we have no exact definition of operating system. Operating system exist because they offer a reasonable way to solve the problem of creating a usable computing system. The fundamental goal of a computer system is to execute programs and to make solving user problems easy. Computer hardware is constructed toward this goal. The more common definition, and the one we usually follow is that the operating system is the one program running all the time on the computer, usually called the kernel. Along with kernel there are other two types of programs: system programs, which are associated with operating system, but not necessary part of kernel, and application programs, which includes programs not associated with the operating system. Now mobile operating systems often include not only a core kernel but also middleware (a set of the software framework that provides additional services to the application developers). For example, Google's Android and Apple's iOS provides not only kernel but also middleware for additional functionality.


2- Operating-System Structure

An operating system provides the environment within which programs are executed. One of the most important aspects of operating system is the ability to multiprocessing. A single program either user can't busy CPU or the input/output devices all the time. Generally single user operating system have multiple programs running. Multi-programming increase CPU utilization by organizing jobs (code and data) so the CPU always has one to use as shown in fig.

Memory Layout of Multi-programming systems
Since, in general, main memory is too small to accommodate all jobs, the jobs are kept initially on the disk in the job pool. The pool consists of all the processes residing on disk awaiting allocation of main memory. In multiprogrammed systems, the operating system simply switches to, and executes, another job. When that job need to wait, CPU switch to another job, and so on. For example: if any user running a program and required to fill a form to execute further, then in this case CPU switch to another job, which is in the queue (on the top of waiting list) and return to the previous job when user give all the inputs required to execute further. Multiprogrammed systems provide an environment in which the various system resources (for example, CPU, Memory, and peripherals devices) are utilized effectively, but they don't provide for user interaction with the system.

Time sharing (or multitasking) is the logical execution of multi-programming. In time-sharing systems, the CPU executes multiple jobs by switching among them, but switching is so frequently that user can interact with program while running. Accordingly, the switch time (response time) should be short typically less than one second. For example if you are using your PC and running multiple programs/applications (Media player, web browsers, compilers, text files) then CPU switch so frequently (mostly in Nano-seconds) that you can't feel any disturbance while switching and user feel that all the application are running at the same time. This is also occurring in single processing systems as well as multiple processing systems.

Time sharing and multiple programming required the several jobs be kept simultaneously in memory. If the several jobs are ready to bring into memory, and if there is not enough room for all of them, then system must choose among them. Making this decision involves job scheduling. When an operating system select a job pool, it loads job to the memory for execution. Having several jobs in the memory required memory management. In addition, if several jobs are ready to run at the same time, the system must choose which job will run fast according to priority. CPU scheduling occurs for decision making in these scenarios. Above two scheduling will discuss later. For example, if any school block has a common printer. All the user of the system connects through a network to access printer and to give commands to print. If any many requests would come at the same time then, in this scenario operating system should be genus to decide between the conflicting requests. If the algorithm in the operating system is designed, to first serve the students then give priority to others. This will occur at that time, decision making at that level occur by CPU scheduling.

In a time-sharing systems, operating system must ensure responsible response time. Thus, this goal is sometimes performed by swapping, whereby processes swapped in and out of main memory to disk. A more common method for ensuring responsible response time is virtual memory (This is the logical memory that not exist permanently but allocate temporarily, when required). For example when we retrieve data from database by applying some queries, the tables that formed on the run time are temporary tables and use the concept of virtual memory to store data. The main advantage of the virtual-memory schema is that it enables users to run programs that are large then actual physical memory. Further it abstracts main memory to large, uniform array of storage, separating logical memory as viewed by the user from physical memory. This arrangement free programmers from concern over memory storage limitations. Operating system provides the following main operations:

  1. Process Management
  2. Dual-Mode and Multimode Operations 
  3. Memory Management
  4. Storage Management
  5. Input\Output Systems
  6. Protection and Security
  7. Computing Environment
  8. Resource Allocation
  9. Execute User's Programs
Previous -- User view and System view                       Next -- Operating System Basic Operations

Previous
Next Post »