This function is called process scheduling. Operating System does the following activities for processor management. Program responsible for this task is known as traffic controller.
Device Management OS manages device communication via their respective drivers. Operating System does the following activities for device management. File Management A file system is normally organized into directories for easy navigation and usage. These directories may contain files and other directions. Operating System does the following activities for file management.
The collective facilities are often known as file system. Other Important Activities Following are some of the important activities that Operating System does. Operating systems are there from the very first computer generation. Operating systems keep evolving over the period of time. Following are few of the important types of operating system which are most commonly used.
Batch operating system The users of batch operating system do not interact with the computer directly. Each user prepares his job on an off-line device like punch cards and submits it to the computer operator.
To speed up processing, jobs with similar needs are batched together and run as a group. Thus, the programmers left their programs with the operator.
The operator then sorts programs into batches with similar requirements. The problems with Batch Systems are following. Time sharing operating system Time sharing is a technique which enables many people, located at various terminals, to use a particular computer system at the same time. Time-sharing or multitasking is a logical extension of multiprogramming.
Processor's time which is shared among multiple users simultaneously is termed as time-sharing. The main difference between Multiprogrammed Batch Systems and Time-Sharing Systems is that in case of multiprogrammed batch systems, objective is to maximize processor use, whereas in Time-Sharing Systems objective is to minimize response time.
Distributed operating System Distributed systems use multiple central processors to serve multiple real time application and multiple users. Data processing jobs are distributed among the processors accordingly to which one can perform each job most efficiently.
The processors communicate with one another through various communication lines such as high-speed buses or telephone lines. These are referred as loosely coupled systems or distributed systems. Processors in a distributed system may vary in size and function.
These processors are referred as sites, nodes, and computers and so on. Network Operating System Network Operating System runs on a server and and provides server the capability to manage data, users, groups, security, applications, and other networking functions. The primary purpose of the network operating system is to allow shared file and printer access among multiple computers in a network, typically a local area network LAN , a private network or to other networks.
Real time system Real time system is defines as a data processing system in which the time interval required to process and respond to inputs is so small that it controls the environment. Real time processing is always on line whereas on line system need not be real time.
The time taken by the system to respond to an input and display of required updated information is termed as response time. So in this method response time is very less as compared to the online processing. There are two types of real-time operating systems. Hard real-time systems Hard real-time systems guarantee that critical tasks complete on time. In hard real-time systems secondary storage is limited or missing with data stored in ROM. In these systems virtual memory is almost never found.
Soft real-time systems Soft real time systems are less restrictive. Critical real-time task gets priority over other tasks and retains the priority until it completes. Soft real-time systems have limited utility than hard real- time systems. For example, Multimedia, virtual reality, Advanced Scientific Projects like undersea exploration and planetary rovers etc.
Operating system with multiple users provides following services. Resource allocation 2. Accounting 3. Protection A Resource allocation: If there are more than one user or jobs running at the same time, then resources must be allocated to each of them.
Operating system manages different types of resources. Some resources require special allocation code, i. CPU scheduling routines consider the speed of the CPU, number of available registers and other required factors. It is also necessary to keep record of which user uses how much and what kinds of computer resources. This log is used for accounting purposes. It also used to improve system efficiency. Security starts with each user having to authenticate to the system, usually by means of a password.
In multiprocess environment, it is possible that, one process to interface with the other, or with the operating system, so protection is required. System calls provide the interface between a process and the operating system. A system call instruction is an instruction that generates an interrupt that cause the operating system to gain control of the processor.
Types of System Call: A system call is made using the system call machine language instruction. System calls can be grouped into five major categories. File management 2. Interprocess communication 3. Process management 4. Information maintenance. Following are few common services provided by operating systems.
Each of these activities is encapsulated as a process. A process includes the complete execution context code to execute, data to manipulate, registers, OS resources in use. Following are the major activities of an operating system with respect to program management. Drivers hides the peculiarities of specific hardware devices from the user as the device driver knows the peculiarities of the specific device. Operating System manages the communication between user and device drivers. File System manipulation A file represents a collection of related information.
Computer can store files on the disk secondary storage , for long term storage purpose. Each of these media has its own properties like speed, capacity, data transfer rate and data access methods. A file system is normally organized into directories for easy navigation and usage. Following are the major activities of an operating system with respect to file management. Communication In case of distributed systems which are a collection of processors that do not share memory, peripheral devices, or a clock, operating system manages communications between processes.
Multiple processes with one another through communication lines in the network. OS handles routing and connection strategies, and the problems of contention and security. Following are the major activities of an operating system with respect to communication. Following are the major activities of an operating system with respect to error handling. Resource Management In case of multi-user or multi-tasking environment, resources such as main memory, CPU cycles and files storage are to be allocated to each user or job.
Following are the major activities of an operating system with respect to resource management. Protection Considering computer systems having multiple users the concurrent execution of multiple processes, then the various processes must be protected from each another's activities.
Protection refers to mechanism or a way to control the access of programs, processes, or users to the resources defined by computer systems.
Following are the major activities of an operating system with respect to protection. Various properties of an Operating System Following are few of very important tasks that Operating System handles. Batch processing Batch processing is a technique in which Operating System collects one programs and data together in a batch before processing starts.
Operating system does the following activities related to batch processing. Multitasking Multitasking refers to term where multiple jobs are executed by the CPU simultaneously by switching between them. Switches occur so frequently that the users may interact with each program while it is running. Operating system does the following activities related to multitasking.
During this time a CPU can be utilized by another process. Since each action or command in a time-shared system tends to be short, only a little CPU time is needed for each user. When two or more programs are residing in memory at the same time, then sharing the processor is referred to the multiprogramming. Multiprogramming assumes a single shared processor. Following figure shows the memory layout for a multiprogramming system.
Operating system does the following activities related to multiprogramming. Interactivity Interactivity refers that a User is capable to interact with computer system. Operating system does the following activities related to interactivity. For example, keyboard. For example, Monitor. Real Time System Real time systems represents are usually dedicated embedded systems. Operating system does the following activities related to real time system activity.
Distributed Environment Distributed environment refers to multiple independent CPUs or processors in a computer system. Operating system does the following activities related to distributed environment. Spooling Spooling is an acronym for simultaneous peripheral operations on line. Process A process is a program in execution. The execution of a process must progress in a sequential fashion.
Definition of process is following. Components of a process are following. Status 4 Verifies the status of the process execution. A process can run to completion only when all requested resources have been allocated to the process. Two or more processes could be executing the same program, each using their own data and resources. Program A program by itself is not a process. It is a static entity made up of program statement while process is a dynamic entity. Program contains the instructions to be executed by processor.
A program takes a space at single place in main memory and continues to stay there. A program does not perform any action by itself. Process States As a process executes, it changes state. The state of a process is defined as the current activity of the process.
Process can have one of the following five states at a time. Ready 2 The process is waiting to be assigned to a processor. Ready processes are waiting to have the processor allocated to them by the operating system so that they can run. Running 3 Process instructions are being executed i. The process that is currently being executed. PCB is the data structure used by the operating system. Operating system groups all information that needs about particular process.
PCB contains many pieces of information associated with a specific process which is described below. Pointer is used for maintaining the scheduling list. Process State 2 Process state may be new, ready, running, waiting and so on. Program Counter Program Counter indicates the address of the next instruction to be 3 executed for this process. CPU registers CPU registers include general purpose register, stack pointers, index 4 registers and accumulators etc.
Memory management information This information may include the value of base and limit registers, the 5 page tables, or the segment tables depending on the memory system used by the operating system. This information is useful for deallocating the memory when the process terminates. Accounting information This information includes the amount of CPU and real time used, 6 time limits, job or process numbers, account numbers etc. The PCB serves as the repository for any information which can vary from process to process.
By this technique, the hardware state can be restored so that the process can be scheduled to run again. Definition The process scheduling is the activity of the process manager that handles the removal of the running process from the CPU and the selection of another process on the basis of a particular strategy. Process scheduling is an essential part of a Multiprogramming operating system.
Such operating systems allow more than one process to be loaded into the executable memory at a time and loaded process shares the CPU using time multiplexing. Scheduling Queues Scheduling queues refers to queues of processes or devices. When the process enters into the system, then this process is put into a job queue. This queue consists of all processes in the system. The operating system also maintains other queues such as device queue.
Each device has its own device queue. This figure shows the queuing diagram of process scheduling. Processes waits in ready queue for allocating the CPU.
Once the CPU is assigned to a process, then that process will execute. While executing the process, any one of the following events can occur. Two state process model refers to running and non-running states which are described below.
Non-Running Processes that are not running are kept in queue, waiting for their turn to execute. Each entry in the queue is a pointer to a particular process. Queue is implemented by using linked list. Use of dispatcher is as follows. When 2 a process is interrupted, that process is transferred in the waiting queue. If the process has completed or aborted, the process is discarded.
In either case, the dispatcher then selects a process from the queue to execute. Schedulers Schedulers are special system software which handles process scheduling in various ways. Their main task is to select the jobs to be submitted into the system and to decide which process to run. Long term scheduler determines which programs are admitted to the system for processing.
Job scheduler selects processes from the queue and loads them into memory for execution. Process loads into the memory for CPU scheduling. It also controls the degree of multiprogramming. If the degree of multiprogramming is stable, then the average rate of process creation must be equal to the average departure rate of processes leaving the system.
On some systems, the long term scheduler may not be available or minimal. Time-sharing operating systems have no long term scheduler. When process changes the state from new to ready, then there is use of long term scheduler. Main objective is increasing system performance in accordance with the chosen set of criteria.
It is the change of ready state to running state of the process. CPU scheduler selects process among the processes that are ready to execute and allocates CPU to one of them. Short term scheduler also known as dispatcher, execute most frequently and makes the fine grained decision of which process to execute next. Short term scheduler is faster than long term scheduler. Medium Term Scheduler Medium term scheduling is part of the swapping.
It removes the processes from the memory. It reduces the degree of multiprogramming. The medium term scheduler is in-charge of handling the swapped out-processes. Suspended processes cannot make any progress towards completion. In this condition, to remove the process from memory and make space for other process, the suspended process is moved to the secondary storage.
This process is called swapping, and the process is said to be swapped out or rolled out. Swapping may be necessary to improve the process mix. It controls the degree of It provides lesser control multiprogramming over degree of It reduces the degree of 3 multiprogramming multiprogramming. It is almost absent or It is also minimal in time It is a part of Time sharing 4 minimal in time sharing sharing system systems.
A context switch is the mechanism to store and restore the state or context of a CPU in Process Control block so that a process execution can be resumed from the same point at a later time.
Using this technique a context switcher enables multiple processes to share a single CPU. Context switching is an essential part of a multitasking operating system features. When the scheduler switches the CPU from executing one process to execute another, the context switcher saves the content of all processor registers for the process being removed from the CPU, in its process descriptor.
The context of a process is represented in the process control block of a process. Context switch time is pure overhead. Context switching can significantly affect performance as modern computers have a lot of general and status registers to be saved. Content switching times are highly dependent on hardware support. Context switching Some hardware systems employ two or more sets of processor registers to reduce the amount of context switching time.
When the process is switched, the following information is stored. Process with highest priority is to be executed first and so on.
Process is preempted and other process executes for given time period. Dining Philosophers Problem The scenario involves five philosophers sitting at a round table with a bowl of food and five chopsticks. Each chopstick sits between two adjacent philosophers.
The philosophers are allowed to think and eat. Since two chopsticks are required for each philosopher to eat, and only five chopsticks exist at the table, no two adjacent philosophers may be eating at the same time. A scheduling problem arises as to who gets to eat at what time. This problem is similar to the problem of scheduling processes that require a limited number of resources Problems The problem was designed to illustrate the challenges of avoiding deadlock, a system state in which no progress is possible.
This attempted solution fails because it allows the system to reach a deadlock state, in which no progress is possible. Executable Code. Intermediate Object Pass 1 Pass 2 file codes. Reason out with simple example. Explain the different types of directives used in SIC machine.
Open navigation menu. Close suggestions Search Search. User Settings. Skip carousel. Carousel Previous. Carousel Next. What is Scribd? Explore Ebooks. Bestsellers Editors' Picks All Ebooks. Explore Audiobooks. Bestsellers Editors' Picks All audiobooks. Explore Magazines. Editors' Picks All magazines. Explore Podcasts All podcasts. Difficulty Beginner Intermediate Advanced. Explore Documents. Uploaded by Nameera Nameera. Document Information click to expand document information Description Original Title System Software Unit 2 1.
Did you find this document useful? Is this content inappropriate? Blog, Inc. Related Audiobooks Free with a 30 day trial from Scribd. Who Owns the Future? Jaron Lanier. Two pass Assembler 1. Ahmed Ateeb Apr. Sunil Nivarkar Apr. Pritesh Dhole Jan. Show More.
Total views. You just clipped your first slide! Clipping is a handy way to collect important slides you want to go back to later. Now customize the name of a clipboard to store your clips. Visibility Others can see my Clipboard. Cancel Save. Exclusive 60 day trial to the world's largest digital library.
0コメント