This document provides an overview of processes and process management in Linux. It discusses key topics such as:
- Processes are created through the fork system call, with the creating process becoming the parent and new process becoming the child.
- Processes can run in the foreground or background. The ps command is used to view running processes.
- The kill command terminates processes by sending a signal, with no arguments using the default SIGTERM signal.
- Parent processes use wait to suspend until child processes complete before continuing. Scheduling and priorities can be configured through nice, sleep, at, cron, and other commands.
WHAT IS SOFTWARE ENGINEERING?
According to IEEE software engineering is defined as the application of the systematic, discipline, quantifiable approach to development of an operation and maintenance of software.
Following presentation answers:
- Why do we need evolution?
- What happens if we do not evolve the software?
- What are the types of software evolution?
- What are Lehman's laws
- What are the strategies for evolution?
Real Time Systems,Issues of real time system,Notations, state oriented Petrinets,Milestones, Walkthroughs, Inspections, Test plans,Functional test,Performance test,Stress test,Structural test
Synchronization in distributed computingSVijaylakshmi
Synchronization in distributed systems is achieved via clocks. The physical clocks are used to adjust the time of nodes. Each node in the system can share its local time with other nodes in the system. The time is set based on UTC (Universal Time Coordination).
WHAT IS SOFTWARE ENGINEERING?
According to IEEE software engineering is defined as the application of the systematic, discipline, quantifiable approach to development of an operation and maintenance of software.
Following presentation answers:
- Why do we need evolution?
- What happens if we do not evolve the software?
- What are the types of software evolution?
- What are Lehman's laws
- What are the strategies for evolution?
Real Time Systems,Issues of real time system,Notations, state oriented Petrinets,Milestones, Walkthroughs, Inspections, Test plans,Functional test,Performance test,Stress test,Structural test
Synchronization in distributed computingSVijaylakshmi
Synchronization in distributed systems is achieved via clocks. The physical clocks are used to adjust the time of nodes. Each node in the system can share its local time with other nodes in the system. The time is set based on UTC (Universal Time Coordination).
New language runtimes appear all the time, but most of them die young. Failure can be attributed to different reasons, but an important factor is that lack of support can limit the community’s and industry’s willingness to adopt the new language.
Quicker development and improved serviceability allows emerging languages to overcome this obstacle. By building on the proven technology available in Eclipse OMR, language developers can get more than performance and stability; you also get tools that help you quickly debug your language runtime, allowing you to provide competitive serviceability.
From this presentation, you will learn how to enable Eclipse OMR’s mature debugging features in your language runtime, and also how Eclipse OMR can assist with development and debugging.
Operating System ,UNIX & LINUX base System Calls
1) Process Creation
2) Executing a Command
3) Wait command
4) Sleep Command
5) Sleep Command using getpid
6) Signal Handling
With C-Programming & BASH Programming
OS | Functions of OS | Operations of OS | Operations of a process | Scheduling algorithms | FCFS scheduling | SJF scheduling | RR scheduling | Paging | File system implementation | Cryptography as a security tool
UNIT-II Initial Response and forensic duplication, Initial Response & Volatile Data Collection from Windows system -Initial Response & Volatile Data Collection from Unix system – Forensic Duplication: Forensic duplication: Forensic Duplicates as Admissible Evidence, Forensic Duplication Tool Requirements, Creating a Forensic. Duplicate/Qualified Forensic Duplicate of a Hard Drive
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
1. LECTURE ON
SYSTEM ADMINISTRATION
M.SC. COMPUTER SCIENCE III SEMESTER
SUBJECT: LINUX
UNIT 5
BY: POONAM YADAV
ASSISTANT PROFESSOR , CS
SHRI SHANKARACHARYA MAHAVIDYALAYA, JUNWANI, BHILAI
2. PROCESSES
• THE TERM PROCESS WAS FIRST USED BY THE DESIGNERS OF THE MULTICS
OPERATING SYSTEM, AN ANCESTOR OF THE UNIX OPERATING SYSTEM. PROCESS
HAS BEEN GIVEN MANY DEFINITIONS. IN THIS CHAPTER, WE USE THE INTUITIVE
DEFINITION THAT MAKES PROCESS EQUIVALENT TO TASK, AS IN
MULTIPROCESSING OR MULTITASKING. IN A SIMPLE SENSE, A PROCESS IS A
PROGRAM IN EXECUTION.
3. • AT THE LOWEST LEVEL, A PROCESS IS CREATED BY A FORK SYSTEM CALL. (ASYSTEM
CALL IS A ROUTINE THAT CAUSES THE KERNEL TO PROVIDE SOME SERVICE FOR A
PROGRAM.)
• A FORK CREATES A SEPARATE, BUT ALMOST IDENTICAL RUNNING PROCESS. THE
PROCESS THAT MAKES THE FORK SYSTEM CALL IS CALLED THE PARENT PROCESS;
THE PROCESS THAT IS CREATED BY THE FORK IS CALLED THE CHILD PROCESS. THE
TWO PROCESSES HAVE THE SAME ENVIRONMENT, THE SAME SIGNAL-HANDLING
SETTINGS, THE SAME GROUP AND USER IDS, AND THE SAME SCHEDULER CLASS AND
PRIORITY BUT DIFFERENT PROCESS ID NUMBERS.
• THE ONLY WAY TO INCREASE THE NUMBER OF PROCESSES RUNNING ON A UNIX
SYSTEM IS WITH THE FORK SYSTEM CALL. WHEN YOU RUN PROGRAMS THAT SPAWN
NEW PROCESSES, THEY DO SO BY USING THE FORK SYSTEM CALL.
4. • THERE ARE TWO CATEGORIES OF PROCESSES RUNNING ON A UNIX SYSTEM,
FOREGROUND AND BACKGROUND. A FOREGROUND PROCESS IS ONE THAT IS RUN BY
EXECUTING A COMMAND AT THE COMMAND LINE, SUCH AS THE PS COMMAND IN
THE FOLLOWING SECTION.
• WHEN RUNNING A FOREGROUND PROCESS, THE COMMAND IS EXECUTED
IMMEDIATELY THE SYSTEM WILL DEVOTE WHATEVER RESOURCES ARE NECESSARY TO
COMPLETE THE PROCESS, AND WHEN THE PROCESS IS COMPLETED-THE SHELL
PROMPT WILL APPEAR, INDICATING THAT THE PROCESS IS COMPLETE.
• A BACKGROUND PROCESS IS ONE WHERE THE PROCESS IS SCHEDULED FOR
EXECUTION AT A LATER TIME WHEN RESOURCES ARE AVAILABLE, ACCORDING TO
PRIORITIES SET BY THE SYSTEM ADMINISTRATOR.
5. PS COMMAND
• THE PS COMMAND TO SEE WHAT IS HAPPENING ON YOUR UNIX SYSTEM, USE THE
PS (PROCESS STATUS) COMMAND. THE PS COMMAND LISTS ALL OF THE ACTIVE
PROCESSES RUNNING ON THE MACHINE. IF YOU USE PS WITHOUT ANY OPTIONS,
INFORMATION IS PRINTED ABOUT THE PROCESSES ASSOCIATED WITH YOUR
TERMINAL. FOR EXAMPLE, THE OUTPUT FROM PS SHOWS THE PROCESS ID (PID),
THE TERMINAL ID (TTY), THE AMOUNT OF CPU TIME IN MINUTES AND SECONDS
THAT THE COMMAND HAS CONSUMED, AND THE NAME OF THE COMMAND, AS
SHOWN HERE:
This user has four processes attached to terminal ID
term/41; there are two Korn shells (ksh), a vi editing
session, and the ps command itself.
6. HOW TO KILL A PROCESS
• YOU MAY WANT TO STOP A PROCESS WHILE IT IS RUNNING. FOR INSTANCE, YOU
MAY BE RUNNING A PROGRAM THAT CONTAINS AN ENDLESS LOOP, SO THAT
THE PROCESS YOU CREATED WILL NEVER STOP. OR YOU MAY DECIDE NOT TO
COMPLETE A PROCESS YOU STARTED, EITHER BECAUSE IT IS HOGGING SYSTEM
RESOURCES OR BECAUSE IT IS DOING SOMETHING UNINTENDED. IF YOUR
PROCESS IS ACTIVELY RUNNING, JUST HIT THE BREAK OR DELETE KEY HOWEVER,
YOU CANNOT TERMINATE A BACKGROUND PROCESS OR ONE ATTACHED TO A
DIFFERENT TERMINAL THIS WAY, UNLESS YOU BRING IT BACK TO THE
FOREGROUND.
7. • TO TERMINATE SUCH A PROCESS, OR KILL IT, USE THE KILL COMMAND, GIVING THE
PROCESS ID AS AN ARGUMENT. FOR INSTANCE, TO KILL THE PROCESS WITH PID 2312
(AS REVEALED BY PS), TYPE
• THIS COMMAND SENDS A SIGNAL TO THE PROCESS. IN PARTICULAR, WHEN USED
WITH NO ARGUMENTS, THE KILL COMMAND SENDS THE SIGNAL 15 TO THE PROCESS.
(OVER 30 DIFFERENT SIGNALS CAN BE SENT ON UNIX SYSTEMS. SEE TABLE 11–1, IN
THE SECTION “SIGNALS AND SEMAPHORES,” FOR A LIST.) SIGNAL 15 IS THE
SOFTWARE UNIX-THE COMPLETE REFERENCE, SECOND EDITION 298 / 877
TERMINATION SIGNAL (SIGTERM) THAT IS USED TO STOP PROCESSES.
8.
9. PARENT AND CHILD PROCESSES
• PARENT AND CHILD PROCESSES WHEN YOU TYPE A COMMAND LINE ON YOUR UNIX
SYSTEM, THE SHELL HANDLES ITS EXECUTION. IF THE COMMAND IS A BUILT-IN
COMMAND KNOWN BY THE SHELL (ECHO, BREAK, EXIT, TEST, AND SO FORTH), IT IS
EXECUTED INTERNALLY WITHOUT CREATING A NEW PROCESS. IF THE COMMAND IS
NOT A BUILT-IN, THE SHELL TREATS IT AS AN EXECUTABLE FILE. THE CURRENT SHELL
USES THE SYSTEM CALL FORK AND CREATES A CHILD PROCESS, WHICH EXECUTES
THE COMMAND. THE PARENT PROCESS, THE SHELL, WAITS UNTIL THE CHILD EITHER
COMPLETES EXECUTION OR DIES, AND THEN IT RETURNS TO READ THE NEXT
COMMAND. NORMALLY WHEN THE SHELL CREATES THE CHILD PROCESS, IT
EXECUTES A WAIT SYSTEM CALL. THIS SUSPENDS OPERATION OF THE PARENT SHELL
UNTIL IT RECEIVES A SIGNAL FROM THE KERNEL INDICATING THE DEATH OF A
CHILD. AT THAT POINT, THE PARENT PROCESS WAKES UP AND LOOKS FOR A NEW
COMMAND.
10. PROCESS SCHEDULING
• AS A TIME-SHARING SYSTEM, THE UNIX SYSTEM KERNEL DIRECTLY CONTROLS
HOW PROCESSES ARE SCHEDULED. USER-LEVEL COMMANDS ARE AVAILABLE
THAT ALLOW YOU TO SPECIFY WHEN YOU WOULD LIKE PROCESSES TO BE RUN.
• THE AT COMMAND YOU CAN SPECIFY WHEN COMMANDS SHOULD BE EXECUTED
BY USING THE AT COMMAND, WHICH READS COMMANDS FROM ITS STANDARD
INPUT AND SCHEDULES THEM FOR EXECUTION. NORMALLY, STANDARD OUTPUT
AND STANDARD ERROR
• ARE MAILED TO YOU, UNLESS YOU REDIRECT THEM ELSEWHERE. UNIX ACCEPTS
SEVERAL WAYS OF INDICATING THE TIME; CONSULT THE MANUAL PAGE AT(1)
FOR ALL THE ALTERNATIVES. HERE ARE SOME EXAMPLES OF ALTERNATIVE TIME
AND DATE FORMATS:
11. • WILL MAIL YOU THE REMINDER EARLY FRIDAY MORNING. AT CONTINUES TO
READ FROM STANDARD INPUT UNTIL YOU TERMINATE INPUT WITH CTRL-D. YOU
CAN REDIRECT STANDARD OUTPUT BACK TO YOUR TERMINAL AND USE AT TO
INTERRUPT WITH A REMINDER. USE THE PS COMMAND JUST DISCUSSED TO FIND
OUT YOUR TERMINAL NUMBER. INCLUDE THIS TERMINAL NUMBER IN A
COMMAND LINE SUCH AS THIS:
12. • WILL MAIL YOU THE REMINDER EARLY FRIDAY MORNING. AT CONTINUES TO
READ FROM STANDARD INPUT UNTIL YOU TERMINATE INPUT WITH CTRL-D. YOU
CAN REDIRECT STANDARD OUTPUT BACK TO YOUR TERMINAL AND USE AT TO
INTERRUPT WITH A REMINDER. USE THE PS COMMAND JUST DISCUSSED TO FIND
OUT YOUR TERMINAL NUMBER. INCLUDE THIS TERMINAL NUMBER IN A
COMMAND LINE SUCH AS THIS:
13. • YOU SHOULD OBSERVE SOME CAUTIONS WHEN USING KILL TO END PROCESSES.
BEFORE YOU ATTEMPT TO KILL A PROCESS, YOU SHOULD ENSURE THAT YOU
HAVE CORRECTLY IDENTIFIED THE PROCESS ID (PID) YOU WISH TO KILL. IN THIS
“FAMILY” RELATIONSHIP THAT IS BUILT AS PROCESSES SPAWN OTHERS, YOU CAN
INADVERTENTLY KILL A PROCESS THAT IS THE PARENT OF THE ONE YOU WANT
TO KILL, AND LEAVE AN ORPHAN, OR-IN THE WORST CASE-A ZOMBIE (A
PROCESS THAT STILL APPEARS IN THE PROCESS TABLE AS THOUGH IT WERE
ACTIVE, BUT EITHER HAS BEEN KILLED OR HAS COMPLETED AND IS CONSUMING
NO RESOURCES).
14. CRON FACILITY
• THE CRON FACILITY IS A SYSTEM DAEMON THAT EXECUTES COMMANDS AT SPECIFIC TIMES. IT
IS SIMILAR IN SOME RESPECTS TO THE AT COMMAND (PREVIOUSLY DISCUSSED IN THIS
CHAPTER) BUT IS MUCH MORE USEFUL FOR REPETITIVE EXECUTION OF A PROCESS. THE
COMMAND AND SCHEDULE INFORMATION ARE KEPT IN THE DIRECTORY
/VAR/SPOOL/CRON/CRONTABS OR IN /USR/SPOOL/CRON/CRONTABS. EACH USER WHO IS
ENTITLED TO DIRECTLY SCHEDULE COMMANDS WITH CRON HAS A CRONTAB FILE. CRON
WAKES UP PERIODICALLY (USUALLY ONCE EACH MINUTE) AND EXECUTES ANY JOBS THAT ARE
SCHEDULED FOR THAT MINUTE. ENTRIES IN A CRONTAB FILE HAVE SIX FIELDS, AS SHOWN IN
THE FOLLOWING EXAMPLE. THE FIRST FIELD IS THE MINUTE THAT THE COMMAND IS TO RUN;
THE SECOND FIELD IS THE HOUR; THE THIRD, THE DAY OF THE MONTH; THE FOURTH, THE
MONTH OF THE YEAR; THE FIFTH, THE DAY OF THE WEEK; AND THE SIXTH IS THE COMMAND
STRING TO BE EXECUTED. ASTERISKS ACT AS WILDCARDS. IN THE CRONTAB EXAMPLE, THE
PROGRAM WITH THE PATHNAME /HOME/GATHER IS EXECUTED AND MAILED TO “MARYF”
EVERY DAY AT 6 P.M. THE PROGRAM /HOME/JAR/BIN/BACKUP IS EXECUTED EVERY DAY AT
2:30 A.M.
15. The crontab Command To make an addition in your crontab file, you use the crontab
command.
For example, you can schedule the removal of old files in your wastebasket with an entry like
this:
0 1 * * 0 cd /home/jar/.wastebasket; find . -atime +7 -exec /bin/rm -r {} 2> /dev/null ;
This entry says, “Each Sunday at 1 A.M., go to jar’s wastebasket directory and delete all files
that are more than 7 days old.” If you place this line in a file named wasterm, and issue the
command
$ crontab wasterm the line will be placed in your crontab file
16. PROCESS PRIORITIES
• PROCESSES ON A UNIX SYSTEM ARE SEQUENTIALLY ASSIGNED RESOURCES FOR
EXECUTION. THE KERNEL ASSIGNS THE CPU TO A PROCESS FOR A TIME SLICE;
WHEN THE TIME HAS ELAPSED, THE PROCESS IS PLACED IN ONE OF SEVERAL
PRIORITY QUEUES. HOW THE EXECUTION IS SCHEDULED DEPENDS ON THE
PRIORITY ASSIGNED TO THE PROCESS. SYSTEM PROCESSES HAVE A HIGHER
PRIORITY THAN ALL USER PROCESSES.
17. THE NICE COMMAND
• THE NICE COMMAND THE NICE COMMAND ALLOWS A USER TO EXECUTE A COMMAND WITH A
LOWER-THAN-NORMAL PRIORITY THE PROCESS THAT IS USING THE NICE COMMAND AND THE
COMMAND BEING RUN MUST BOTH BELONG TO THE TIME-SHARING SCHEDULING CLASS. THE
PRIOCNTL COMMAND, DISCUSSED LATER IN THIS CHAPTER, IS A GENERAL COMMAND FOR TIME-
SHARED AND REAL-TIME PRIORITY CONTROL. THE PRIORITY OF A PROCESS IS A FUNCTION OF ITS
PRIORITY INDEX AND ITS NICE VALUE. THAT IS, PRIORITY=PRIORITY INDEX+NICE VALUE.
• PRECEDING THE NORMAL COMMAND WITH THE NICE COMMAND. FOR EXAMPLE,
• THE COMMAND
• $ NICE PROOFIT
WILL RUN THE PROOFIT COMMAND WITH A PRIORITY VALUE REDUCED BY THE DEFAULT OF 10 UNITS.
THE COMMAND
$ NICE −19 PROOFIT
WILL REDUCE IT BY 19. THE INCREMENT PROVIDED TO NICE IS AN ARBITRARY UNIT, ALTHOUGH NICE
−19 WILL RUN SLOWER THAN NICE −9.
18. SLEEP COMMAND
• THE SLEEP COMMAND ANOTHER SIMPLE WAY TO AFFECT SCHEDULING IS WITH THE SLEEP COMMAND. THE SLEEP
COMMAND DOES NOTHING FOR A SPECIFIED TIME. YOU CAN HAVE A SHELL SCRIPT SUSPEND OPERATION FOR A
PERIOD BY USING SLEEP. THE COMMAND SLEEP TIME INCLUDED IN A SCRIPT WILL DELAY FOR TIME SECONDS. YOU
CAN USE SLEEP TO CONTROL WHEN A COMMA. YOU CAN ALSO USE SLEEP WITHIN A SHELL PROGRAM TO
REGULARLY EXECUTE A COMMAND. THE SCRIPT
• $ (WHILE TRUE
• > DO
• > SLEEP 600
• > FINGER BARBARA
• >DONE)
• & CAN BE USED TO WATCH WHETHER THE USER BARBARA IS LOGGED ON EVERY TEN MINUTES. SUCH A SCRIPT CAN
BE USED TO DISPLAY IN ONE WINDOW (IN A WINDOW ENVIRONMENT SUCH AS X) WHILE YOU REMAIN ACTIVE IN
ANOTHER WINDOW. ND IS RUN, AND TO REPEAT A COMMAND AT REGULAR INTERVALS
19. WAIT COMMAND
• THE WAIT COMMAND WHEN A SHELL USES THE SYSTEM CALL FORK TO CREATE A
CHILD PROCESS, IT SUSPENDS OPERATION AND WAITS UNTIL THE CHILD PROCESS
TERMINATES. WHEN A JOB IS RUN IN THE BACKGROUND, THE SHELL CONTINUES TO
OPERATE WHILE OTHER JOBS ARE BEING RUN. OCCASIONALLY, IT IS IMPORTANT IN
SHELL SCRIPTS TO BE ABLE TO RUN SIMULTANEOUS PROCESSES AND WAIT FOR THEIR
CONCLUSION BEFORE PROCEEDING WITH OTHER COMMANDS. THE WAIT COMMAND
ALLOWS THIS DEGREE OF SCHEDULING CONTROL WITHIN SHELL SCRIPTS, AND YOU
CAN HAVE SOME COMMANDS RUNNING SYNCHRONOUSLY AND OTHERS RUNNING
ASYNCHRONOUSLY. FOR EXAMPLE, THE SEQUENCE COMMAND1 > FILE1 &
COMMAND2 > FILE2 & WAIT SORT FILE1 FILE2 RUNS THE TWO COMMANDS
SIMULTANEOUSLY IN THE BACKGROUND. IT WAITS UNTIL BOTH BACKGROUND
PROCESSES TERMINATE, AND THEN IT SORTS THE TWO OUTPUT FILES.
20. SYSTEM ACCOUNTS
• SYSTEM ACCOUNTS ARE THOSE NEEDED FOR THE OPERATION OF SYSTEM-SPECIFIC
COMPONENTS FOR EXAMPLE MAIL ACCOUNTS AND THE SSHD ACCOUNTS. THESE ACCOUNTS
ARE USUALLY NEEDED FOR SOME SPECIFIC FUNCTION ON YOUR SYSTEM, AND ANY
MODIFICATIONS TO THEM COULD ADVERSELY AFFECT THE SYSTEM.
• USER ACCOUNTS
• USER ACCOUNTS PROVIDE INTERACTIVE ACCESS TO THE SYSTEM FOR USERS AND GROUPS OF
USERS. GENERAL USERS ARE TYPICALLY ASSIGNED TO THESE ACCOUNTS AND USUALLY HAVE
LIMITED ACCESS TO CRITICAL SYSTEM FILES AND DIRECTORIES.
• UNIX SUPPORTS A CONCEPT OF GROUP ACCOUNT WHICH LOGICALLY GROUPS A NUMBER OF
ACCOUNTS. EVERY ACCOUNT WOULD BE A PART OF ANOTHER GROUP ACCOUNT. A UNIX
GROUP PLAYS IMPORTANT ROLE IN HANDLING FILE PERMISSIONS AND PROCESS MANAGEMENT.
21. MANAGING USERS AND GROUPS
• THERE ARE FOUR MAIN USER ADMINISTRATION FILES −
• /ETC/PASSWD − KEEPS THE USER ACCOUNT AND PASSWORD INFORMATION.
THIS FILE HOLDS THE MAJORITY OF INFORMATION ABOUT ACCOUNTS ON THE
UNIX SYSTEM.
• /ETC/SHADOW − HOLDS THE ENCRYPTED PASSWORD OF THE CORRESPONDING
ACCOUNT. NOT ALL THE SYSTEMS SUPPORT THIS FILE.
• /ETC/GROUP − THIS FILE CONTAINS THE GROUP INFORMATION FOR EACH
ACCOUNT.
• /ETC/GSHADOW − THIS FILE CONTAINS SECURE GROUP ACCOUNT
INFORMATION.
22. S.no. Name and description
1 useradd
Adds accounts to the
system
2 usermod
Modifies account attributes
3 userdel
Deletes accounts from the
system
4 groupadd
Adds groups to the system
5 groupmod
Modifies group attributes
23. CREATE A GROUP
• WE WILL NOW UNDERSTAND HOW TO CREATE A GROUP. FOR THIS, WE NEED TO
CREATE GROUPS BEFORE CREATING ANY ACCOUNT OTHERWISE, WE CAN MAKE USE
OF THE EXISTING GROUPS IN OUR SYSTEM. WE HAVE ALL THE GROUPS LISTED IN
/ETC/GROUPS FILE.
• ALL THE DEFAULT GROUPS ARE SYSTEM ACCOUNT SPECIFIC GROUPS AND IT IS NOT
RECOMMENDED TO USE THEM FOR ORDINARY ACCOUNTS. SO, FOLLOWING IS THE
SYNTAX TO CREATE A NEW GROUP ACCOUNT −
• GROUPADD [-G GID [-O]] [-R] [-F] GROUPNAME
24. Sr.No. Option & Description
1 -g GID
The numerical value of the group's ID
2 -o
This option permits to add group with
non-unique GID
3 -r
This flag instructs groupadd to add a
system account
4 -f
This option causes to just exit with
success status, if the specified group
already exists. With -g, if the specified
GID already exists, other (unique) GID is
chosen
5 groupname
Actual group name to be created
25. MODIFY A GROUP
• TO MODIFY A GROUP, USE THE GROUPMOD SYNTAX −
• $ GROUPMOD -N NEW_MODIFIED_GROUP_NAME OLD_GROUP_NAME
• TO CHANGE THE DEVELOPERS_2 GROUP NAME TO DEVELOPER, TYPE −
• $ GROUPMOD -N DEVELOPER DEVELOPER_2
• HERE IS HOW YOU WILL CHANGE THE FINANCIAL GID TO 545 −
• $ GROUPMOD -G 545 DEVELOPER
26. CREATE AN ACCOUNT
• LET US SEE HOW TO CREATE A NEW ACCOUNT ON YOUR UNIX SYSTEM.
FOLLOWING IS THE SYNTAX TO CREATE A USER'S ACCOUNT −
• USERADD -D HOMEDIR -G GROUPNAME -M -S SHELL -U USERID ACCOUNTNAME
27. Sr.
No
.
Option & Description
1 -d homedir
Specifies home directory for the account
2 -g groupname
Specifies a group account for this account
3 -m
Creates the home directory if it doesn't exist
4 -s shell
Specifies the default shell for this account
5 -u userid
You can specify a user id for this account
6 accountname
Actual account name to be created
28. DELETE AN ACCOUNT
• THE USERDEL COMMAND CAN BE USED TO DELETE AN EXISTING USER. THIS IS A VERY
DANGEROUS COMMAND IF NOT USED WITH CAUTION.
• THERE IS ONLY ONE ARGUMENT OR OPTION AVAILABLE FOR THE COMMAND .R, FOR
REMOVING THE ACCOUNT'S HOME DIRECTORY AND MAIL FILE.
• FOR EXAMPLE, TO REMOVE ACCOUNT MCMOHD20, ISSUE THE FOLLOWING COMMAND −
• $ USERDEL -R MCMOHD20
29. DELETE A GROUP
• WE WILL NOW UNDERSTAND HOW TO DELETE A GROUP. TO DELETE AN EXISTING
GROUP, ALL YOU NEED IS THE GROUPDEL COMMAND AND THE GROUP NAME.
TO DELETE THE FINANCIAL GROUP, THE COMMAND IS −
• $ GROUPDEL DEVELOPER
• THIS REMOVES ONLY THE GROUP, NOT THE FILES ASSOCIATED WITH THAT
GROUP. THE FILES ARE STILL ACCESSIBLE BY THEIR OWNERS.
30. RESOURCES
• UNIX HAS FOLLOWING MAJOR RESOURCE TYPES THAT NEED TO BE MONITORED AND
TUNED −
• CPU
• MEMORY
• DISK SPACE
• COMMUNICATIONS LINES
• I/O TIME
• NETWORK TIME
• APPLICATIONS PROGRAMS
31. • USER STATE CPU
• THE ACTUAL AMOUNT OF TIME THE CPU SPENDS RUNNING THE USERS’
PROGRAM IN THE USER STATE. IT INCLUDES THE TIME SPENT EXECUTING
LIBRARY CALLS, BUT DOES NOT INCLUDE THE TIME SPENT IN THE KERNEL ON ITS
BEHALF
32. • SYSTEM STATE CPU
• THIS IS THE AMOUNT OF TIME THE CPU SPENDS IN THE SYSTEM STATE ON
BEHALF OF THIS PROGRAM. ALL I/O ROUTINES REQUIRE KERNEL SERVICES. THE
PROGRAMMER CAN AFFECT THIS VALUE BY BLOCKING I/O TRANSFERS
33. • I/O TIME AND NETWORK TIME
• THIS IS THE AMOUNT OF TIME SPENT MOVING DATA AND SERVICING I/O
REQUESTS
34. • VIRTUAL MEMORY PERFORMANCE
• THIS INCLUDES CONTEXT SWITCHING AND SWAPPING
35. • APPLICATION PROGRAM
• TIME SPENT RUNNING OTHER PROGRAMS - WHEN THE SYSTEM IS NOT
SERVICING THIS APPLICATION BECAUSE ANOTHER APPLICATION CURRENTLY HAS
THE CPU
36. PERFORMANCE TOOLS
• PERFORMANCE TOOLS
• UNIX PROVIDES FOLLOWING IMPORTANT TOOLS TO MEASURE AND FINE TUNE
UNIX SYSTEM PERFORMANCE −
37. PERFORMANCE TOOLS
Sr.No. Command & Description
1 nice/renice
Runs a program with modified
scheduling priority
2 netstat
Prints network connections, routing
tables, interface statistics,
masquerade connections, and
multicast memberships
3 time
Helps time a simple command or
give resource usage
4 uptime
This is System Load Average
5 ps
Reports a snapshot of the current
processes
6 vmstat
Reports virtual memory statistics
7 gprof
Displays call graph profile data
8 prof
Facilitates Process Profiling
9 top
Displays system tasks
38. WHAT IS X-WINDOW
• THE X WINDOW SYSTEM (X11) IS AN OPEN SOURCE, CROSS PLATFORM, CLIENT-
SERVER COMPUTER SOFTWARE SYSTEM THAT PROVIDES A GUI IN A DISTRIBUTED
NETWORK ENVIRONMENT. USED PRIMARILY ON UNIX VARIANTS, X VERSIONS ARE
ALSO AVAILABLE FOR OTHER OPERATING SYSTEMS. FEATURES OF THE X WINDOW
SYSTEM INCLUDE NETWORK TRANSPARENCY, THE ABILITY TO LINK TO DIFFERENT
NETWORKS, AND CUSTOMIZABLE GRAPHICAL CAPABILITIES. THE X WINDOW SYSTEM
WAS FIRST DEVELOPED IN 1984, AS PART OF PROJECT ATHENA, COLLABORATION
BETWEEN STANFORD UNIVERSITY AND MIT. X.ORG FOUNDATION, AN OPEN GROUP,
MANAGES THE DEVELOPMENT AND STANDARDIZATION OF THE X WINDOW SYSTEM.
• THE X WINDOW SYSTEM IS ALSO KNOWN SIMPLY AS X, X11 OR X WINDOWS.
39. WHAT IS X-WINDOW
• THE X WINDOW SYSTEM WAS THE RESULT OF RESEARCH EFFORTS IN THE EARLY
1980S AT STANFORD UNIVERSITY AND MIT, AIDED BY IBM, TO DEVELOP A
PLATFORM-INDEPENDENT GRAPHICS PROTOCOL. THE X WINDOW SYSTEM IS AN
OPEN STANDARD THAT IS MANAGED BY THE X.ORG CONSORTIUM. ALTHOUGH
MICROSOFT HAS ITS OWN PLATFORM-DEPENDENT WINDOWING SYSTEM (AN
INTEGRAL PART OF THE WINDOWS 95/98/NT OPERATING SYSTEMS), THERE ARE
VENDOR-SUPPLIED X WINDOWS PRODUCTS THAT CAN BE INSTALLED TO RUN ON
THESE SYSTEMS.
40. THANKS!!!
• UNIX AND SHELL PROGRAMMING: A TEXTBOOK BEHROUZ A.
FOROUZAN, RICHARD F. GILBERG
• INTRODUCTION TO UNIX AND SHELL PROGRAMMING BOOKS.GOOGLE.CO.IN ›
BOOKS
• M. G. VENKATESHMURTHY
• TUTORIAL POINT