c program for inter-process communication using double pipe (with algorithm)
aim : to implement inter-process communication using double pipe
algorithm :
step 1 : start
step 2 : declare p1,p2,buff1[25],buff2[25],pid
step 3 : call system calls pipe(p1),pipe(p2)
step 4 : call the fork and initialize pid
step 5 : check if pid==0 then goto step 6 else goto step 11
step 6 : read the message to parent and store on buff1
step 7 : write the message to child using pipe p1
step 8 : call sleep()
step 9 : read the message from parent using pipe p2 and store in buff1
step 10 : print the message from parent
step 11 : read the message from child using pipe p1
step 12 : print the message from child
step 13 : read the message from child
step 14 : write the message to child using pipe2
step 15 : stop
MASM PROGRAM TO DISPLAY "HELLO" (WITH ALGORITHM) AIM : TO DISPLAY HELLO
ALGORITHM :
STEP 1 : WRITE DATA SEGMENT
STEP 2 : MOVE DATA TO AX
STEP 3 : MOVE AX TO DS
STEP 4 : DISPLAY THE MESSAGE IN DS
STEP 5 : PROGRAM TERMINATES
STEP 6 : STOP
PROGRAM :
DATA SEGMENT
MSG DB "HELLO$"
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
LEA DX,MSG
MOV AH,09H
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
END START
'Rahul' is the subject because the sentence is about Rahul.
'likes playing football' is the predicate because it tells us about the subject 'Rahul'.
The part of the sentence that tells us what or whom the sentence is about is called the subject.
The part of the sentence that tells us something about the subject is called the predicate.
Eg: The players are not tired.
Subject : The players Predicate: are not tired
The predicate always includes the verb.
More examples to understand subject and predicate
1) The boy was chasing a cat
Subject: The boy predicate: was chasing a cat
2) Suraj is sleeping.
Subject : Suraj Predicate: is sleeping
The subject may have only one or more than a word.
Subject in commands
(i)Come here (ii) Don't talk
In these sentences, the subject is not mentioned.
The subject is actually 'you' and the sentences actually read like the following:
(i) You come here (ii)You don't talk
In all commands, the subject is 'you' which is not mentioned in the sentence but is understood.
Subject in questions
The subject usually comes before the predicate. But, in questions, subjects come after predicates.
Eg: (i) Where is mother ?
Subject : mother Predicate: Where is
(ii) Who are you ?
Subject : you Predicate: Who are
Let's revise
A sentence has two parts : subject and predicate
In commands, the subject is 'you' which is not mentioned but implied.
In questions and exclamatory sentences, predicates usually come before the subjects.
Kinds of Sentences
There are four kinds of sentences.
1) Statements
2) Interrogative sentences
3) Imperative sentences
4) Exclamatory sentences
A statement says or states something. It begins with a capital letter and ends with a full stop.
Eg: 1) I like water melons.
2) I love to paint pictures.
An interrogative sentence or question asks something. It begins with a capital letter and ends with a question mark.
Eg: 1) What is your name?
2) Did you meet Mr. Verma?
An imperative sentence requests, commands or gives directions. It usually begins with a verb. It begins with a capital letter and ends with a full stop.
Eg: 1) Switch off the fan.
2) Please, come to me.
An exclamatory sentence expresses a strong feeling or emotion. It ends with an exclamation mark.
13MP primary camera with 5-elements lens, f/2.2 aperture, PDAF, high dynamic range (HDR), panorama, 1080p full HD video recording and 5MP front facing camera
12.7 centimeters (5-inch) display with 1280 x 720 pixels resolution and 293 PPI pixel density
Android v6.0.1 Marshmallow operating system with up to 1.4GHz Qualcomm Snapdragon 435 octa core processor with Adreno 505 GPU, 3GB RAM, 32GB internal memory expandable up to 128GB and dual SIM (micro+nano) dual-standby (4G+4G)
4100mAH lithium-ion battery providing talk-time of 36 hours and standby time of 432 hours
1-year manufacturer warranty for device and 6 months manufacturer warranty for in-box accessories including batteries from the date of purchase
Yu Yureka Black
With a superior metal finish, the Yureka Black is designed to impress. Boasting 4 GB of RAM and a 1.4 GHz Qualcomm Snapdragon 430 octa-core processor, this smartphone packs quite a punch, making every task smooth and fast. Its 13 MP Sony IMX 258 rear camera helps you capture life’s beautiful moments in picture-perfect photos. The 8 MP selfie camera of the Yureka Black, with its selfie flash, lets you take stunning selfies even in poorly lit conditions. Watch movies, play games or shop online - the 12.7 cm (5) FHD IPS display is made to offer an impressive viewing experience. The 3000 mAh battery of this smartphone keeps the fun going on for up to two days on a single full charge. To top it off, the fingerprint sensor of this phone keeps all your private data truly private from prying eyes.
Some study hard, even though they end up scoring fewer marks. Why so?
Some are lazy to study. Why so?
Well, the answer for all these lies in this article.
An efficient study technique includes 5-W's and 2-H's. Who, Why, When, Where, What, How, and How much.
1)Who - who all are included in an efficient studying technique? Surely you are there. You can also include your parents, brothers, sisters, and friends in that list. You may be thinking why should I include them. Well, the answer is that you can cross check with the above people the things you have studied. You should discuss tough topics with your friends. They may be knowing some of the portions better than you.Also, they may have doubts that you wouldn't have even thought of. If you discuss all these things together it will help in eradicating most of the doubts or else you could approach your teacher for clarifying your doubts. You and your friends must take the combined study seriously otherwise will end up in sheer wastage of time.
2)Why -your performance decides your future life whether it be higher studies or work.
3)When - here comes the time planning on daily studies. Stick to your time plan.
4)Where - you should select a place having good air flow, good light system, and essential furniture to study. Don't be sad if you don't have all the essential things. Place your books in a clean corner so that you can easily pick up the needed one. A chair and a table are more preferred. Or you can use a cardboard for your writing purpose.
5)What - plan your studies according to the exam. Try to study the things taught on that day itself. If needed you can reduce the time for rest or sleeping, but you should make it up on the holidays.
6)How - (i) sit straight
(ii) light should fall on your book from the left side.
(iii) need concentration.
(iv) read and understand fast. On the first read, try to understand the important points, words, and sentences. This will reduce the time required for repeated studies.
7)How much - decide the portion to be covered in certain time limit. Similarly, decide on the things to be studied from a chapter on that day. This will help in concentrating much on your studies. Otherwise, you may be simply wasting time by reading the same portion again and again.
Try to read and understand as many words as possible, at a time 5-6 words. Improve your vocabulary daily using dictionary or newspaper. Not knowing the meaning of words will hamper the reading speed and understanding. Read in your mind. Reading aloud or using your lips will exhaust you. Don't move fingers over the line to be read this will reduce the speed of reading. During appropriate instances bring into use the learned things. Think about the things learned, during day time. Repeatedly revise the important topics and chapters. Share the things you have learned with your friends.
Just like petrol for a car, food is important for our body. You should not eat too much food as this may slow down the processing power of the brain and will make you lazy. Today the use of chemical fertilisers have made all things polluted. So we should wash well vegetables and fruits prior use. The younger generation is more attracted towards the gas filled drinks such as Coca- Cola, Fanta, Pepsi etc. They consider drinking it as a fashion or proud. The news about the poison content in these drinks is now out. We should completely avoid these drinks. Just rely on the fresh natural fruit juices.
Veg vs non-veg
Most of the scientists all over the world have found out that veg. food habit is best for the health. Veg. Food habit is now in tremendous growth among all. World vegetarians association once gave Dr. A P J Abdul Kalam the award for the best vegetarian.
Healthy food habits
1) if you are fat, add honey and lemon juice to little warm water and drink in the morning. This helps in reducing the weight of the body.
2) if you are lean, add honey to milk and drink. Also, eat dry date palm.
3) at night put almonds in water, peel off its skin and eat in the morning.
4) avoid eating more chillies, salt, sweets etc.
5) avoid junk and fast food.
6) eat spinach as salad or chutney - this will help in improving memory.
8) grape juice - prevents breast cancer, jaundice, kidney and heart problems
We have to drink 2-3 litres of water daily. After waking up drink 400-800 ml water, this will clean your stomach and digestive system. We can live without food for days but can't live without water. Water is necessary for better blood flow. When your body gets enough water our face and skin will become brighter.
Human beings are social animals. A life alone for a human is impossible. By interacting with people love, friendship, care etc will get generated in students. Students must develop a good social relationship during their school days itself. So that unity and peace can be ensured in their personal and social life. We have to improve our communication skills. To fulfil our needs and requirements we must be capable enough in communicating them with others. Communication is a management skill required for the success of a person. You should learn to communicate well with your parents, teachers, friends, colleagues. Good communication skill can provide us with leadership skills to accomplish the given tasks. Communication can be written or spoken. You must learn to cope with all type of people. You need to develop good habits. You must be disciplined. Throw away all the bad habits which destroy your valuable time, energy and life. Improve and develop your skills. Always root in reality.
If your parents or teachers defame you by comparing with intelligent students you don't need to be egoistic or feel any inferiority complex. Actually, they are not supposed to do so. But they speak so in order to inculcate the desire to study in you. They think that by doing so you will become competitive with the above-mentioned intellectuals. But that will only lead in developing ego and inferiority complex in you.
Go ahead by deciding your goals
At the same time, you shouldn't be lazy as before. Suppose that you have only scored 50% marks in an exam. Then you should make a firm decision that you will be scoring between 70-80% marks in the next exam. Along with this decision, you would have to hard-work for it sincerely. You wouldn't be able to score 90-95% marks in the first attempt itself. You can advance only through small steps. At the same time set up high targets for other subjects as well and advance forward. Try to remember the below-mentioned points while doing all these.
1) thoroughly examine the answer sheet of the subject of which you scored only 50% marks.
2) find the mistakes you made. Find out the reasons for low scoring.
3) try to avoid those type of mistakes as well as try to study the lessons which you couldn't study well.
4) if necessary discuss the undigested topics with your friends. This will help in understanding the topic and also will help in enhancing your performance in exams.
Don't repent
Don't repent even if you have scored less than 40% marks. If you are confident and are ready to implement the things mentioned above you can score good marks. God or nature has created each and every uniquely. We can't compare one with another. You may have your own skills- drawing, painting, music, sports etc. You may be one among the best in any of these fields, even though you need to have a basic qualification of higher secondary, otherwise, others may not give value for you. So plan yourself to excel more. Set the targets of 60,70% marks for the coming exams.
Try to follow the instructions mentioned till now.Don't procrastinate anything. Study the lessons taught in the same-day itself. This will help in managing your time as well as for preparing best for the exam.
Steps to be followed for best performance
1) best planning and exercising of duties
i) try to read fast and understand fast.
ii) maintain a good handwriting.
2) good knowledge of the language - spelling, sentence making etc. The wrong usage of language will cut off your marks in language subjects. For other subjects, two or three language errors will be accepted.
3) better memory power
4) better presentation
Human computer
Our brain which is responsible for reading and learning is more efficient than computers. We have to utilize it well. Even the most intellectuals are not using the full capacity of their brains. Some scientific findings,
1) left part of the brain is related to logical thinking, idea making and the making of words.
2) right part of the brain is related to imagination and conceptualization.
1) maintain healthy habits
2) proper exercises and games
3) enough sleep and rest
4) good food habits
Our body's working is even more complicated than the new generation computers. If we maintain our body correctly, it will provide us a happy and successful life.
Wake up early in the morning
If we wake up in the morning between 5 and 6 we would be able to hear the chirping of birds. How energetic they are!
Nowadays most of the students like to sit for a long time in the night rather than waking up early in the morning. These students awake very late in the morning. Sleeping early(around 10 pm) and waking up early in the morning is good for health. Morning time is good for learning and by-hearting.
You may argue that since the night time is calm you will be able to concentrate on your studies.That's right but morning time is calm as well as your body and mind will be fresh and energetic then. You won't get this freshness and energy during the night time. Your mind and body will be tired since you have worked for the whole day. During the exam time, this is not a problem. But for regular studies, morning time is best. Even modern science proves this right.
If you wake up usually at 7 or 8 then you should change this habit gradually. Try to wake up at 6:30 in the first time, then at 6 in the next month, thus learn to wake up early in the morning and study. There is a biological clock under the control of the hypothalamus in our brain. If you repeatedly wake up at 6 in the morning for 7 days then on the 8th day this biological clock will work and wake you up at 6 in the morning. Also if you order your brain two or three times(before going to sleep) to wake up at 6 in the morning then
you will be able to wake up at 6 in the morning.
Cleaning the teeth
You will be aware of the fact that cleaning of teeth before bed is a necessity. This is a big issue. Problems of teeth will lead to many health issues. This is proven. You must clean your toothbrush daily. Clean your teeth in the upper row by brushing from upper to lower, and clean your teeth in the lower row by brushing from lower to upper. You should clean the inner parts of the mouth using a brush. These habits will make your teeth stronger and healthy. You should clean your tongue using metal or plastic tongue cleaners. This is necessary to stimulate the taste buds in your tongue.
Bathing
Bathing improves your blood flow and makes you energetic. When you rub and clean your body after applying soap or herbal powders, dead cells will get removed and pores for sweating will get opened. You shouldn't bath immediately after exercising. Also, you shouldn't bath while you are sweating. It's better to bathe in cold water during the summer season. The temperature of water used for bathing must be below 98-degree Fahrenheit. Some people put neem leaves in the water before bathing, this is good for skin. Bathing after walking or exercising in the evening is good. This will maintain you energetic.
1) Computer Graphics
- Donald Hearn and M. Pauline Baker, Computer Graphics-C Version, 2/e DOWNLOAD
Computers have become a powerful tool for the rapid and economical production of pictures. There is virtually no area in which graphical displays cannot be used to some advantage, and so it is not surprising to find the use of computer graphics so widespread. Although early applications in engineering and science had to rely on expensive and cumbersome equipment, advances in computer technology have made interactive computer graphics a practical tool. Today, we find computer graphics used routinely in such diverse areas as science, engineering, medicine, business, industry, government, art, entertainment, advertising, education, and training.A major use of computer graphics is in design processes, particularly for engineering and architectural systems, but almost all products are now computer designed. Generally referred to as CAD, computer-aided design methods are now routinely used in the design of buildings, automobiles, aircraft, watercraft, spacecraft,
computers, textiles, and many, many other products.
2) Embedded Systems
- Wayne Wolf and Morgan Kaufmann, Computers as Components-Principles of
Embedded Computer System Design, 2/e DOWNLOAD
The traditional microprocessor system design class originated in the 1970s when microprocessors were exotic yet relatively limited.That traditional class emphasizes breadboarding hardware and software to build a complete system. As a result, it concentrates on the characteristics of a particular microprocessor, including its instruction set, bus interface, and so on.This book takes a more abstract approach to embedded systems. This book is fundamentally not a microprocessor data book. As a result, its approach may seem initially unfamiliar. Rather than concentrating on particulars, the book tries to study more generic examples to come up with more generally applicable principles. However, this approach is both fundamentally easier to teach and in the long run more useful to students. It is easier because one can rely less on complex lab setups and spend more time on pencil-and-paper exercises,simulations, and programming exercises. It is more useful to the students because their eventual work in this area will almost certainly use different components and facilities than those used at your school. Once students learn fundamentals, it is much easier for them to learn the details of new components.
3) Software Engineering And Project Management
- Roger S. Pressman, Software Engineering, 7/e DOWNLOAD
Computer software is the product that software professionals build and then support over the long term. It encompasses programs that execute within a computer of any size and architecture, content that is presented as the computer programs execute, and descriptive information in both hard copy and virtual forms that encompass virtually any electronic media. Software engineering encompasses a process, a collection of methods (practice) and an array of tools that allow professionals to build high quality computer software. Software engineers build and support software, and virtually everyone in the industrialized world uses it either directly or indirectly. Software is important because it affects nearly every aspect of our lives and has become pervasive in our commerce, our culture, and our everyday activities. Software engineering is important because it enables us to build complex systems in a timely manner and with high quality. You build computer software like you build any successful product, by applying an agile, adaptable process that leads to a high-quality result that meets the needs of the people who will use the product. You apply a software engineering approach.
From the point of view of a software engineer, the work product is the set of programs, content (data), and other work products that are computer software. But from the user’s viewpoint, the work product is the resultant information that somehow makes the user’s world better.
4) Fuzzy Set Theoy And Applications
- Timothy J. Ross, Fuzzy Logic with Engineering Applications, 2/e DOWNLOAD
Our understanding of most physical processes is based largely on imprecise human reasoning. This imprecision (when compared to the precise quantities required by computers) is nonetheless a form of information that can be quite useful to humans. The ability to embed such reasoning in hitherto intractable and complex problems is the criterion by which the efficacy of fuzzy logic is judged. Undoubtedly this ability cannot solve problems that require precision – problems such as shooting precision laser beams over tens of kilometers in space; milling machine components to accuracies of parts per billion; or focusing a microscopic electron beam on a specimen the size of a nanometer. The impact of fuzzy logic in these areas might be years away, if ever. But not many human problems require such precision – problems such as parking a car, backing up a trailer, navigating a car among others on a freeway, washing clothes, controlling traffic at intersections, judging beauty contestants, and a preliminary understanding of a complex system.
Sunday Holiday is an upcoming malayalam movie. Asif Ali and Aparna Balamurali are the lead characters in the film. Jis Joy is the director and Sheen Helen is the producer of the film. Songs are composed by Deepak Dev. The song "mazha paadum..." has already become trending in the youtube. The song "mazha paadum ..." was sung by Aravind Venugopal (son of playback singer G Venugopal) and Aparna Balamurali(actress).Production Co : Maqtro pictures . Asif Ali's upcoming movies are Avarude Ravukal (starred by Mukesh, Honey Rose, Vinay Forrt, Aju Varghese), Kumarasambhavam Live( directed by Shaiju Anthikkad), Town To Town( female lead role by Gauthami Nair) , Goodbye December, St.Peter's Day( starred by Sunny Wayne, Aju Varghese, Joju George, Manoj K Jayan), Happy Birthday ( female lead role by Janani Iyer), Omanakuttante Sahasangal ( female lead role by Bhavana), Beautiful Game, Thrissivaperoor Kliptham(starred by Aparna Balamurali, Chemban Vinod, Joju George). The film Avarude Ravukal is scheduled to release on August 14, 2017.
Asif Ali's most of the recently released movies were not successful in the box office, he also produced a couple of films which couldn't recieve positive response from the audience. Audience are eagerly waiting for his mass comeback in the mollywood, can wait and see...
AIM : 8086 PROGRAM TO CHECK WHETHER THE GIVEN NUMBER IS ODD OR EVEN
PROGRAM :
ADDRESS
LABEL
MNEMONICS
DESCRIPTION
1000
MOV AX,[3000]
Move the content of 3000 to AX
1004
MOV BX,0002
Move 0002 into BX
1008
DIV BX
Divide AX with BX
100C
CMP DX,0000
Compare DX with 0000
100E
JZ L1
Jump if zero
1010
MOV DX,0001
Move 0001 into DX
1014
L1
MOV [3002],DX
Move content of DX to 3002
1018
HLT
Stop
INPUTOUTPUT
[3000] : 0005 [3002] : 0001 // If the input given is odd, '1' will get stored at location 3000 else '0'
Input is given as, SW 3000
Then give the input value, 0005
Then execute the program, GO 1000 //1000 is starting address of the program.
Press INT button on the kit.
Now the output is stored at location 3002, to view the output, SW 3002
RESULT
8086 PROGRAM TO CHECK WHETHER THE GIVEN NUMBER IS ODD OR EVEN HAS BEEN EXECUTED SUCCESSFULLY AND OUTPUT IS VERIFIED