18, సెప్టెంబర్ 2022, ఆదివారం

 

Examples of Real-time Operating Systems

author is ramu@madras , some of the concepts form the manuscripts of class

Real-time operating systems(RTOS) are used in situations to handle real-life scenarios. A few examples of real-time operating systems include:
1. VxWorks: This OS is part of the Mars 2020 rover (2020 launch). Also, in the past, it was used in Phonix Mars lander, Boing 787, Honda Robot ASIMO etc.
2. QNX: QNX Neutrino TROS finds widespread use in embedded systems. Thus, it is compatible with platforms like ARM and x86. Industries using QNS are automotive, railway transportation and health-care.
3. eCos: eCos is an open-source real-time operating system. Example of eCos use is Chibis-M microsatellite‘s attitude and stabilization control system. 
4. RTLinux: RTLinux is a hard real-time operating system. It runs the Linux operating system as a full preemptive process. As a result, it is useful in controlling robots, data acquisition systems, manufacturing plants

What is a Real-Time Operating System(RTOS)?

A real-time operating system is a time crucial operating system. This means that the response to any event must come in a specified time interval only. Hence, a delay in response will result in disastrous effects.

For instance, an operating system like Windows10 which comes as the default OS in most laptops or PCs is not a real-time operating system. The reason is that even if your application say, VLC player starts with a delay it is not going to have any harmful impact. On the contrary, an OS used in an aircraft is a real-time operating system because if the landing gears do not come out in a specified interval after issuing the command, the aircraft will crash.

So, all situations like Red-light crossing, autonomous cars etc., are all real-life operating systems. An RTOS can be event-driven or time-sharing. In event-driven strategy, the OS shifts tasks only if a higher priority task requires servicing. In time-sharing, tasks are shifted in a round-robin fashion based on time quantum.

Types of Real-time operating systems

1. Soft Real Time OS

A Soft RTOS is a system in which the deadline for certain tasks can be delayed to some extent. For example, if the task deadline is 1:20:30PM, then the task can on occasions complete at let us say 1:20:35PM every. However, it can not delay for too long say 1:30PM.

2. Hard Real Time OS

A Hard RTOS is a system which meets the deadline for every process at all times. For example, if the task deadline is 1:20:30PM, then the task has to complete before 1:20:30PM every time.

Differences between Soft RTOS and Hard RTOS

CharacteristicHard RTOSSoft RTOS
Response TimeStrict deadlinesoft deadline
SafetyCriticalNot critical
Data IntegrityShort termLong Term
Error DetectionAutomaticUser assisted

Scheduling Algorithms for RTOS

CPU scheduling algorithms used for RTOS are also different from normal CPU scheduling algorithms like FCFS, SJF etc. For example, a couple of popular algorithms are:
1. Rate Monotonic scheduling
2. Earliest Deadline First scheduling

13, సెప్టెంబర్ 2022, మంగళవారం

 Text Books:

1) Cryptography and Network Security, Behrouz A Forouzan, DebdeepMukhopadhyay, (3e) Mc Graw Hill.

2) Cryptography and Network Security, William Stallings, (6e) Pearson.

3) Everyday Cryptography, Keith M.Martin, Oxford.

Reference Books:

1) Network Security and Cryptography, Bernard Meneges, Cengage Learning

Course Outcomes:

  • To be familiarity with information security awareness and a clear understanding of its importance.
  • To master fundamentals of secret and public cryptography
  • To master protocols for security services
  • To be familiar with network security threats and countermeasures
  • To be familiar with network security designs using available secure solutions (such as PGP,
  • SSL, IPSec, etc)



9, సెప్టెంబర్ 2022, శుక్రవారం

GOOGLEMEET. ppt presentation problem eraised, but putting efforts solved , delayed but not stopped

 gmail(100), gsuit(250).

faced problem at the time of interviewing

video conference- date,time,discription,save- send invitation,  link copy paste in gmail or whatsup

start meeting from the link - join with meet, join new,(start new meeting, start instant meeting)

ppt presentation [settings audio, video, general resolution ], present now, entaire screen , u can chat aslo

never share entair screen or browser window, it cause mirroring , so usen window or tab only share

audio, video,cc , arrow(PPT),three dots

at the end , stop presentation , leave the call . for presentation of slides envato elements select this for free, graphic river@paid,  from this premium template.



MIOT INTL HOSP TO MARINA MALL , NAVLUR. GOING AND COMMING BACK LANDMARKS

              Coming back

Holiday inn STRAIGHT- national fashion techonology-LEFT TURN (CURVED PATH coming back)ramco systems-IIT M main gate -rajbhavan junctionGUINDY NATIONAL PARK-ITC GRAND CHOLA- idbi bank- tamilnadu news print- bsnl exchange-LEFT

GOING lee royal meridian – spic-littlemount metro-vasant&co , patel statue-highways research institute- arumuga valli ammal temple

                Hap daily- iit flyover- end take RIGHT TURN (Madhya kailash signal) temple also. RAJIV IT corridor- STRAIGHT

 

 


 

8, సెప్టెంబర్ 2022, గురువారం

from SRM to vels

 From ramapuram Miot intl hospital backside

Ramapuram singnal-miot hospital- butt road – guindyflyovers

Go straight road u will see the following landmarks

Sarvana bavan

Radison blue hotel

Trident hotel

Santhi service station

Meenambakkam metro

Sbi

Pvr grand galada Chennai

Drdo transit facility

Csi church

Hotel nk grand park

Pallavaram bustand(left in the middle )

Bismillah king beef hotel

Flyover surabhi wedding hall

Leftside vels univ road

 

 

While coming back 

From vels university - take right and surabhi function hall move towards -> airport metro – naganallur metro- st thromusmount

Road take right turn  you will reach inside nadam bakam trade center no need to go guindy flyover it is easy





4, సెప్టెంబర్ 2022, ఆదివారం

TOMORROW CLASS IS ABOUT THE MULTITHREADING IN JAVA WAITING FOR THE EXPLANATION

 an example getCurrentThreadName(), main[thread groupname, priority, childthreadname]

ThreadGroup in Java

Java provides a convenient way to group multiple threads in a single object. In such a way, we can suspend, resume or interrupt a group of threads by a single method call.

Note: Now suspend(), resume() and stop() methods are deprecated.

Java thread group is implemented by java.lang.ThreadGroup class.

A ThreadGroup represents a set of threads. A thread group can also include the other thread group. The thread group creates a tree in which every thread group except the initial thread group has a parent.

1)ThreadGroup(String name)creates a thread group with given name.
2)ThreadGroup(ThreadGroup parent, String name)creates a thread group with a given parent group and name.

A thread is allowed to access information about its own thread group, but it cannot access the information about its thread group's parent thread group or any other thread groups.

  1. ThreadGroup tg1 = new ThreadGroup("Group A");   
  2. Thread t1 = new Thread(tg1,new MyRunnable(),"one");     
  3. Thread t2 = new Thread(tg1,new MyRunnable(),"two");     
  4. Thread t3 = new Thread(tg1,new MyRunnable(),"three");    

Now all 3 threads belong to one group. Here, tg1 is the thread group name, MyRunnable is the class that implements Runnable interface and "one", "two" and "three" are the thread names.

Now we can interrupt all threads by a single line of code only.

  1. Thread.currentThread().getThreadGroup().interrupt();  













The reality of multi-core hardware has made concurrent programs pervasive. Unfortunately, writing correct concurrent programs is difficult. Atomicity violation, which is caused by concurrent executions unexpectedly violating the atomicity of a certain code region, is one of the most common concurrency errors., atomicity violation bugs



HTM/STM.

Transactional memory originated in database theory, provides an alternative strategy for process synchronization.

A memory transaction is atomic is a sequence of memory read–write operations. The memory transaction is committed, if all operations in a transaction are completed. Otherwise, the operations must be aborted and rolled back. The ease of transactional memory can be obtained through features added to a programming language. Consider an example. Suppose we have a function update() that modifies shared data. Traditionally, this function would be written using mutex locks (or semaphores) such as the following −

void update (){
   acquire(); /* modify shared data */
   release();
}

However, using synchronization mechanisms such as mutex locks and semaphores involves many potential problems, including deadlock. Additionally, as the number of threads increases, traditional locking scales less well, because the level of contention among threads for lock ownership becomes very high. As an alternative to traditional locking methods, new features that take advantage of transactional memory can be added to a programming language. In our example, suppose we add the construct atomic{S}, which ensures that the operations in S execute as a transaction. This allows us to rewrite the update() function as follows −

void update (){
   atomic {
      /* modify shared data */
   }
}

The advantage of using such a mechanism rather than locks is that the transactional memory system—not the developer-is responsible guaranteeing atomicity. Additionally, because no locks are involved, deadlock is not possible. Furthermore, a transactional memory system can identify which statements in atomic blocks can be executed concurrently, such as concurrent read access to a shared variable. It is, of course, possible for a programmer to identify these situations and use reader-writer locks, but the task becomes increasingly difficult as the number of threads within an application grows. Transactional memory can be implemented in either software or hardware. Software transactional memory(STM), which implements transactional memory exclusively in software—no special hardware is needed. It works by inserting instrumentation code inside transaction blocks. The code is inserted by a compiler and manages each transaction by examining where statements may run concurrently and where specific low-level locking is required. Hardware transactional memory (HTM) uses hardware cache hierarchies and cache coherency protocols to manage and resolve conflicts involving shared data residing in separate processors’ caches. It requires no special code instrumentation and thus has less overhead than STM. However, HTM does require that existing cache hierarchies and cache coherency protocols be modified to support transactional memory. Transactional memory has existed for several years without widespread implementation. However, the growth of multicore systems and the associated emphasis on concurrent and parallel programming have prompted a significant amount of research in this area on the part of both academics and commercial software and hardware vendors.

semaphores ,BINARY,COUNTING , short notes

 

 Dijkestra proposed a significant technique for managing concurrent processes for complex mutual exclusion problems. He introduced a new synchronization tool called Semaphore.

Semaphores are of two types −

  1. Binary semaphore

  2. Counting semaphore

Binary semaphore can take the value 0 & 1 only. Counting semaphore can take nonnegative integer values.

Two standard operations, wait and signal are defined on the semaphore. Entry to the critical section is controlled by the wait operation and exit from a critical region is taken care by signal operation. The wait, signal operations are also called P and V operations. The manipulation of semaphore (S) takes place as following:

  1. The wait command P(S) decrements the semaphore value by 1. If the resulting value becomes negative then P command is delayed until the condition is satisfied.

  2. The V(S) i.e. signals operation increments the semaphore value by 1.

Mutual exclusion on the semaphore is enforced within P(S) and V(S). If a number of processes attempt P(S) simultaneously, only one process will be allowed to proceed & the other processes will be waiting.These operations are defined as under −

P(S) or wait(S): 
If S > 0 then
   Set S to S-1
Else
   Block the calling process (i.e. Wait on S)

V(S) or signal(S): 
If any processes are waiting on S
   Start one of these processes
Else
   Set S to S+1

The semaphore operation are implemented as operating system services and so wait and signal are atomic in nature i.e. once started, execution of these operations cannot be interrupted.

Thus semaphore is a simple yet powerful mechanism to ensure mutual exclusion among concurrent processes.