SlideShare a Scribd company logo
Advanced Operating System
(Programming Assignment #1)




Teacher’s Name                   Nabeel Sabir Khan
Student Name                     Farhan Ali
Student Reg.No                   L1S09MSCS0003




University Of Central Punjab
Faculty of Computer Sciences (PICS)
1. PCB
     I.   Process Id (The id of the process to which it belongs to)

    II.   User Id (The Owner of the process who initialize the process)

   III.   Address Space

              a) Program Code (All the code of that is to be executed is placed here. A pointer
                 called PC points it in the core memory)

              b) Static Data

              c) Heap

              d) Stack

              Both heap and stack extends in the opposite directions. There is a pointer SP that
              points to the Stack.



   IV.    Open Files (Keep the information that a particular process is using in its execution and
          also shared by the child of that process)

    V.    Memory management information

   VI.    Privileged Information (Access that a particular process has)

  VII.    Scheduling priorities

  VIII.   Recourses information (All the resources which is occupy by this process)




2. Process Creation & Management
     I.   fork(), vfork() (used for the creation of a process)

    II.   wait() (used by a parent process to wait until its child has finish its execution)

   III.   exec() (used by a process to run another program into it)

   IV.    read(), write() (used by process to read and write data from memory or from
          some shared media)
V.    pipe() (used to create a inter-process channel that is shared by different
            processes.)

      VI.   exit() (used to terminate a process)

   VII.     kill() (forcefully terminates the process of another process)

  VIII.     getpid(), getppid() (used to get the process id and parent process id respectively)



3. C-Program
  Void main(){

            cout<<”Enter the depth of the tree”;

            int tree_depth;

            cin>>tree_depth;

            main_process = fork();

            if(main_process == 0){

                   cout<<”Process Id is”<<getpid()<<” and parent id is ”<<getppid();

                   for(int i=1; i<=tree_depth; i++){

                   }

            }

  }

More Related Content

PPTX
Unix- the process
DOCX
test questions
PPTX
Tutorial netvibes facebook
PPTX
Media evaluation (1)
PDF
Online Income Done Right!
PPTX
Photoshoot powerpoint
PPTX
Final contrustion powerpoint
DOCX
Mychurch File Upload
Unix- the process
test questions
Tutorial netvibes facebook
Media evaluation (1)
Online Income Done Right!
Photoshoot powerpoint
Final contrustion powerpoint
Mychurch File Upload

Similar to Mychurch File Upload (20)

PPTX
Lecture_Slide_4.pptx
PPTX
Operating systems Lab program: to develop C program to implement process mana...
PDF
Lecture2 process structure and programming
PDF
Os lab final
PPTX
Process management
PPT
process creation OS
PPT
Lect3 process
PPTX
Advanced Operating Systems......Process Management
PPT
11_UNIX_Processes_Including_Select.ppt
PPTX
04_ForkPipe.pptx
PPT
Chapter 02 modified
PPT
Operating System 3
PPTX
Operating Systems
PDF
3 process management
PDF
CH03.pdf
PDF
Chap01 objectivequestionsemsys2enew
PPTX
Lecture 5 process concept
PDF
UNIT-2-Process-Management.pdf
PDF
Processes in unix
PPTX
Chapter -2 Operating-System and its Structures
Lecture_Slide_4.pptx
Operating systems Lab program: to develop C program to implement process mana...
Lecture2 process structure and programming
Os lab final
Process management
process creation OS
Lect3 process
Advanced Operating Systems......Process Management
11_UNIX_Processes_Including_Select.ppt
04_ForkPipe.pptx
Chapter 02 modified
Operating System 3
Operating Systems
3 process management
CH03.pdf
Chap01 objectivequestionsemsys2enew
Lecture 5 process concept
UNIT-2-Process-Management.pdf
Processes in unix
Chapter -2 Operating-System and its Structures
Ad

More from Joe Suh (20)

DOCX
Mychurch File Upload
DOCX
Mychurch File Upload
PPT
Mychurch File Upload
DOCX
Mychurch File Upload
PDF
Mychurch File Upload
DOC
test
TXT
Mychurch File Upload
PDF
Mychurch File Upload
TXT
Mychurch File Upload
TXT
Mychurch File Upload
DOCX
Mychurch File Upload
TXT
Mychurch File Upload
TXT
Mychurch File Upload
TXT
Mychurch File Upload
TXT
Mychurch File Upload
PPT
Mychurch File Upload
TXT
Mychurch File Upload
PDF
Mychurch File Upload
PDF
Mychurch File Upload
TXT
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
test
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Mychurch File Upload
Ad

Mychurch File Upload

  • 1. Advanced Operating System (Programming Assignment #1) Teacher’s Name Nabeel Sabir Khan Student Name Farhan Ali Student Reg.No L1S09MSCS0003 University Of Central Punjab Faculty of Computer Sciences (PICS)
  • 2. 1. PCB I. Process Id (The id of the process to which it belongs to) II. User Id (The Owner of the process who initialize the process) III. Address Space a) Program Code (All the code of that is to be executed is placed here. A pointer called PC points it in the core memory) b) Static Data c) Heap d) Stack Both heap and stack extends in the opposite directions. There is a pointer SP that points to the Stack. IV. Open Files (Keep the information that a particular process is using in its execution and also shared by the child of that process) V. Memory management information VI. Privileged Information (Access that a particular process has) VII. Scheduling priorities VIII. Recourses information (All the resources which is occupy by this process) 2. Process Creation & Management I. fork(), vfork() (used for the creation of a process) II. wait() (used by a parent process to wait until its child has finish its execution) III. exec() (used by a process to run another program into it) IV. read(), write() (used by process to read and write data from memory or from some shared media)
  • 3. V. pipe() (used to create a inter-process channel that is shared by different processes.) VI. exit() (used to terminate a process) VII. kill() (forcefully terminates the process of another process) VIII. getpid(), getppid() (used to get the process id and parent process id respectively) 3. C-Program Void main(){ cout<<”Enter the depth of the tree”; int tree_depth; cin>>tree_depth; main_process = fork(); if(main_process == 0){ cout<<”Process Id is”<<getpid()<<” and parent id is ”<<getppid(); for(int i=1; i<=tree_depth; i++){ } } }