Showing posts from March, 2015
virtualfs.py 1: import shelve 2: import os,sys 3: fs=shelve.open('myfilesystem.fs', writeback=True) 4: current_dir=[] 5: def install(fs): 6: uname=raw_input("Enter user name : ") 7: fs[""]={&q…
e2fsck.py #make sure to run the program from home directry only #>> 1. no directry named 'mount' is present in the working home directry #>> 2. for the user right option , only go if many users are created for the #>> ma…
GRUB.cpp #include "stdio.h" #include "stdlib.h" #include "unistd.h" #include "fcntl.h" #include "iostream" #include "iomanip" using namespace std; struct partition { unsigned char boo…
boot.py import os if(os.path.exists("/boot/efi")): print "System is booted with UEFI" else: print "System is booted with lagecy boot"
inode.cpp 1: #include"iostream" 2: #include"stdio.h" 3: #include"stdlib.h" 4: #include"sys/types.h" 5: #include"sys/stat.h" 6: #include"time.h" 7: using namespace s…
What is the difference between the terms concurrent and parallel execution? What is Thread in java? All Java programs have at least one thread, known as the main thread, which is created by the JVM at the program’s start, when the m…
server.py 1: #!/usr/bin/python 2: import socket 3: s = socket.socket() 4: print 'Server Name : ', #socket.gethostbyaddr('127.0.0.1') 5: s.bind(('127.0.0.1', 1234)) 6: s.listen(…
1: #include"iostream" 2: #include"cstring" 3: #include"stdlib.h" 4: #include"unistd.h" 5: #include"sys/types.h" 6: using namespace std; 7: int main() 8: { 9: int fd[2]; …