Process management in Minix1 Processes Process is a program in execution. Program is a static entity while process is an active entity. Process Control.

Slides:



Advertisements
Similar presentations
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Advertisements

 2004 Deitel & Associates, Inc. All rights reserved. 1 Chapter 3 – Process Concepts Outline 3.1 Introduction 3.1.1Definition of Process 3.2Process States:
Process Description and Control Module 1.0. Major Requirements of an Operating System Interleave the execution of several processes to maximize processor.
Process Description and Control Chapter 3. Major Requirements of an Operating System Interleave the execution of several processes to maximize processor.
1 UNIX 1 History of UNIX 2 Overview of UNIX 3 Processes in UNIX 4 Memory management in UNIX 5 The UNIX file system 6 Input/output in UNIX.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
Introduction to Kernel
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
CSCE 351: Operating System Kernels
3.5 Interprocess Communication
OS Spring’03 Introduction Operating Systems Spring 2003.
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
Minix Overview & System Call Implementation Sankara Narayanan. CSE 785 Computer Security, Syracuse University, NY Spring 2003 – 2004.
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Linux Operating System
MINIX Operating System Presented by: Pravendra Lohiya.
Operating Systems (CSCI2413) Lecture 3 Processes phones off (please)
Process Description and Control A process is sometimes called a task, it is a program in execution.
Using Two Queues. Using Multiple Queues Suspended Processes Processor is faster than I/O so all processes could be waiting for I/O Processor is faster.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
System Calls 1.
Minix Jeff Ward, Robert Burghart, Jeb Collins, Joe Creech.
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007.
Implementing Processes and Process Management Brian Bershad.
Introduction to Operating Systems Chapter 1. cs431 -cotter2 Lecture Objectives Understand the relationship between computing hardware, operating system,
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview Part 2: History (continued)
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Threads G.Anuradha (Reference : William Stallings)
LINUX System : Lecture 7 Bong-Soo Sohn Lecture notes acknowledgement : The design of UNIX Operating System.
Processes and Process Control 1. Processes and Process Control 2. Definitions of a Process 3. Systems state vs. Process State 4. A 2 State Process Model.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
UNIX Unit 1- Architecture of Unix - By Pratima.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
Process Description and Control Chapter 3. Source Modified slides from Missouri U. of Science and Tech.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
MINIX 3 – Introduction Béat Hirsbrunner Lecture 1, 18 September 2012 Main reference Andrew S. Tanenbaum, Albert S. Woodhull Operating Systems : Design.
MINIX Presented by: Clinton Morse, Joseph Paetz, Theresa Sullivan, and Angela Volk.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
WORKING OF SCHEDULER IN OS
Introduction to Operating Systems Concepts
Introduction to Kernel
Interrupts and signals
CS 6560: Operating Systems Design
Protection of System Resources
Operating Systems: A Modern Perspective, Chapter 6
CS703 - Advanced Operating Systems
KERNEL ARCHITECTURE.
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION Third Edition ANDREW S
More examples How many processes does this piece of code create?
CS 143A Quiz 1 Solution.
Mid Term review CSC345.
Process Description and Control
Lecture Topics: 11/1 General Operating System Concepts Processes
Linux Architecture Overview.
Introduction to Operating Systems
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Operating Systems: A Modern Perspective, Chapter 6
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
Presentation transcript:

Process management in Minix1 Processes Process is a program in execution. Program is a static entity while process is an active entity. Process Control Block (PCB) is a data structure that holds essential process information. Process table is and array or link list of PCBs.

Process management in Minix2 The Internal Structure of Minix Minix is structured in four layers. User processes (Init) Server processes (MM, FS) I/O tasks and system task (Disk task) Process management

Process management in Minix3 Process Management Bottom layer of the structure. Catches hardware interrupts and software traps. Performs scheduling. Handles messages between processes (checks for protection, locates send and receive buffers, copies messages between senders and receiver’s buffers.)

Process management in Minix4 I/O Tasks (Drivers) Second layer from the bottom. There is one task per device type. Example of tasks are:disk tasks, printer tasks, terminal tasks, etc.. There is one special task: system task. System task provides for communication of MM and FS with the kernel and its data structures.

Process management in Minix5 The Kernel The layer 1 and 2 code (the process management code and the tasks) are linked together into a single binary program called the kernel.

Process management in Minix6 Server Processes Third layer from the bottom. Provide useful services to the user processes such as MM (Memory Management) and FS (File system). Less privileged than the process management and the tasks

Process management in Minix7 Memory Manager Memory manager carries out all the Minix system calls that involve memory management. E.g. FORK EXEC BRK

Process management in Minix8 File System File system carries out all the Minix file system calls. E.g. READ/WRITE MOUNT CHDIR

Process management in Minix9 Servers As User Processes Servers run at the same privilege level as user processes but at higher priority. Q: What is the difference between the privilege and priority?

Process management in Minix10 Server’s Characteristics They start when the system starts. They never terminate when the system is active. To accommodate a new server the kernel must be recompiled. The kernel startup code installs the servers in the higher priority slots of process table before any user processes are allowed to run.

Process management in Minix11 Processes Management in Minix All user processes in the system are descendants of a process called init. The Minix boot program loads into memory: the kernel the memory nanager the fisle syetm and init (the first user process)

Process management in Minix12 Init execution steps Init executes the following steps: –reads the file /etc/ttytab to find all potential login terminals –forks off a child process for each terminal –each child executes usr/bin/getty which prints a message and waits for a name to be typed –usr/bin/login is called with the name as its argument –after a successful login /bin/login executes user’s shell specifies in etc/passwd file.

Process management in Minix13 Interprocess Communication Processes communicate in Minix via message passing. Three primivites are provided for sending and receiving messages: –send (dest, &message) –receive(source, &message) –send_rec(src_dst, &message)

Process management in Minix14 Send send (dest, &message) Is used to send a message to process dest. The second parameter: &message is the address of the message data.

Process management in Minix15 Receive receive(source, &message) Is used to receive a message from process source. The second parameter: &message is the address of the message data to be received.

Process management in Minix16 Send and Receive send_rec(src_dst, &message) Is used to send a message and wait for a reply form the same process. The replay overwrites the original message.

Process management in Minix17 Synchronous and Asynchronous Message Passing When a process sends a message to a process that is not currently waiting to receive the message, the sender blocks until the destination does RECEIVE. Q. WHY? Q. What is the difference between synchronous and asynchronous message passing?

Process management in Minix18 Process Scheduling in Minix Minix uses multilevel queue scheduling algorithm. There are three levels corresponding to layers 2, 3 and 4 of the Minix structure Tasks and server processes run until they block (FCFS). User processes use Round Robin with quantum 100 msec.

Process management in Minix19 Minix Source Code Organization Source code is organized in two directories: /usr/include and usr/src /usr/include directory contain: –sys/ : contains additional POSIX headers –minix/: includes header files used by Minix –ibm/: includes header files with IBM PC specific definitions

Process management in Minix20 Src/ directory Scr/ directory contains: –kernel/ : layers 1 and 2 of Minix –mm/: the code for memory manager –fs/ : the code for the file system –lib/ : the source code for library procedures –tools/:the source code for the init program –boot/: the source code for booting and installing Minix.

Process management in Minix21 Minix Executable When Minix is compiled all source codes in src/kernel/, src/mm/ and src/fs/ are compiled to object files. All the object files in src/kernel/ are linked together to form a single executable program, kernel. The object files in src/mm/ and in src/fs/ are linked respectively to form mm and fs.

Process management in Minix22 Process header files src/kernel/kernel.h –defines macros _POSIX SOURCE, _MINIX. _SYSTEM –includes other header files – a lot of other files may share a large number of definitions by including kernel.h

Process management in Minix23 const.h –contains a number of machine dependent values such as interrupt vectors –contains machine independent values such as priorities of scheduling queues. type.h –defines several prototypes and structures used in any implementation of Minix and some machine dependent values

Process management in Minix24 proto.h –all functions that must be know outside of of the file in which they are defined are in this file glo.h –all kernel global variables are defined here

Process management in Minix25 Proc.h –defines a process table entry as proc. –Defines process table as proc[NR_TASKS+NR_PROCS] Question: –What are the values of NR_TASK and NR_PROCS? –Look at include/minix/const.h and include/minic/config.h

Process management in Minix26 protect.h –defines values very specific to the protected mode of the Intel Processor architectures.

Process management in Minix27 How to Backup the Kernel –Login as bin –In bin’s home directory /usr/src do !cpdir kernel kernelBackup

Process management in Minix28 How To Restore the Kernel !cpdir kernel_backup kernel !rm kernel/*.o !cd tools !make hdboot !shutdown

Process management in Minix29 How to Compile the Kernel Log in to as bin Change directory to tools Run make hdboot

Process management in Minix30 How to boot from an older (correct) version of Minix). Use the “image” variable of the boot monitor. For example: –hd1> image=minix/2.0.0 –hd1> boot After correcting the problem and recompiling the kernel you may instruct the monitor to pick the most recent version by typing. –Hd1> unset image –hd1> boot