Recents in Beach

System calls


Previous                                                          Next⏩



System calls provide the interface between a process & the OS. 
These are usually available in the form of assembly language instruction. 
Some systems allow system calls to be made directly from a 
high level language program like C, BCPL and PERL etc. 
systems calls occur in different ways depending on the computer in use

System calls can be roughly grouped into 5 major categories. 







1. Process Control: 

• End, abort: 
          A running program needs to be able to has its execution either normally
            (end) or abnormally (abort). 
• Load, execute:
          A process or job executing one program may want to load and executes

          another program. 
• Create Process, terminate process: 
          There is a system call specifying for the purpose of creating a new process or job (create process or submit job).
 We may want to terminate a job or process that we created (terminates
 process, if we find that it is incorrect or no longer 
needed).  
• Get process attributes, set process attributes:
          If we create a new job or process we should able to control its execution.
 This control requires the ability to determine & reset the attributes of a job or processes (get process attributes, set process attributes). 

• Wait time: 
         After creating new jobs or processes, we may need to wait for them to finish their execution (wait time).  
• Wait event, signal event: 
         We may wait for a specific event to occur (wait event).
  The jobs or processes then signal when that event has occurred (signal event).  

2. File Manipulation: 

• Create file, delete file:
            We first need to be able to create & delete files.
 Both the system calls require the name of the file & some of its attributes. 

• Open file, close file:
           Once the file is created, we need to open it & use it. 
 We close the file when we are no longer using it.  
• Read, write, reposition file: 
           After opening, we may also read, write or reposition the file 
(rewind or skip to the end of the file).  
• Get file attributes, set file attributes:
          For either files or directories, we need to be able to  determine the values of various attributes & reset them if necessary. 
 Two system calls get file attribute & set file attributes are required for their purpose. 

3. Device Management: 

• Request device, release device:
      If there are multiple users of the system, we first request the device. After we finished with the device, we must release it.  
• Read, write, reposition: 
      Once the device has been requested & allocated to us, we can read, 
write & reposition the device. 

4. Information maintenance: 

• Get time or date, set time or date:
       Most systems have a system call to return the current date & time or set the current date & time.  
• Get system data, set system data:
           Other system calls may return information about the 
system like number of current users, version number of OS, amount of free memory etc.  
• Get process attributes, set process attributes: 
             The OS keeps information about all its processes & there are system calls to access this information. 

5. Communication: 

            There are two modes of communication such as: 
• Message passing model: 
                 Information is exchanged through an inter process 
communication facility provided by operating system. Each computer in a network has a name by which it is known. Similarly, each process has a process name which is translated to an equivalent identifier by which the OS can refer to it. 
The recipient process must give its permission for communication to take place with an accept connection call. 
The source of the communication known as client & receiver known as 
server exchange messages by read message & write message system calls.
 The close connection call terminates the connection.  
• Shared memory model:  
         processes use map memory system calls to access regions of 
memory owned by other processes. 
They exchange information by reading & writing data in the shared areas. The processes ensure that they are not writing to the same location 
simultaneously.



Previous                                                          Next⏩

  1. What is an Operating System ?
  2. Discuss the structure off OS ?
  3. Explain type of OS?
  4. Explain Function of OS?
  5. Explain OS Services ?
  6. What do mean by system call ?List different type ofsystem call available ?

  1. what is process ? and Characteristics ?
  2. What is different process state? explain the same in details?
  3. write short note on user level and kernal level threads?
  4. explain what is thread and its type ?
  5. explain scheduler ? (short term,medium term,and long term)
  6. state and explain scheduling criteria ?
  7. Explain scheduling algorithm ? [ FCFS,SJF,PRIORITY,ROUND ROBINE.]    

  1. What is process synchronization ? explain critical section problem and race condition ?
  2. what is Race Condition ?
  3. what is critical section problem?
  4. explain classical problem of synchronization?
  5. explain bounded - buffer problem?
  6. explain reader - writer problem ?
  7. explain Dining Philosophers Problem ?
  8. explain semaphores ? its type ?

  1.  What is deadlock ?
  2. What are the 4 condition to produce deadlock ?
  3. explain methods of handling deadlock ?
  4. explain in detail deadlock prevention ?
  5. write short note on deadlock avoidance ?
  6. explain deadlock detection ? 
  7. explain Banker algorithm with example ? 

Post a Comment

0 Comments