OPERATING SYSTEM CONCEPTS UNDERSTAND!!! IMPLEMENT!!!
Processor Management Memory Management IO Management File Management Multiprogramming Protection and Security Network Management UNDERSTAND!!! IMPLEMENT!!!
Low Level Software Utility Boot Loader User Interface Application Programming Interface (API) POSIX UNDERSTAND!!! IMPLEMENT!!!
The kernel is the innermost part or core of an operating system, and it is that provides the basic services for all for all other parts of the system The kernel is sometimes referred to as the supervisor, core or internals of the operating system UNDERSTAND!!! IMPLEMENT!!!
Monolihthic kernel Microkernels UNDERSTAND!!! IMPLEMENT!!!
The activity of a computer is to run/execute programs. A program in execution is formally defined as a process. Terms like task and job are also used to denote a process. In this chapter, we use the words tasks and processes interchangeably. UNDERSTAND!!! IMPLEMENT!!!
The five states are named as new, ready, running, blocked and exit. UNDERSTAND!!! IMPLEMENT!!!
It has i) The unique ID of the task ii) The state of the task iii) Scheduling information with respect to it iv) The registers it uses and their contents v) The I/O resources it has been allocated vi) Pointers to the memory it uses vii) Priority of the task viii) Other information pertaining to the task UNDERSTAND!!! IMPLEMENT!!!
Multitasking? How does multitasking affect the user? Task (Process) scheduling? UNDERSTAND!!! IMPLEMENT!!!
Some aspects CPU utilization Response time Turnaround time (TAT) Throughput rate UNDERSTAND!!! IMPLEMENT!!!
OPERATING SYSTEM CONCEPTS UNDERSTAND!!! IMPLEMENT!!!
Co-operative Scheduling Each task is allowed to execute to its finish, then only the next one is taken up. While one task executes, the others are willing to wait and this gives the name cooperative to the scheduling algorithm. This is also a case of first come first serve scheduling (FCFS) or a first in first out scheme (FIFO). UNDERSTAND!!! IMPLEMENT!!!
Here the method is to queue the tasks such that the one with the shortest service time gets to execute first. But the problem is that, usually the execution times of tasks are not known in advance. The method then is to estimate the service times by using the recent history of each of the tasks. UNDERSTAND!!! IMPLEMENT!!!
In such a system, tasks have priorities which are represented in terms of numbers. The convention is to have 0 to 255 as the numbers representing priorities, with 0 representing the highest priority, and higher numbers indicating lower priorities. UNDERSTAND!!! IMPLEMENT!!!
In this set, when a task is running (i.e. using the CPU), it is pushed out from the running state to the ready state and another task from the ready queue is taken up. We say that the task has been pre-empted (removed and replaced). Let s examine some scheduling methods based on this pre-emptive approach. UNDERSTAND!!! IMPLEMENT!!!
Here, time slices are defined. Suppose there are n tasks in a system, each of them is allowed to execute for a period equal to the time slice. After this, the next task gets its turn, but can use the CPU only for a time equal to the defined time slice. This is also called a time sharing or time slice system UNDERSTAND!!! IMPLEMENT!!!
In this method, at any time it should be ensured that it is the highest priority task in the ready queue that should be running. If, at any time, a task with a higher priority than the one that is currently running enters the ready queue, the current task is pre-empted and the new one is taken up. UNDERSTAND!!! IMPLEMENT!!!
Normally the scheduling is in the order of increasing service times. Thus, tasks with the shortest service times are executed earlier. In the midst of a schedule, if a new task enters the ready queue, its service time is compared with the remaining service time of the currently executing task If the new task has a shorter service time than the remaining time of the current task, it (the current task) is pre-empted and the new one serviced until it completes. UNDERSTAND!!! IMPLEMENT!!!
A thread is sometimes called a lightweight process. In a program which goes into execution (and becomes a process/task), a number of subsidiary activities may be needed Each of these subsidiary activities are handled by separate threads UNDERSTAND!!! IMPLEMENT!!!
The sequence of actions that follow an interrupt i) Saving the current context ii) Determining the identity of the interrupt iii) Switching to the new context iv) Starting the execution of the Interrupt Handler UNDERSTAND!!! IMPLEMENT!!!
Task switching is accomplished by the mechanism of interrupts. The total switching latency = interrupt latency + dispatch latency. UNDERSTAND!!! IMPLEMENT!!!
OPERATING SYSTEM CONCEPTS UNDERSTAND!!! IMPLEMENT!!!
Where is communication needed? Processes in the same machine, and processes in different machines might need to communicate it might be to share data, or to send queries and receive responses UNDERSTAND!!! IMPLEMENT!!!
Two of the task communication methods are i) Shared memory ii) Message passing UNDERSTAND!!! IMPLEMENT!!!
This is an indirect way of sending messages. It is just like a mailbox available in post offices. The sender deposits the message in the box. The receiver should have the mechanism to receive it. UNDERSTAND!!! IMPLEMENT!!!
?? UNDERSTAND!!! IMPLEMENT!!!
There are three aspects to it. First, how different tasks with conflicting actions can cause havoc. Second, how to avoid such situations and third, if such a situation occurs, how to get out of it. UNDERSTAND!!! IMPLEMENT!!!
Atomicity Disabling interrupts These may not be feasible solutions The practical solution is to use locks UNDERSTAND!!! IMPLEMENT!!!
Readers?? Writers? How is this problem tackled? UNDERSTAND!!! IMPLEMENT!!!
A set of tasks is deadlocked if each task in the set is waiting for an event that only another task in the set can cause Necessary conditions i)mutual exclusion ii) Hold and wait iii) Non pre-emption iv) Circular wait UNDERSTAND!!! IMPLEMENT!!!
i)ignore deadlocks ii) Avoidance iii) Prevention iv) Detect and recover UNDERSTAND!!! IMPLEMENT!!!
?? UNDERSTAND!!! IMPLEMENT!!!
The word semaphore means signal. In operating systems, a variable can be used as a semaphore which does signalling Binary Semaphores and Counting Semaphores UNDERSTAND!!! IMPLEMENT!!!
Are they the same??? UNDERSTAND!!! IMPLEMENT!!!
Priority Inheritance Priority Ceiling UNDERSTAND!!! IMPLEMENT!!!
Device drivers are associated with external devices that you want to add to your processing hardware, which may be a PC or an embedded board It is a software interface to a hardware device that handles requests from the kernel regarding the use of the particular I/O device. There is a well-defined interface for the kernel to make these requests. Because of this, adding new devices is easy. UNDERSTAND!!! IMPLEMENT!!!
Block device drivers Character device drivers Network device drivers UNDERSTAND!!! IMPLEMENT!!!
REAL TIME OPERATING SYSTEMS UNDERSTAND!!! IMPLEMENT!!!
What is a real-time task? It is a task in which the performance is judged on the basis of time; this means that the result of a computation is correct only if has produced its correct output within the specified time constraint. UNDERSTAND!!! IMPLEMENT!!!
Process control in industrial plants Robotics Air traffic control Telecommunications Weapon guidance system Medical diagnostic and life-support systems Automobile engine control systems Anti-lock braking systems Real-time data bases UNDERSTAND!!! IMPLEMENT!!!
No, embedded systems are systems designed for a specific set of applications. When such a system requires time constrained operation, it becomes a realtime embedded system. UNDERSTAND!!! IMPLEMENT!!!
i) Release time (or ready time) ii) Scheduling time iii) Completion time iv) Deadline v) Run time vi) Tardiness vii) Laxity UNDERSTAND!!! IMPLEMENT!!!
??? UNDERSTAND!!! IMPLEMENT!!!
A real-time system is composed of many tasks, but there should be at least one task which can be categorized as one of the above three types (hard, soft or firm). UNDERSTAND!!! IMPLEMENT!!!
A sporadic task is an aperiodic task with a hard deadline and a minimum inter-arrival time (between two such tasks). Without a minimum inter-arrival time restriction, it is impossible to guarantee that a deadline of a sporadic task would always be me. UNDERSTAND!!! IMPLEMENT!!!
Do embedded systems need an operating system? UNDERSTAND!!! IMPLEMENT!!!
Non-preemptive Scheduling Preemptive Priority-based Execution UNDERSTAND!!! IMPLEMENT!!!
This allows priority to be changed at run time, and so scheduling requires more computation. Here also pre-emption may or may not be used. UNDERSTAND!!! IMPLEMENT!!!
This belongs to a class of dynamic priority allocation methods. Here the priority of tasks changes at run time. At any instant, the highest priority task is one that has the closest deadline. Tasks that cannot be scheduled by the RM algorithm (because of high CPU utilization) can be scheduled by this method. UNDERSTAND!!! IMPLEMENT!!!
i) Performance ii) Reliability iii) Compactness iv) Scalability UNDERSTAND!!! IMPLEMENT!!!