BCA 3 Sem Operating System
BCA 3 Sem Operating System
BCA 3 Sem Operating System
? Operating system is the executive manager, the part of the computing system that manages all of the hardware and all of the software. It controls every file, every device, every section of main memory, and every nanosecond of processing time. It controls who can use the system and how. When the user sends command, the operating system must make sure that the command executed or, if its not executed, must arrange for the user to get a message explaining the error. This doesnt necessarily mean that the operating system executes the command or sends the error message but it does control the parts of the system that do. A computer system consists of software (programs) and hardware(the physical machine and its electronic components). Operating system software falls in a broad category of software. Categories can include utility software and application software.
Operaring System Software The pyramid shown in the figure is an abstract representation of an operating system. It demonstrates the interrelationships of its major components.
Figure: this model of a non-networked operating system shows four subsystem managers supporting the user command interface.
The base of the pyramid shows the four essential managers of every operating system: 1. 2. 3. 4. Memory manager Processor manager Device manager File manager
These managers are the basis of all operating system. Each manager works closely with the other managers and performs its unique role regardless of which specific operating system is being used.
Network functions were not always an integral part of operating system; they were normally mounted over existing operating system. User Command Interface: Users issue commands to the operating system from the user command interface. The user command interface is the component that is unique to each operating system. It is very different from one operating system to another sometimes even between different versions of the same operating system. Regardless of the size and configuration of the operating system, each of the subsystem managers performs the following operations: 1. 2. 3. 4. Monitor its resources continuously Enforce the policies that determine who gets what, when and how much Allocate the resource when its appropriate Deallocate the resource when appropriate
Memory manager: The memory manager is in charge of main memory, also known as RAM. It checks the validity of each request for memory space and, if it is legal request, the memory manager allocates a portion that isnt already in use. In a multiuser environment, the memory manager sets up a table to keep track of who is using which section of memory. Finally, when the time comes to reclaim the memory, the memory manager deallocates memory. A primary responsibility of the memory manager is to preserve the space in main memory occupied by the operating system. Memory manager cant allow any part of it to be accidentally or intentionally altered.
Processor manager: The processor manager decides how to allocate the central processing unit (CPU). An important function of the processor manager is to keep track of the status of each process. A process is defined as an instance of execution of a program. The processor manager monitors whether the cpu is executing a process or waiting for a READ or WRITE command to finish execution. Processor manager handles the processes transitions from one state of execution to another.
Once the processor manager allocates the processor, it sets up the necessary registers and tables. When the job is finished or the maximum amount of time is expired, it reclaims the processor. The processor manager has two levels of responsibility: 1. One is to handle jobs as they enter the system. This part is handled by the Job Scheduler. It is a high level portion of the processor manager. 2. Second is to manage each process within those jobs. This part is handled by the Process Scheduler. It is a low level portion of the processor manager. It decides which process gets the cpu and for how long. Device Manager: The device manager monitors every device, channel, and control unit. Its job is to choose the most efficient way to allocate all of the systems devices, printers, terminals, disk drivers, and so forth, based on a scheduling policy. The device manger makes the allocation , starts its operation, and, finally, deallocates the device.
File Manager: The file manager keeps track of every file in the system including data files, assemblers, compilers, and application programs. By using predetermined access policies, it enforces restrictions on who has access to which files. The file manager also controls what users are allowed to do with files once they access them. For example, a user might have read-only access, read-and-write access, or the authority to create and delete files. File manager allocates the resources by opening the file and deallocates it by closing the file.
It is not enough for each manger to perform its individual tasks. It must also be able to work harmoniously with every other manager. No single manger could perform its tasks without the active cooperation of every other part.
Operating systems with networking capability have a fifth essential manager called the network manager. Network manager provides a convenient way for users to share resources while controlling users access to them. These resources include hardware (such as CPUs, memory area, printers, tape drives, modems, and disk drivers) and software (such as compilers, application programs, and data files). By adding the fifth manager to create a networked operating system, we create a five-sided pyramid.
Figure: networked systems have a network manager that assumes responsibility for networking tasks while working harmoniously with every other manager.
Types of operating systems Operating system for computers fall into five categories: 1. 2. 3. 4. 5. Batch systems Interactive systems Real-time system Hybrid system Embedded system
Categories of operating systems are distinguished based on response time and how the data is entered into the system. 1. Batch systems: earliest computer, which relied on punched cards or tape for input. A job was entered by assembling the cards into a desk and running the entire deck of cards through a card reader as a group a batch. Present day batch systems arent limited to cards or tapes, but the jobs are still processed serially, without user interaction. 2. Interactive systems: it is also known as time-sharing system. These systems give a faster turnaround than batch systems but are slower than the real-time systems. These systems were introduced to satisfy the demands of users who needed fast turnaround when debugging their programs. The operating system required the development of time-sharing software. The time-sharing software would allow each user to interact directly with the computer system via commands entered from a typewriter-like terminal. 3. Real-time system: these systems are the fastest and are used in time-critical environments. In this environment data must be processed quickly because the output influences immediate decisions. Real time systems are used for space flights, airport traffic control, high-speed aircraft, industrial processes, distribution of electricity, and telephone switching. A real time system must be 100 percent responsive 100 percent of time. Response time is measured in fractions of a second. 4. Hybrid system: these systems are combination of batch and interactive. They appear to be interactive because individual users can access the system via terminals and get fast response, but such systems actually accepts and runs batch programs in the background when the interactive load is light. 5. Embedded system: these systems are computers placed inside other products to add features and capabilities. For example, you find embedded computers in household appliances, automobiles, digital music players, elevators, and pacemakers. Throughput: the efficiency of the system was measured in throughput. The number of jobs completed in a given amount of time. For example, 30 jobs per hour.
CHAPTER 2
PROCESSOR MANAGEMENT