Ertos U4 Notes
Ertos U4 Notes
Ertos U4 Notes
An OS is system software that manages computer hardware and software resources and provides
common services for computer programs. The operating system is an essential component of
the system software in a computer system. Application usually requires an operating system to
function.
Time-sharing operating systems schedule tasks for efficient use of the system and may also
include accounting software for cost allocation of processor time, mass storage, printing, and
other resources.
For hardware functions such as input and output and memory allocation, the operating system
acts as an intermediary between programs and the computer hardware, although the application
code is usually executed directly by the hardware and frequently makes system calls to an OS
function or be interrupted by it. Operating systems are found on many devices that contain a
computerfrom cellular phones and video game consoles to web servers and supercomputers.
Examples:
popular modern operating systems include
1. Android
2.
BlackBerry
3.
BSD
4. Chrome OS
5.
iOS
6.
Linux
7.
OS X
8. QNX
9. Microsoft Windows
10. Steam OS
11. Windows Phone
12. z/OS.
The first eight of these examples share roots in UNIX.
Popular hard real-time operating systems include FreeRTOS, Micrium and VxWorks.
The Kernel
The kernel is the core of an operating system. It is the software responsible for running
programs and providing secure access to the machine's hardware. Since there are many
programs, and resources are limited, the kernel also decides when and how long a program
should run. This is called scheduling. Accessing the hardware directly can be very complex,
since there are many different hardware designs for the same type of component.
Kernels usually implement some level of hardware abstraction (a set of instructions
universal to all devices of a certain type) to hide the underlying complexity from applications
and provide a clean and uniform interface. This helps application programmers to develop
programs without having to know how to program for specific devices. The kernel relies upon
software drivers that translate the generic command into instructions specific to that device.
Four broad categories of kernels:
Monolithic kernels provide rich and powerful abstractions of the underlying hardware.
Microkernel provide a small set of simple hardware abstractions and use applications
called servers to provide more functionality.
(modified microkernels) are much like pure microkernels, except that they
include some additional code in kernel space to increase performance.
In this type of system, there is no direct interaction between user and the computer.
The user has to submit a job (written on cards or tape) to a computer operator.
Then a special program, the monitor, manages the execution of each program in the
batch.
The monitor is always in the main memory and available for execution.
2.
In this the operating system, picks and begins to execute one job from memory.
Once this job needs an I/O operation operating system switches to another job (CPU and
OS always busy).Jobs in the memory are always less than the number of jobs on disk(Job
Pool).
If several jobs are ready to run at the same time, then system chooses which one to run
(CPU Scheduling).
In Non-multiprogrammed system, there are moments when CPU sits idle and does not do
any work.
In Multiprogramming system, CPU will never be idle and keeps on processing.
Time-Sharing Systems are very similar to Multiprogramming batch systems. In fact time
sharing systems are an extension of multiprogramming systems.
In time sharing systems the prime focus is on minimizing the response time, while in
multiprogramming the prime focus is to maximize the CPU usage.
MULTIPROCESSOR SYSTEMS
A multiprocessor system consists of several processors that share a common physical memory.
Multiprocessor system provides higher computing power and speed. In multiprocessor system all
processors operate under single operating system. Multiplicity of the processors and how they do
act together are transparent to the others.
Following are some advantages of this type of system.
1.
2.
Enhanced performance
Execution of several tasks by different processors concurrently, increases the system's
throughput without speeding up the execution of a single task.
3.
If possible, system divides task into many subtasks and then these subtasks can be
executed in parallel in different processors. Thereby speeding up the execution of single
tasks.
DISTRIBUTED OPERATING SYSTEMS
The motivation behind developing distributed operating systems is the availability of powerful
and inexpensive microprocessors and advances in communication technology.
These advancements in technology have made it possible to design and develop distributed
systems comprising of many computers that are inter connected by communication networks.
The main benefit of distributed systems is its low price/performance ratio.
REAL-TIME OPERATING SYSTEM
It is defined as an operating system known to give maximum time for each of the critical
operations that it performs, like OS calls and interrupt handling.The Operating system which
guarantees the maximum time for these operations are commonly referred to as hard real-time,
hile operating systems that can only guarantee a maximum of the time are referred to as soft
real-time.
PROCESS
Structure of a Process
THREADS
In most modern operating systems, a thread exists within a process - that is, a single
process may contain multiple threads.
This context switching generally happens frequently enough that the user perceives the
threads or tasks to be running at the same time.
On the multiprocessor or mutli-core system, the threads or task actually do run at the
same time, with each processor or core running a particular thread or task.
No suspend state since all threads share the same address space.
i.
ii.
Block
iii.
Unblock
iv.
Finish
Types Of Threads
1. User Level Threads (user managed thread)
2. Kernel-Level Threads
1.User Level Threads (user managed thread)
Kernel maintains context information for the process and the threads.
Multithreading Models
1. Many to One Relationship
Run parallel